I have built a small electron app in Linux to be used on Windows, installed Wine and packaged up with electron-packager and built install files with electron-wininstaller. But I am stuck with how I can install on a windows os. Any help appreciated.
What happens when you try to install it?
Hello Damned Scholar. Have got it running in Windows but confused by all the different files for the setup and install so am unsure what to give a client:/
What files did you need to get it running?
I just zipped up the win32-ia32 folder. Uploaded to google drive in Linux. Went to my Windows os and then downloaded from google drive. Then I extracted all files from zip. Ran the .exe (file with icon), pinned to task bar. Fairly straight forward but the file is too big I think, at just over 61.mb. I understand after reading so much about this why this is so - I just do not know if I want a user to have to download an app that size that actually only does one thing (client choice).
As an adage to that and as this was really a trial release (my first ever) I didn’t purchase/use a code signed certificate as client not keen to spend much. Personally having a code signed cert would definitely make the end user feel a lot more comfortable and re-assured in using the app. Even though I made the app I felt uncomfortable downloading and running because of the warnings from Windows etc:
Electron packages a library from Chrome along with Node and it will always have a certain minimum size. You can’t get around that.
Yes I have been reading up on that. Will see if I can make the app any leaner some other way. Thanks for your support.
Well, if you don’t need NodeJS then you could achieve a HTML interface by using CEF (https://bitbucket.org/chromiumembedded/cef) along with something such as Python. I guess that will reduce the size of it, but the caveat is you won’t have all the useful bits that have been put into Electron to help with cross-platform consistency. For example, if you use desktop notifications then you’d have to reimplement that in Python or C, or use a library.
If you want a really lean app then you’d have to use GTK, Qt or native Win APIs.
Thanks for your info. However I did say leaner not lean. I have managed to get it down from 61 to 41mb.
How did you do that?
By the way, I changed my mind about suggesting CEF could be smaller. I managed to find a good source of CEF & Python stuff last night and one “hello world” example app showed the Chromium library alone is 110 MB and then when you add up all the other supporting files it grows to 186 MB for the complete package!
I think the problem is modern browsers now are essentially mini operating systems in their own right. The only way I can see around that is if Chromium or Gecko were fragmented into dozens of components so you could pack only the parts related to the web technologies and APIs that you are actually using in your app. Other than that, I think the bloat is here to stay.
I love the compactness of natively coded apps, but I also love using web technologies on the front-end (especially if the app can make use of some of the various Web APIs available in browsers) so I think I shall be going the more bloated route for the foreseeable future.
I agree with you and thanks for sharing your wisdom. Apart from running prune when running the windows installer, prior to packaging I also ran npm prune ‘any_module’ I wasn’t using and I think there is still a few more to remove.
One of my aims in making this app was to use core Node.js modules, in this case https and fs. I could have used request or express but I didn’t. On top of that I did install electron(of course) and moment.js - and because I had to, electron-packager and electron-winsinstaller and Wine because I’m on Linux.
Refactored some lengthy code, got rid of any empty lines, unnecessary comments, white space and so on. Fundamental stuff and whether that made a huge difference I believe so - every byte helps.
I’ll admit I am not an experienced dev but I am sticking with Node.js and Electron because I like it and I know there will always someone more experienced willing to advise.
Thanks I’ll try that pruning action when I package my app.