electron-vue app.asar

electron-vue app.asar

The following examples are based on the window system, and the project is an electron-vue project, using vue-cli-plugin-electron-builder as the packaging tool.

The location of app.asar

win-unpackedA folder called will be generated in the packaging directory , which win-unpackedcontains the software's exe execution file and other folders, including resourcessome folders.

app.asarThe location is just resourcesbelow.

Unzip app.asar

app.asarTools are required for decompression asarand can be installed globally using npm.

npm install asar -g

The decompression command is as follows:

asar e app.asar ./app

After decompression, you will find that an app directory folder will be generated in the directory. After opening, you will find that after app.asardecompression, there is a bunch of packaged js and css and some static resource files.

_static和 _dirname

__dirnameand __staticin a dev environment, represents the following path:

dev produce
__dirname Point to the directory where the main.js file is located Directed <app.asar>
__static Point to publish (static resource directory) Directed <app.asar>

Guess you like

Origin blog.csdn.net/qq_43203949/article/details/128322668