Migrate from PyInstaller to Nuitka for compilation

This commit is contained in:
2026-07-31 13:17:09 +08:00
parent 31d31edd62
commit b5ae10db53
5 changed files with 47 additions and 23 deletions
+6 -2
View File
@@ -11,14 +11,18 @@ COMMAND_KEY = REG_KEY + r"\command"
MENU_NAME = "刷新壁纸(&R)"
def _is_frozen() -> bool:
return getattr(sys, 'frozen', False) or '__compiled__' in sys.modules
def _get_app_dir() -> str:
if getattr(sys, 'frozen', False):
if _is_frozen():
return os.path.dirname(sys.executable)
return os.path.dirname(os.path.abspath(__file__))
def _get_command() -> str:
if getattr(sys, 'frozen', False):
if _is_frozen():
return f'"{sys.executable}" --refresh'
else:
base = os.path.dirname(sys.executable)