Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: mac打包调试
yikaJasonMica007a3404667
diff --git a/electron-builder.json b/electron-builder.jsonindex 74e6516b..cbbe9d5a 100644--- a/electron-builder.json+++ b/electron-builder.json@@ -6,21 +6,15 @@"directories": {"output": "release/${version}"},- "files": [- "dist-electron",- "dist"- ],-"beforePack": "scripts/cleanup-ffmpeg.cjs",+ "files": ["dist-electron", "dist"],+ "beforePack": "scripts/cleanup-ffmpeg.cjs","mac": {- "identity":null,+ "identity": null,"artifactName": "${productName}-${version}-${arch}.${ext}","target": [{"target": "default",- "arch": [- "x64",- "arm64"- ]+ "arch": ["x64", "arm64"]}]},@@ -28,9 +22,7 @@"target": [{"target": "nsis",- "arch": [- "x64"- ]+ "arch": ["x64"]}],"artifactName": "${productName}-${version}.${ext}"@@ -50,16 +42,12 @@{"from": "public/assets","to": "assets",- "filter": [- "**/*"- ]+ "filter": ["**/*"]},{"from": "public/bin","to": "bin",- "filter": [- "**/*"- ]+ "filter": ["**/*"]}]-}\ No newline at end of file+}diff --git a/electron/entitlements.mac.plist b/electron/entitlements.mac.plistnew file mode 100644index 00000000..737b0ff4--- /dev/null+++ b/electron/entitlements.mac.plist@@ -0,0 +1,113 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+ <dict>+ <key>CFBundleDisplayName</key>+ <string>爱团团AiToEarn</string>+ <key>CFBundleExecutable</key>+ <string>爱团团AiToEarn</string>+ <key>CFBundleIconFile</key>+ <string>icon.icns</string>+ <key>CFBundleIdentifier</key>+ <string>cn.yikart.att</string>+ <key>CFBundleInfoDictionaryVersion</key>+ <string>6.0</string>+ <key>CFBundleName</key>+ <string>爱团团AiToEarn</string>+ <key>CFBundlePackageType</key>+ <string>APPL</string>+ <key>CFBundleShortVersionString</key>+ <string>0.1.2</string>+ <key>CFBundleVersion</key>+ <string>0.1.2</string>+ <key>DTCompiler</key>+ <string>com.apple.compilers.llvm.clang.1_0</string>+ <key>DTSDKBuild</key>+ <string>23F73</string>+ <key>DTSDKName</key>+ <string>macosx14.5</string>+ <key>DTXcode</key>+ <string>1540</string>+ <key>DTXcodeBuild</key>+ <string>15F31d</string>+ <key>ElectronAsarIntegrity</key>+ <dict>+ <key>Resources/app.asar</key>+ <dict>+ <key>algorithm</key>+ <string>SHA256</string>+ <key>hash</key>+ <string>8b6b2470bbe0752a3b5617667f4b37f8f1a1aefe8779033bbcbe262cf0059c6e</string>+ </dict>+ </dict>+ <key>LSApplicationCategoryType</key>+ <string>public.app-category.developer-tools</string>+ <key>LSEnvironment</key>+ <dict>+ <key>MallocNanoZone</key>+ <string>0</string>+ </dict>+ <key>LSMinimumSystemVersion</key>+ <string>11.0</string>+ <key>NSAppTransportSecurity</key>+ <dict>+ <key>NSAllowsArbitraryLoads</key>+ <true />+ <key>NSAllowsLocalNetworking</key>+ <true />+ <key>NSExceptionDomains</key>+ <dict>+ <key>127.0.0.1</key>+ <dict>+ <key>NSIncludesSubdomains</key>+ <false />+ <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>+ <true />+ <key>NSTemporaryExceptionAllowsInsecureHTTPSLoads</key>+ <false />+ <key>NSTemporaryExceptionMinimumTLSVersion</key>+ <string>1.0</string>+ <key>NSTemporaryExceptionRequiresForwardSecrecy</key>+ <false />+ </dict>+ <key>localhost</key>+ <dict>+ <key>NSIncludesSubdomains</key>+ <false />+ <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>+ <true />+ <key>NSTemporaryExceptionAllowsInsecureHTTPSLoads</key>+ <false />+ <key>NSTemporaryExceptionMinimumTLSVersion</key>+ <string>1.0</string>+ <key>NSTemporaryExceptionRequiresForwardSecrecy</key>+ <false />+ </dict>+ </dict>+ </dict>+ <key>NSBluetoothAlwaysUsageDescription</key>+ <string>This app needs access to Bluetooth</string>+ <key>NSBluetoothPeripheralUsageDescription</key>+ <string>This app needs access to Bluetooth</string>+ <key>NSCameraUsageDescription</key>+ <string>This app needs access to the camera</string>+ <key>NSHighResolutionCapable</key>+ <true />+ <key>NSHumanReadableCopyright</key>+ <string>Copyright © 2025 艺咖</string>+ <key>NSMainNibFile</key>+ <string>MainMenu</string>+ <key>NSMicrophoneUsageDescription</key>+ <string>This app needs access to the microphone</string>+ <key>NSPrefersDisplaySafeAreaCompatibilityMode</key>+ <false />+ <key>NSPrincipalClass</key>+ <string>AtomApplication</string>+ <key>NSQuitAlwaysKeepsWindows</key>+ <false />+ <key>NSRequiresAquaSystemAppearance</key>+ <false />+ <key>NSSupportsAutomaticGraphicsSwitching</key>+ <true />+ </dict>+</plist>\ No newline at end of filediff --git a/electron/main/index.ts b/electron/main/index.tsindex 50eb050c..1998ad24 100644--- a/electron/main/index.ts+++ b/electron/main/index.ts@@ -28,6 +28,7 @@ if (os.release().startsWith('6.1')) app.disableHardwareAcceleration();// Set application name for Windows 10+ notificationsif (process.platform === 'win32') app.setAppUserModelId(app.getName());+// 单例锁if (!app.requestSingleInstanceLock()) {app.quit();process.exit(0);@@ -168,4 +169,4 @@ ipcMain.handle('open-win', (_, arg) => {} else {childWindow.loadFile(indexHtml, { hash: arg });}-});\ No newline at end of file+});