re Electron installation/deployment

Hi , 

i go to the \TMS WEB Core Demos\Electron\WebCamera folder and did the
npm install , and after installed , the node_modules was created and found.

1. after i compiled , (F9) , the camera app window display , but when i clicked
on start/resume , nothing happened , pls advice , is it because i run it in
a Virtual environment ?
(my delphi 10.2 , win7pro , windows running in VM Fusion. )

2, pls let me know, whether the electron can be installed globally or only in the
    development folder ?

3. do we need to npm install electron in 
    the WebCamera\TMSWeb\Build-Win32 ?

4. for deployment to a Pc , 
    do we need to install NPM and also Electron or we will 
    only copy whatever inside the Build-Win32 will do ? 

Hello,


You don't need to call npm install in the demo folder if you don't want to work with a local copy of Electron. See 2) for a more detailed answer.

1) Virtual Machines can cause such issues, we have encountered that ourselves as well. You can easily track down the issue:
Launch a default camera application if available, or download one if you don't have any. With that you can check if you can access your camera within your virtual environment. If you cannot use your camera, then you are probably missing some additional settings or an addon/package. The VM's website (or a Google search) probably contains information regarding to configuring cameras and other USB devices.

2) Yes you can, and it's advised to do so, as multiple local copies can add up really quickly in disk space. When you compile the application, in the background it's checking if Electron is available and if it's not, then it's going to install it globally. So if you remove/uninstall Electron from the demo folder, it should be fine. If for some reason it won't install, then let us know.
You can also install Electron yourself globally via the command line, but I strongly recommend to specify a version too as we have not yet tested the newly released v.5.0.0. Our minimal requirement is 3.1.3, so you can use:
npm install -g electron@3.1.3

3) Not if Electron was globally installed. 

4) Under Build-Win32 you will find a folder named {ProjectName}-win32-ia32 which is the packaged application. You can copy that and it should be sufficient in itself. If your application is for distribution, it's recommended to sign it. You can also find several tools made for Electron if you want to create an installer from your packaged application.

Tunde Keller2019-04-25 11:50:32