1. Generate exe, dmg, and deb executable files
preparation: In corresponding operating system for example, build xxx.exe in windows and xxx.dmg in MacOS.
Step 0: pre-release mode, test whether the function is normal
# prod
npm run start
step 1: Move front-end resource files
# The operation is as follows:
1:Build resources, such as 'npm run build' in Vue front-end project
2:project directory:npm run rd
# instruction
The rd command will copy './frontend/dist' to './public/dist'; The service finally loads the './public/dist' front-end resources.
The code in the frontend directory will not be packaged to prevent source code leakage.
step 2: code encryption (optional)
if not used this function, please do not filter the source code, view the operation: code encryption
# ee-core >= 1.2.10
npm run encrypt
# instruction
the encrypt command will copy './electron/' to './public/electron', then encrypt it.
the code in the './electron' will not be packaged to prevent source code leakage.
# (deprecated)
npm run compress
npm run restore
Details: code encryption
step 3: run the package command
note: Please try to make unique project name (name attribute in electron-egg/package.json) to prevent conflicts with other software names
# build (windows)
npm run build-w (32 bit)
npm run build-w-64 (64 bit)
# build (mac)
npm run build-m
npm run build-m-arm64 (m1)
# build (linux)
npm run build-l
Note: For more information about platform Packaging, see: https://www.electron.build/
step 4: Find the program
directory:electron-egg/out
Installation package:electron-egg/out/electron-egg-windows-2.0.3.exe
2. Other modifications
- modify the application name
```
modify ./package.json file
name: project name productName: app name appId: id shortcutName: Desktop shortcut name
modify ./frontend/vue.config.js
args[0].title= software header name
2. modify the desktop icon
file path
./build/icons/256x256.png (Name and size must be consistent)(windows or Linux) ./build/icons/512x512.png (Name and size must be consistent)(windows or Linux) ./build/icons/icon.ico (macOs)
3. modify the minimize tray icon
file path
./public/images/tray_logo.png (suggest 32x32 或 16x16 ) ```