init repress

This commit is contained in:
shenjack 2023-12-16 23:40:38 +08:00
commit 829d64d00d
Signed by: shenjack
GPG Key ID: 7B1134A979775551
73 changed files with 10810 additions and 0 deletions

25
.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
doc_build

2
docs/_meta.json Normal file
View File

@ -0,0 +1,2 @@
[
]

43
docs/index.md Normal file
View File

@ -0,0 +1,43 @@
---
pageType: home
hero:
name: Difficult-Rocket 文档
text: DR 的文档!
tagline: WIP~
actions:
- theme: brand
text: Quick Start
link: main/readme
- theme: alt
text: DR 的 Github
link: https://github.com/shenjackyuanjie/Difficult-Rocket
- theme: alt
text: 文档的 Github
link: https://github.com/shenjackyuanjie/DR-docs
image:
src: demo.png
alt: Difficult-Rocket logo
features:
- title: Readme 先读我!
details: 来看看 DR 到底是什么吧
link: main/readme
icon: 🏃🏻‍♀️
- title: 使用 Nuitka 打包
details: Difficult Rocket 使用 Nuitka 打包, 作者甚至在 Nuitka 里有贡献, 这里是一些相关文档
icon: 📦
link: main/nuitka/readme
- title: 帮助完善 DR
details: DR 是一个开源项目! 来这里看看你需要怎么才能帮助 DR
icon: 🎨
link: main/contributing
- title: Simpler I18n solution
details: With the built-in I18n solution, you can easily provide multi-language support for documents or components.
icon: 🌍
- title: Static site generation
details: In production, it automatically builds into static HTML files, which can be easily deployed anywhere.
icon: 🌈
- title: Providing multiple custom capabilities
details: Through its extension mechanism, you can easily extend theme UI and build process.
icon: 🔥
---

50
docs/main/_meta.json Normal file
View File

@ -0,0 +1,50 @@
[
{
"type": "file",
"name": "readme",
"label": "DR 中文 readme"
},
{
"type": "file",
"name": "readme-en",
"label": "DR readme in English"
},
{
"type": "dir",
"name": "howto",
"label": "DR 贡献相关的内容",
"collapsible": true,
"collapsed": true
},
{
"type": "dir",
"name": "change_log",
"label": "DR 更新日志",
"collapsible": true,
"collapsed": true
},
{
"type": "dir",
"name": "plan_features",
"label": "DR 计划中的功能",
"collapsible": true,
"collapsed": true
},
{
"type": "dir",
"name": "nuitka",
"label": "一些 Nuitka 相关的内容",
"collapsible": true,
"collapsed": true
},
{
"type": "file",
"name": "rua",
"label": "一些怪东西"
},
{
"type": "dir",
"name": "no",
"label": "NO!"
}
]

5
docs/main/change_log.md Normal file
View File

@ -0,0 +1,5 @@
# 这里存储了 `DR sdk` `DR game``DR rs` 的更新日志
- [DR sdk](/main/change_log/sdk)
- [DR game/DR rs](/main/change_log/game)
- [old update logs](/main/change_log/old)

View File

@ -0,0 +1,22 @@
[
{
"type": "file",
"name": "build_file",
"label": "DR 构建 更新日志"
},
{
"type": "dir",
"name": "sdk",
"label": "DR SDK 更新日志"
},
{
"type": "dir",
"name": "game",
"label": "DR game 更新日志"
},
{
"type": "file",
"name": "old",
"label": "DR 一些旧的更新日志"
}
]

View File

@ -0,0 +1,85 @@
# DR 构建 更新日志
- 最新构建版本号
- build_version: 3.0.0.0
## 202310 build 3.0.0.0
- 直接将整个构建系统再重构为基于 `lib-not-dr``lndl_nuitka`
## 20230917 build 2.2.0.0
### 修改
- 删掉了蹩脚的 `_add_cmd`
- 可读性更好的写法
- 反正建议自己去看源码修改
- 现在应该可以直接运行输出的脚本了
- 不需要手动给带空格的参数添加引号了
- 给 `--disable-plugin` 添加了
- `pyqt5`
- `tk-inter`
- 防止因为 `pyperclicp` 把他俩打包进来
- 添加了几行 `# noqa`
- 向 linker 低头
## 20230715 build 2.1.3.0
### 修改
- 添加 `email` `win32con` `smtplib` `win32evtlog` `win32evtlogutil` `win32api``--no-follow-import`
- Add `email`, `win32con`, `smtplib`, `win32evtlog`, `win32evtlogutil`, `win32api` to `--no-follow-import`
- `include_data_dir` 移除 `libs/fonts` `textures`
- 改为 `assets``config`
## 20230708 build 2.1.2.0
### 修改
- 同步了 `lib-not-dr` 的修改
- `NuitkaCompiler`
- 添加了 `run_after_build` 选项
- `--run`
- 添加了 `compat_nuitka_version` 选项
- 目前是 `1.7.1`
## 20230630 build 2.1.1.0
### 修改
- 现在本地构建会根据系统名称修改输出目录
- 例如
- 在 `Windows` 上构建会输出到 `build\nuitka-windows`
- Now the local build will modify the output directory according to the system name
- For example
- Build on `Windows` will output to `build\nuitka-windows`
## 20230611 build 2.1.0.0
### 添加
- 现在会在每个平台上自动排除其他平台的 `pyglet` 兼容模块
- 例如
- 在 `Windows``--no-follow-import` `pyglet.libs.x11`
- 大幅提升编译效率
- 缩短编译时间
- Now `pyglet` compatibility modules for other platforms will be automatically excluded on each platform
- For example
- `--no-follow-import` `pyglet.libs.x11` on `Windows`
- Greatly improve compilation efficiency
- Shorten compilation time
## 20230609 build 2.0.0.0
### Breaking Change
- 将构建脚本生成方式改为通过 `libs/utils/nuitka.py` 生成
- Change the way the build script is generated to generate it through `libs/utils/nuitka.py`
- GitHub Actions 也使用相同脚本构建
- GitHub Actions also uses the same script to build
## 202306 build 1.3.0.0
- 修改
- 向 `bifollow-import-to` 添加 `pydoc`

View File

@ -0,0 +1,3 @@
# DR game 的更新日志
- [0.2.x](/main/change_log/game/0-2.md)

View File

