diff --git a/electron-builder.yml b/electron-builder.yml index 2228544..a6ca5fa 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -10,8 +10,7 @@ files: - '!{.env,.env.*,.npmrc,pnpm-lock.yaml}' - '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}' asarUnpack: - - ./resources/iconTemplate.png - - ./resources/index.html + - ./resources/* win: target: - target: "nsis" @@ -24,6 +23,8 @@ win: to: "Resources" - from: "./resources/index.html" to: "Resources" + - from: "./resources/*" + to: "Resources" nsis: oneClick: false artifactName: ${name}-${version}-${arch}.${ext} diff --git a/resources/frpc.exe b/resources/frpc.exe new file mode 100755 index 0000000..676afd5 Binary files /dev/null and b/resources/frpc.exe differ diff --git a/src/main/download-dep/index.ts b/src/main/download-dep/index.ts index 79199a1..590b65e 100644 --- a/src/main/download-dep/index.ts +++ b/src/main/download-dep/index.ts @@ -169,5 +169,5 @@ async function makeSureFrpDependenciesExist(dirname: string) { export async function makeSureDependenciesExist(dirname: string) { await makeSureFfmpegDependenciesExist(dirname) - await makeSureFrpDependenciesExist(dirname) + // await makeSureFrpDependenciesExist(dirname) } diff --git a/src/main/frpc/index.ts b/src/main/frpc/index.ts index e7fc687..c148a4d 100644 --- a/src/main/frpc/index.ts +++ b/src/main/frpc/index.ts @@ -195,13 +195,17 @@ export async function startFrpcProcess( writeLog('frpc', 'frpcConfigPath: ' + frpcConfigPath) + const resourcePath = is.dev + ? join(__dirname, '../../../resources/') + : process.resourcesPath + const frpcPath = isMac ? isArm - ? join(userPath, 'frp-mac-arm64/frpc') - : join(userPath, 'frp-mac-amd64/frpc') + ? join(resourcePath, 'frp-mac-arm64/frpc') + : join(resourcePath, 'frp-mac-amd64/frpc') : isArm - ? join(userPath, 'frp-win-arm64/frpc.exe') - : join(userPath, 'frp-win-amd64/frpc.exe') + ? join(resourcePath, 'frpc.exe') + : join(resourcePath, 'frpc.exe') const frpcProcess = spawn(frpcPath, ['-c', frpcConfigPath])