diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 494ff21..19c626b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,11 +138,9 @@ jobs: if [ "${{ matrix.platform }}" == "mac-arm64" ]; then echo "Building native modules for ARM64" npm run build:native-addon:mac-arm64 - npm run rebuild-deps:mac-arm64 elif [ "${{ matrix.platform }}" == "mac-x64" ]; then echo "Building native modules for x64" npm run build:native-addon:mac-x64 - npm run rebuild-deps:mac-x64 fi # 检查编译的模块 diff --git a/package.json b/package.json index 9b3595b..91d2d74 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "main": "packages/main/dist/index.cjs", "scripts": { "build:native-addon": "cd ./packages/main/src/native-addon && node-gyp clean && node-gyp configure && node-gyp build", - "build:native-addon:mac-x64": "cd ./packages/main/src/native-addon && node-gyp clean && SDKROOT=$(xcrun --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=10.13 node-gyp rebuild --arch=x64", - "build:native-addon:mac-arm64": "cd ./packages/main/src/native-addon && node-gyp clean && SDKROOT=$(xcrun --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=10.13 node-gyp rebuild --arch=arm64", + "build:native-addon:mac-x64": "cd ./packages/main/src/native-addon && node-gyp clean && node-gyp configure && node-gyp build --arch=x64", + "build:native-addon:mac-arm64": "cd ./packages/main/src/native-addon && node-gyp clean && node-gyp configure && node-gyp build --arch=arm64", "build": "npm run build:main && npm run build:preload && npm run build:renderer", "build:main": "cd ./packages/main && vite build", "build:preload": "cd ./packages/preload && vite build", diff --git a/packages/main/src/services/sync-service.ts b/packages/main/src/services/sync-service.ts index 54843c1..05d8557 100644 --- a/packages/main/src/services/sync-service.ts +++ b/packages/main/src/services/sync-service.ts @@ -18,15 +18,15 @@ if (!app.isPackaged) { try { addon = require(addonPath); } catch (error) { - console.error('Failed to load addon:', error); - console.error('Attempted path:', addonPath); - console.error('Process arch:', process.arch); + logger.error('Failed to load addon:', error); + logger.error('Attempted path:', addonPath); + logger.error('Process arch:', process.arch); } } export const initSyncService = () => { if (!addon) { - logger.error('Window addon not loaded properly'); + logger.error('Window addon not loaded properly', process.resourcesPath); return; }