diff --git a/assets/favicon.ico b/assets/favicon.ico index 7a2af28..1037109 100644 Binary files a/assets/favicon.ico and b/assets/favicon.ico differ diff --git a/assets/living-together.icns b/assets/living-together.icns new file mode 100644 index 0000000..3b1c04c Binary files /dev/null and b/assets/living-together.icns differ diff --git a/assets/living-together.ico b/assets/living-together.ico new file mode 100644 index 0000000..1c24b13 Binary files /dev/null and b/assets/living-together.ico differ diff --git a/config/electron.forge.config.js b/config/electron.forge.config.js index 2da8873..bc8e4c2 100644 --- a/config/electron.forge.config.js +++ b/config/electron.forge.config.js @@ -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", diff --git a/package.json b/package.json index 0390b0d..3ba3002 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/source/Electron/Electron.ts b/source/Electron/Electron.ts index eb3c1d3..e62db7a 100644 --- a/source/Electron/Electron.ts +++ b/source/Electron/Electron.ts @@ -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();