Enhance cursor_pro_keep_alive.py and update packaging
- Added logging functionality to cursor_pro_keep_alive.py for better error tracking. - Improved configuration loading to handle frozen executables and updated success message. - Introduced cleanup_temp_files function to remove temporary directories. - Refactored browser options setup into a separate function for clarity. - Updated .gitignore to include virtual environment directory. - Enhanced CursorKeepAlive.spec to check for config.ini existence and updated app bundle details. - Added new files for macOS app packaging, including Info.plist and application icon.
This commit is contained in:
@@ -18,6 +18,11 @@ a = Analysis(
|
||||
excludes=[],
|
||||
noarchive=False,
|
||||
)
|
||||
|
||||
import os
|
||||
if not os.path.exists('config.ini'):
|
||||
raise FileNotFoundError('config.ini 文件不存在!请确保它在正确的位置。')
|
||||
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
@@ -26,7 +31,7 @@ exe = EXE(
|
||||
a.binaries,
|
||||
a.datas,
|
||||
[],
|
||||
name='cursorPro',
|
||||
name='CursorPro',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
@@ -39,4 +44,18 @@ exe = EXE(
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon=None
|
||||
)
|
||||
|
||||
app = BUNDLE(
|
||||
exe,
|
||||
name='CursorPro.app',
|
||||
icon=None,
|
||||
bundle_identifier='com.yourcompany.cursorpro',
|
||||
info_plist={
|
||||
'CFBundleShortVersionString': '1.0.0',
|
||||
'CFBundleVersion': '1.0.0',
|
||||
'NSHighResolutionCapable': True,
|
||||
'LSBackgroundOnly': False,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user