-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build Windows app #796
Comments
The main issue is that you are missing the entry point for electron into your app when it's running as a standalone build. The reason for this is that your So to fix this, you need to make the following changes:
I hope this is helpful and helps you get started with electron-builder. They've done an excellent job so far! |
Also, consider to use NSIS target instead of Squirrel.Windows. |
Thanks so much for that. I was definitely mixed up about the location for main.js, but that makes sense. I still don't understand a return statement when there's no function to return from, but it works! I hadn't even discovered app.makeSingleInstance(), that's really good. So it all looks good now, thanks. |
I was trying to look into the differences between NSIS and Squirrel.Windows, and which might be preferred, but got very lost, and assumed the default should be the best option. Could you point me to something which gives clear info on the pros & cons? Would I put |
Yes, you'd add In regards to Squirrel vs. NSIS: There seem to be a few issues with Squirrel and to paraphrase @develar: "I'm tired fixing it" For me a good cross-platform auto-updating functionality is more important than the actual installer. So, I'm really excited about the NSIS auto-updater (issue #529) functionality and how that will work across Mac and Windows at least. (EDIT: The electron-builder autoUpdater API I mean. I know NSIS is a Windows installer) |
Thanks for that guidance @eriedl. My 'hello world' trial is working, though I feel there's quite a bit of (little documented) boilerplate in main.js, and I'm not quite sure how much of it is squirrel-specific. Once I can pause for breath, I may put together another issue on the subject to reach out for a bit more advice :) |
I'm sure there must be something simple I am missing with electron-builder / Sqiurrel.Windows; when
I open the built
setup.exe
file, nothing happens other than an animated splash screen. (I haveno experience of electron.builder or Squirrel.Windows, but I've been googling all I can).
I'm using Electron 1.4.2, electron-builder 7.10.2, using a two-package.json approach. The app being
built is a Koa app.
There is a very simple app which illustrates the problem on github.com/chrisveness/electron-koa-app.
My main.js is:
It may be clear what's missing just from reviewing the code, but otherwise, to replicate,
Then running
opens the app perfectly well in Electron; but if I build a distributable (on Windows) with
then when I open the generated
dist\win\koa-hello-world Setup 0.0.0.exe
, nothing happens after theanimated splash screen.
Also, if I open
%LocalAppData%\koahelloworld\app-0.0.0\koahelloworld.exe
, I get anEADDRINUSE
error, which doesn't happen when I run the app using
npm start
.What am I missing?
The text was updated successfully, but these errors were encountered: