From e6fda5d1c783a0016a06d338abaff7e70ea25c7e Mon Sep 17 00:00:00 2001 From: gaoshuaixing Date: Thu, 16 Nov 2023 18:13:24 +0800 Subject: [PATCH] go config --- .gitignore | 1 + electron/config/bin.js | 6 +- electron/config/config.default.js | 14 +++++ electron/config/config.local.js | 13 +++++ electron/config/config.prod.js | 13 +++++ public/html/loading.html | 94 +++++++++++++++++++++++++++++++ 6 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 public/html/loading.html diff --git a/.gitignore b/.gitignore index 553281f..485537b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ pnpm-lock.yaml yalc.lock go/public/ build/extraResources/core.exe +build/extraResources/goapp.exe diff --git a/electron/config/bin.js b/electron/config/bin.js index fb27159..33f593d 100644 --- a/electron/config/bin.js +++ b/electron/config/bin.js @@ -105,17 +105,17 @@ module.exports = { go_build_w: { directory: './go', cmd: 'go', - args: ['build', '-o', '../build/extraResources/core.exe'], + args: ['build', '-o', '../build/extraResources/goapp.exe'], }, go_build_m: { directory: './go', cmd: 'go', - args: ['build', '-o core', '--env=prod'], + args: ['build', '-o goapp', '--env=prod'], }, go_build_l: { directory: './go', cmd: 'go', - args: ['build', '-o core', '--env=prod'], + args: ['build', '-o goapp', '--env=prod'], } }, }; \ No newline at end of file diff --git a/electron/config/config.default.js b/electron/config/config.default.js index be57281..b442112 100644 --- a/electron/config/config.default.js +++ b/electron/config/config.default.js @@ -116,8 +116,22 @@ module.exports = (appInfo) => { indexPath: '/public/dist/index.html', host: '127.0.0.1', port: 7072, + loadingPage: '/public/html/loading.html' }; + /** + * Cross-language service + * 跨语言服务 + */ + config.cross = { + go: { + auto: false, + name: 'goapp', + args: ['--env=dev'], + port: 7073, + } + }; + /** * 硬件加速 */ diff --git a/electron/config/config.local.js b/electron/config/config.local.js index 69938ca..9ee1bbb 100644 --- a/electron/config/config.local.js +++ b/electron/config/config.local.js @@ -25,6 +25,19 @@ module.exports = (appInfo) => { messageLog: true }; + /** + * Cross-language service + * 跨语言服务 + */ + config.cross = { + go: { + auto: true, + name: 'goapp', + args: ['--env=dev'], + port: 7073, + } + }; + return { ...config }; diff --git a/electron/config/config.prod.js b/electron/config/config.prod.js index 2ed9b61..6bcb77f 100644 --- a/electron/config/config.prod.js +++ b/electron/config/config.prod.js @@ -25,6 +25,19 @@ module.exports = (appInfo) => { messageLog: false }; + /** + * Cross-language service + * 跨语言服务 + */ + config.cross = { + go: { + auto: true, + name: 'goapp', + args: ['--env=dev'], + port: 7073, + } + }; + return { ...config }; diff --git a/public/html/loading.html b/public/html/loading.html new file mode 100644 index 0000000..9d1520b --- /dev/null +++ b/public/html/loading.html @@ -0,0 +1,94 @@ + + + + + + + + + +
+
+
+
+
+
+
+
+ +