-
-
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
asar target and prepackaged option support for it #1102
Comments
@pauliusuza Crash fixed. But |
So I found a temporary workaround by packing app.asar through the electron-builder, and including the remaining .asar files through extraResources key:
However, it would be really great if electron builder would have a feature which would simply pack the whole folder and it's contents if it has app.asar file without running additional checks.
Would you consider adding this feature? |
@pauliusuza It is already supported (#759)
What error do you get? |
I am not sure what this problem is actually about. |
@develar it's checking for package.json and index.js files, so if I simply point it to a folder with asar files the build step fails. |
@pauliusuza So — you have some folder where asar files are located ( Just curious — why electron-builder is not suitable to produce required asar files? |
@develar yes. Mostly for flexibility - we want to separate the build process and packaging process. Asar files would be built in one CI process (which is complex and takes more time) and stored on a cdn, and packaging would run in another process on demand. We have a use case where we need to be able to build 20-30 different apps on demand on CI re-using same .asar files, but only changing app name and branding. |
Using electron-builder? Or using asar tool programmatically? I just want to understand to be sure that implemented solution will be the best solution (not workaround). |
Sure, thanks.
|
Got it. So:
|
@develar thanks, that sounds good |
So just a note for |
@develar I posted a 50$ bounty for this. |
Solution: just use electron-builder in a standard way. But your project directory must contain:
If electron-builder cannot find package.json in the project directory, app.asar will be used a source of project metadata. Caveats:
Easy possible solution to provide additional data: using
This comment in progress — I will update as soon functionality is pushed/updated. |
Issue closed — please try 12.3.0.
If you want, you can donate. https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W6V79R2RGCCHL |
Asar target — if need, please open separate issue. |
Sorry, this does not work. How can i specify project directory through options and point it to a subfolder containing asar files? |
current working directory or set explicitly using |
We are using electron-builder programmatically, not through CLI - is it possible to add a config parameter for the project directory? |
Set
|
Can't get this to work.
Error: Application entry file "index.js" in the "/Users/pro/repository/test-project/dist/mac/Test Project.app/Contents/Resources/app.asar" does not exist. Seems like a wrong configuration.
Additional files in the asar folder were not copied to the Resources |
Running this in cli
TypeError: Cannot read property 'directories' of undefined |
Would it not be simpler just to ignore the app folder packaging step if a specific flag is set, so we can include the .asar files via extraFiles / extraResources? |
@pauliusuza Is it possible to send me your directory with asar files to test? |
@develar I will send you an email shortly |
Thanks @develar for checking out the code. Leaving a comment here if someone has the same issue (this should be documented somewhere eventually) Important bit is to specify the electronVersion and projectDir parameters.
|
@pauliusuza Have you successfully build a separate app.asar? |
Builder crashes when trying to package app with --prepackaged command with the following error:
In my package.json:
{"dist": "npm run compile && build --prepackaged ./asar"}
where
./asar
is the folder containing app.asar, core.asar and node_modules.asar filesWhat I want is to be able to point electron-builder into a folder containing app.asar and it would package the apps for distribution.
The text was updated successfully, but these errors were encountered: