理论可行,实践开始!

This commit is contained in:
shenjack 2023-09-17 22:21:45 +08:00
parent 225882dcf8
commit 404fd63c03
Signed by: shenjack
GPG Key ID: 7B1134A979775551
3 changed files with 46 additions and 30 deletions

View File

@ -11,7 +11,7 @@ from pathlib import Path
from Difficult_Rocket.api.types import Options, Version from Difficult_Rocket.api.types import Options, Version
sdk_version = Version("0.8.7.0") # SDK 版本 sdk_version = Version("0.8.7.0") # SDK 版本
build_version = Version("2.1.3.0") # 编译文件版本(与游戏本体无关) build_version = Version("2.2.0.0") # 编译文件版本(与游戏本体无关)
Api_version = Version("0.1.1.0") # API 版本 Api_version = Version("0.1.1.0") # API 版本
__version__ = sdk_version __version__ = sdk_version

View File

@ -2,7 +2,23 @@
# DR 构建 更新日志 # DR 构建 更新日志
- 最新构建版本号 - 最新构建版本号
- build_version: 2.1.3.0 - build_version: 2.2.0.0
## 20230917 build 2.2.0.0
### 修改
- 删掉了蹩脚的 `_add_cmd`
- 可读性更好的写法
- 反正建议自己去看源码修改
- 现在应该可以直接运行输出的脚本了
- 不需要手动给带空格的参数添加引号了
- 给 `--disable-plugin` 添加了
- `pyqt5`
- `tk-inter`
- 防止因为 `pyperclicp` 把他俩打包进来
- 添加了几行 `# noqa`
- 向 linker 低头
## 20230715 build 2.1.3.0 ## 20230715 build 2.1.3.0

View File

@ -166,40 +166,40 @@ class CompilerHelper(Options):
cmd_list = [self.python_cmd, '-m', 'nuitka'] cmd_list = [self.python_cmd, '-m', 'nuitka']
# macos 和 非 macos icon 参数不同 # macos 和 非 macos icon 参数不同
if platform.system() == 'Darwin': if platform.system() == 'Darwin':
cmd_list.append(f"--macos-app-version={self.product_version}") cmd_list += format_cmd('--macos-app-version=', self.product_version, self.product_version) # noqa
_add_cmd(cmd_list, f'--macos-app-icon={self.icon_path.absolute()}' if self.icon_path else None) cmd_list += format_cmd('--macos-app-icon=', self.icon_path.absolute(), self.icon_path) # noqa
elif platform.system() == 'Windows': elif platform.system() == 'Windows':
_add_cmd(cmd_list, f'--windows-icon-from-ico={self.icon_path.absolute()}' if self.icon_path else None) cmd_list += format_cmd('--windows-icon-from-ico=', self.icon_path.absolute(), self.icon_path) # noqa
elif platform.system() == 'Linux': elif platform.system() == 'Linux':
_add_cmd(cmd_list, f'--linux-icon={self.icon_path.absolute()}' if self.icon_path else None) cmd_list += format_cmd('--linux-icon=', self.icon_path.absolute(), self.icon_path) # noqa
_add_cmd(cmd_list, '--lto=yes' if self.use_lto else '--lto=no') cmd_list += format_cmd('--lto=', 'yes' if self.use_lto else 'no')
_add_cmd(cmd_list, '--clang' if self.use_clang else None) cmd_list += format_cmd('--clang' if self.use_clang else None)
_add_cmd(cmd_list, '--msvc=latest' if self.use_msvc else None) cmd_list += format_cmd('--msvc=latest' if self.use_msvc else None)
_add_cmd(cmd_list, '--mingw64' if self.use_mingw else None) cmd_list += format_cmd('--mingw64' if self.use_mingw else None)
_add_cmd(cmd_list, '--standalone' if self.standalone else None) cmd_list += format_cmd('--standalone' if self.standalone else None)
_add_cmd(cmd_list, '--disable-ccache' if not self.use_ccache else None) cmd_list += format_cmd('--disable-ccache' if not self.use_ccache else None)
_add_cmd(cmd_list, '--show-progress' if self.show_progress else None) cmd_list += format_cmd('--show-progress' if self.show_progress else None)
_add_cmd(cmd_list, '--show-memory' if self.show_memory else None) cmd_list += format_cmd('--show-memory' if self.show_memory else None)
_add_cmd(cmd_list, '--remove-output' if self.remove_output else None) cmd_list += format_cmd('--remove-output' if self.remove_output else None)
_add_cmd(cmd_list, '--assume-yes-for-download' if self.download_confirm else None) cmd_list += format_cmd('--assume-yes-for-download' if self.download_confirm else None)
_add_cmd(cmd_list, '--run' if self.run_after_build else None) cmd_list += format_cmd('--run' if self.run_after_build else None)
_add_cmd(cmd_list, '--enable-console' if self.enable_console else '--disable-console') cmd_list += format_cmd('--enable-console' if self.enable_console else '--disable-console')
_add_cmd(cmd_list, f'--xml={self.xml_path.absolute()}' if self.save_xml else None) cmd_list += format_cmd('--xml=', str(self.xml_path.absolute()), self.save_xml)
_add_cmd(cmd_list, f'--output-dir={self.output_path.absolute()}' if self.output_path else None) cmd_list += format_cmd('--output-dir=', str(self.output_path.absolute()), self.output_path)
_add_cmd(cmd_list, f'--company-name={self.company_name}' if self.company_name else None) cmd_list += format_cmd('--company-name=', self.company_name, self.company_name)
_add_cmd(cmd_list, f'--product-name={self.product_name}' if self.product_name else None) cmd_list += format_cmd('--product-name=', self.product_name, self.product_name)
_add_cmd(cmd_list, f'--file-version={self.file_version}' if self.file_version else None) cmd_list += format_cmd('--file-version=', str(self.file_version), self.file_version)
_add_cmd(cmd_list, f'--product-version={self.product_version}' if self.product_version else None) cmd_list += format_cmd('--product-version=', str(self.product_version), self.product_version)
_add_cmd(cmd_list, f'--file-description={self.file_description}' if self.file_description else None) cmd_list += format_cmd('--file-description=', self.file_description, self.file_description)
_add_cmd(cmd_list, f'--copyright={self.copy_right}' if self.copy_right else None) cmd_list += format_cmd('--copyright=', self.copy_right, self.copy_right)
_add_cmd(cmd_list, f'--follow-import-to={",".join(self.follow_import)}' if self.follow_import else None) cmd_list += format_cmd('--follow-import-to=', self.follow_import, self.follow_import)
_add_cmd(cmd_list, f'--nofollow-import-to={",".join(self.no_follow_import)}' if self.no_follow_import else None) cmd_list += format_cmd('--nofollow-import-to=', self.no_follow_import, self.no_follow_import)
_add_cmd(cmd_list, f'--enable-plugin={",".join(self.enable_plugin)}' if self.enable_plugin else None) cmd_list += format_cmd('--enable-plugin=', self.enable_plugin, self.enable_plugin)
_add_cmd(cmd_list, f'--disable-plugin={",".join(self.disable_plugin)}' if self.disable_plugin else None) cmd_list += format_cmd('--disable-plugin=', self.disable_plugin, self.disable_plugin)
if self.include_data_dir: if self.include_data_dir:
cmd_list += [f"--include-data-dir={src}={dst}" for src, dst in self.include_data_dir] cmd_list += [f"--include-data-dir={src}={dst}" for src, dst in self.include_data_dir]