diff --git a/packages/backend/src/common/utils.ts b/packages/backend/src/common/utils.ts index ce3d6b2472..071c8e9ee6 100644 --- a/packages/backend/src/common/utils.ts +++ b/packages/backend/src/common/utils.ts @@ -120,13 +120,17 @@ export const torBinForPlatform = (basePath: string = '', binName: string = 'tor' } export const torDirForPlatform = (basePath?: string): string => { - let torPath + let torPath: string if (!basePath) { - basePath = path.join(process.cwd(), '..', '..', '3rd-party') const platformPath = process.platform === 'darwin' ? path.join(process.platform, process.arch) : process.platform + basePath = path.join(process.cwd(), '..', '..', '3rd-party') torPath = path.join(basePath, 'tor', platformPath) } else { - torPath = path.join(basePath, 'tor') + if (process.platform === 'darwin') { + torPath = path.join(basePath, 'tor', process.arch) + } else { + torPath = path.join(basePath, 'tor') + } } return torPath } diff --git a/packages/desktop/package.json b/packages/desktop/package.json index 5a8db043aa..ba77e065e7 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -89,7 +89,7 @@ "copyBinariesDarwin": "cp -R ../../3rd-party/tor/$SOURCE_PATH/ ./tor/ && chmod 775 ./tor/arm64/tor ./tor/x64/tor", "copyBinariesWin": "xcopy ..\\..\\3rd-party\\tor\\win32 .\\tor\\", "pullLibs": "wget -N https://zbay-binaries.s3.us-east-2.amazonaws.com/$SOURCE_PATH/libssl.so -P ./ && chmod 775 ./libssl.so", - "dist": "export SOURCE_PATH=darwin && npm run copyBinariesDarwin && npm run build:prod && electron-builder --mac", + "dist": "export SOURCE_PATH=darwin TEST_MODE=true && npm run copyBinariesDarwin && npm run build:prod && electron-builder --mac", "distUbuntu": "export SOURCE_PATH=linux TEST_MODE=true && npm run setMainEnvs && npm run copyBinaries && npm run pullLibs && npm run build:prod && electron-builder --linux", "distwin": "export SOURCE_PATH=win32 && npm run copyBinariesWin && npm run build:prod && electron-builder --win", "lint": "eslint --ext .jsx,.js,.ts,.tsx ./src/ --fix",