compat nuitka

This commit is contained in:
shenjack 2023-12-03 19:04:10 +08:00
parent a520bc587b
commit 27e782f293
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 4 additions and 4 deletions

View File

@ -110,7 +110,7 @@ include-data-dir = [
['./config', './config'], ['./config', './config'],
['./assets', './assets'] ['./assets', './assets']
] ]
include-packages = ['Difficult_Rocket.api'] include-package = ['Difficult_Rocket.api']
# DR.api 没有直接 import, 所以需要手动添加 # DR.api 没有直接 import, 所以需要手动添加
disable-plugin = ['pyqt5', 'tk-inter'] disable-plugin = ['pyqt5', 'tk-inter']

View File

@ -28,13 +28,13 @@ def gen_pyglet_no_follow_import() -> list:
] ]
no_follow_import += [ no_follow_import += [
f"pyglet.canvas.{x}" f"pyglet.canvas.{x}"
for x in [ for x in (
"win32", "win32",
"xlib", "xlib",
"xlib_vidmoderstore", "xlib_vidmoderstore",
"cocoa", "cocoa",
"headless", "headless",
] )
] ]
no_follow_import += [ no_follow_import += [
f"pyglet.gl.{x}" for x in ["win32", "xlib", "cocoa", "headless"] f"pyglet.gl.{x}" for x in ["win32", "xlib", "cocoa", "headless"]
@ -67,7 +67,7 @@ def main(config: raw_config_type) -> nuitka_config_type:
config['macos-app-version'] = str(sdk_version) config['macos-app-version'] = str(sdk_version)
config['nofollow-import-to'] += gen_pyglet_no_follow_import() config['nofollow-import-to'] += gen_pyglet_no_follow_import()
config['output-dir'] = './build/nuitka-' + platform.system().lower()
print('done', config) print('done', config)
return config return config