简体   繁体   中英

Electron - Tidy Up Packaged App Folder

Running electron-packager, I expected the resulting folder structure to be a bit neater, so that I could just zip it up and allow it to be downloaded as an app.

The main folder contains the executable app, but also a lot of .dll, .pak and .bin files. I think this may be a bit confusing to users of my app, is there any way to move all of these files into a folder when running electron packager?

The output from electron-packager is not supposed to be used by the user. It gives an output folder that you can pass into the windows installer to make an installer for users. The installer hides that messy folder under AppData\\Local\\appname\\app-version . It uses Squirrel to do this and once configured correctly the user only sees desktop and start menu shortcuts to launch the application. Using Squirrel means it plays nicely with the Electron autoUpdater .

While using the windows installer and auto updater is recommended you could also create a shortcut to the executable created by the packager so that users don't have to see the messy folder themselves.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM