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

  1. # prod
  2. npm run start

step 1: Move front-end resource files

  1. # The operation is as follows:
  2. 1Build resources, such as 'npm run build' in Vue front-end project
  3. 2project directorynpm run rd
  4. # instruction
  5. The rd command will copy './frontend/dist' to './public/dist'; The service finally loads the './public/dist' front-end resources.
  6. 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

  1. # ee-core >= 1.2.10
  2. npm run encrypt
  3. # instruction
  4. the encrypt command will copy './electron/' to './public/electron', then encrypt it.
  5. the code in the './electron' will not be packaged to prevent source code leakage.
  6. # (deprecated)
  7. npm run compress
  8. 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

  1. # build (windows)
  2. npm run build-w (32 bit)
  3. npm run build-w-64 (64 bit)
  4. # build (mac)
  5. npm run build-m
  6. npm run build-m-arm64 (m1)
  7. # build (linux)
  8. npm run build-l

Note: For more information about platform Packaging, see: https://www.electron.build/

step 4: Find the program

  1. directoryelectron-egg/out
  2. Installation packageelectron-egg/out/electron-egg-windows-2.0.3.exe

2. Other modifications

  1. 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

  1. 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)

  1. 3. modify the minimize tray icon

file path

./public/images/tray_logo.png (suggest 32x32 或 16x16 ) ```