-
Notifications
You must be signed in to change notification settings - Fork 15k
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
app. Ispackaged is also false after it is packaged by electronic builder #35153
Comments
what do you get when you print |
C:\Users\TR\Desktop\electron\electron.exe |
I didn't get a chance to try to package an electron app using electron-builder yet but the reason why this happens is clear - electron/shell/browser/api/electron_api_app.cc Lines 988 to 1003 in 31be6ec
app.isPackaged works by checking if the name of the executable is electron . If it is so (which is true in your case), it assumes that it is not packaged, otherwise it thinks that it's packaged. If this is blocking your progress, you could try to set the environment variable, ELECTRON_FORCE_IS_PACKAGED , with any value you want and that would make electron think that it's always a packaged app.
I'd also like to know what version of electron or electron-builder where this problem was introduced in. That info would be very helpful (might help us understand if opening this issue in the electron-builder repo makes more sense, which you have already done in electron-userland/electron-builder#7034)! |
set ELECTRON_FORCE_IS_PACKAGED Or false |
@message163 I tried to package a dummy app using electron-builder v23.3.3 on Windows and I wasn't able to repro this locally because the name of the executable is the same as the name of the packaged app (which is not |
No follow-up for more than a month, closing. |
when i change the productName of build parameter to the name except electron, |
Preflight Checklist
Electron Version
16
What operating system are you using?
Windows
Operating System Version
window 11
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
Actual Behavior
// app.isPackaged returns true
Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: