Add bundle script

This commit is contained in:
MrKBear 2022-04-17 13:50:43 +08:00
parent 4f6b1ebbf2
commit a788968525
6 changed files with 17 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 264 KiB

BIN
assets/living-together.icns Normal file

Binary file not shown.

BIN
assets/living-together.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -29,7 +29,20 @@ const Config = {
"license": PackageJSON.license,
"config": {
"forge": {
"packagerConfig": {},
"packagerConfig": {
"appBundleId": "com.mrkbear.living-together",
"appCopyright": "2021-2022 © copyright MrKBear",
"download": {
"rejectUnauthorized": false,
"executableName": "LivingTogether",
"mirrorOptions": {
"mirror": 'https://npmmirror.com/mirrors/electron/',
"customDir": '{{ version }}',
}
},
"asar": true,
"icon": "./living-together"
},
"makers": [
{
"name": "@electron-forge/maker-zip",

View File

@ -32,8 +32,9 @@
"release-run-electron": "npm run release-desktop-web & npm run copy-fluent-icon & npm run release-electron & npm run electron",
"copy-package-json": "fse mkdirp ./bundle/ & node ./config/electron.forge.config.js --out ./bundle",
"copy-build-result": "fse mkdirp ./bundle/ & fse mkdirp ./build/ & fse copy ./build/ ./bundle/",
"copy-electron-icon": "fse mkdirp ./bundle/ & fse copy ./assets/living-together.ico ./bundle/living-together.ico & fse copy ./assets/living-together.icns ./bundle/living-together.icns",
"electron-app-ci": "cd ./bundle & npm install & cd ../",
"gen-bundle": "fse emptyDir ./bundle/ & npm run copy-package-json & npm run electron-app-ci"
"gen-bundle": "fse emptyDir ./bundle/ & npm run copy-package-json & npm run copy-electron-icon & npm run electron-app-ci"
},
"keywords": [
"artwork",

View File

@ -52,7 +52,7 @@ class ElectronApp {
webPreferences: { preload }
});
this.simulatorWindow.loadURL(this.serviceUrl + (ENV.LIVING_TOGETHER_WEB_PATH ?? "/resources/app/"));
this.simulatorWindow.loadURL(this.serviceUrl + (ENV.LIVING_TOGETHER_WEB_PATH ?? "/resources/app.asar/"));
this.handelSimulatorWindowBehavior();