Migrate from PyInstaller to Nuitka for compilation
This commit is contained in:
+6
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user