@ -0,0 +1,365 @@
# DR game/DR rs 更新日志
- 最新版本号
- DR game: 0.3.3.0
- DR rs: 0.2.23.0
## 20231101 DR rs 0.2.23.0
### Dependency
- Update `DR rs` dependency
- `quick-xml`: `0.30.0` -> `0.31.0`
- `serde`: `1.0.186` -> `1.0.190`
- `xml-rs`: `0.8.16` -> `0.8.19`
## 20230825 DR rs 0.2.22.0
### Remove
- 删除了 `map_ptype_textures` 函数
- 直接通过 `SR1PartType_rs` 实例获取贴图路径
- Delete `map_ptype_textures`
- Get the texture path directly through the `SR1PartType_rs` instance
### Changes
- 为 `types.rs` 添加了一些注释
- 感谢 `sssssssboom` 的帮助
- Add some comments to `types.rs`
- Thanks to `sssssssboom` for the help
- 正在设计 DR 的数据结构
- Designing DR's data structure
## 20230812 DR game 0.3.3.0
### Changes
- 将 `sr1_ship` 渲染器使用的 Camera 改成 `CenterGroupCamera`
- 删除了之前的 Camera 相关代码
- 将用于渲染到材质的代码部分改为使用 `glScissor``glViewport`
- 优化了一点性能 ( 毕竟是OpenGL )
## 20230809 DR game 0.3.2.1
### Fix
- 因为把部件加载图片的数据源改成从 `SR1PartType_rs` 里取
- 所以修改了 `SR1Textures` 的加载逻辑
- 可以自动忽略文件名最后的 `.png`
## 20230808 DR rs 0.2.21.0
### Add
- 在 `__init__.py` 里添加了
- `sprite`
- `type`
- 的导出 (实际上就是 typing)
- `SR1PartType_rs`
- 添加了 `type` getter
摸鱼真开心
## 20230724 DR rs 0.2.20.2
### Fix
- [#49](https://github.com/shenjackyuanjie/Difficult-Rocket/issues/49)
- missing field `touchingGround`
- SR1 says: `touchingGround` field is NOT Required
- make them happy
- SR1 说: `touchingGround` 字段也是可选的
- 让他们开心
- 我就看看我能发多少个 issue
## 20230724 DR rs 0.2.20.1
### Fix
- [#48](https://github.com/shenjackyuanjie/Difficult-Rocket/issues/48)
- `missing field version`
- SR1 says: `version` field is NOT Required
- make them happy
- SR1 说: `version` 字段也是可选的
- 让他们开心
- 我谢谢您啊 Jundroo
- 我就看看我能发多少个 issue
## 20230724 DR rs 0.2.20.0
### Fix
- [#47](https://github.com/shenjackyuanjie/Difficult-Rocket/issues/47)
- `editorAngle field is Option<i32>`
- SR1 says: `editorAngle` field is Optional
- make them happy
- SR1 说: `editorAngle` 字段是可选的
- 让他们开心
## 20230721 DR rs 0.2.19.0
### Add
- `PySR1Ship`
- `as_list`
## 20230721 DR game 0.3.2.0
### BUG Fix
- [#46](https://github.com/shenjackyuanjie/Difficult-Rocket/issues/46)
- 渲染偏移 bug
## 20230721 DR rs 0.2.18.0
### Add
- 导出了 export
- `PySR1PartData`
- `PySaveStatus`
- `map_ptype_textures(part_type: str) -> str`
## 20230721 DR rs 0.2.17.0
### BreakingChanges
- `SR1Ship_rs`
- `__init__`
- 将 `part_list` 参数从传入 `PartList.xml` 路径 改为直接传入 `SR1PartList_rs` 实例
- Change the `part_list` parameter from passing in the `PartList.xml` path to directly passing in the `SR1PartList_rs` instance
## 20230721 DR rs 0.2.16.0
### Dependencies
in [#45](https://github.com/shenjackyuanjie/Difficult-Rocket/pull/45)
- `pyo3`
- `0.19.0` -> `0.19.1`
- `xml-rs`
- `0.8.14` -> `0.8.16`
- `serde`
- `1.0.164` -> `1.0.173`
## DR game 0.3.1.2 / 0.3.1.3
- 加回了显示 delta 的那根线
- Add back the line that displays delta
## DR rs 0.2.15.2
### Add
- `SR1PartData_rs`
- `get_id -> IdType`
- `get_x -> f64`
- `get_y -> f64`
- `get_activate -> bool`
- `get_angle_v -> f64`
- `get_explode -> bool`
## DR rs 0.2.15.1
### Changes
- `types.rs` & `python.rs` 利用可用的 Clippy 改进了代码
- `types.rs` & `python.rs` improved the code with available Clippy
## DR game 0.3.1.1
### Fix
- `sr_tr` 加载语言文件的路径并没有跟随目录名称改变
- `sr_tr` does not follow the directory name change when loading the language file path
## DR game 0.3.1.0
- 使用 `Difficult_Rocket.api.camera.Camera`
- Use `Difficult_Rocket.api.camera.Camera` class
## DR game 0.3.0.0
有一些修改(忘记记录了
## DR rs 0.3.0.0
### 修改
- 适配了 `DR sdk` 的关于 mods 的修改
- Adapted the modification of mods about `DR sdk`
- `RustConsole`
- 现在输入体验更好了
- Now the input experience is better
## DR rs 0.2.15.0
### 修改
- 现在支持新的 mods reload 和 unload 了
- 适配了 `DR sdk` 的关于 mods 的修改
- Now support new mods reload and unload
- Adapted the modification of mods about `DR sdk`
### 添加
- `IdType = i64`
- 统一的 id 类型
- Unified id type
- `PySR1Ship`
- `get_connection -> Vec<(i32, i32, IdType, IdType)>`
- 获取飞船的连接信息
- Get the connection information of the ship
## DR rs 0.2.14.0
### 删除
- 删除了多个 xml 测试读取函数
- Remove multiple xml test read functions
### 改进
- 改进了 xml writer 的 `SR1Ship` 写入
- Improve the xml writer's `SR1Ship` write
## DR game 0.2.1.0
### 修改
- 将 `sr1_ship` 中的 `Camera_rs` 改为 `Difficult_Rocket.utils.camera.Camera`
- Change `Camera_rs` in `sr1_ship` to `Difficult_Rocket.utils.camera.Camera`
- 添加了部件的连接线(都是彩色哒)
- Add the connection line of the part (all are colored)
## DR rs 0.2.13.0
### 删除
- 删除了 `render.rs`
- 没必要拿 rust 写这玩意(
- 用 `DR game``camera` 代替
- Delete `render.rs`
- No need to write this thing with rust (
- Use `DR game`'s `camera` instead
### 添加
- 添加了 基于 `quick-xml::writer::Writer` 的 xml `SR1Ship` 写入
- 折磨啊啊啊啊啊啊啊啊
- Add xml `SR1Ship` write based on `quick-xml::writer::Writer`
- Torture ah ah ah ah ah ah ah ah
## DR rs 0.2.12.0
### 添加
- 添加了 xml 的读取测试
- Add xml read test
## DR game 0.1.2.0
### 修改
- 现在渲染飞船的时候不会再显示那个白色框了
- 改为一个彩色的框
- Now, the ship will not be displayed in the white box
- Change to a colored box
## DR rs 0.2.11.0
### 添加
- `Python::data::PySR1Ship`
- `get_part_box(&self, part_id: i64) -> Option<(f64, f64), (f64, f64)>`
- 用于获取对应 id 的实际碰撞箱
## DR game 0.2.0.0
### 适配
- 适配了 `DR_sdk` `0.8.3.0` 的修改
## DR game 0.1.1.0
### 添加
- `types.py`
- 从 `DR.api.types.SR1` 中移动过来
### 新功能
- `console.py`
- 基于 `PyConsole`
- 用于替换 `DR sdk` 的默认控制台方法
## DR rs 0.2.10.1
### `types.rs`
- 兼容了 `Option<Vec<Step>>``sr1_data.rs`
- `Vec<Step>` -> `Option<Vec<Step>>`
### Bug 修复
- [#24](https://github.com/shenjackyuanjie/Difficult-Rocket/issues/24) `无法解析 带 staging 不带 steps的飞船`
## DR rs 0.2.10.0
### `python::PySR1PartType`
- 添加可从 Python 端获取的部件信息
- `get_descriptiton -> String`
- 部件描述 (Part description)
- `get_sprite -> String`
- 部件贴图 (Part sprite)
- `get_width -> u32`
- 部件宽度 (Part width)
- `get_height -> u32`
- 部件高度 (Part height)
- `get_friction`
- 部件摩擦系数 (Part friction)
- `get_hidden`
- 部件是否隐藏 (Part hidden)
## DR rs 0.2.9.3
### `sr1_data`
- `inflation`
- `Option<bool>` -> `Option<f64>`
### Bug 修复
- [#21](https://github.com/shenjackyuanjie/Difficult-Rocket/issues/21) `field: "missing field Activate"`
## DR rs 0.2.9.2
### Bug 修复
- [#20](https://github.com/shenjackyuanjie/Difficult-Rocket/issues/20) `<DisconnectedParts/>`
## DR rs 0.2.9.1
### 实现
- `types::sr1::get_max_box`
- 部分实现
- `types::math::Rotatable`
- 添加了 mut 版方法
## DR rs 0.2.9.0
### 新功能
- `python::console::PyConsole`
- 一个基于 `std::thread` 的多线程控制台
- GIL 我谢谢你
- 用于替换 `DR sdk` 的默认控制台方法
- A multi-thread console based on `std::thread`
- Used to replace the default console method of `DR sdk`
### Bug 修复
- [#19](https://github.com/shenjackyuanjie/Difficult-Rocket/issues/19) `BorrowMutError`

View File

@ -0,0 +1,7 @@
[
{
"type": "file",
"name": "0-2",
"label": "0.2.x 更新日志"
}
]

1099
docs/main/change_log/old.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
# DR sdk 更新日志
- [0.8.x](/main/change_log/sdk/0-8.md)
- [0.9.x](/main/change_log/sdk/0-9.md)
## 旧版本更新日志
[old](/main/change_log/old)

View File

@ -0,0 +1,318 @@
# DR SDK 0.8.x 更新日志
## DR sdk 0.8.7.2
### Add
- `assets/fonts`
- `unifont.otf`
- `unifont v 15.1.02`
### Translate key
- Add
- `client`
- `load.font`
- `start`
- `file`
- `error`
- `use_time`
### Enhance
- `client.pyglet_load_fonts_folder`
- 现在使用 `os.walk` 遍历文件夹
- 使用 `tr` 进行日志记录
## DR sdk 0.8.7.1
### Add
- `BaseScreen`
- 现在继承了 `Options`
- 添加了 `name` 选项来识别名称
- Now inherits `Options`
- Added `name` option to identify name
- `gui.widget.PressTextButton`
- 作为 gui 的一部分
- 依然在测试阶段
- 有人发现 bug 请务必发 issue, 十分感谢
- As part of gui
- Still in the testing phase
- If you find a bug, please be sure to issue it, thank you very much
## DR sdk 0.8.7.0
### Add
- 添加了 `Difficult_Rocket.utils.camera.GroupCamera`
- 和 `Difficult_Rocket.utils.camera.CenterGroupCamera`
- 实际上就是使用 `pyglet.graphics.Group` 来实现的 `Camera`
- 具有相同的功能
- 顺便同样在 `api.camera` 里添加了导出
- 这次我一定不会再忘记导出了
- Added `Difficult_Rocket.utils.camera.GroupCamera`
- And `Difficult_Rocket.utils.camera.CenterGroupCamera`
- Actually, it is implemented `Camera` using `pyglet.graphics.Group`
- Has the same function
- By the way, the export was also added in `api.camera`
- This time I will never forget to export it again
- 为所有 `xxCamera` 添加了
- `reset` 方法
- 用于一键重置缩放+平移
- Added `reset` method for all `xxCamera`
- Used to reset zoom + translation with one click
## DR sdk 0.8.6.1
### Fix
- 现在 `DR.py` 启动之后如果崩溃会在控制台输出完整的 Crash report 了
- Now, after `DR.py` starts, if it crashes, the complete Crash report will be output to the console
## DR sdk 0.8.6.0
重构了一下项目结构
Refactored the project structure
### Fix
- issue [#42](https://github.com/shenjackyuanjie/Difficult-Rocket/issues/42)
- Crash report 的时区不正确
- Crash report time zone is incorrect
### Change
- 将大部分资源文件移动到 `assets/`
- `libs/fonts` -> `assets/fonts`
- `configs/lang` -> `assets/lang`
- `configs/xxx.xml` -> `assets/builtin/xxx.xml`
- `textures` -> `assets/textures`
- Move all the resources to `assets/`
## DR sdk 0.8.5.2
### Fix
- `crash` 引用了已经重命名的 `Difficult_Rocket.game_version` (`Difficult_Rocket.sdk_version`)
- `Difficult_Rocket.api.types`
- `VersionRequirement`
- `VersionParsingError`
### Change
- 修改了 `DR.py`
- 实际上是 `DR-start.py` 的改名
- Changed `DR.py`
- Actually renamed `DR-start.py`
### Clean
- 删除了 `DR-start.py`
- 实际上是改成了 `DR.py`
- Removed `DR-start.py`
- Actually changed to `DR.py`
- 删除了 `libs/utils/dsm.py`
- Deleted `libs/utils/dsm.py`
## DR sdk 0.8.5.1
### API
- 将 `Camera``CenterCamera` 添加到 `Difficult_Rocket.api.camera`
- Add `Camera` and `CenterCamera` to `Difficult_Rocket.api.camera`
## DR sdk 0.8.5.0
### Changes
- `Difficult_Rocket.__init__`
- 重命名 / Rename
- `game_version` -> `sdk_version`
- `ModManager`
- `get_mod_module(mod_name: str) -> Optional[ModInfo]`
- 通过 mod 名称获取 mod 的信息
- Get mod information by mod name
- `load_mod(mod_path: Path) -> Optional[ModInfo]`
- 加载指定路径的 mod
- Load the mod at the specified path
- `find_mods_in_path(extra_mods_path: Optional[List[Path]]) -> List[Path]`
- 在指定的路径中查找 mod 并返回 mod 的路径
- Find mods in the specified path and return the path of the mod
- `unload_mod(mod_id: str, game: Game) -> Optional[ModInfo]`
- 卸载指定的 mod 并返回 mod 的信息
- Unload the specified mod and return the mod information
- `reload_mod(mod_id: str, game: Game)`
- 重新加载指定的 mod
- Reload the specified mod
### Remove
- `DR.client.guis.widget.InputBox`
- 没用了 `TextEntry` 已经好了 可以直接用了
- Use Less, the `TextEntry` is ok to use
### Command
- `mods`
- `list`
- 列出所有已加载的 mod
- List all loaded mods
- `reload <mod_id>`
- 重新加载指定的 mod
- Reload the specified mod
## DR sdk 0.8.4.1
### Add
- `utils.camera`
- `Camera`
- 一个 2D 摄影机,可以用于高效变换渲染坐标
- `CenterCamera`
- 一个中心对器的 2D 摄影机,可以用于高效变换渲染坐标
## DR sdk 0.8.4.0
### Fix
- issue #33 (<https://github.com/shenjackyuanjie/Difficult-Rocket/issues/33>)
- 修复了实际上并不会加载 `.otf` 格式的字体文件的问题
### language
- 去除了 `dr_game` 相关的键值
- 现在这些键值已经在 `dr_game` 自己的语言文件中了
- Removed the key values related to `dr_game`
- Now these key values are in the language file of `dr_game` itself
- 将 mod 加载部分的键值独立出来
- 这样调用起来更方便一些
- Separate the key values of the mod loading part
- This makes it easier to call
### 修改
- `utils.translate`
- `Tr`
- 现在支持自定义语言文件的路径了
- `lang_path`
- 用于给 mod 加载自己的语言文件
- 现在 `logging` 的配置转移到 `__init__` 中了
- 保证调用 `logging` 的时候可以正常使用
- Now the configuration of `logging` is moved to `__init__`
- Ensure that `logging` can be used normally when called
- 现在输入命令之后不会输出一个 `True`/`False` 了
- (实际上是用来检测命令是不是用 `/` 开头的)
- Now, the command will not output a `True`/`False`
- (Actually used to detect whether the command starts with `/`)
- `CommandText`
- `find`
- 现在会先用 `str.startswith` 检测是否以要求的字符串开头
- 实际上就是丐版 `re.match`
- 并且会在匹配上之后 如果匹配内容后面第一个字符是空格 则会截取掉空格
- Now, it will first use `str.startswith` to detect whether it starts with the required string
- Actually a poor version of `re.match`
- And after matching, if the first character after the matching content is a space, the space will be intercepted
## DR sdk 0.8.3.0
### 删除
- `pyglet_rs`
- 事实证明这玩意没啥用
- Removed pyglet_rs
### Fix
- issue #31 (https://github.com/shenjackyuanjie/Difficult-Rocket/issues/31)
- 窗口标题不正确 (实际上是因为只使用 `DR_runtime` 进行格式化)
- Window title is incorrect
### 添加
- `DR_status`
- 实际上就是 `DR_runtime`
- `DR_runtime` -> `DR_status`
- `client_running`
- 客户端是否在运行
- Is client running
- `server_running`
- 服务器是否在运行
- Is server running
- Mod loader
- 添加了对支持版本号的 warnings
- Added warnings for supporting version numbers
### 移动
- `Difficult_Rocket.DR_runtime`
- `DR_version` -> `DR_status.DR_version`
- `API_version` -> `DR_status.API_version`
- `Build_version` -> `DR_status.Build_version`
- `default_language` -> `DR_status.default_language`
### 删除
- `Diffiuclt_Rocket.long_version`
- 不再使用整数标记版本号 (反正 `Version` 有一个完整的版本号比较机制)
- No longer use integer to mark version number (since `Version` has a complete version comparison mechanism)
- `Difficult_Rocket.DR_rust_available`
- 似乎我忘记删掉这个 `DR_rs` 的耦合了
```python
long_version: int = 15
"""
long_version: 一个用于标记内部协议的整数
15: 完全移除 DR_rust 相关内容 解耦完成
14: BaseScreen 的每一个函数都添加了一个参数: window: "ClientWindow"
13: 为 DR_runtime 添加 API_version
12: 去除 DR_runtime 的 global_logger
要 logging 自己拿去(
11: 为 DR_option 添加 use_DR_rust
修复了一些拼写错误
10: 为 DR_runtime 添加 DR_Rust_get_version
9 : 为 DR_option 添加 pyglet_macosx_dev_test
8 : 为 DR_runtime 添加 DR_rust_version
为 DR_option 添加 DR_rust_available
以后就有 DR_rust 了
7 : 为 DR_option 添加 std_font_size
6 : 事实证明, 不如直接用int
5 : 添加 build_version 信息,用于标记编译文件版本,
游戏版本改为四位数,终于有一个可以让我随便刷的版本号位数了
4 : 把 translate 的字体常量位置改了一下,顺便调换顺序
3 : 就是试试改一下,正好 compiler 要用
2 : 哦,对 longlong 好耶!
1 : 我可算想起来还有这回事了 v0.6.4
"""
```
## DR sdk 0.8.2.0
### Fix
- issue #27 (https://github.com/shenjackyuanjie/Difficult_Rocket/issues/27)
- ~~为什么每次发完release都要修issue啊 font文件夹不存在就会报错~~
## DR sdk 0.8.1.0
### 删除
- `api.types.SR1`
- 移动到 `dr_game`
### 添加
- `api.types`
- 添加 `Version` (`libs.MCDR.version.Version`)
- `Difficult_Rocket.api.types.Options`
- `str_option`
- 获取一个所有键、值都是 builtin 类型的字典
- 可以用于写入文件
- `__str__`
- `__repr__`
- 让 `Options` 可以被 `print` 打印
### 修复 Bug
- 自带的 `console` 类在 `get_command` 时 没有检查是否为空

View File

@ -0,0 +1,44 @@
# Draft DR sdk 0.9.0.0
## Changes
- `api.screen.BaseScreen`
- `on_draw`
- `self, window: ClientWindow` -> `self, dt: float, window: ClientWindow`
- `dt` 为上一帧到这一帧的时间间隔
- `dt` is the time interval from the last frame to this frame
## Rename
- `Api_version` -> `api_version`
- `_DR_Status` -> `_DRStatus`
- `name` = `DR Option` -> `DR Status`
- 这毛病属实是没想到, 之前一直没发现
## Rework
- 将 `logging` 的依赖改为 `lib_not_dr.loggers`
- 以后都用 `lib_not_dr` 的 logger 了
- Change the dependency of `logging` to `lib_not_dr.loggers`
- Use `lib_not_dr` logger in the future
## Add
- 添加内置依赖: `lib-not-dr`
- Added built-in dependency: `lib-not-dr`
- 不再同时维护两份代码
- No longer maintain two sets of code at the same time
## Fix
- 如果没有 DR_game 的情况下, 退出时会 join 控制台线程
- 通过检测线程是否是守护线程来判断是否 join
- If there is no DR_game, join the console thread when exiting
- Determine whether to join by detecting whether the thread is a daemon thread
## Dependency
- 更新了所有的依赖版本号
- 去看 `requirements.txt`
- Updated all dependency version numbers
- Go see `requirements.txt`

View File

@ -0,0 +1,12 @@
[
{
"type": "file",
"name": "0-9",
"label": "0.9.x 更新日志"
},
{
"type": "file",
"name": "0-8",
"label": "0.8.x 更新日志"
}
]

6
docs/main/howto.md Normal file
View File

@ -0,0 +1,6 @@
# 这里是 DR 的 贡献指南
主要包括
- 设计文档(没写多少)
- [贡献指南](/main/howto/contributing.md)

View File

@ -0,0 +1,4 @@
# 设计文档
20220208

View File

@ -0,0 +1,20 @@
# 如何帮助 DR 开发
## 需要准备的工具
1. Powershell 7+
2. Python3.8 +
3. gcc / clang 编译器
4. rust 工具链
5. git
## 安装依赖
1. 确保 Path 下有以下内容
- `python`
- `python3.8`
- 可供 `setuptools-rust` 调用的 rust 工具链
2. 为 Python 安装 `requirement-dev.txt` 的依赖
- `python -m pip install -r requre`
3. 使用 `build_rs.ps1` 尝试编译一次 `DR_rs`
- `./build_rs.ps1` 38/39/310/311

View File

@ -0,0 +1,70 @@
# Difficult Rocket 游戏功能设计文档
> by shenjackyuanjie and BlueFunny_
`Difficult Rocket` 游戏本体功能由 `DR mod` 实现
## DR mod
- `DR mod` 包含以下几个部分
- `DR_mod`: Python 实现的主体
- `DR_rs`: DR_mod 的 Rust 扩展
- 命名空间
- 命名空间遵循本体原则 全拼
- `Difficult_Rocket_mod`
- `Difficult_Rocket_rs`
## DR_rs
> DR_rs 扩展为 DR mod 的 Rust 扩展
- 内容
- `simluation`
- 物理引擎交互
- `sr1_data`
- SR1 数据读取 格式转化
- `types`
- 主要的 Rust 数据格式定义
### `DR_rs` Rust 插件加载逻辑
- 加载模式
- 冷加载
- 游戏启动前扫描 Rust 扩展目录, 并加载所有的可识别后缀名扩展, 然后启动游戏
- 热加载
- 游戏进行中进行 `热加载` / `热卸载` / `热重载` 等操作
- **不推荐使用此方式, 因为这可能导致某些插件未正常加载导致异常**
- 使用此方式必须提供**明确的**初始化加载阶段, 否则将拒绝加载
- PS: 这个初始化加载阶段指扩展应在何时加载, 如启动时, 这个具体是看扩展都要修改哪些内容的
- 加载方法
- 利用 [本文](https://docs.rs/libloading/latest/libloading/) 中的方法加载 dll 扩展模组
- 模组应明确提供以下信息 (加 `*` 为可选内容)
- 模组名称
- 模组唯一可识别 ID
- 模组版本
- 模组作者
- 模组作者链接
- *模组描述 (限制字数在 x 以内)
- x 暂未确定
- 模组兼容游戏版本 (carte 版本表达式)
- 模组使用的 DR SDK 版本
- 此处应由软件自动生成
- 模组构建时的 DR SDK 版本
- 此处应由软件自动生成
- 模组使用的 DR SDK API 版本
- 模组使用的 DR SDK 内部协议版本
- *模组可选依赖 (包括版本)
- 模组必选依赖
- DR SDK版本 和 DR API 版本都需要写,都需要最高和最低,
- 然后······ 版本号是四位的格式
- 调用手段
- UI 调用
- 模组添加
- 软件内调用
- 加载时调用
- 我先睡了,老爹催了

View File

@ -0,0 +1,49 @@
# 关于命名的设计文档
## 命名规则
## 命名空间
- DR: Difficult Rocket
- DR单独的部件、格式、结构的命名空间
- 例子
- `DR:pod-1`
- `DR:solar.expand`
- `DR:wheel.big`
- `DR:planet.smearth`
- `DR:planet.smars`
- SR: SimpleRockets
- SR的原生组件、格式、结构的命名空间(大概不会用多少)
- 例子
- `SR:pod-1`
- `SR:wheel.small`
- 其他:
- 命名规则:
- 可以包含
- `ABC`
- `abc`
- `-` `_`
- `123`
- `从前有座山`
- `Unicode表情`
- 各种中文标点符号
- 中文的啊!
- `` `。` `、` `·`
- `` ``
- `` ``
- `` ``
- `【` `】`
- `《` `》`
- `“` `”`
- `` ``
- 不能以数字开头
- 不能包含
- `.` `/` `:`
- `<` `>`
- `|` `*` `?`
- `"` `'`
- 例子:
- `Simple_Mod`
- `真·简单mod`
- `啊啊啊啊↑↓Jundroo`
- mod添加的部件、格式、结构的命名空间

View File

@ -0,0 +1,25 @@
# MOD加载器设计文档
## v1-20220307
### __init__.py
- MODInfo类
- MODInfo类的属性
- 一些基本的MOD信息
- 版本类信息
- MOD版本号
- DR MOD加载器兼容版本
- DR 内容兼容版本
- 需要的MOD版本号
-
你隔这呢我还在隔壁readme呢先来写readme
### DR_rs 扩展加载
- 发现 Mod 方式
- 在用户打开界面时进行扫描
- 用户手动添加 (UI请求)
- 加载方式
- 游戏启动前进行加载 (根据后缀名, 只有特定后缀名采用, 否则无视(方便实现备用))

View File

@ -0,0 +1,9 @@
# 多语言支持
## 范例
```python
from Difficult_Rocket.utils.translate import tr
print(tr().window.setup.done())
```

View File

@ -0,0 +1,6 @@
# NOPE
![条款](/csdn/条款.png)
![离谱](/csdn/离谱.png)
![gitee](/csdn/gitee.png)
![github](/csdn/github.png)

3
docs/main/no/readme.md Normal file
View File

@ -0,0 +1,3 @@
# NO
没错,这里是被挂起来的一些东西(

View File

@ -0,0 +1,7 @@
# NO
![6](/zhanganzhi/6.png)
![translate](/zhanganzhi/translate.png)
<!-- ![bridge](./bridge.png) -->

6
docs/main/nuitka.md Normal file
View File

@ -0,0 +1,6 @@
# Nuitka
这里是一些在 DR 编写过程中的 nuitka 相关的内容
例如 [不同编译器的性能](/main/nuitka/20221121_nuitka_performs.md) 和 [nuitka 选项解释](/main/nuitka/20230116_nuitka_options.md)
(其实也就这俩(20230116))

View File

@ -0,0 +1,196 @@
# nuitka 1.2.1 的性能测试
大家好! 这里是shenjack
这篇文章就是 [B站](https://www.bilibili.com/read/cv20208726) 专栏的原文!
# 综述
## 环境
- 硬件
- CPU: `AMD R5 5600X`
- 内存: `64G DDR4 3200 (32×2)`
- 软件
- ![gcc clang](/nuitka/gcc_clang_version.png)
- ![python nuitka](/nuitka/python_nuitka_version.png)
- ![DR](/nuitka/DR_git_commit.png)
- `gcc 12.2.0`
- `clang 14.0.6`
- `nuitka v1.2.1`
- `Python 3.8.10`
- [DR](https://github.com/shenjackyuanjie/Difficult-Rocket) commit `e6a2b7b36cc98e508efbc61c4646181f5817fc7c`
## 编译选项
- 核心编译选项
- 环境
- `--standalone`
- 将环境一并打包进完成的文件夹中
- ```
--standalone Enable standalone mode for output. This allows you to
transfer the created binary to other machines without
it using an existing Python installation. This also
means it will become big. It implies these option: "--
follow-imports" and "--python-flag=no_site". Defaults
to off.```
- 编译器
- `--clang`
- 强制使用 `clang` 编译器
- ```
--clang Enforce the use of clang. On Windows this requires a
working Visual Studio version to piggy back on.
Defaults to off.```
- `--mingw64` (常量)
- 强制使用 `mingw64` 编译器
- ```
--mingw64 Enforce the use of MinGW64 on Windows. Defaults to
off.```
- `--jobs=24` (常量)
- 最多同时运行的 C 编译器 `(clang|mingw64)` 数量
- ```
-j N, --jobs=N Specify the allowed number of parallel C compiler
jobs. Defaults to the system CPU count.```
- `--lto=` `yes|no|auto(None)`
- 是否启用 链接
- ```
--lto=choice Use link time optimizations (MSVC, gcc, clang).
Allowed values are "yes", "no", and "auto" (when it's
known to work). Defaults to "auto".```
- `--disable-ccache`
- 不使用 `ccache` 或者 `clcache` 的缓存
- ```
--disable-ccache Do not attempt to use ccache (gcc, clang, etc.) or
clcache (MSVC, clangcl).```
## 结论综述
补充:`lto=yes` 的情况下经常有报错
### 有 `Ccache` (全 hit 无实际编译)
`clang lto=no` 效率最高
`mingw lto=no` 效率低于 `lto=yes`,但是更加稳定(不会报错)
### 无 `Ccache` (测试编译器实际效率)
`clang lto=no` 效率最高
`mingw lto=no` 同样效率相对高
### 总结
尽量使用 `lto=no` 配合 `ccache` 以及 `clang`
# 原始数据
## 因为视频使用CPU编码所以很多数据没法看到这里使用的是后面再次测试/微信群内存档的数据
## 视频应该会再次测试,数据可能不同,请谅解(obs更新完没注意编码啊啊啊啊)
<table>
<tr>
<th>编译器</th> <th colspan="2">有ccache</th> <th colspan="2">无ccache</th>
</tr>
<tr>
<th>编译器</th> <th>lto=no</th> <th>lto=yes</th> <th>lto=no</th> <th>lto=yes</th>
</tr>
<tr>
<td>clang</td> <td>50s</td> <td>86s</td> <td>83s</td> <td>67s</td>
</tr>
<tr>
<td>gcc</td> <td>59s</td> <td>641s</td> <td>227s</td> <td>630s</td>
</tr>
</table>
- `clang`
- `with ccache`
- `lto=no`
- `视频内数据`
- `--clang`
- `--mingw64`
- `--lto=no`
- 耗时: 50000ms (50s)
- ![clang mingw lto no ccache](/nuitka/clang_mingw_lto_no_ccache.png)
- `lto=yes`
- `后期测试数据`
- `--clang`
- `--mingw64`
- `--lto=yes`
- 耗时 86000ms (86s)
- ![clang mingw lto yes ccache](/nuitka/clang_mingw_lto_yes_ccache.png)
- `no ccache`
- `lto=no`
- `视频内数据`
- `--clang`
- `--mingw64`
- `--lto=no`
- `--disable-ccache`
- 耗时 83000ms (83s)
- ![clang mingw lto no](/nuitka/clang_mingw_lto_no.png)
- `lto=yes`
- `后期测试数据`
- `--clang`
- `--mingw64`
- `--lto=yes`
- `--disable-ccache`
- 耗时 67000ms (67s)
- ![clang mingw lto yes](/nuitka/clang_mingw_lto_yes.png)
- `mingw64`
- `with ccache`
- `lto=no`
- `后期测试数据`
- `--mingw64`
- `--lto=no`
- 耗时 59000ms (59s)
- ![mingw lto no ccache](/nuitka/mingw_lto_no_ccache.png)
- `lto=yes`
- `后期测试数据`
- `--mingw64`
- `--lto=yes`
- 耗时 641000ms (641s) (10.68min)
- ![mingw lto yes ccache](/nuitka/mingw_lto_yes_ccache.png)
- `no ccache`
- `lto=no`
- `视频内数据`
- `--mingw64`
- `--lto=no`
- `--disable-ccache`
- 耗时 227000ms (227s) (3.78min)
- ![mingw lto no](/nuitka/mingw_lto_no.png)
- `lto=yes`
- `后期测试数据`
- `--mingw64`
- `--lto=yes`
- `--disable-ccache`
- 耗时 630000ms (630s) (10.5min)
- ![mingw lto yes](/nuitka/mingw_lto_yes.png)

View File

@ -0,0 +1,721 @@
# nuitka 1.3.7 编译选项说明
## [nuitka 所有编译选项原文](nuitka_options_137.md)
## 用法:
`__main__.py [--module] [--run] [options] main_module.py`
## 主要选项:
- `--help`
- 展示这条信息,然后退出
- `--version`
- 展示版本信息和用于汇报 bug 的重要细节,然后退出
- 默认: `禁用`
- `--module`
- 创建一个扩展而不是可执行程序
- 默认: `禁用`
- `--standalone`
- 启用独立环境模式输出
- 可以允许你将输出的内容直接复制到其他系统相同的电脑上并且不用安装 Python 环境
- 这也会意味着输出文件会变大
- 在启用此选项是同样意味着启用
- `--follow-imports`
- `--python-flag=no_site`
- 默认: `禁用`
- `--onefile`
- 基于独立环境模式的同时将输出内容变为单个可执行文件
- 默认: `禁用`
- `--python-debug`
- 是否使用 debug 版本
- 默认: 运行 nuitka 的 Python 版本
- `--python-flag=FLAG`
- Python 运行标志
- 这个标志会强制改变运行标志
- 目前受支持的选项
- `-S`: `no_site` 的缩写
- `static_hashes`: 禁用随机哈希
- `no_warnings`: 不输出 Python 的运行时警告
- `-O`: `no_asserts` 的缩写
- `no_docstrings`: 不在编译中包含注释
- `-u`: `unbuffered` 的缩写
- `-m`: 运行模块
- 默认: 运行 nuitka 的 Python 运行标志
- `--python-for-scons=PATH`
- 如果正在用 Python 3.3/3.4 将自动生成一个可以让 Scons 使用的 Python 二进制库
否则 nuitka 将使用运行 nuitka 的 Python 目录或者 Windows 注册表中的 Python 安装路径
在 Python 3.5+ 是需要的? 在 非 Windows 上 Python 2.6/2.7 也需要
## 编译模块和内容选项:
- `--include-package=PACKAGE`
- 编译给定的整个模块和子包
- 输入格式: Python 命名空间
- 例如: `一个模块.的子包`
- nuitka 会寻找并编译这个包和他的所有子包,并且让给定的包可以在代码中引用
- 默认: 空
- `--include-module=MODULE`
- 编译给定的单个模块
- 输入格式: Python 命名空间
- 例如: `一个模块.的子包`
- nuitka 会寻找并编译这个模块,并让给定的包可以在代码中引用
- `--include-plugin-directory=MODULE/PACKAGE`
Include also the code found in that directory,
considering as if they are each given as a main file.
Overrides all other inclusion options. You ought to
prefer other inclusion options, that go by names,
rather than filenames, those find things through being
in "sys.path". This option is for very special use
cases only. Can be given multiple times. Default
empty.
- `--include-plugin-files=PATTERN`
Include into files matching the PATTERN. Overrides all
other follow options. Can be given multiple times.
Default empty.
- `--prefer-source-code`
For already compiled extension modules, where there is
both a source file and an extension module, normally
the extension module is used, but it should be better
to compile the module from available source code for
best performance. If not desired, there is --no-
prefer-source-code to disable warnings about it.
Default off.
Control the following into imported modules:
- `--follow-imports Descend into all imported modules. Defaults to on in`
standalone mode, otherwise off.
- `--follow-import-to=MODULE/PACKAGE`
Follow to that module if used, or if a package, to the
whole package. Can be given multiple times. Default
empty.
- `--nofollow-import-to=MODULE/PACKAGE`
Do not follow to that module name even if used, or if
a package name, to the whole package in any case,
overrides all other options. Can be given multiple
times. Default empty.
- `--nofollow-imports Do not descend into any imported modules at all,`
overrides all other inclusion options and not usable
for standalone mode. Defaults to off.
- `--follow-stdlib Also descend into imported modules from standard`
library. This will increase the compilation time by a
lot and is also not well tested at this time and
sometimes won't work. Defaults to off.
### Onefile 选项:
- `--onefile-tempdir-spec=ONEFILE_TEMPDIR_SPEC`
Use this as a folder to unpack to in onefile mode.
Defaults to '%TEMP%/onefile_%PID%_%TIME%', i.e. user
temporary directory and being non-static it's removed.
Use e.g. a string like
'%CACHE_DIR%/%COMPANY%/%PRODUCT%/%VERSION%' which is a
good static cache path, this will then not be removed.
### 数据文件:
- `--include-package-data=PACKAGE`
Include data files for the given package name. DLLs
and extension modules are not data files and never
included like this. Can use patterns the filenames as
indicated below. Data files of packages are not
included by default, but package configuration can do
it. This will only include non-DLL, non-extension
modules, i.e. actual data files. After a ":"
optionally a filename pattern can be given as well,
selecting only matching files. Examples: "--include-
package-data=package_name" (all files) "--include-
package-data=package_name=*.txt" (only certain type) "
-
- `--include-package-data=package_name=some_filename.dat`
- (concrete file) Default empty.
- `--include-data-files=DESC`
Include data files by filenames in the distribution.
There are many allowed forms. With '--include-data-
files=/path/to/file/*.txt=folder_name/some.txt' it
will copy a single file and complain if it's multiple.
With '--include-data-
files=/path/to/files/*.txt=folder_name/' it will put
all matching files into that folder. For recursive
copy there is a form with 3 values that '--include-
data-files=/path/to/scan=folder_name=**/*.txt' that
will preserve directory structure. Default empty.
- `--include-data-dir=DIRECTORY`
Include data files from complete directory in the
distribution. This is recursive. Check '--include-
data-files' with patterns if you want non-recursive
inclusion. An example would be '--include-data-
dir=/path/some_dir=data/some_dir' for plain copy, of
the whole directory. All files are copied, if you want
to exclude files you need to remove them beforehand,
or use '--noinclude-data-files' option to remove them.
Default empty.
- `--noinclude-data-files=PATTERN`
Do not include data files matching the filename
pattern given. This is against the target filename,
not source paths. So to ignore a file pattern from
package data for "package_name" should be matched as
"package_name/*.txt". Or for the whole directory
simply use "package_name". Default empty.
### DLL 文件:
- `--noinclude-dlls=PATTERN`
Do not include DLL files matching the filename pattern
given. This is against the target filename, not source
paths. So ignore a DLL "someDLL" contained in the
package "package_name" it should be matched as
"package_name/someDLL.*". Default empty.
- `--list-package-dlls=LIST_PACKAGE_DLLS`
Output the DLLs found for a given package name.
Default not done.
### 哪些警告会给到 Nuitka:
- `--warn-implicit-exceptions`
Enable warnings for implicit exceptions detected at
compile time.
- `--warn-unusual-code`
Enable warnings for unusual code detected at compile
time.
- `--assume-yes-for-downloads`
Allow Nuitka to download external code if necessary,
e.g. dependency walker, ccache, and even gcc on
Windows. To disable, redirect input from nul device,
e.g. "</dev/null" or "<NUL:". Default is to prompt.
- `--nowarn-mnemonic=MNEMONIC`
Disable warning for a given mnemonic. These are given
to make sure you are aware of certain topics, and
typically point to the Nuitka website. The mnemonic is
the part of the URL at the end, without the HTML
suffix. Can be given multiple times and accepts shell
pattern. Default empty.
Immediate execution after compilation:
- `--run`
- 编译后立即运行二进制文件(或者导入编译的模块)
- 默认: `禁用`
- `--debugger`
- 在 debugger 中运行
- 例如: "gdb" 或 "lldb"
- 用于自动获取堆栈跟踪
- 默认: `禁用`
- `--execute-with-pythonpath`
When immediately executing the created binary or
module using '--run', don't reset 'PYTHONPATH'
environment. When all modules are successfully
included, you ought to not need PYTHONPATH anymore,
and definitely not for standalone mode.
Compilation choices:
- `--user-package-configuration-file=YAML_FILENAME`
User provided Yaml file with package configuration.
You can include DLLs, remove bloat, add hidden
dependencies. Check User Manual for a complete
description of the format to use. Can be given
multiple times. Defaults to empty.
- `--full-compat Enforce absolute compatibility with CPython. Do not`
even allow minor deviations from CPython behavior,
e.g. not having better tracebacks or exception
messages which are not really incompatible, but only
different or worse. This is intended for tests only
and should *not* be used.
- `--file-reference-choice=MODE`
Select what value "__file__" is going to be. With
"runtime" (default for standalone binary mode and
module mode), the created binaries and modules, use
the location of themselves to deduct the value of
"__file__". Included packages pretend to be in
directories below that location. This allows you to
include data files in deployments. If you merely seek
acceleration, it's better for you to use the
"original" value, where the source files location will
be used. With "frozen" a notation "<frozen
module_name>" is used. For compatibility reasons, the
"__file__" value will always have ".py" suffix
independent of what it really is.
- `--module-name-choice=MODE`
Select what value "__name__" and "__package__" are
going to be. With "runtime" (default for module mode),
the created module uses the parent package to deduce
the value of "__package__", to be fully compatible.
The value "original" (default for other modes) allows
for more static optimization to happen, but is
incompatible for modules that normally can be loaded
into any package.
Output choices:
- `--output-filename=FILENAME`
Specify how the executable should be named. For
extension modules there is no choice, also not for
standalone mode and using it will be an error. This
may include path information that needs to exist
though. Defaults to '<program_name>' on this platform.
.exe
- `--output-dir=DIRECTORY`
Specify where intermediate and final output files
should be put. The DIRECTORY will be populated with
build folder, dist folder, binaries, etc. Defaults to
current directory.
- `--remove-output Removes the build directory after producing the module`
or exe file. Defaults to off.
- `--no-pyi-file Do not create a ".pyi" file for extension modules`
created by Nuitka. This is used to detect implicit
imports. Defaults to off.
## Debug 特性:
- `--debug Executing all self checks possible to find errors in`
Nuitka, do not use for production. Defaults to off.
- `--unstripped Keep debug info in the resulting object file for`
better debugger interaction. Defaults to off.
- `--profile`
- 启用基于 `vmprof` 的效率检测
- 现在还用不了
- 默认: `禁用`
- `--internal-graph Create graph of optimization process internals, do not`
use for whole programs, but only for small test cases.
Defaults to off.
- `--trace-execution Traced execution output, output the line of code`
before executing it. Defaults to off.
- `--recompile-c-only This is not incremental compilation, but for Nuitka`
development only. Takes existing files and simply
compile them as C again. Allows compiling edited C
files for quick debugging changes to the generated
source, e.g. to see if code is passed by, values
output, etc, Defaults to off. Depends on compiling
Python source to determine which files it should look
at.
- `--xml=XML_FILENAME Write the internal program structure, result of`
optimization in XML form to given filename.
- `--generate-c-only`
- 仅编译成 C 代码,不编译为可执行文件或者模块
- 此选项是为了那些不想浪费 CPU 资源的 单纯为了 debug 或者 覆盖率检测的编译
- 不要觉得你能直接做到这样
- 默认: `禁用`
- `--experimental=FLAG`
Use features declared as 'experimental'. May have no
effect if no experimental features are present in the
code. Uses secret tags (check source) per experimented
feature.
- `--low-memory Attempt to use less memory, by forking less C`
compilation jobs and using options that use less
memory. For use on embedded machines. Use this in case
of out of memory problems. Defaults to off.
### 后端 C 编译器选项:
- `--clang
- 强制使用 `clang` 编译器
- 在 Windows 上需要一个可用的 Visual Studio Enforce the use of clang. On Windows this requires a`
working Visual Studio version to piggy back on.
Defaults to off.
- `--mingw64
- 在 Windows 上强制使用 MinGW64 编译器
- 除非运行在 MSYS2 和 Mingw 编译的 Python 上
- 默认: `禁用`
- `--msvc=MSVC_VERSION`
- 在 Windows 上强制使用给定版本的 MSVC 编译器
Enforce the use of specific MSVC version on Windows.
Allowed values are e.g. "14.3" (MSVC 2022) and other
MSVC version numbers, specify "list" for a list of
installed compilers, or use "latest". Defaults to
latest MSVC being used if installed, otherwise MinGW64
is used.
- `--jobs=N
- 指定最多可同时运行的 C 编译器数量
- 默认: 你的 CPU 线程数
- `--lto=choice
- 使用 来自编译器的 链接时间优化
- Use link time optimizations (MSVC, gcc, clang).`
Allowed values are "yes", "no", and "auto" (when it's
known to work). Defaults to "auto".
- `--static-libpython=choice`
Use static link library of Python. Allowed values are
"yes", "no", and "auto" (when it's known to work).
Defaults to "auto".
Cache Control:
- `--disable-cache=DISABLED_CACHES`
Disable selected caches, specify "all" for all cached.
Currently allowed values are:
"all","ccache","bytecode","dll-dependencies". can be
given multiple times or with comma separated values.
Default none.
- `--clean-cache=CLEAN_CACHES`
Clean the given caches before executing, specify "all"
for all cached. Currently allowed values are:
"all","ccache","bytecode","dll-dependencies". can be
given multiple times or with comma separated values.
Default none.
- `--disable-bytecode-cache`
Do not reuse dependency analysis results for modules,
esp. from standard library, that are included as
bytecode. Same as --disable-cache=bytecode.
- `--disable-ccache Do not attempt to use ccache (gcc, clang, etc.) or`
clcache (MSVC, clangcl). Same as --disable-
cache=ccache.
- `--disable-dll-dependency-cache`
Disable the dependency walker cache. Will result in
much longer times to create the distribution folder,
but might be used in case the cache is suspect to
cause errors. Same as --disable-cache=dll-
dependencies.
- `--force-dll-dependency-cache-update`
For an update of the dependency walker cache. Will
result in much longer times to create the distribution
folder, but might be used in case the cache is suspect
to cause errors or known to need an update.
## PGO 编译选项:
- `--pgo Enables C level profile guided optimization (PGO), by`
executing a dedicated build first for a profiling run,
and then using the result to feedback into the C
compilation. Note: This is experimental and not
working with standalone modes of Nuitka yet. Defaults
to off.
- `--pgo-args=PGO_ARGS`
Arguments to be passed in case of profile guided
optimization. These are passed to the special built
executable during the PGO profiling run. Default
empty.
- `--pgo-executable=PGO_EXECUTABLE`
Command to execute when collecting profile
information. Use this only, if you need to launch it
through a script that prepares it to run. Default use
created program.
### Tracing features:
- `--report=REPORT_FILENAME`
Report module, data files, compilation, plugin, etc.
details in an XML output file. This is also super
useful for issue reporting. Default is off.
- `--quiet Disable all information outputs, but show warnings.`
Defaults to off.
- `--show-scons Run the C building backend Scons with verbose`
information, showing the executed commands, detected
compilers. Defaults to off.
- `--no-progressbar Disable progress bars. Defaults to off.`
- `--show-progress Obsolete: Provide progress information and statistics.`
Disables normal progress bar. Defaults to off.
- `--show-memory Provide memory information and statistics. Defaults to`
off.
- `--show-modules Provide information for included modules and DLLs`
Obsolete: You should use '--report' file instead.
Defaults to off.
- `--show-modules-output=PATH`
Where to output '--show-modules', should be a
filename. Default is standard output.
- `--verbose Output details of actions taken, esp. in`
optimizations. Can become a lot. Defaults to off.
- `--verbose-output=PATH`
Where to output from '--verbose', should be a
filename. Default is standard output.
General OS controls:
- `--disable-console When compiling for Windows or macOS, disable the`
console window and create a GUI application. Defaults
to off.
- `--enable-console When compiling for Windows or macOS, enable the`
console window and create a console application. This
disables hints from certain modules, e.g. "PySide"
that suggest to disable it. Defaults to true.
- `--force-stdout-spec=FORCE_STDOUT_SPEC`
Force standard output of the program to go to this
location. Useful for programs with disabled console
and programs using the Windows Services Plugin of
Nuitka commercial. Defaults to not active, use e.g.
'%PROGRAM%.out.txt', i.e. file near your program.
- `--force-stderr-spec=FORCE_STDERR_SPEC`
Force standard error of the program to go to this
location. Useful for programs with disabled console
and programs using the Windows Services Plugin of
Nuitka commercial. Defaults to not active, use e.g.
'%PROGRAM%.err.txt', i.e. file near your program.
Windows specific controls:
- `--windows-icon-from-ico=ICON_PATH`
Add executable icon. Can be given multiple times for
different resolutions or files with multiple icons
inside. In the later case, you may also suffix with
#<n> where n is an integer index starting from 1,
specifying a specific icon to be included, and all
others to be ignored.
- `--windows-icon-from-exe=ICON_EXE_PATH`
Copy executable icons from this existing executable
(Windows only).
- `--onefile-windows-splash-screen-image=SPLASH_SCREEN_IMAGE`
When compiling for Windows and onefile, show this
while loading the application. Defaults to off.
- `--windows-uac-admin`
Request Windows User Control, to grant admin rights on
execution. (Windows only). Defaults to off.
- `--windows-uac-uiaccess`
Request Windows User Control, to enforce running from
a few folders only, remote desktop access. (Windows
only). Defaults to off.
macOS specific controls:
- `--macos-target-arch=MACOS_TARGET_ARCH`
What architectures is this to supposed to run on.
Default and limit is what the running Python allows
for. Default is "native" which is the architecture the
Python is run with.
- `--macos-create-app-bundle`
When compiling for macOS, create a bundle rather than
a plain binary application. Currently experimental and
incomplete. Currently this is the only way to unlock
disabling of console.Defaults to off.
- `--macos-app-icon=ICON_PATH`
Add icon for the application bundle to use. Can be
given only one time. Defaults to Python icon if
available.
- `--macos-signed-app-name=MACOS_SIGNED_APP_NAME`
Name of the application to use for macOS signing.
Follow "com.YourCompany.AppName" naming results for
best results, as these have to be globally unique, and
will potentially grant protected API accesses.
- `--macos-app-name=MACOS_APP_NAME`
Name of the product to use in macOS bundle
information. Defaults to base filename of the binary.
- `--macos-app-mode=MODE`
Mode of application for the application bundle. When
launching a Window, and appearing in Docker is
desired, default value "gui" is a good fit. Without a
Window ever, the application is a "background"
application. For UI elements that get to display
later, "ui-element" is in-between. The application
will not appear in dock, but get full access to
desktop when it does open a Window later.
- `--macos-sign-identity=MACOS_APP_VERSION`
When signing on macOS, by default an ad-hoc identify
will be used, but with this option your get to specify
another identity to use. The signing of code is now
mandatory on macOS and cannot be disabled. Default
"ad-hoc" if not given.
- `--macos-sign-notarization`
When signing for notarization, using a proper TeamID
identity from Apple, use the required runtime signing
option, such that it can be accepted.
- `--macos-app-version=MACOS_APP_VERSION`
Product version to use in macOS bundle information.
Defaults to "1.0" if not given.
- `--macos-app-protected-resource=RESOURCE_DESC`
Request an entitlement for access to a macOS protected
resources, e.g.
"NSMicrophoneUsageDescription:Microphone access for
recording audio." requests access to the microphone
and provides an informative text for the user, why
that is needed. Before the colon, is an OS identifier
for an access right, then the informative text. Legal
values can be found on https://developer.apple.com/doc
umentation/bundleresources/information_property_list/p
rotected_resources and the option can be specified
multiple times. Default empty.
Linux specific controls:
- `--linux-icon=ICON_PATH`
Add executable icon for onefile binary to use. Can be
given only one time. Defaults to Python icon if
available.
Binary Version Information:
- `--company-name=COMPANY_NAME`
Name of the company to use in version information.
Defaults to unused.
- `--product-name=PRODUCT_NAME`
Name of the product to use in version information.
Defaults to base filename of the binary.
- `--file-version=FILE_VERSION`
File version to use in version information. Must be a
sequence of up to 4 numbers, e.g. 1.0 or 1.0.0.0, no
more digits are allowed, no strings are allowed.
Defaults to unused.
- `--product-version=PRODUCT_VERSION`
Product version to use in version information. Same
rules as for file version. Defaults to unused.
- `--file-description=FILE_DESCRIPTION`
Description of the file used in version information.
Windows only at this time. Defaults to binary
filename.
- `--copyright=COPYRIGHT_TEXT`
Copyright used in version information. Windows only at
this time. Defaults to not present.
- `--trademarks=TRADEMARK_TEXT`
Copyright used in version information. Windows only at
this time. Defaults to not present.
Plugin control:
- `--enable-plugin=PLUGIN_NAME`
Enabled plugins. Must be plug-in names. Use '--plugin-
list' to query the full list and exit. Default empty.
- `--disable-plugin=PLUGIN_NAME`
Disabled plugins. Must be plug-in names. Use '--
plugin-list' to query the full list and exit. Most
standard plugins are not a good idea to disable.
Default empty.
- `--plugin-no-detection`
Plugins can detect if they might be used, and the you
can disable the warning via "--disable-plugin=plugin-
that-warned", or you can use this option to disable
the mechanism entirely, which also speeds up
compilation slightly of course as this detection code
is run in vain once you are certain of which plugins
to use. Defaults to off.
- `--plugin-list Show list of all available plugins and exit. Defaults`
to off.
- `--user-plugin=PATH The file name of user plugin. Can be given multiple`
times. Default empty.
- `--show-source-changes`
Show source changes to original Python file content
before compilation. Mostly intended for developing
plugins. Default False.
Plugin options of 'anti-bloat':
- `--show-anti-bloat-changes`
Annotate what changes are by the plugin done.
- `--noinclude-setuptools-mode=NOINCLUDE_SETUPTOOLS_MODE`
What to do if a 'setuptools' or import is encountered.
This package can be big with dependencies, and should
definitely be avoided. Also handles 'setuptools_scm'.
- `--noinclude-pytest-mode=NOINCLUDE_PYTEST_MODE`
What to do if a 'pytest' import is encountered. This
package can be big with dependencies, and should
definitely be avoided. Also handles 'nose' imports.
- `--noinclude-unittest-mode=NOINCLUDE_UNITTEST_MODE`
What to do if a unittest import is encountered. This
package can be big with dependencies, and should
definitely be avoided.
- `--noinclude-IPython-mode=NOINCLUDE_IPYTHON_MODE`
What to do if a IPython import is encountered. This
package can be big with dependencies, and should
definitely be avoided.
- `--noinclude-dask-mode=NOINCLUDE_DASK_MODE`
What to do if a 'dask' import is encountered. This
package can be big with dependencies, and should
definitely be avoided.
- `--noinclude-numba-mode=NOINCLUDE_NUMBA_MODE`
What to do if a 'numba' import is encountered. This
package can be big with dependencies, and is currently
not working for standalone. This package is big with
dependencies, and should definitely be avoided.
- `--noinclude-default-mode=NOINCLUDE_DEFAULT_MODE`
This actually provides the default "warning" value for
above options, and can be used to turn all of these
on.
- `--noinclude-custom-mode=CUSTOM_CHOICES`
What to do if a specific import is encountered. Format
is module name, which can and should be a top level
package and then one choice, "error", "warning",
"nofollow", e.g. PyQt5:error.

View File

@ -0,0 +1,582 @@
# nuitka 1.3.7 --help
``` text
Usage: __main__.py [--module] [--run] [options] main_module.py
Options:
--help show this help message and exit
--version Show version information and important details for bug
reports, then exit. Defaults to off.
--module Create an extension module executable instead of a
program. Defaults to off.
--standalone Enable standalone mode for output. This allows you to
transfer the created binary to other machines without
it using an existing Python installation. This also
means it will become big. It implies these option: "--
follow-imports" and "--python-flag=no_site". Defaults
to off.
--onefile On top of standalone mode, enable onefile mode. This
means not a folder, but a compressed executable is
created and used. Defaults to off.
--python-debug Use debug version or not. Default uses what you are
using to run Nuitka, most likely a non-debug version.
--python-flag=FLAG Python flags to use. Default is what you are using to
run Nuitka, this enforces a specific mode. These are
options that also exist to standard Python executable.
Currently supported: "-S" (alias "no_site"),
"static_hashes" (do not use hash randomization),
"no_warnings" (do not give Python run time warnings),
"-O" (alias "no_asserts"), "no_docstrings" (do not use
doc strings), "-u" (alias "unbuffered") and "-m".
Default empty.
--python-for-scons=PATH
If using Python3.3 or Python3.4, provide the path of a
Python binary to use for Scons. Otherwise Nuitka can
use what you run Nuitka with or a Python installation
from Windows registry. On Windows Python 3.5 or higher
is needed. On non-Windows, Python 2.6 or 2.7 will do
as well.
Control the inclusion of modules and packages in result:
--include-package=PACKAGE
Include a whole package. Give as a Python namespace,
e.g. "some_package.sub_package" and Nuitka will then
find it and include it and all the modules found below
that disk location in the binary or extension module
it creates, and make it available for import by the
code. To avoid unwanted sub packages, e.g. tests you
can e.g. do this "--nofollow-import-to=*.tests".
Default empty.
--include-module=MODULE
Include a single module. Give as a Python namespace,
e.g. "some_package.some_module" and Nuitka will then
find it and include it in the binary or extension
module it creates, and make it available for import by
the code. Default empty.
--include-plugin-directory=MODULE/PACKAGE
Include also the code found in that directory,
considering as if they are each given as a main file.
Overrides all other inclusion options. You ought to
prefer other inclusion options, that go by names,
rather than filenames, those find things through being
in "sys.path". This option is for very special use
cases only. Can be given multiple times. Default
empty.
--include-plugin-files=PATTERN
Include into files matching the PATTERN. Overrides all
other follow options. Can be given multiple times.
Default empty.
--prefer-source-code
For already compiled extension modules, where there is
both a source file and an extension module, normally
the extension module is used, but it should be better
to compile the module from available source code for
best performance. If not desired, there is --no-
prefer-source-code to disable warnings about it.
Default off.
Control the following into imported modules:
--follow-imports Descend into all imported modules. Defaults to on in
standalone mode, otherwise off.
--follow-import-to=MODULE/PACKAGE
Follow to that module if used, or if a package, to the
whole package. Can be given multiple times. Default
empty.
--nofollow-import-to=MODULE/PACKAGE
Do not follow to that module name even if used, or if
a package name, to the whole package in any case,
overrides all other options. Can be given multiple
times. Default empty.
--nofollow-imports Do not descend into any imported modules at all,
overrides all other inclusion options and not usable
for standalone mode. Defaults to off.
--follow-stdlib Also descend into imported modules from standard
library. This will increase the compilation time by a
lot and is also not well tested at this time and
sometimes won't work. Defaults to off.
Onefile options:
--onefile-tempdir-spec=ONEFILE_TEMPDIR_SPEC
Use this as a folder to unpack to in onefile mode.
Defaults to '%TEMP%/onefile_%PID%_%TIME%', i.e. user
temporary directory and being non-static it's removed.
Use e.g. a string like
'%CACHE_DIR%/%COMPANY%/%PRODUCT%/%VERSION%' which is a
good static cache path, this will then not be removed.
Data files:
--include-package-data=PACKAGE
Include data files for the given package name. DLLs
and extension modules are not data files and never
included like this. Can use patterns the filenames as
indicated below. Data files of packages are not
included by default, but package configuration can do
it. This will only include non-DLL, non-extension
modules, i.e. actual data files. After a ":"
optionally a filename pattern can be given as well,
selecting only matching files. Examples: "--include-
package-data=package_name" (all files) "--include-
package-data=package_name=*.txt" (only certain type) "
--include-package-data=package_name=some_filename.dat
(concrete file) Default empty.
--include-data-files=DESC
Include data files by filenames in the distribution.
There are many allowed forms. With '--include-data-
files=/path/to/file/*.txt=folder_name/some.txt' it
will copy a single file and complain if it's multiple.
With '--include-data-
files=/path/to/files/*.txt=folder_name/' it will put
all matching files into that folder. For recursive
copy there is a form with 3 values that '--include-
data-files=/path/to/scan=folder_name=**/*.txt' that
will preserve directory structure. Default empty.
--include-data-dir=DIRECTORY
Include data files from complete directory in the
distribution. This is recursive. Check '--include-
data-files' with patterns if you want non-recursive
inclusion. An example would be '--include-data-
dir=/path/some_dir=data/some_dir' for plain copy, of
the whole directory. All files are copied, if you want
to exclude files you need to remove them beforehand,
or use '--noinclude-data-files' option to remove them.
Default empty.
--noinclude-data-files=PATTERN
Do not include data files matching the filename
pattern given. This is against the target filename,
not source paths. So to ignore a file pattern from
package data for "package_name" should be matched as
"package_name/*.txt". Or for the whole directory
simply use "package_name". Default empty.
DLL files:
--noinclude-dlls=PATTERN
Do not include DLL files matching the filename pattern
given. This is against the target filename, not source
paths. So ignore a DLL "someDLL" contained in the
package "package_name" it should be matched as
"package_name/someDLL.*". Default empty.
--list-package-dlls=LIST_PACKAGE_DLLS
Output the DLLs found for a given package name.
Default not done.
Control the warnings to be given by Nuitka:
--warn-implicit-exceptions
Enable warnings for implicit exceptions detected at
compile time.
--warn-unusual-code
Enable warnings for unusual code detected at compile
time.
--assume-yes-for-downloads
Allow Nuitka to download external code if necessary,
e.g. dependency walker, ccache, and even gcc on
Windows. To disable, redirect input from nul device,
e.g. "</dev/null" or "<NUL:". Default is to prompt.
--nowarn-mnemonic=MNEMONIC
Disable warning for a given mnemonic. These are given
to make sure you are aware of certain topics, and
typically point to the Nuitka website. The mnemonic is
the part of the URL at the end, without the HTML
suffix. Can be given multiple times and accepts shell
pattern. Default empty.
Immediate execution after compilation:
--run Execute immediately the created binary (or import the
compiled module). Defaults to off.
--debugger Execute inside a debugger, e.g. "gdb" or "lldb" to
automatically get a stack trace. Defaults to off.
--execute-with-pythonpath
When immediately executing the created binary or
module using '--run', don't reset 'PYTHONPATH'
environment. When all modules are successfully
included, you ought to not need PYTHONPATH anymore,
and definitely not for standalone mode.
Compilation choices:
--user-package-configuration-file=YAML_FILENAME
User provided Yaml file with package configuration.
You can include DLLs, remove bloat, add hidden
dependencies. Check User Manual for a complete
description of the format to use. Can be given
multiple times. Defaults to empty.
--full-compat Enforce absolute compatibility with CPython. Do not
even allow minor deviations from CPython behavior,
e.g. not having better tracebacks or exception
messages which are not really incompatible, but only
different or worse. This is intended for tests only
and should *not* be used.
--file-reference-choice=MODE
Select what value "__file__" is going to be. With
"runtime" (default for standalone binary mode and
module mode), the created binaries and modules, use
the location of themselves to deduct the value of
"__file__". Included packages pretend to be in
directories below that location. This allows you to
include data files in deployments. If you merely seek
acceleration, it's better for you to use the
"original" value, where the source files location will
be used. With "frozen" a notation "<frozen
module_name>" is used. For compatibility reasons, the
"__file__" value will always have ".py" suffix
independent of what it really is.
--module-name-choice=MODE
Select what value "__name__" and "__package__" are
going to be. With "runtime" (default for module mode),
the created module uses the parent package to deduce
the value of "__package__", to be fully compatible.
The value "original" (default for other modes) allows
for more static optimization to happen, but is
incompatible for modules that normally can be loaded
into any package.
Output choices:
--output-filename=FILENAME
Specify how the executable should be named. For
extension modules there is no choice, also not for
standalone mode and using it will be an error. This
may include path information that needs to exist
though. Defaults to '<program_name>' on this platform.
.exe
--output-dir=DIRECTORY
Specify where intermediate and final output files
should be put. The DIRECTORY will be populated with
build folder, dist folder, binaries, etc. Defaults to
current directory.
--remove-output Removes the build directory after producing the module
or exe file. Defaults to off.
--no-pyi-file Do not create a ".pyi" file for extension modules
created by Nuitka. This is used to detect implicit
imports. Defaults to off.
Debug features:
--debug Executing all self checks possible to find errors in
Nuitka, do not use for production. Defaults to off.
--unstripped Keep debug info in the resulting object file for
better debugger interaction. Defaults to off.
--profile Enable vmprof based profiling of time spent. Not
working currently. Defaults to off.
--internal-graph Create graph of optimization process internals, do not
use for whole programs, but only for small test cases.
Defaults to off.
--trace-execution Traced execution output, output the line of code
before executing it. Defaults to off.
--recompile-c-only This is not incremental compilation, but for Nuitka
development only. Takes existing files and simply
compile them as C again. Allows compiling edited C
files for quick debugging changes to the generated
source, e.g. to see if code is passed by, values
output, etc, Defaults to off. Depends on compiling
Python source to determine which files it should look
at.
--xml=XML_FILENAME Write the internal program structure, result of
optimization in XML form to given filename.
--generate-c-only Generate only C source code, and do not compile it to
binary or module. This is for debugging and code
coverage analysis that doesn't waste CPU. Defaults to
off. Do not think you can use this directly.
--experimental=FLAG
Use features declared as 'experimental'. May have no
effect if no experimental features are present in the
code. Uses secret tags (check source) per experimented
feature.
--low-memory Attempt to use less memory, by forking less C
compilation jobs and using options that use less
memory. For use on embedded machines. Use this in case
of out of memory problems. Defaults to off.
Backend C compiler choice:
--clang Enforce the use of clang. On Windows this requires a
working Visual Studio version to piggy back on.
Defaults to off.
--mingw64 Enforce the use of MinGW64 on Windows. Defaults to off
unless MSYS2 with MinGW Python is used.
--msvc=MSVC_VERSION
Enforce the use of specific MSVC version on Windows.
Allowed values are e.g. "14.3" (MSVC 2022) and other
MSVC version numbers, specify "list" for a list of
installed compilers, or use "latest". Defaults to
latest MSVC being used if installed, otherwise MinGW64
is used.
--jobs=N Specify the allowed number of parallel C compiler
jobs. Defaults to the system CPU count.
--lto=choice Use link time optimizations (MSVC, gcc, clang).
Allowed values are "yes", "no", and "auto" (when it's
known to work). Defaults to "auto".
--static-libpython=choice
Use static link library of Python. Allowed values are
"yes", "no", and "auto" (when it's known to work).
Defaults to "auto".
Cache Control:
--disable-cache=DISABLED_CACHES
Disable selected caches, specify "all" for all cached.
Currently allowed values are:
"all","ccache","bytecode","dll-dependencies". can be
given multiple times or with comma separated values.
Default none.
--clean-cache=CLEAN_CACHES
Clean the given caches before executing, specify "all"
for all cached. Currently allowed values are:
"all","ccache","bytecode","dll-dependencies". can be
given multiple times or with comma separated values.
Default none.
--disable-bytecode-cache
Do not reuse dependency analysis results for modules,
esp. from standard library, that are included as
bytecode. Same as --disable-cache=bytecode.
--disable-ccache Do not attempt to use ccache (gcc, clang, etc.) or
clcache (MSVC, clangcl). Same as --disable-
cache=ccache.
--disable-dll-dependency-cache
Disable the dependency walker cache. Will result in
much longer times to create the distribution folder,
but might be used in case the cache is suspect to
cause errors. Same as --disable-cache=dll-
dependencies.
--force-dll-dependency-cache-update
For an update of the dependency walker cache. Will
result in much longer times to create the distribution
folder, but might be used in case the cache is suspect
to cause errors or known to need an update.
PGO compilation choices:
--pgo Enables C level profile guided optimization (PGO), by
executing a dedicated build first for a profiling run,
and then using the result to feedback into the C
compilation. Note: This is experimental and not
working with standalone modes of Nuitka yet. Defaults
to off.
--pgo-args=PGO_ARGS
Arguments to be passed in case of profile guided
optimization. These are passed to the special built
executable during the PGO profiling run. Default
empty.
--pgo-executable=PGO_EXECUTABLE
Command to execute when collecting profile
information. Use this only, if you need to launch it
through a script that prepares it to run. Default use
created program.
Tracing features:
--report=REPORT_FILENAME
Report module, data files, compilation, plugin, etc.
details in an XML output file. This is also super
useful for issue reporting. Default is off.
--quiet Disable all information outputs, but show warnings.
Defaults to off.
--show-scons Run the C building backend Scons with verbose
information, showing the executed commands, detected
compilers. Defaults to off.
--no-progressbar Disable progress bars. Defaults to off.
--show-progress Obsolete: Provide progress information and statistics.
Disables normal progress bar. Defaults to off.
--show-memory Provide memory information and statistics. Defaults to
off.
--show-modules Provide information for included modules and DLLs
Obsolete: You should use '--report' file instead.
Defaults to off.
--show-modules-output=PATH
Where to output '--show-modules', should be a
filename. Default is standard output.
--verbose Output details of actions taken, esp. in
optimizations. Can become a lot. Defaults to off.
--verbose-output=PATH
Where to output from '--verbose', should be a
filename. Default is standard output.
General OS controls:
--disable-console When compiling for Windows or macOS, disable the
console window and create a GUI application. Defaults
to off.
--enable-console When compiling for Windows or macOS, enable the
console window and create a console application. This
disables hints from certain modules, e.g. "PySide"
that suggest to disable it. Defaults to true.
--force-stdout-spec=FORCE_STDOUT_SPEC
Force standard output of the program to go to this
location. Useful for programs with disabled console
and programs using the Windows Services Plugin of
Nuitka commercial. Defaults to not active, use e.g.
'%PROGRAM%.out.txt', i.e. file near your program.
--force-stderr-spec=FORCE_STDERR_SPEC
Force standard error of the program to go to this
location. Useful for programs with disabled console
and programs using the Windows Services Plugin of
Nuitka commercial. Defaults to not active, use e.g.
'%PROGRAM%.err.txt', i.e. file near your program.
Windows specific controls:
--windows-icon-from-ico=ICON_PATH
Add executable icon. Can be given multiple times for
different resolutions or files with multiple icons
inside. In the later case, you may also suffix with
#<n> where n is an integer index starting from 1,
specifying a specific icon to be included, and all
others to be ignored.
--windows-icon-from-exe=ICON_EXE_PATH
Copy executable icons from this existing executable
(Windows only).
--onefile-windows-splash-screen-image=SPLASH_SCREEN_IMAGE
When compiling for Windows and onefile, show this
while loading the application. Defaults to off.
--windows-uac-admin
Request Windows User Control, to grant admin rights on
execution. (Windows only). Defaults to off.
--windows-uac-uiaccess
Request Windows User Control, to enforce running from
a few folders only, remote desktop access. (Windows
only). Defaults to off.
macOS specific controls:
--macos-target-arch=MACOS_TARGET_ARCH
What architectures is this to supposed to run on.
Default and limit is what the running Python allows
for. Default is "native" which is the architecture the
Python is run with.
--macos-create-app-bundle
When compiling for macOS, create a bundle rather than
a plain binary application. Currently experimental and
incomplete. Currently this is the only way to unlock
disabling of console.Defaults to off.
--macos-app-icon=ICON_PATH
Add icon for the application bundle to use. Can be
given only one time. Defaults to Python icon if
available.
--macos-signed-app-name=MACOS_SIGNED_APP_NAME
Name of the application to use for macOS signing.
Follow "com.YourCompany.AppName" naming results for
best results, as these have to be globally unique, and
will potentially grant protected API accesses.
--macos-app-name=MACOS_APP_NAME
Name of the product to use in macOS bundle
information. Defaults to base filename of the binary.
--macos-app-mode=MODE
Mode of application for the application bundle. When
launching a Window, and appearing in Docker is
desired, default value "gui" is a good fit. Without a
Window ever, the application is a "background"
application. For UI elements that get to display
later, "ui-element" is in-between. The application
will not appear in dock, but get full access to
desktop when it does open a Window later.
--macos-sign-identity=MACOS_APP_VERSION
When signing on macOS, by default an ad-hoc identify
will be used, but with this option your get to specify
another identity to use. The signing of code is now
mandatory on macOS and cannot be disabled. Default
"ad-hoc" if not given.
--macos-sign-notarization
When signing for notarization, using a proper TeamID
identity from Apple, use the required runtime signing
option, such that it can be accepted.
--macos-app-version=MACOS_APP_VERSION
Product version to use in macOS bundle information.
Defaults to "1.0" if not given.
--macos-app-protected-resource=RESOURCE_DESC
Request an entitlement for access to a macOS protected
resources, e.g.
"NSMicrophoneUsageDescription:Microphone access for
recording audio." requests access to the microphone
and provides an informative text for the user, why
that is needed. Before the colon, is an OS identifier
for an access right, then the informative text. Legal
values can be found on https://developer.apple.com/doc
umentation/bundleresources/information_property_list/p
rotected_resources and the option can be specified
multiple times. Default empty.
Linux specific controls:
--linux-icon=ICON_PATH
Add executable icon for onefile binary to use. Can be
given only one time. Defaults to Python icon if
available.
Binary Version Information:
--company-name=COMPANY_NAME
Name of the company to use in version information.
Defaults to unused.
--product-name=PRODUCT_NAME
Name of the product to use in version information.
Defaults to base filename of the binary.
--file-version=FILE_VERSION
File version to use in version information. Must be a
sequence of up to 4 numbers, e.g. 1.0 or 1.0.0.0, no
more digits are allowed, no strings are allowed.
Defaults to unused.
--product-version=PRODUCT_VERSION
Product version to use in version information. Same
rules as for file version. Defaults to unused.
--file-description=FILE_DESCRIPTION
Description of the file used in version information.
Windows only at this time. Defaults to binary
filename.
--copyright=COPYRIGHT_TEXT
Copyright used in version information. Windows only at
this time. Defaults to not present.
--trademarks=TRADEMARK_TEXT
Copyright used in version information. Windows only at
this time. Defaults to not present.
Plugin control:
--enable-plugin=PLUGIN_NAME
Enabled plugins. Must be plug-in names. Use '--plugin-
list' to query the full list and exit. Default empty.
--disable-plugin=PLUGIN_NAME
Disabled plugins. Must be plug-in names. Use '--
plugin-list' to query the full list and exit. Most
standard plugins are not a good idea to disable.
Default empty.
--plugin-no-detection
Plugins can detect if they might be used, and the you
can disable the warning via "--disable-plugin=plugin-
that-warned", or you can use this option to disable
the mechanism entirely, which also speeds up
compilation slightly of course as this detection code
is run in vain once you are certain of which plugins
to use. Defaults to off.
--plugin-list Show list of all available plugins and exit. Defaults
to off.
--user-plugin=PATH The file name of user plugin. Can be given multiple
times. Default empty.
--show-source-changes
Show source changes to original Python file content
before compilation. Mostly intended for developing
plugins. Default False.
Plugin options of 'anti-bloat':
--show-anti-bloat-changes
Annotate what changes are by the plugin done.
--noinclude-setuptools-mode=NOINCLUDE_SETUPTOOLS_MODE
What to do if a 'setuptools' or import is encountered.
This package can be big with dependencies, and should
definitely be avoided. Also handles 'setuptools_scm'.
--noinclude-pytest-mode=NOINCLUDE_PYTEST_MODE
What to do if a 'pytest' import is encountered. This
package can be big with dependencies, and should
definitely be avoided. Also handles 'nose' imports.
--noinclude-unittest-mode=NOINCLUDE_UNITTEST_MODE
What to do if a unittest import is encountered. This
package can be big with dependencies, and should
definitely be avoided.
--noinclude-IPython-mode=NOINCLUDE_IPYTHON_MODE
What to do if a IPython import is encountered. This
package can be big with dependencies, and should
definitely be avoided.
--noinclude-dask-mode=NOINCLUDE_DASK_MODE
What to do if a 'dask' import is encountered. This
package can be big with dependencies, and should
definitely be avoided.
--noinclude-numba-mode=NOINCLUDE_NUMBA_MODE
What to do if a 'numba' import is encountered. This
package can be big with dependencies, and is currently
not working for standalone. This package is big with
dependencies, and should definitely be avoided.
--noinclude-default-mode=NOINCLUDE_DEFAULT_MODE
This actually provides the default "warning" value for
above options, and can be used to turn all of these
on.
--noinclude-custom-mode=CUSTOM_CHOICES
What to do if a specific import is encountered. Format
is module name, which can and should be a top level
package and then one choice, "error", "warning",
"nofollow", e.g. PyQt5:error.
```

View File

@ -0,0 +1,629 @@
# nuitka 1.6.1 --help
``` text
Usage: __main__.py [--module] [--run] [options] main_module.py
Options:
--help show this help message and exit
--version Show version information and important details for bug
reports, then exit. Defaults to off.
--module Create an extension module executable instead of a
program. Defaults to off.
--standalone Enable standalone mode for output. This allows you to
transfer the created binary to other machines without
it using an existing Python installation. This also
means it will become big. It implies these option: "--
follow-imports" and "--python-flag=no_site". Defaults
to off.
--onefile On top of standalone mode, enable onefile mode. This
means not a folder, but a compressed executable is
created and used. Defaults to off.
--python-debug Use debug version or not. Default uses what you are
using to run Nuitka, most likely a non-debug version.
--python-flag=FLAG Python flags to use. Default is what you are using to
run Nuitka, this enforces a specific mode. These are
options that also exist to standard Python executable.
Currently supported: "-S" (alias "no_site"),
"static_hashes" (do not use hash randomization),
"no_warnings" (do not give Python run time warnings),
"-O" (alias "no_asserts"), "no_docstrings" (do not use
doc strings), "-u" (alias "unbuffered") and "-m".
Default empty.
--python-for-scons=PATH
If using Python3.3 or Python3.4, provide the path of a
Python binary to use for Scons. Otherwise Nuitka can
use what you run Nuitka with or a Python installation
from Windows registry. On Windows Python 3.5 or higher
is needed. On non-Windows, Python 2.6 or 2.7 will do
as well.
Control the inclusion of modules and packages in result:
--include-package=PACKAGE
Include a whole package. Give as a Python namespace,
e.g. "some_package.sub_package" and Nuitka will then
find it and include it and all the modules found below
that disk location in the binary or extension module
it creates, and make it available for import by the
code. To avoid unwanted sub packages, e.g. tests you
can e.g. do this "--nofollow-import-to=*.tests".
Default empty.
--include-module=MODULE
Include a single module. Give as a Python namespace,
e.g. "some_package.some_module" and Nuitka will then
find it and include it in the binary or extension
module it creates, and make it available for import by
the code. Default empty.
--include-plugin-directory=MODULE/PACKAGE
Include also the code found in that directory,
considering as if they are each given as a main file.
Overrides all other inclusion options. You ought to
prefer other inclusion options, that go by names,
rather than filenames, those find things through being
in "sys.path". This option is for very special use
cases only. Can be given multiple times. Default
empty.
--include-plugin-files=PATTERN
Include into files matching the PATTERN. Overrides all
other follow options. Can be given multiple times.
Default empty.
--prefer-source-code
For already compiled extension modules, where there is
both a source file and an extension module, normally
the extension module is used, but it should be better
to compile the module from available source code for
best performance. If not desired, there is --no-
prefer-source-code to disable warnings about it.
Default off.
Control the following into imported modules:
--follow-imports Descend into all imported modules. Defaults to on in
standalone mode, otherwise off.
--follow-import-to=MODULE/PACKAGE
Follow to that module if used, or if a package, to the
whole package. Can be given multiple times. Default
empty.
--nofollow-import-to=MODULE/PACKAGE
Do not follow to that module name even if used, or if
a package name, to the whole package in any case,
overrides all other options. Can be given multiple
times. Default empty.
--nofollow-imports Do not descend into any imported modules at all,
overrides all other inclusion options and not usable
for standalone mode. Defaults to off.
--follow-stdlib Also descend into imported modules from standard
library. This will increase the compilation time by a
lot and is also not well tested at this time and
sometimes won't work. Defaults to off.
Onefile options:
--onefile-tempdir-spec=ONEFILE_TEMPDIR_SPEC
Use this as a folder to unpack to in onefile mode.
Defaults to '%TEMP%/onefile_%PID%_%TIME%', i.e. user
temporary directory and being non-static it's removed.
Use e.g. a string like
'%CACHE_DIR%/%COMPANY%/%PRODUCT%/%VERSION%' which is a
good static cache path, this will then not be removed.
--onefile-child-grace-time=GRACE_TIME_MS
When stopping the child, e.g. due to CTRL-C or
shutdown, etc. the Python code gets a
"KeyboardInterrupt", that it may handle e.g. to flush
data. This is the amount of time in ms, before the
child it killed in the hard way. Unit is ms, and
default 5000.
--onefile-no-compression
When creating the onefile, disable compression of the
payload. This is mostly for debug purposes, or to save
time. Default is off.
Data files:
--include-package-data=PACKAGE
Include data files for the given package name. DLLs
and extension modules are not data files and never
included like this. Can use patterns the filenames as
indicated below. Data files of packages are not
included by default, but package configuration can do
it. This will only include non-DLL, non-extension
modules, i.e. actual data files. After a ":"
optionally a filename pattern can be given as well,
selecting only matching files. Examples: "--include-
package-data=package_name" (all files) "--include-
package-data=package_name=*.txt" (only certain type) "
--include-package-data=package_name=some_filename.dat
(concrete file) Default empty.
--include-data-files=DESC
Include data files by filenames in the distribution.
There are many allowed forms. With '--include-data-
files=/path/to/file/*.txt=folder_name/some.txt' it
will copy a single file and complain if it's multiple.
With '--include-data-
files=/path/to/files/*.txt=folder_name/' it will put
all matching files into that folder. For recursive
copy there is a form with 3 values that '--include-
data-files=/path/to/scan=folder_name=**/*.txt' that
will preserve directory structure. Default empty.
--include-data-dir=DIRECTORY
Include data files from complete directory in the
distribution. This is recursive. Check '--include-
data-files' with patterns if you want non-recursive
inclusion. An example would be '--include-data-
dir=/path/some_dir=data/some_dir' for plain copy, of
the whole directory. All files are copied, if you want
to exclude files you need to remove them beforehand,
or use '--noinclude-data-files' option to remove them.
Default empty.
--noinclude-data-files=PATTERN
Do not include data files matching the filename
pattern given. This is against the target filename,
not source paths. So to ignore a file pattern from
package data for "package_name" should be matched as
"package_name/*.txt". Or for the whole directory
simply use "package_name". Default empty.
--list-package-data=LIST_PACKAGE_DATA
Output the data files found for a given package name.
Default not done.
Metadata support:
--include-distribution-metadata=DISTRIBUTION
Include metadata information for the given
distribution name. Some packages check metadata for
presence, version, entry points, etc. and without this
option given, it only works when it's recognized at
compile time which is not always happening. This of
course only makes sense for packages that are included
in the compilation. Default empty.
DLL files:
--noinclude-dlls=PATTERN
Do not include DLL files matching the filename pattern
given. This is against the target filename, not source
paths. So ignore a DLL "someDLL" contained in the
package "package_name" it should be matched as
"package_name/someDLL.*". Default empty.
--list-package-dlls=LIST_PACKAGE_DLLS
Output the DLLs found for a given package name.
Default not done.
Control the warnings to be given by Nuitka:
--warn-implicit-exceptions
Enable warnings for implicit exceptions detected at
compile time.
--warn-unusual-code
Enable warnings for unusual code detected at compile
time.
--assume-yes-for-downloads
Allow Nuitka to download external code if necessary,
e.g. dependency walker, ccache, and even gcc on
Windows. To disable, redirect input from nul device,
e.g. "</dev/null" or "<NUL:". Default is to prompt.
--nowarn-mnemonic=MNEMONIC
Disable warning for a given mnemonic. These are given
to make sure you are aware of certain topics, and
typically point to the Nuitka website. The mnemonic is
the part of the URL at the end, without the HTML
suffix. Can be given multiple times and accepts shell
pattern. Default empty.
Immediate execution after compilation:
--run Execute immediately the created binary (or import the
compiled module). Defaults to off.
--debugger Execute inside a debugger, e.g. "gdb" or "lldb" to
automatically get a stack trace. Defaults to off.
--execute-with-pythonpath
When immediately executing the created binary or
module using '--run', don't reset 'PYTHONPATH'
environment. When all modules are successfully
included, you ought to not need PYTHONPATH anymore,
and definitely not for standalone mode.
Compilation choices:
--user-package-configuration-file=YAML_FILENAME
User provided Yaml file with package configuration.
You can include DLLs, remove bloat, add hidden
dependencies. Check User Manual for a complete
description of the format to use. Can be given
multiple times. Defaults to empty.
--full-compat Enforce absolute compatibility with CPython. Do not
even allow minor deviations from CPython behavior,
e.g. not having better tracebacks or exception
messages which are not really incompatible, but only
different or worse. This is intended for tests only
and should *not* be used.
--file-reference-choice=MODE
Select what value "__file__" is going to be. With
"runtime" (default for standalone binary mode and
module mode), the created binaries and modules, use
the location of themselves to deduct the value of
"__file__". Included packages pretend to be in
directories below that location. This allows you to
include data files in deployments. If you merely seek
acceleration, it's better for you to use the
"original" value, where the source files location will
be used. With "frozen" a notation "<frozen
module_name>" is used. For compatibility reasons, the
"__file__" value will always have ".py" suffix
independent of what it really is.
--module-name-choice=MODE
Select what value "__name__" and "__package__" are
going to be. With "runtime" (default for module mode),
the created module uses the parent package to deduce
the value of "__package__", to be fully compatible.
The value "original" (default for other modes) allows
for more static optimization to happen, but is
incompatible for modules that normally can be loaded
into any package.
Output choices:
--output-filename=FILENAME
Specify how the executable should be named. For
extension modules there is no choice, also not for
standalone mode and using it will be an error. This
may include path information that needs to exist
though. Defaults to '<program_name>' on this platform.
.exe
--output-dir=DIRECTORY
Specify where intermediate and final output files
should be put. The DIRECTORY will be populated with
build folder, dist folder, binaries, etc. Defaults to
current directory.
--remove-output Removes the build directory after producing the module
or exe file. Defaults to off.
--no-pyi-file Do not create a ".pyi" file for extension modules
created by Nuitka. This is used to detect implicit
imports. Defaults to off.
Debug features:
--debug Executing all self checks possible to find errors in
Nuitka, do not use for production. Defaults to off.
--unstripped Keep debug info in the resulting object file for
better debugger interaction. Defaults to off.
--profile Enable vmprof based profiling of time spent. Not
working currently. Defaults to off.
--internal-graph Create graph of optimization process internals, do not
use for whole programs, but only for small test cases.
Defaults to off.
--trace-execution Traced execution output, output the line of code
before executing it. Defaults to off.
--recompile-c-only This is not incremental compilation, but for Nuitka
development only. Takes existing files and simply
compile them as C again. Allows compiling edited C
files for quick debugging changes to the generated
source, e.g. to see if code is passed by, values
output, etc, Defaults to off. Depends on compiling
Python source to determine which files it should look
at.
--xml=XML_FILENAME Write the internal program structure, result of
optimization in XML form to given filename.
--generate-c-only Generate only C source code, and do not compile it to
binary or module. This is for debugging and code
coverage analysis that doesn't waste CPU. Defaults to
off. Do not think you can use this directly.
--experimental=FLAG
Use features declared as 'experimental'. May have no
effect if no experimental features are present in the
code. Uses secret tags (check source) per experimented
feature.
--low-memory Attempt to use less memory, by forking less C
compilation jobs and using options that use less
memory. For use on embedded machines. Use this in case
of out of memory problems. Defaults to off.
--create-environment-from-report=CREATE_ENVIRONMENT_FROM_REPORT
Create a new virtualenv in that non-existing path from
the report file given with e.g. '--report=compilation-
report.xml'. Default not done.
Backend C compiler choice:
--clang Enforce the use of clang. On Windows this requires a
working Visual Studio version to piggy back on.
Defaults to off.
--mingw64 Enforce the use of MinGW64 on Windows. Defaults to off
unless MSYS2 with MinGW Python is used.
--msvc=MSVC_VERSION
Enforce the use of specific MSVC version on Windows.
Allowed values are e.g. "14.3" (MSVC 2022) and other
MSVC version numbers, specify "list" for a list of
installed compilers, or use "latest". Defaults to
latest MSVC being used if installed, otherwise MinGW64
is used.
--jobs=N Specify the allowed number of parallel C compiler
jobs. Defaults to the system CPU count.
--lto=choice Use link time optimizations (MSVC, gcc, clang).
Allowed values are "yes", "no", and "auto" (when it's
known to work). Defaults to "auto".
--static-libpython=choice
Use static link library of Python. Allowed values are
"yes", "no", and "auto" (when it's known to work).
Defaults to "auto".
Cache Control:
--disable-cache=DISABLED_CACHES
Disable selected caches, specify "all" for all cached.
Currently allowed values are:
"all","ccache","bytecode","dll-dependencies". can be
given multiple times or with comma separated values.
Default none.
--clean-cache=CLEAN_CACHES
Clean the given caches before executing, specify "all"
for all cached. Currently allowed values are:
"all","ccache","bytecode","dll-dependencies". can be
given multiple times or with comma separated values.
Default none.
--disable-bytecode-cache
Do not reuse dependency analysis results for modules,
esp. from standard library, that are included as
bytecode. Same as --disable-cache=bytecode.
--disable-ccache Do not attempt to use ccache (gcc, clang, etc.) or
clcache (MSVC, clangcl). Same as --disable-
cache=ccache.
--disable-dll-dependency-cache
Disable the dependency walker cache. Will result in
much longer times to create the distribution folder,
but might be used in case the cache is suspect to
cause errors. Same as --disable-cache=dll-
dependencies.
--force-dll-dependency-cache-update
For an update of the dependency walker cache. Will
result in much longer times to create the distribution
folder, but might be used in case the cache is suspect
to cause errors or known to need an update.
PGO compilation choices:
--pgo Enables C level profile guided optimization (PGO), by
executing a dedicated build first for a profiling run,
and then using the result to feedback into the C
compilation. Note: This is experimental and not
working with standalone modes of Nuitka yet. Defaults
to off.
--pgo-args=PGO_ARGS
Arguments to be passed in case of profile guided
optimization. These are passed to the special built
executable during the PGO profiling run. Default
empty.
--pgo-executable=PGO_EXECUTABLE
Command to execute when collecting profile
information. Use this only, if you need to launch it
through a script that prepares it to run. Default use
created program.
Tracing features:
--report=REPORT_FILENAME
Report module, data files, compilation, plugin, etc.
details in an XML output file. This is also super
useful for issue reporting. These reports can e.g. be
used to re-create the environment easily using it with
'--create-environment-from-report', but contain a lot
of information. Default is off.
--report-diffable Report data in diffable form, i.e. no timing or memory
usage values that vary from run to run. Default is
off.
--report-user-provided=KEY_VALUE
Report data from you. This can be given multiple times
and be anything in 'key=value' form, where key should
be an identifier, e.g. use '--report-user-
provided=pipenv-lock-hash=64a5e4' to track some input
values. Default is empty.
--report-template=REPORT_DESC
Report via template. Provide template and output
filename "template.rst.j2:output.rst". For built-in
templates, check the User Manual for what these are.
Can be given multiple times. Default is empty.
--quiet Disable all information outputs, but show warnings.
Defaults to off.
--show-scons Run the C building backend Scons with verbose
information, showing the executed commands, detected
compilers. Defaults to off.
--no-progressbar Disable progress bars. Defaults to off.
--show-progress Obsolete: Provide progress information and statistics.
Disables normal progress bar. Defaults to off.
--show-memory Provide memory information and statistics. Defaults to
off.
--show-modules Provide information for included modules and DLLs
Obsolete: You should use '--report' file instead.
Defaults to off.
--show-modules-output=PATH
Where to output '--show-modules', should be a
filename. Default is standard output.
--verbose Output details of actions taken, esp. in
optimizations. Can become a lot. Defaults to off.
--verbose-output=PATH
Where to output from '--verbose', should be a
filename. Default is standard output.
General OS controls:
--disable-console When compiling for Windows or macOS, disable the
console window and create a GUI application. Defaults
to off.
--enable-console When compiling for Windows or macOS, enable the
console window and create a console application. This
disables hints from certain modules, e.g. "PySide"
that suggest to disable it. Defaults to true.
--force-stdout-spec=FORCE_STDOUT_SPEC
Force standard output of the program to go to this
location. Useful for programs with disabled console
and programs using the Windows Services Plugin of
Nuitka commercial. Defaults to not active, use e.g.
'%PROGRAM%.out.txt', i.e. file near your program,
check User Manual for full list of available values.
--force-stderr-spec=FORCE_STDERR_SPEC
Force standard error of the program to go to this
location. Useful for programs with disabled console
and programs using the Windows Services Plugin of
Nuitka commercial. Defaults to not active, use e.g.
'%PROGRAM%.err.txt', i.e. file near your program,
check User Manual for full list of available values.
Windows specific controls:
--windows-icon-from-ico=ICON_PATH
Add executable icon. Can be given multiple times for
different resolutions or files with multiple icons
inside. In the later case, you may also suffix with
#<n> where n is an integer index starting from 1,
specifying a specific icon to be included, and all
others to be ignored.
--windows-icon-from-exe=ICON_EXE_PATH
Copy executable icons from this existing executable
(Windows only).
--onefile-windows-splash-screen-image=SPLASH_SCREEN_IMAGE
When compiling for Windows and onefile, show this
while loading the application. Defaults to off.
--windows-uac-admin
Request Windows User Control, to grant admin rights on
execution. (Windows only). Defaults to off.
--windows-uac-uiaccess
Request Windows User Control, to enforce running from
a few folders only, remote desktop access. (Windows
only). Defaults to off.
macOS specific controls:
--macos-target-arch=MACOS_TARGET_ARCH
What architectures is this to supposed to run on.
Default and limit is what the running Python allows
for. Default is "native" which is the architecture the
Python is run with.
--macos-create-app-bundle
When compiling for macOS, create a bundle rather than
a plain binary application. Currently experimental and
incomplete. Currently this is the only way to unlock
disabling of console.Defaults to off.
--macos-app-icon=ICON_PATH
Add icon for the application bundle to use. Can be
given only one time. Defaults to Python icon if
available.
--macos-signed-app-name=MACOS_SIGNED_APP_NAME
Name of the application to use for macOS signing.
Follow "com.YourCompany.AppName" naming results for
best results, as these have to be globally unique, and
will potentially grant protected API accesses.
--macos-app-name=MACOS_APP_NAME
Name of the product to use in macOS bundle
information. Defaults to base filename of the binary.
--macos-app-mode=MODE
Mode of application for the application bundle. When
launching a Window, and appearing in Docker is
desired, default value "gui" is a good fit. Without a
Window ever, the application is a "background"
application. For UI elements that get to display
later, "ui-element" is in-between. The application
will not appear in dock, but get full access to
desktop when it does open a Window later.
--macos-sign-identity=MACOS_APP_VERSION
When signing on macOS, by default an ad-hoc identify
will be used, but with this option your get to specify
another identity to use. The signing of code is now
mandatory on macOS and cannot be disabled. Default
"ad-hoc" if not given.
--macos-sign-notarization
When signing for notarization, using a proper TeamID
identity from Apple, use the required runtime signing
option, such that it can be accepted.
--macos-app-version=MACOS_APP_VERSION
Product version to use in macOS bundle information.
Defaults to "1.0" if not given.
--macos-app-protected-resource=RESOURCE_DESC
Request an entitlement for access to a macOS protected
resources, e.g.
"NSMicrophoneUsageDescription:Microphone access for
recording audio." requests access to the microphone
and provides an informative text for the user, why
that is needed. Before the colon, is an OS identifier
for an access right, then the informative text. Legal
values can be found on https://developer.apple.com/doc
umentation/bundleresources/information_property_list/p
rotected_resources and the option can be specified
multiple times. Default empty.
Linux specific controls:
--linux-icon=ICON_PATH
Add executable icon for onefile binary to use. Can be
given only one time. Defaults to Python icon if
available.
Binary Version Information:
--company-name=COMPANY_NAME
Name of the company to use in version information.
Defaults to unused.
--product-name=PRODUCT_NAME
Name of the product to use in version information.
Defaults to base filename of the binary.
--file-version=FILE_VERSION
File version to use in version information. Must be a
sequence of up to 4 numbers, e.g. 1.0 or 1.0.0.0, no
more digits are allowed, no strings are allowed.
Defaults to unused.
--product-version=PRODUCT_VERSION
Product version to use in version information. Same
rules as for file version. Defaults to unused.
--file-description=FILE_DESCRIPTION
Description of the file used in version information.
Windows only at this time. Defaults to binary
filename.
--copyright=COPYRIGHT_TEXT
Copyright used in version information. Windows only at
this time. Defaults to not present.
--trademarks=TRADEMARK_TEXT
Copyright used in version information. Windows only at
this time. Defaults to not present.
Plugin control:
--enable-plugin=PLUGIN_NAME
Enabled plugins. Must be plug-in names. Use '--plugin-
list' to query the full list and exit. Default empty.
--disable-plugin=PLUGIN_NAME
Disabled plugins. Must be plug-in names. Use '--
plugin-list' to query the full list and exit. Most
standard plugins are not a good idea to disable.
Default empty.
--plugin-no-detection
Plugins can detect if they might be used, and the you
can disable the warning via "--disable-plugin=plugin-
that-warned", or you can use this option to disable
the mechanism entirely, which also speeds up
compilation slightly of course as this detection code
is run in vain once you are certain of which plugins
to use. Defaults to off.
--plugin-list Show list of all available plugins and exit. Defaults
to off.
--user-plugin=PATH The file name of user plugin. Can be given multiple
times. Default empty.
--show-source-changes
Show source changes to original Python file content
before compilation. Mostly intended for developing
plugins. Default False.
Plugin options of 'anti-bloat':
--show-anti-bloat-changes
Annotate what changes are by the plugin done.
--noinclude-setuptools-mode=NOINCLUDE_SETUPTOOLS_MODE
What to do if a 'setuptools' or import is encountered.
This package can be big with dependencies, and should
definitely be avoided. Also handles 'setuptools_scm'.
--noinclude-pytest-mode=NOINCLUDE_PYTEST_MODE
What to do if a 'pytest' import is encountered. This
package can be big with dependencies, and should
definitely be avoided. Also handles 'nose' imports.
--noinclude-unittest-mode=NOINCLUDE_UNITTEST_MODE
What to do if a unittest import is encountered. This
package can be big with dependencies, and should
definitely be avoided.
--noinclude-IPython-mode=NOINCLUDE_IPYTHON_MODE
What to do if a IPython import is encountered. This
package can be big with dependencies, and should
definitely be avoided.
--noinclude-dask-mode=NOINCLUDE_DASK_MODE
What to do if a 'dask' import is encountered. This
package can be big with dependencies, and should
definitely be avoided.
--noinclude-numba-mode=NOINCLUDE_NUMBA_MODE
What to do if a 'numba' import is encountered. This
package can be big with dependencies, and is currently
not working for standalone. This package is big with
dependencies, and should definitely be avoided.
--noinclude-default-mode=NOINCLUDE_DEFAULT_MODE
This actually provides the default "warning" value for
above options, and can be used to turn all of these
on.
--noinclude-custom-mode=CUSTOM_CHOICES
What to do if a specific import is encountered. Format
is module name, which can and should be a top level
package and then one choice, "error", "warning",
"nofollow", e.g. PyQt5:error.
```

View File

@ -0,0 +1,44 @@
# Difficult Rocket 计划特性页面
这里会用中文列出。DR未来的计划特性已经做出来的也会有标注
别问为什么用中文问就是写不动English了
正文开始
注:文件名指的是本文件夹里的详细说明文件的文件名,如果没有则代表没有详细说明
| 特性描述 | 文件名 | 状态 |
|:---------:|:-------------------:|:-------:|
| 轨道规划 | orbit-plan | planing |
| 部件可成环 | multi-connect | planing |
| 多指令舱控制 | multi-control | planing |
| 自定义部件旋转角度 | custom-turn-angle | planing |
| 自定义warp速度 | custom-warp-speed | planing |
| Dv计算 | Dv-calculation | planing |
| socket 联机 | online-play | planing |
| 操作界面可视化轨道 | visible-orbit | planing |
| 可堆叠部件 | part-stack | planing |
| 可压缩结构 | part-zip | planing |
| 部件平移 | part-move | planing |
| 存档额外信息 | extra-save-info | planing |
| 自定义部件分组开关 | custom-stage-on-off | planing |
| 各种奇怪部件 | custom-part | planing |
# 文件范例
# 中文简称 文件名 `英文名称`
## 日期
## 发起人
## 状态
## 描述
### 底层机制 `实现方法(大致)`
### 效果
## 别的什么的

View File

@ -0,0 +1,33 @@
# 各种自定义部件 custom-part.md `custom part`
## 2023 07 15
## shenjack 和 qq 群的各位
- 北风百草
- 小阳阳
## 状态
- 计划中
## 描述
- 各种奇怪自定义部件的收集
## 列表
### `核推`
- 消耗工质
- 产生大量热量
- 需要散热
### `装饰性外壳`
- 没有碰撞箱
- 或者最外层有碰撞箱
### `部件 Pro`
- 超级大

View File

@ -0,0 +1,29 @@
# 存档额外信息 extra save info
## 20210514
## shenjackyuanjie
## planing
## 描述
存档中会额外保存一些信息
### 底层机制
保存存档时会读取 `partlist` 中的部件信息
比如部件碰撞箱、重量等
并保存到存档中
### 效果
存档会根据部件使用情况
增大体积(直到所有种类的部件都被用)
## 别的什么的
没了

View File

@ -0,0 +1,15 @@
# 部件可成环 multi-connect
## 2021-4-25
## shenjackyuanjie(writer)
## 描述
### 底层机制
单个部件可以同时连接到2个或两个以上部件
### 效果
可以搞点 环世界 之类的巨构

View File

@ -0,0 +1,34 @@
# 多指令舱控制 multi-control
## 2021-4-25
## shenjackyuanjie(writer)
## planing
## 描述
### 示例1
可以让多个指令舱同时进行动作
比如一个空间站由很多部分组成
每一个部分都由不同的指令舱控制
多指令舱控制就可以实现空间站所有部分统一加速、减速
其实也是某种程度上的统一控制
### 示例2
在同时发射多枚火箭/卫星时
可以让火箭在操作其他火箭的时候继续燃烧
就是说操纵A火箭的时候B火箭还能继续燃烧
### 底层机制
不知道
别问我

View File

@ -0,0 +1,22 @@
# 轨道规划 `orbit plan`
## 20230106
## shenjack
## 状态
planing
## 描述
### 底层机制 `实现方法(大致)`
aaaa
### 效果
可以规划轨道
## 别的什么的

View File

@ -0,0 +1,15 @@
# 中文简称 文件名
## 日期
## 发起人
## 状态
## 描述
### 底层机制
### 效果
## 别的什么的

193
docs/main/readme-en.md Normal file
View File

@ -0,0 +1,193 @@
# Difficult Rocket
[中文](/main/readme.md) | English
- [GitHub](https://github.com/shenjackyuanjie/Difficult-Rocket)
- [gitee](https://gitee.com/shenjackyuanjie/Difficult-Rocket)
- [discord](https://discord.gg/kWzw2JrG6M)
- [kook](https://kook.top/sRPjFG)
## Notice: This repo will only publish `DR SDK` updates, `DR game` updates will be published [here](https://github.com/shenjackyuanjie/DR-game)
![demo](/demo.png)
[![996.icu](https://img.shields.io/badge/996.icu-996.icu-red.svg)](https://996.icu)
[![semver](https://img.shields.io/badge/SemVer-2.0.0-blue.svg)](https://Semver.org/)
[![python-3.8.10](https://img.shields.io/badge/编写于_Python_版本-3.8.10-blue.svg)](https://Python.org)
[![pyglet-2.x](https://img.shields.io/badge/编写于_Pyglet_版本-2.x-blue.svg)](https://pyglet.org)
[![support python 3.8~12](https://img.shields.io/badge/Python-_3.8_~_3.12_-blue.svg)](https://Python.org)
## Version
[About Versions](./version.md)
[![release version](https://img.shields.io/badge/Release-0.8.7.2-blue.svg)](https://github.com/shenjackyuanjie/Difficult-Rocket/releases)
[![pre version](https://img.shields.io/badge/Pre_Release-0.8.7.2-blue.svg)](https://github.com/shenjackyuanjie/Difficult-Rocket/releases)
[![devlo version](https://img.shields.io/badge/Devloping-0.9.0-blue.svg)](https://github.com/shenjackyuanjie/Difficult-Rocket/releases)
[![language badge](https://stats.deeptrain.net/repo/shenjackyuanjie/Difficult-Rocket?theme=dark)](https://stats.deeptrain.net/repo/shenjackyuanjie/Difficult-Rocket?theme=dark)
[DR sdk latest Action build](https://nightly.link/shenjackyuanjie/Difficult-Rocket/workflows/nuitka/main)
[DR rs latest Action build](https://nightly.link/shenjackyuanjie/Difficult-Rocket/workflows/dr_rs/main)
## 中文README请移步 [这里](../README.md)
> Difficult-rocket is a Simple Rocket liked game build with Python (in short: rocket simulator)
## Advantage
> Lighter than Vanilla SR
## [Plan feature list](/main/plan_features/README.md)
[YouTrack](https://difficult-rocket.youtrack.cloud/projects/8dafd498-59c0-4ce7-9900-d9292e9ed1f0)
## [Update logs](/main/change_log)
## How To Run
### clone
```bash title="clone.sh"
mkdir DR
cd DR
git clone https://github.com/shenjackyuanjie/Difficult-Rocket.git
# or
git clone https://gitee.com/shenjackyuanjie/Difficult-Rocket.git
# or
git clone git@github.com:shenjackyuanjie/Difficult-Rocket.git
```
### Install requirements
```bash title="install.sh"
python -m pip install -r requirements.txt
git submodule update --init --recursive
cd libs
cd lib_not_dr
python -m pip install .
```
### Run
```bash title="run.sh"
python DR.py
```
## Environment (been tested / developed on)
- `Develop platform 1 - Windows 10 x64 22H2`
- Python `3.8.10` / `3.10.11`
- pillow `10.0.0`
- psutil `5.9.5`
- rtoml `0.9.0`
- tomlkit `0.12.1`
- defusedxml `0.7.1`
- objprint `0.2.2`
- viztracer `0.15.6`
- vizplugins `0.1.3`
- nuitka `1.7.10`
- ordered-set `4.1.0`
- imageio `2.31.2`
- wheel `0.41.2`
- setuptools `68.1.2`
- setuptools-rust `1.7.0`
- `AMD R5 5600X`
- `AMD RX 550 4G`
## Required python modules
- `pyglet` (pre-installed V2.0.8 path:`./libs/pyglet`)
- `xmltodict` (pre-installed V0.12.0 path:`./libs/xmltodict`)
- `pyperclip` (pre-installed V1.8.2 path: `./libs/pyperclip`)
```text
# this requirement is for
# DR basic running from source
# DR build (by nuitka)
# DR contributing
# for images
# not for pypy >= 3.10
pillow >= 10.0.0; (platform_python_implementation == "PyPy" and python_version < "3.10") or platform_python_implementation == "CPython"
# for sys info
psutil >= 5.9.5
# for files
rtoml >= 0.9.0
tomlkit >= 0.11.8
defusedxml >= 0.7.1
# for debug
objprint >= 0.2.2
viztracer >= 0.15.6; platform_python_implementation != "PyPy"
vizplugins >= 0.1.3; platform_python_implementation != "PyPy"
# for compile
nuitka >= 1.7.5
ordered-set >= 4.1.0
imageio >= 2.31.0; (platform_python_implementation == "PyPy" and python_version < "3.10") or platform_python_implementation == "CPython"
wheel >= 0.40.0
setuptools >= 67.8.0
setuptools-rust >= 1.6.0
```
## thanks to
- Open Source Projects
- [pyglet](https://github.com/pyglet/pyglet): GUI and graphics
- `tomlkit` / `rtoml` toml parser
- `xmltodict`: translate data between xml and dict
- `pyperclip`: paste board!
- [rapier2d](https://rapier.rs/) : Phy simulate engine
- [pyo3](https://pyo3.rs/main) : Rust Python Binding
- Main contributors
- [@Rayawa](https://github.com/Rayawa) : Check mistake in docs & some translates
- [@rouxiao-you](https://github.com/ruoxiao-you) : Translate chinese to English
- [@Billchyi](https://github.com/Billchyi) : Check mistake in docs
- [@MSDNicrosoft](https://github.com/MSDNicrosoft) : Optimize code
## Other links
## About License
#### https://creativecommons.org/licenses/by-nc-sa/4.0/
#### Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
You are free to:
Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You
may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
NonCommercial — You may not use the material for commercial purposes.
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same
license as the original.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from
doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public domain or where your use is
permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all the permissions necessary for your intended use. For example,
other rights such as publicity, privacy, or moral rights may limit how you use the material.

190
docs/main/readme.md Normal file
View File

@ -0,0 +1,190 @@
<div style="text-align: center;">
# Difficult Rocket
中文 | [English](/main/readme-en.md)
- [GitHub](https://github.com/shenjackyuanjie/Difficult-Rocket)
- [gitee](https://gitee.com/shenjackyuanjie/Difficult-Rocket)
- [discord](https://discord.gg/kWzw2JrG6M)
- [kook](https://kook.top/sRPjFG)
## 请注意 这个仓库未来只会发布 `DR SDK` 的更新 `DR game` 的更新会在 [这里](https://github.com/shenjackyuanjie/DR-game) 发布
![demo](/demo.png)
[![996.icu](https://img.shields.io/badge/996.icu-996.icu-red.svg)](https://996.icu)
[![semver](https://img.shields.io/badge/SemVer-2.0.0-blue.svg)](https://Semver.org/)
[![python-3.8.10](https://img.shields.io/badge/编写于_Python_版本-3.8.10-blue.svg)](https://Python.org)
[![pyglet-2.x](https://img.shields.io/badge/编写于_Pyglet_版本-2.x-blue.svg)](https://pyglet.org)
[![support python 3.8~12](https://img.shields.io/badge/Python-_3.8_~_3.12_-blue.svg)](https://Python.org)
## 版本
[关于版本号的说明](/main/version.md)
[![release version](https://img.shields.io/badge/Release-0.8.7.2-blue.svg)](https://github.com/shenjackyuanjie/Difficult-Rocket/releases)
[![pre version](https://img.shields.io/badge/Pre_Release-0.8.7.2-blue.svg)](https://github.com/shenjackyuanjie/Difficult-Rocket/releases)
[![devlo version](https://img.shields.io/badge/Devloping-0.9.0-blue.svg)](https://github.com/shenjackyuanjie/Difficult-Rocket/releases)
[![language badge](https://stats.deeptrain.net/repo/shenjackyuanjie/Difficult-Rocket?theme=dark)](https://stats.deeptrain.net/repo/shenjackyuanjie/Difficult-Rocket?theme=dark)
[DR sdk 最新 Action 构建](https://nightly.link/shenjackyuanjie/Difficult-Rocket/workflows/nuitka/main)
[DR rs 最新 Action 构建](https://nightly.link/shenjackyuanjie/Difficult-Rocket/workflows/dr_rs/main)
## English README please look [here](/main/readme-en.md)
> 这是一个用Python制作的类Simple Rocket游戏(简称:火箭模拟器)
## 优势
> 相对于原版SR比较“轻量化”
## [计划特性列表](/main/plan_features/README.md)
[YouTrack](https://difficult-rocket.youtrack.cloud/projects/8dafd498-59c0-4ce7-9900-d9292e9ed1f0)
## [更新日志](/main/change_log)
## 运行方式
### clone
```bash title="clone.sh"
mkdir DR
cd DR
git clone https://github.com/shenjackyuanjie/Difficult-Rocket.git
# 或者
git clone https://gitee.com/shenjackyuanjie/Difficult-Rocket.git
# 又或者
git clone git@github.com:shenjackyuanjie/Difficult-Rocket.git
```
### 安装依赖
```bash title="install.sh"
python -m pip install -r requirements.txt
git submodule update --init --recursive
cd libs
cd lib_not_dr
python -m pip install .
```
### 运行
```bash title="run.sh"
python DR.py
```
## 环境需求 (测试过的 / 开发平台)
- `开发平台 1 - Windows 10 x64 22H2`
- Python `3.8.10` / `3.10.11`
- pillow `10.0.0`
- psutil `5.9.5`
- rtoml `0.9.0`
- tomlkit `0.12.1`
- defusedxml `0.7.1`
- objprint `0.2.2`
- viztracer `0.15.6`
- vizplugins `0.1.3`
- nuitka `1.7.10`
- ordered-set `4.1.0`
- imageio `2.31.2`
- wheel `0.41.2`
- setuptools `68.1.2`
- setuptools-rust `1.7.0`
- `AMD R5 5600X`
- `AMD RX 550 4G`
## 需要的 Python 模块
- `pyglet` (已经内置 V2.0.8 路径:`./libs/pyglet`)
- `xmltodict` (已经内置 V0.12.0 路径:`./libs/xmltodict`)
- `pyperclip` (已经内置 V1.8.2 路径: `./libs/pyperclip`)
```text
# this requirement is for
# DR basic running from source
# DR build (by nuitka)
# DR contributing
# for images
# not for pypy >= 3.10
pillow >= 10.0.0; (platform_python_implementation == "PyPy" and python_version < "3.10") or platform_python_implementation == "CPython"
# for sys info
psutil >= 5.9.5
# for files
rtoml >= 0.9.0
tomlkit >= 0.11.8
defusedxml >= 0.7.1
# for debug
objprint >= 0.2.2
viztracer >= 0.15.6; platform_python_implementation != "PyPy"
vizplugins >= 0.1.3; platform_python_implementation != "PyPy"
# for compile
nuitka >= 1.7.5
ordered-set >= 4.1.0
imageio >= 2.31.0; (platform_python_implementation == "PyPy" and python_version < "3.10") or platform_python_implementation == "CPython"
wheel >= 0.40.0
setuptools >= 67.8.0
setuptools-rust >= 1.6.0
```
## 感谢
- 开源项目
- [pyglet](https://github.com/pyglet/pyglet) : GUI 和画面渲染
- `tomlkit` / `rtoml` : toml 解析器
- `xmltodict`: xml 与 dict 转换器
- `pyperclip`: 剪贴板!
- [rapier2d](https://rapier.rs/) : 物理模拟引擎
- [pyo3](https://pyo3.rs/main): Rust Python 扩展
- 主要贡献者
- [@Rayawa](https://github.com/Rayawa) : 文档矫正 & 翻译部分 lang
- [@rouxiao-you](https://github.com/ruoxiao-you) : 翻译 lang
- [@Billchyi](https://github.com/Billchyi) : 文档矫正
- [@MSDNicrosoft](https://github.com/MSDNicrosoft) : 优化代码
</div>
## 相关链接
## 关于分享协议
#### https://creativecommons.org/licenses/by-nc-sa/4.0/
#### 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
这是一份普通人可以理解的许可协议概要 (但不是替代) 。 免责声明.
您可以自由地:
共享 — 在任何媒介以任何形式复制、发行本作品
演绎 — 修改、转换或以本作品为基础进行创作
只要你遵守许可协议条款,许可人就无法收回你的这些权利。
惟须遵守下列条件:
署名 — 您必须给出地当的署名,提供指向本许可协议的链接,同时标明是否(对原始作品)作了修改。您可以用任何合理的方式来署名,但是不得以任何方式暗示许可人为您或您的使用背书。
非商业性使用 — 您不得将本作品用于商业目的。
相同方式共享 — 如果您再混合、转换或者基于本作品进行创作,您必须基于与原先许可协议地同的许可协议 分发您贡献的作品。
没有附加限制 — 您不得适用法律术语或者 技术措施 从而限制其他人做许可协议允许的事情。
声明:
您不必因为公共领域的作品要素而遵守许可协议,或者您的使用被可适用的 例外或限制所允许。
不提供担保。许可协议可能不会给与您意图使用的所必须的所有许可。例如,其他权利比如形象权、隐私权或人格权可能限制您如何使用作品。

28
docs/main/rua.md Normal file
View File

@ -0,0 +1,28 @@
# 一些怪东西
## pyglet相关
pyglet 坐标轴原点是左上角 0, 0
## 坐标记录相关
记录的是部件碰撞箱中心的相对于控制仓碰撞箱中心的相对坐标
然后控制仓的坐标是单独记录的
记录的是区块坐标+区块内坐标
## 渲染
屏幕坐标系需要*100有待测试
这个应该跟 windows 屏幕缩放比例有关
嗯(我找一下你发的那个图
找到了 qq 群
我check一下微调器的代码原理应该一样有个函数我看看怎么实现
## 素材提供
<!-- [背景候选1号](../../assets/textures/runtime/background.png) -->
来自 @底层萌新 QQ1744251171
## gl.glClearColor(a / 255, b / 255, c / 255, d)

24
docs/main/version.md Normal file
View File

@ -0,0 +1,24 @@
# 关于 Difficult_Rocket 的版本号说明
## `Semver++` by shenjackyuanjie
* 基于 [Semver](https://semver.org/) 2.0.0
* 1.0.0.0
## 版本号格式
### 基本遵守 Semver 规范
* `x.y.z.w`
* `0.y.z.w`
### 各子版本号说明
#### 版本号发布之后不会退回,只会增加
| 子版本号 | 名称 | 步进条件 | 更新内容 | 更新兼容性 |
|:----:|:----------:|:-------------:|:---------------:|:-------:|
| `X` | 主版本号 | 每次 `大更新` | 大量 `新内容` | `完全不兼容` |
| `Y` | `功能` 版本号 | 发布 `内容更新` | 大量 `新内容` | `基本不兼容` |
| `Z` | `内容修订` 版本号 | 修订 `新内容` | 对 `新内容` 的修订 | `基本兼容` |
| `W` | `内部修订` 版本号 | 发布未实装的 `内部更新` | 对 `将要到来的内容` 的更新 | `完全兼容` |

BIN
docs/public/SR1render.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
docs/public/csdn/gitee.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

BIN
docs/public/csdn/github.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 KiB

BIN
docs/public/csdn/条款.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 KiB

BIN
docs/public/csdn/离谱.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

BIN
docs/public/demo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 KiB

BIN
docs/public/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

18
package.json Normal file
View File

@ -0,0 +1,18 @@
{
"name": "dr-repress-docs",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "rspress dev",
"build": "rspress build",
"preview": "rspress preview"
},
"dependencies": {
"rspress": "^1.8.3"
},
"devDependencies": {
"rspress": "^1.7.5",
"ts-node": "^10.9.1",
"typescript": "^5.3.2"
}
}

5713
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
readme.md Normal file
View File

@ -0,0 +1 @@
# DR 的文档

24
rspress.config.ts Normal file
View File

@ -0,0 +1,24 @@
import * as path from 'path';
import { defineConfig } from 'rspress/config';
export default defineConfig({
root: path.join(__dirname, 'docs'),
title: 'Difficult-Rocket-docs',
description: 'Diffuclt Rocket 的文档',
icon: "/icon.png",
logo: "/icon.png",
themeConfig: {
socialLinks: [
{ icon: 'github', mode: 'link', content: 'https://github.com/shenjackyuanjie/DR-docs' },
{ icon: 'github', mode: 'link', content: 'https://github.com/shenjackyuanjie/Difficult-Rocket' },
],
},
markdown: {
highlightLanguages: [
['py', 'python'],
'python',
['cfg', 'ini'],
'toml',
]
}
});

6
tsconfig.json Normal file
View File

@ -0,0 +1,6 @@
{
"compilerOptions": {
"jsx": "react-jsx",
"esModuleInterop": true
}
}