- 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.
62 lines
1.2 KiB
Python
62 lines
1.2 KiB
Python
# -*- mode: python ; coding: utf-8 -*-
|
|
|
|
a = Analysis(
|
|
['cursor_pro_keep_alive.py'],
|
|
pathex=[],
|
|
binaries=[],
|
|
datas=[
|
|
('config.ini', '.'),
|
|
('turnstilePatch', 'turnstilePatch'),
|
|
('cursor_auth_manager.py', '.'),
|
|
],
|
|
hiddenimports=[
|
|
'cursor_auth_manager'
|
|
],
|
|
hookspath=[],
|
|
hooksconfig={},
|
|
runtime_hooks=[],
|
|
excludes=[],
|
|
noarchive=False,
|
|
)
|
|
|
|
import os
|
|
if not os.path.exists('config.ini'):
|
|
raise FileNotFoundError('config.ini 文件不存在!请确保它在正确的位置。')
|
|
|
|
pyz = PYZ(a.pure)
|
|
|
|
exe = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
a.binaries,
|
|
a.datas,
|
|
[],
|
|
name='CursorPro',
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=True,
|
|
upx_exclude=[],
|
|
runtime_tmpdir=None,
|
|
console=True,
|
|
disable_windowed_traceback=False,
|
|
argv_emulation=False,
|
|
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,
|
|
},
|
|
)
|