Compare commits
2 Commits
34749b68e0
...
c9968bb284
Author | SHA1 | Date | |
---|---|---|---|
c9968bb284 | |||
3fffd3b301 |
114
.github/workflows/page.yml
vendored
@ -1,114 +0,0 @@
|
|||||||
# Simple workflow for deploying static content to GitHub Pages
|
|
||||||
name: Deploy static content to Pages
|
|
||||||
|
|
||||||
on:
|
|
||||||
# Runs on pushes targeting the default branch
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- "docs/**"
|
|
||||||
- ".github/workflows/page.yml"
|
|
||||||
- "**README**"
|
|
||||||
branches: ["main"]
|
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
# Allow one concurrent deployment
|
|
||||||
concurrency:
|
|
||||||
group: "pages"
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Single deploy job since we're just deploying
|
|
||||||
deploy:
|
|
||||||
if: ${{!startsWith(github.event.ref, 'refs/tags/') && contains(github.event.head_commit.message, '[page skip]') == false }}
|
|
||||||
environment:
|
|
||||||
name: github-pages
|
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Pages
|
|
||||||
uses: actions/configure-pages@v2
|
|
||||||
|
|
||||||
- name: 安装 mdbook
|
|
||||||
uses: extractions/setup-mdbook@v1
|
|
||||||
|
|
||||||
- name: Install mdBook
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
# 设置变量
|
|
||||||
$urls = @(
|
|
||||||
'https://github.com/shenjackyuanjie/Minecraft_Science_Tree/releases/download/0.0.4/mdbook-i18n',
|
|
||||||
'https://github.com/shenjackyuanjie/Minecraft_Science_Tree/releases/download/0.0.4/mdbook-theme',
|
|
||||||
'https://github.com/shenjackyuanjie/Minecraft_Science_Tree/releases/download/0.0.4/mdbook-cmdrun',
|
|
||||||
'https://github.com/shenjackyuanjie/Minecraft_Science_Tree/releases/download/0.0.4/mdbook-pagetoc',
|
|
||||||
'https://github.com/shenjackyuanjie/Minecraft_Science_Tree/releases/download/0.0.4/mdbook-footnote',
|
|
||||||
'https://github.com/shenjackyuanjie/Minecraft_Science_Tree/releases/download/0.0.4/mdbook-external-links',
|
|
||||||
'https://github.com/plantuml/plantuml/releases/download/v1.2023.4/plantuml-1.2023.4.jar'
|
|
||||||
)
|
|
||||||
# 下载文件
|
|
||||||
foreach ($url in $urls) {
|
|
||||||
Invoke-WebRequest -Uri $url -OutFile "$($url.Split('/')[-1])"
|
|
||||||
}
|
|
||||||
# 将目录路径添加到 $PATH 中
|
|
||||||
$PWD >> $env:GITHUB_PATH
|
|
||||||
ls $PWD
|
|
||||||
|
|
||||||
# - name: Setup mdbook-theme latest
|
|
||||||
# run: |
|
|
||||||
# curl -s https://api.github.com/repos/zjp-CN/mdbook-theme/releases/latest \
|
|
||||||
# | grep browser_download_url \
|
|
||||||
# | grep mdbook-theme_linux \
|
|
||||||
# | cut -d '"' -f 4 \
|
|
||||||
# | wget -qi -
|
|
||||||
# tar -xvzf mdbook-theme_linux.tar.gz
|
|
||||||
# echo $PWD >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: 安装 python 3.11
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: 3.11
|
|
||||||
|
|
||||||
- name: 安装 dsm api
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
pip install synology-api>=0.5.1
|
|
||||||
|
|
||||||
- name: build mdbook
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
# cp docs/theme .
|
|
||||||
cd docs
|
|
||||||
mdbook build
|
|
||||||
cd ..
|
|
||||||
# Copy-Item docs/book/README-en.html docs/book/html/README-en.html
|
|
||||||
Copy-Item index.html docs/book/index.html
|
|
||||||
Get-ChildItem -Recurse -Path .\docs\book* | ?{$_.PsIsContainer -eq $false} | Get-FileHash -Algorithm MD5 >> .\docs\md5.txt
|
|
||||||
|
|
||||||
- name: 上传到 github pages
|
|
||||||
uses: actions/upload-pages-artifact@v1
|
|
||||||
with:
|
|
||||||
# Upload entire repository
|
|
||||||
path: './docs/book'
|
|
||||||
|
|
||||||
- name: 部署到 github pages
|
|
||||||
id: deployment
|
|
||||||
uses: actions/deploy-pages@v1
|
|
||||||
|
|
||||||
- name: 上传到 DSM
|
|
||||||
env:
|
|
||||||
DSM_TOKEN: ${{ secrets.DSM_TOKEN }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
python .github/workflows/dsm.py -X utf8
|
|
@ -9,8 +9,8 @@ from pathlib import Path
|
|||||||
from Difficult_Rocket.api.types import Options, Version
|
from Difficult_Rocket.api.types import Options, Version
|
||||||
|
|
||||||
sdk_version = Version("0.9.0.0") # SDK 版本
|
sdk_version = Version("0.9.0.0") # SDK 版本
|
||||||
build_version = Version("2.2.0.0") # 编译文件版本(与游戏本体无关)
|
build_version = Version("3.0.0.0") # 编译文件版本(与游戏本体无关)
|
||||||
api_version = Version("0.1.2.0") # API 版本
|
api_version = Version("0.1.2.1") # API 版本
|
||||||
__version__ = sdk_version
|
__version__ = sdk_version
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
@ -61,7 +61,7 @@ class ClientOption(Options):
|
|||||||
caption: str = "Difficult Rocket v{DR_version}"
|
caption: str = "Difficult Rocket v{DR_version}"
|
||||||
|
|
||||||
def load_file(self) -> None:
|
def load_file(self) -> None:
|
||||||
file: dict = tools.load_file("./config/main.toml")
|
file = DR_runtime.main_config
|
||||||
self.fps = int(file["runtime"]["fps"])
|
self.fps = int(file["runtime"]["fps"])
|
||||||
self.width = int(file["window"]["width"])
|
self.width = int(file["window"]["width"])
|
||||||
self.height = int(file["window"]["height"])
|
self.height = int(file["window"]["height"])
|
||||||
@ -126,7 +126,6 @@ class Client:
|
|||||||
return f"<Client {self.process_name} {self.process_pid}>"
|
return f"<Client {self.process_name} {self.process_pid}>"
|
||||||
|
|
||||||
|
|
||||||
@new_thread("pyglet load fonts")
|
|
||||||
def pyglet_load_fonts_folder(folder) -> None:
|
def pyglet_load_fonts_folder(folder) -> None:
|
||||||
"""
|
"""
|
||||||
递归加载字体文件夹
|
递归加载字体文件夹
|
||||||
@ -210,7 +209,7 @@ def _call_screen_after(func: Callable) -> Callable:
|
|||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
warped.__signature__ = inspect.signature(func)
|
warped.__signature__ = inspect.signature(func) # type: ignore
|
||||||
return warped
|
return warped
|
||||||
|
|
||||||
|
|
||||||
@ -237,7 +236,7 @@ def _call_screen_before(func: Callable) -> Callable:
|
|||||||
result = func(self, *args, **kwargs)
|
result = func(self, *args, **kwargs)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
warped.__signature__ = inspect.signature(func)
|
warped.__signature__ = inspect.signature(func) # type: ignore
|
||||||
return warped
|
return warped
|
||||||
|
|
||||||
|
|
||||||
@ -260,10 +259,9 @@ class ClientWindow(Window):
|
|||||||
self.run_input = False
|
self.run_input = False
|
||||||
self.command_list: List[str] = []
|
self.command_list: List[str] = []
|
||||||
# config
|
# config
|
||||||
self.main_config = tools.load_file("./config/main.toml")
|
|
||||||
self.game_config = tools.load_file("./config/game.config")
|
self.game_config = tools.load_file("./config/game.config")
|
||||||
# FPS
|
# FPS
|
||||||
self.FPS = Decimal(int(self.main_config["runtime"]["fps"]))
|
self.FPS = Decimal(int(DR_runtime.main_config["runtime"]["fps"]))
|
||||||
self.SPF = Decimal("1") / self.FPS
|
self.SPF = Decimal("1") / self.FPS
|
||||||
self.fps_log = FpsLogger(stable_fps=int(self.FPS))
|
self.fps_log = FpsLogger(stable_fps=int(self.FPS))
|
||||||
# batch
|
# batch
|
||||||
@ -305,7 +303,7 @@ class ClientWindow(Window):
|
|||||||
self.game.dispatch_mod_event("on_client_start", game=self.game, client=self)
|
self.game.dispatch_mod_event("on_client_start", game=self.game, client=self)
|
||||||
|
|
||||||
def load_fonts(self) -> None:
|
def load_fonts(self) -> None:
|
||||||
fonts_folder_path = self.main_config["runtime"]["fonts_folder"]
|
fonts_folder_path = DR_runtime.main_config["runtime"]["fonts_folder"]
|
||||||
# 加载字体路径
|
# 加载字体路径
|
||||||
# 淦,还写了个递归来处理
|
# 淦,还写了个递归来处理
|
||||||
pyglet_load_fonts_folder(fonts_folder_path)
|
pyglet_load_fonts_folder(fonts_folder_path)
|
||||||
@ -314,10 +312,7 @@ class ClientWindow(Window):
|
|||||||
self.set_icon(pyglet.image.load("assets/textures/icon.png"))
|
self.set_icon(pyglet.image.load("assets/textures/icon.png"))
|
||||||
try:
|
try:
|
||||||
pyglet.clock.schedule_interval(self.draw_call, float(self.SPF))
|
pyglet.clock.schedule_interval(self.draw_call, float(self.SPF))
|
||||||
# pyglet.clock.schedule(self.draw_call)
|
|
||||||
pyglet.app.run(None)
|
pyglet.app.run(None)
|
||||||
# TODO: wait for pyglet 2.1
|
|
||||||
# pyglet.app.run(float(self.SPF))
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
self.logger.warn(
|
self.logger.warn(
|
||||||
"==========client stop. KeyboardInterrupt info==========", tag="starter"
|
"==========client stop. KeyboardInterrupt info==========", tag="starter"
|
||||||
@ -333,7 +328,7 @@ class ClientWindow(Window):
|
|||||||
@new_thread("window save_info")
|
@new_thread("window save_info")
|
||||||
def save_info(self):
|
def save_info(self):
|
||||||
self.logger.info(tr().client.config.save.start())
|
self.logger.info(tr().client.config.save.start())
|
||||||
config_file: dict = tools.load_file("./config/main.toml")
|
config_file = DR_runtime.main_config
|
||||||
config_file["window"]["width"] = self.width
|
config_file["window"]["width"] = self.width
|
||||||
config_file["window"]["height"] = self.height
|
config_file["window"]["height"] = self.height
|
||||||
config_file["runtime"]["language"] = DR_runtime.language
|
config_file["runtime"]["language"] = DR_runtime.language
|
||||||
@ -366,15 +361,12 @@ class ClientWindow(Window):
|
|||||||
self.on_draw(dt)
|
self.on_draw(dt)
|
||||||
self.flip()
|
self.flip()
|
||||||
|
|
||||||
|
|
||||||
@_call_screen_after
|
@_call_screen_after
|
||||||
def on_draw(self, dt: float): # TODO: wait for pyglet 2.1
|
def on_draw(self, dt: float):
|
||||||
# def on_draw(self):
|
|
||||||
while (command := self.game.console.get_command()) is not None:
|
while (command := self.game.console.get_command()) is not None:
|
||||||
self.on_command(line.CommandText(command))
|
self.on_command(line.CommandText(command))
|
||||||
self.clear()
|
self.clear()
|
||||||
self.draw_update(dt) # TODO: wait for pyglet 2.1
|
self.draw_update(dt)
|
||||||
# self.draw_update(float(self.SPF))
|
|
||||||
self.draw_batch()
|
self.draw_batch()
|
||||||
|
|
||||||
@_call_screen_after
|
@_call_screen_after
|
||||||
@ -432,8 +424,8 @@ class ClientWindow(Window):
|
|||||||
# self.command.push_line(self.fps_log.min_fps, block_line=True)
|
# self.command.push_line(self.fps_log.min_fps, block_line=True)
|
||||||
elif command.find("default"):
|
elif command.find("default"):
|
||||||
self.set_size(
|
self.set_size(
|
||||||
int(self.main_config["window_default"]["width"]),
|
int(DR_runtime.main_config["window_default"]["width"]),
|
||||||
int(self.main_config["window_default"]["height"]),
|
int(DR_runtime.main_config["window_default"]["height"]),
|
||||||
)
|
)
|
||||||
elif command.find("lang"):
|
elif command.find("lang"):
|
||||||
try:
|
try:
|
||||||
|
@ -17,16 +17,18 @@ from Difficult_Rocket.api.types import Options, Version
|
|||||||
__all__ = ["DR_runtime"]
|
__all__ = ["DR_runtime"]
|
||||||
|
|
||||||
|
|
||||||
class _DR_runtime(Options):
|
class _DRRuntime(Options):
|
||||||
"""
|
"""
|
||||||
DR 的运行时配置 / 状态
|
DR 的运行时配置 / 状态
|
||||||
"""
|
"""
|
||||||
|
|
||||||
name = "DR Runtime"
|
name = "DR Runtime"
|
||||||
|
|
||||||
|
running: bool = False
|
||||||
language: str = "zh-CN"
|
language: str = "zh-CN"
|
||||||
mod_path: str = "./mods"
|
mod_path: str = "./mods"
|
||||||
DR_Mod_List: List[Tuple[str, Version]] = [] # DR Mod 列表 (name, version)
|
DR_Mod_List: List[Tuple[str, Version]] = [] # DR Mod 列表 (name, version)
|
||||||
|
main_config: dict = {} # main.toml
|
||||||
|
|
||||||
# run status
|
# run status
|
||||||
start_time_ns: Optional[int] = None
|
start_time_ns: Optional[int] = None
|
||||||
@ -41,6 +43,7 @@ class _DR_runtime(Options):
|
|||||||
config_file = rtoml.load(f)
|
config_file = rtoml.load(f)
|
||||||
self.language = config_file["runtime"]["language"]
|
self.language = config_file["runtime"]["language"]
|
||||||
self.mod_path = config_file["game"]["mods"]["path"]
|
self.mod_path = config_file["game"]["mods"]["path"]
|
||||||
|
self.main_config = config_file
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -77,4 +80,4 @@ class _DR_runtime(Options):
|
|||||||
return mods
|
return mods
|
||||||
|
|
||||||
|
|
||||||
DR_runtime = _DR_runtime()
|
DR_runtime = _DRRuntime()
|
||||||
|
10
README.md
@ -13,11 +13,11 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
<a href="https://996.icu"><img src="https://img.shields.io/badge/link-996.icu-red.svg" alt="996.icu" /></a>
|
[](https://996.icu)
|
||||||
[](https://Semver.org/)
|
[](https://Semver.org/)
|
||||||
[](https://Python.org)
|
[](https://Python.org)
|
||||||
[](https://pyglet.org)
|
[](https://pyglet.org)
|
||||||
[](https://Python.org)
|
[](https://Python.org)
|
||||||
|
|
||||||
## 版本
|
## 版本
|
||||||
|
|
||||||
|
7
docs/.gitignore
vendored
@ -1,7 +0,0 @@
|
|||||||
md5.txt
|
|
||||||
index.html
|
|
||||||
|
|
||||||
book
|
|
||||||
#theme
|
|
||||||
|
|
||||||
README-en.html
|
|
@ -9,13 +9,13 @@
|
|||||||
|
|
||||||
## Notice: This repo will only publish `DR SDK` updates, `DR game` updates will be published [here](https://github.com/shenjackyuanjie/DR-game)
|
## Notice: This repo will only publish `DR SDK` updates, `DR game` updates will be published [here](https://github.com/shenjackyuanjie/DR-game)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<a href="https://996.icu"><img src="https://img.shields.io/badge/link-996.icu-red.svg" alt="996.icu" /></a>
|
[](https://996.icu)
|
||||||
[](https://Semver.org/)
|
[](https://Semver.org/)
|
||||||
[](https://Python.org)
|
[](https://Python.org)
|
||||||
[](https://pyglet.org)
|
[](https://pyglet.org)
|
||||||
[](https://Python.org)
|
[](https://Python.org)
|
||||||
|
|
||||||
## Version
|
## Version
|
||||||
|
|
||||||
@ -49,8 +49,6 @@
|
|||||||
|
|
||||||
### clone
|
### clone
|
||||||
|
|
||||||
### clone
|
|
||||||
|
|
||||||
```bash title="clone.sh"
|
```bash title="clone.sh"
|
||||||
mkdir DR
|
mkdir DR
|
||||||
cd DR
|
cd DR
|
||||||
@ -77,7 +75,6 @@ python -m pip install .
|
|||||||
python DR.py
|
python DR.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Environment (been tested / developed on)
|
## Environment (been tested / developed on)
|
||||||
|
|
||||||
- `Develop platform 1 - Windows 10 x64 22H2`
|
- `Develop platform 1 - Windows 10 x64 22H2`
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
[book]
|
|
||||||
authors = ["shenjack"]
|
|
||||||
language = "zh-cn"
|
|
||||||
multilingual = false
|
|
||||||
src = "src"
|
|
||||||
title = "Difficult-Rocket-docs"
|
|
||||||
|
|
||||||
[build]
|
|
||||||
build-dir = './book'
|
|
||||||
create-missing = false
|
|
||||||
use-default-preprocessors = true # use the default preprocessors
|
|
||||||
extra-watch-dirs = [] # directories to watch for triggering builds
|
|
||||||
|
|
||||||
# 默认 404 文件
|
|
||||||
[output.html]
|
|
||||||
input-404 = "404.md"
|
|
||||||
additional-css = ["./theme/pagetoc.css"]
|
|
||||||
additional-js = ["./theme/pagetoc.js"]
|
|
||||||
|
|
||||||
# Git 相关配置
|
|
||||||
git-repository-url = "https://github.com/shenjackyuanjie/Difficult-Rocket"
|
|
||||||
git-branch = "main"
|
|
||||||
|
|
||||||
# 右上角的 "在 Github 内打开" 按钮
|
|
||||||
open-on-text = "Found a bug? [Edit this page on GitHub.]"
|
|
||||||
|
|
||||||
# 目录折叠
|
|
||||||
[output.html.fold]
|
|
||||||
enable = true
|
|
||||||
level = 0
|
|
||||||
|
|
||||||
# 最大搜索数量
|
|
||||||
[output.html.search]
|
|
||||||
limit-results = 15
|
|
||||||
|
|
||||||
# 允许打印
|
|
||||||
[output.html.print]
|
|
||||||
enable = true # include support for printable output
|
|
||||||
page-break = true # insert page-break after each chapter
|
|
||||||
|
|
||||||
[rust]
|
|
||||||
edition = "2021" # the default edition for code blocks
|
|
||||||
|
|
||||||
# 从本地运行一些东西拿到 markdown 里来
|
|
||||||
[preprocessor.cmdrun]
|
|
||||||
|
|
||||||
### 扩展部分
|
|
||||||
|
|
||||||
# 检查文档内链接
|
|
||||||
#[output.linkcheck]
|
|
||||||
#follow-web-links = false
|
|
||||||
#warning-policy = "ignore"
|
|
||||||
#exclude = [ "requirement-dev.txt" ]
|
|
||||||
#traverse-parent-directories = true
|
|
||||||
|
|
||||||
# 支持脚注 ( {{footnote: Or is it?}} )
|
|
||||||
[preprocessor.footnote]
|
|
||||||
|
|
||||||
# 添加右侧目录
|
|
||||||
[preprocessor.theme]
|
|
||||||
turn-off = true
|
|
||||||
pagetoc = true
|
|
||||||
pagetoc-width = "13%"
|
|
||||||
sidebar-width = "300px"
|
|
||||||
|
|
||||||
# 在新页面中打开链接
|
|
||||||
[preprocessor.external-links]
|
|
@ -1,5 +0,0 @@
|
|||||||
mdbook build .
|
|
||||||
Copy-Item book/README-en.html book/html/README-en.html
|
|
||||||
Remove-Item md5.txt
|
|
||||||
Remove-Item index.html
|
|
||||||
Get-ChildItem -Recurse -Path book\* | Where-Object{$_.PsIsContainer -eq $false} | Get-FileHash -Algorithm MD5 >> .\md5.txt
|
|
@ -1,4 +0,0 @@
|
|||||||
mdbook.exe serve `
|
|
||||||
-p 1114 `
|
|
||||||
-n 192.168.3.45 `
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
# 嘿 看啥呢 404!
|
|
||||||
|
|
||||||
- 很明显,这里没有你想要的东西
|
|
||||||
|
|
||||||
- 404啦!
|
|
||||||
|
|
||||||
aaaaaaa
|
|
@ -1,39 +0,0 @@
|
|||||||
# Summary
|
|
||||||
|
|
||||||
- [README](../../README.md)
|
|
||||||
- [README-en](../README-en.md)
|
|
||||||
|
|
||||||
- [Semver++](./version.md)
|
|
||||||
|
|
||||||
- [Change Log](./change_log/readme.md)
|
|
||||||
- [DR sdk](./change_log/dr_sdk.md)
|
|
||||||
- [DR game/DR rs](./change_log/dr_game.md)
|
|
||||||
- [Old Update logs](./change_log/old.md)
|
|
||||||
|
|
||||||
- [Contributing](./contributing.md)
|
|
||||||
|
|
||||||
- [rua! 奇怪的东西~](./rua!.md)
|
|
||||||
- [nuitka](./nuitka/readme.md)
|
|
||||||
- [nuitka performents test](./nuitka/20221121_nuitka_performs.md)
|
|
||||||
- [nuitka options](./nuitka/20230116_nuitka_options.md)
|
|
||||||
- [nuitka 1.3.7 compile options](./nuitka/nuitka_options_137.md)
|
|
||||||
- [nuitka 1.6.1 compile options](./nuitka/nuitka_options_161.md)
|
|
||||||
|
|
||||||
- [计划特性](./plan_features/README.md)
|
|
||||||
- [格式](./plan_features/格式.md)
|
|
||||||
- [更多保存信息](./plan_features/extra-save-info.md)
|
|
||||||
- [部件可成环](./plan_features/multi-connect.md)
|
|
||||||
- [多指令舱控制](./plan_features/multi-control.md)
|
|
||||||
- [轨道规划](./plan_features/orbit-plan.md)
|
|
||||||
- [自定义部件收集](./plan_features/custom-part.md)
|
|
||||||
|
|
||||||
- [开发文档](./howto/readme.md)
|
|
||||||
- [client](./howto/client.md)
|
|
||||||
- [mod 加载器](./howto/mod/loader.md)
|
|
||||||
- [游戏设计机制](./howto/game/readme.md)
|
|
||||||
- [命名规范](./howto/game/命名.md)
|
|
||||||
- [Translate](./howto/translate.md)
|
|
||||||
|
|
||||||
- [NOOOOOOOOOO](./no/readme.md)
|
|
||||||
- [Andy Zhang](./no/zhang_anzhi/readme.md)
|
|
||||||
- [CSDN](./no/csdn/readme.md)
|
|
@ -1,81 +0,0 @@
|
|||||||
|
|
||||||
# DR 构建 更新日志
|
|
||||||
|
|
||||||
- 最新构建版本号
|
|
||||||
- build_version: 2.2.0.0
|
|
||||||
|
|
||||||
## 20230917 build 2.2.0.0
|
|
||||||
|
|
||||||
### 修改
|
|
||||||
|
|
||||||
- 删掉了蹩脚的 `_add_cmd`
|
|
||||||
- 可读性更好的写法
|
|
||||||
- 反正建议自己去看源码修改
|
|
||||||
- 现在应该可以直接运行输出的脚本了
|
|
||||||
- 不需要手动给带空格的参数添加引号了
|
|
||||||
- 给 `--disable-plugin` 添加了
|
|
||||||
- `pyqt5`
|
|
||||||
- `tk-inter`
|
|
||||||
- 防止因为 `pyperclicp` 把他俩打包进来
|
|
||||||
- 添加了几行 `# noqa`
|
|
||||||
- 向 linker 低头
|
|
||||||
|
|
||||||
## 20230715 build 2.1.3.0
|
|
||||||
|
|
||||||
### 修改
|
|
||||||
|
|
||||||
- 添加 `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`
|
|
@ -1,365 +0,0 @@
|
|||||||
# 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`
|
|
||||||
|
|
@ -1,367 +0,0 @@
|
|||||||
# DR SDK 更新日志
|
|
||||||
|
|
||||||
- 最新版本号
|
|
||||||
- DR sdk: 0.8.7.3
|
|
||||||
- DR api: 0.1.2.0
|
|
||||||
|
|
||||||
## 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`
|
|
||||||
|
|
||||||
## 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` 时 没有检查是否为空
|
|
@ -1,5 +0,0 @@
|
|||||||
# 这里存储了 `DR sdk` `DR game` 和 `DR rs` 的更新日志
|
|
||||||
|
|
||||||
- [DR sdk](./dr_sdk.md)
|
|
||||||
- [DR game/DR rs](./dr_game.md)
|
|
||||||
- [old update logs](./old.md)
|
|
@ -1,22 +0,0 @@
|
|||||||
# 如何帮助 DR 开发
|
|
||||||
|
|
||||||
## 需要准备的工具
|
|
||||||
|
|
||||||
1. Powershell 7+
|
|
||||||
2. Python3.8 +
|
|
||||||
3. gcc / clang 编译器
|
|
||||||
4. rust 工具链
|
|
||||||
5. git
|
|
||||||
|
|
||||||
## 安装依赖
|
|
||||||
|
|
||||||
1. 确保 Path 下有以下内容
|
|
||||||
- `python`
|
|
||||||
- `python3.8`
|
|
||||||
- 可供 `setuptools-rust` 调用的 rust 工具链
|
|
||||||
2. 为 Python 安装 [requrements-dev.txt](../requirement-dev.txt) 的依赖
|
|
||||||
- `python -m pip install -r requre`
|
|
||||||
3. 使用 `build_rs.ps1` 尝试编译一次 `DR_rs`
|
|
||||||
- `./build_rs.ps1` 38/39/310/311
|
|
||||||
|
|
||||||
<!-- cmdrun pwsh test.ps1 -->
|
|
Before Width: | Height: | Size: 408 KiB |
@ -1,4 +0,0 @@
|
|||||||
# 设计文档
|
|
||||||
|
|
||||||
20220208
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
|||||||
# 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 调用
|
|
||||||
- 模组添加
|
|
||||||
- 软件内调用
|
|
||||||
- 加载时调用
|
|
||||||
- 我先睡了,老爹催了
|
|
||||||
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
# 关于命名的设计文档
|
|
||||||
|
|
||||||
## 命名规则
|
|
||||||
|
|
||||||
## 命名空间
|
|
||||||
|
|
||||||
- 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添加的部件、格式、结构的命名空间
|
|
@ -1,25 +0,0 @@
|
|||||||
# MOD加载器设计文档
|
|
||||||
|
|
||||||
## v1-20220307
|
|
||||||
|
|
||||||
### __init__.py
|
|
||||||
|
|
||||||
- MODInfo类
|
|
||||||
- MODInfo类的属性
|
|
||||||
- 一些基本的MOD信息
|
|
||||||
- 版本类信息
|
|
||||||
- MOD版本号
|
|
||||||
- DR MOD加载器兼容版本
|
|
||||||
- DR 内容兼容版本
|
|
||||||
- 需要的MOD版本号
|
|
||||||
-
|
|
||||||
|
|
||||||
草,你隔这呢,我还在隔壁readme呢,先来写readme
|
|
||||||
|
|
||||||
### DR_rs 扩展加载
|
|
||||||
|
|
||||||
- 发现 Mod 方式
|
|
||||||
- 在用户打开界面时进行扫描
|
|
||||||
- 用户手动添加 (UI请求)
|
|
||||||
- 加载方式
|
|
||||||
- 游戏启动前进行加载 (根据后缀名, 只有特定后缀名采用, 否则无视(方便实现备用))
|
|
@ -1,2 +0,0 @@
|
|||||||
# 其实也没啥东西啦,就是个占位符
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
# 多语言支持
|
|
||||||
|
|
||||||
## 范例
|
|
||||||
|
|
||||||
```python
|
|
||||||
from Difficult_Rocket.utils.translate import tr
|
|
||||||
|
|
||||||
print(tr().window.setup.done())
|
|
||||||
```
|
|
Before Width: | Height: | Size: 454 KiB |
Before Width: | Height: | Size: 402 KiB |
@ -1,6 +0,0 @@
|
|||||||
# NOPE
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
Before Width: | Height: | Size: 571 KiB |
Before Width: | Height: | Size: 366 KiB |
@ -1,3 +0,0 @@
|
|||||||
# NO
|
|
||||||
|
|
||||||
没错,这里是被挂起来的一些东西(
|
|
Before Width: | Height: | Size: 865 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 105 KiB |
@ -1,7 +0,0 @@
|
|||||||
# NO
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<!--  -->
|
|
Before Width: | Height: | Size: 322 KiB |
@ -1,197 +0,0 @@
|
|||||||
# nuitka 1.2.1 的性能测试
|
|
||||||
大家好! 这里是shenjack!
|
|
||||||
这篇文章就是 [B站](https://www.bilibili.com/read/cv20208726) 专栏的原文!
|
|
||||||
|
|
||||||
# 综述
|
|
||||||
|
|
||||||
## 环境
|
|
||||||
|
|
||||||
- 硬件
|
|
||||||
- CPU: `AMD R5 5600X`
|
|
||||||
- 内存: `64G DDR4 3200 (32×2)`
|
|
||||||
|
|
||||||
|
|
||||||
- 软件
|
|
||||||
- 
|
|
||||||
- 
|
|
||||||
- 
|
|
||||||
- `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)
|
|
||||||
- 
|
|
||||||
|
|
||||||
- `lto=yes`
|
|
||||||
|
|
||||||
- `后期测试数据`
|
|
||||||
- `--clang`
|
|
||||||
- `--mingw64`
|
|
||||||
- `--lto=yes`
|
|
||||||
- 耗时 86000ms (86s)
|
|
||||||
- 
|
|
||||||
|
|
||||||
- `no ccache`
|
|
||||||
|
|
||||||
- `lto=no`
|
|
||||||
|
|
||||||
- `视频内数据`
|
|
||||||
- `--clang`
|
|
||||||
- `--mingw64`
|
|
||||||
- `--lto=no`
|
|
||||||
- `--disable-ccache`
|
|
||||||
- 耗时 83000ms (83s)
|
|
||||||
- 
|
|
||||||
|
|
||||||
- `lto=yes`
|
|
||||||
|
|
||||||
- `后期测试数据`
|
|
||||||
- `--clang`
|
|
||||||
- `--mingw64`
|
|
||||||
- `--lto=yes`
|
|
||||||
- `--disable-ccache`
|
|
||||||
- 耗时 67000ms (67s)
|
|
||||||
- 
|
|
||||||
|
|
||||||
- `mingw64`
|
|
||||||
|
|
||||||
- `with ccache`
|
|
||||||
|
|
||||||
- `lto=no`
|
|
||||||
|
|
||||||
- `后期测试数据`
|
|
||||||
- `--mingw64`
|
|
||||||
- `--lto=no`
|
|
||||||
- 耗时 59000ms (59s)
|
|
||||||
- 
|
|
||||||
|
|
||||||
- `lto=yes`
|
|
||||||
|
|
||||||
- `后期测试数据`
|
|
||||||
- `--mingw64`
|
|
||||||
- `--lto=yes`
|
|
||||||
- 耗时 641000ms (641s) (10.68min)
|
|
||||||
- 
|
|
||||||
|
|
||||||
- `no ccache`
|
|
||||||
|
|
||||||
- `lto=no`
|
|
||||||
|
|
||||||
- `视频内数据`
|
|
||||||
- `--mingw64`
|
|
||||||
- `--lto=no`
|
|
||||||
- `--disable-ccache`
|
|
||||||
- 耗时 227000ms (227s) (3.78min)
|
|
||||||
- 
|
|
||||||
|
|
||||||
- `lto=yes`
|
|
||||||
|
|
||||||
- `后期测试数据`
|
|
||||||
- `--mingw64`
|
|
||||||
- `--lto=yes`
|
|
||||||
- `--disable-ccache`
|
|
||||||
- 耗时 630000ms (630s) (10.5min)
|
|
||||||
- 
|
|
@ -1,719 +0,0 @@
|
|||||||
# 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.
|
|
Before Width: | Height: | Size: 196 KiB |
Before Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 24 KiB |
@ -1,582 +0,0 @@
|
|||||||
# 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.
|
|
||||||
```
|
|
@ -1,629 +0,0 @@
|
|||||||
# 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.
|
|
||||||
```
|
|
Before Width: | Height: | Size: 55 KiB |
@ -1,6 +0,0 @@
|
|||||||
# Nuitka
|
|
||||||
|
|
||||||
这里是一些在 DR 编写过程中的 nuitka 相关的内容
|
|
||||||
|
|
||||||
例如 [不同编译器的性能](20221121_nuitka_performs.md) 和 [nuitka 选项解释](20230116_nuitka_options.md)
|
|
||||||
(其实也就这俩(20230116))
|
|
@ -1,44 +0,0 @@
|
|||||||
# 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 |
|
|
||||||
|
|
||||||
# 文件范例
|
|
||||||
|
|
||||||
# 中文简称 文件名 `英文名称`
|
|
||||||
|
|
||||||
## 日期
|
|
||||||
|
|
||||||
## 发起人
|
|
||||||
|
|
||||||
## 状态
|
|
||||||
|
|
||||||
## 描述
|
|
||||||
|
|
||||||
### 底层机制 `实现方法(大致)`
|
|
||||||
|
|
||||||
### 效果
|
|
||||||
|
|
||||||
## 别的什么的
|
|
@ -1,33 +0,0 @@
|
|||||||
# 各种自定义部件 custom-part.md `custom part`
|
|
||||||
|
|
||||||
## 2023 07 15
|
|
||||||
|
|
||||||
## shenjack 和 qq 群的各位
|
|
||||||
|
|
||||||
- 北风百草
|
|
||||||
- 小阳阳
|
|
||||||
|
|
||||||
## 状态
|
|
||||||
|
|
||||||
- 计划中
|
|
||||||
|
|
||||||
## 描述
|
|
||||||
|
|
||||||
- 各种奇怪自定义部件的收集
|
|
||||||
|
|
||||||
## 列表
|
|
||||||
|
|
||||||
### `核推`
|
|
||||||
|
|
||||||
- 消耗工质
|
|
||||||
- 产生大量热量
|
|
||||||
- 需要散热
|
|
||||||
|
|
||||||
### `装饰性外壳`
|
|
||||||
|
|
||||||
- 没有碰撞箱
|
|
||||||
- 或者最外层有碰撞箱
|
|
||||||
|
|
||||||
### `部件 Pro`
|
|
||||||
|
|
||||||
- 超级大
|
|
@ -1,29 +0,0 @@
|
|||||||
# 存档额外信息 extra save info
|
|
||||||
|
|
||||||
## 20210514
|
|
||||||
|
|
||||||
## shenjackyuanjie
|
|
||||||
|
|
||||||
## planing
|
|
||||||
|
|
||||||
## 描述
|
|
||||||
|
|
||||||
存档中会额外保存一些信息
|
|
||||||
|
|
||||||
### 底层机制
|
|
||||||
|
|
||||||
保存存档时会读取 `partlist` 中的部件信息
|
|
||||||
|
|
||||||
比如部件碰撞箱、重量等
|
|
||||||
|
|
||||||
并保存到存档中
|
|
||||||
|
|
||||||
### 效果
|
|
||||||
|
|
||||||
存档会根据部件使用情况
|
|
||||||
|
|
||||||
增大体积(直到所有种类的部件都被用)
|
|
||||||
|
|
||||||
## 别的什么的
|
|
||||||
|
|
||||||
没了
|
|
@ -1,15 +0,0 @@
|
|||||||
# 部件可成环 multi-connect
|
|
||||||
|
|
||||||
## 2021-4-25
|
|
||||||
|
|
||||||
## shenjackyuanjie(writer)
|
|
||||||
|
|
||||||
## 描述
|
|
||||||
|
|
||||||
### 底层机制
|
|
||||||
|
|
||||||
单个部件可以同时连接到2个或两个以上部件
|
|
||||||
|
|
||||||
### 效果
|
|
||||||
|
|
||||||
可以搞点 环世界 之类的巨构
|
|
@ -1,34 +0,0 @@
|
|||||||
# 多指令舱控制 multi-control
|
|
||||||
|
|
||||||
## 2021-4-25
|
|
||||||
|
|
||||||
## shenjackyuanjie(writer)
|
|
||||||
|
|
||||||
## planing
|
|
||||||
|
|
||||||
## 描述
|
|
||||||
|
|
||||||
### 示例1
|
|
||||||
|
|
||||||
可以让多个指令舱同时进行动作
|
|
||||||
|
|
||||||
比如一个空间站由很多部分组成
|
|
||||||
|
|
||||||
每一个部分都由不同的指令舱控制
|
|
||||||
|
|
||||||
多指令舱控制就可以实现空间站所有部分统一加速、减速
|
|
||||||
|
|
||||||
其实也是某种程度上的统一控制
|
|
||||||
|
|
||||||
### 示例2
|
|
||||||
|
|
||||||
在同时发射多枚火箭/卫星时
|
|
||||||
|
|
||||||
可以让火箭在操作其他火箭的时候继续燃烧
|
|
||||||
|
|
||||||
(就是说操纵A火箭的时候,B火箭还能继续燃烧)
|
|
||||||
|
|
||||||
### 底层机制
|
|
||||||
|
|
||||||
不知道
|
|
||||||
别问我
|
|
@ -1,22 +0,0 @@
|
|||||||
# 轨道规划 `orbit plan`
|
|
||||||
|
|
||||||
## 20230106
|
|
||||||
|
|
||||||
## shenjack
|
|
||||||
|
|
||||||
## 状态
|
|
||||||
|
|
||||||
planing
|
|
||||||
|
|
||||||
## 描述
|
|
||||||
|
|
||||||
|
|
||||||
### 底层机制 `实现方法(大致)`
|
|
||||||
|
|
||||||
aaaa
|
|
||||||
|
|
||||||
### 效果
|
|
||||||
|
|
||||||
可以规划轨道
|
|
||||||
|
|
||||||
## 别的什么的
|
|
@ -1,15 +0,0 @@
|
|||||||
# 中文简称 文件名
|
|
||||||
|
|
||||||
## 日期
|
|
||||||
|
|
||||||
## 发起人
|
|
||||||
|
|
||||||
## 状态
|
|
||||||
|
|
||||||
## 描述
|
|
||||||
|
|
||||||
### 底层机制
|
|
||||||
|
|
||||||
### 效果
|
|
||||||
|
|
||||||
## 别的什么的
|
|
@ -1,26 +0,0 @@
|
|||||||
# pyglet相关
|
|
||||||
|
|
||||||
pyglet 坐标轴原点是左上角 0, 0
|
|
||||||
|
|
||||||
# 坐标记录相关
|
|
||||||
|
|
||||||
记录的是部件碰撞箱中心的相对于控制仓碰撞箱中心的相对坐标
|
|
||||||
|
|
||||||
然后控制仓的坐标是单独记录的
|
|
||||||
|
|
||||||
记录的是区块坐标+区块内坐标
|
|
||||||
|
|
||||||
# 渲染
|
|
||||||
|
|
||||||
屏幕坐标系需要*100(有待测试)
|
|
||||||
这个应该跟 windows 屏幕缩放比例有关
|
|
||||||
嗯(我找一下你发的那个图
|
|
||||||
找到了 qq 群
|
|
||||||
我check一下微调器的代码,原理应该一样,有个函数我看看怎么实现
|
|
||||||
# 素材提供
|
|
||||||
|
|
||||||
[背景候选1号](../../assets/textures/runtime/background.png)
|
|
||||||
来自 @底层萌新 QQ:1744251171
|
|
||||||
|
|
||||||
|
|
||||||
# gl.glClearColor(a / 255, b / 255, c / 255, d)
|
|
@ -1,8 +0,0 @@
|
|||||||
|
|
||||||
# ls 之后将每一行输出包裹在 ` 里面
|
|
||||||
echo "<pre>"
|
|
||||||
Get-ChildItem . | ForEach-Object {
|
|
||||||
echo $_
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</pre>"
|
|
Before Width: | Height: | Size: 2.2 MiB |
@ -1,24 +0,0 @@
|
|||||||
# 关于 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` | `内部修订` 版本号 | 发布未实装的 `内部更新` | 对 `将要到来的内容` 的更新 | `完全兼容` |
|
|
545
docs/theme/css/chrome.css
vendored
@ -1,545 +0,0 @@
|
|||||||
/* CSS for UI elements (a.k.a. chrome) */
|
|
||||||
|
|
||||||
@import 'variables.css';
|
|
||||||
|
|
||||||
html {
|
|
||||||
scrollbar-color: var(--scrollbar) var(--bg);
|
|
||||||
}
|
|
||||||
#searchresults a,
|
|
||||||
.content a:link,
|
|
||||||
a:visited,
|
|
||||||
a > .hljs {
|
|
||||||
color: var(--links);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
body-container is necessary because mobile browsers don't seem to like
|
|
||||||
overflow-x on the body tag when there is a <meta name="viewport"> tag.
|
|
||||||
*/
|
|
||||||
#body-container {
|
|
||||||
/*
|
|
||||||
This is used when the sidebar pushes the body content off the side of
|
|
||||||
the screen on small screens. Without it, dragging on mobile Safari
|
|
||||||
will want to reposition the viewport in a weird way.
|
|
||||||
*/
|
|
||||||
overflow-x: clip;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Menu Bar */
|
|
||||||
|
|
||||||
#menu-bar,
|
|
||||||
#menu-bar-hover-placeholder {
|
|
||||||
z-index: 101;
|
|
||||||
margin: auto calc(0px - var(--page-padding));
|
|
||||||
}
|
|
||||||
#menu-bar {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
background-color: var(--bg);
|
|
||||||
border-bottom-color: var(--bg);
|
|
||||||
border-bottom-width: 1px;
|
|
||||||
border-bottom-style: solid;
|
|
||||||
}
|
|
||||||
#menu-bar.sticky,
|
|
||||||
.js #menu-bar-hover-placeholder:hover + #menu-bar,
|
|
||||||
.js #menu-bar:hover,
|
|
||||||
.js.sidebar-visible #menu-bar {
|
|
||||||
position: -webkit-sticky;
|
|
||||||
position: sticky;
|
|
||||||
top: 0 !important;
|
|
||||||
}
|
|
||||||
#menu-bar-hover-placeholder {
|
|
||||||
position: sticky;
|
|
||||||
position: -webkit-sticky;
|
|
||||||
top: 0;
|
|
||||||
height: var(--menu-bar-height);
|
|
||||||
}
|
|
||||||
#menu-bar.bordered {
|
|
||||||
border-bottom-color: var(--table-border-color);
|
|
||||||
}
|
|
||||||
#menu-bar i, #menu-bar .icon-button {
|
|
||||||
position: relative;
|
|
||||||
padding: 0 8px;
|
|
||||||
z-index: 10;
|
|
||||||
line-height: var(--menu-bar-height);
|
|
||||||
cursor: pointer;
|
|
||||||
transition: color 0.5s;
|
|
||||||
}
|
|
||||||
@media only screen and (max-width: 420px) {
|
|
||||||
#menu-bar i, #menu-bar .icon-button {
|
|
||||||
padding: 0 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-button {
|
|
||||||
border: none;
|
|
||||||
background: none;
|
|
||||||
padding: 0;
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
.icon-button i {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right-buttons {
|
|
||||||
margin: 0 15px;
|
|
||||||
}
|
|
||||||
.right-buttons a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.left-buttons {
|
|
||||||
display: flex;
|
|
||||||
margin: 0 5px;
|
|
||||||
}
|
|
||||||
.no-js .left-buttons {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-title {
|
|
||||||
display: inline-block;
|
|
||||||
font-weight: 200;
|
|
||||||
font-size: 2.4rem;
|
|
||||||
line-height: var(--menu-bar-height);
|
|
||||||
text-align: center;
|
|
||||||
margin: 0;
|
|
||||||
flex: 1;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
.js .menu-title {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-bar,
|
|
||||||
.menu-bar:visited,
|
|
||||||
.nav-chapters,
|
|
||||||
.nav-chapters:visited,
|
|
||||||
.mobile-nav-chapters,
|
|
||||||
.mobile-nav-chapters:visited,
|
|
||||||
.menu-bar .icon-button,
|
|
||||||
.menu-bar a i {
|
|
||||||
color: var(--icons);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-bar i:hover,
|
|
||||||
.menu-bar .icon-button:hover,
|
|
||||||
.nav-chapters:hover,
|
|
||||||
.mobile-nav-chapters i:hover {
|
|
||||||
color: var(--icons-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Nav Icons */
|
|
||||||
|
|
||||||
.nav-chapters {
|
|
||||||
font-size: 2.5em;
|
|
||||||
text-align: center;
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
margin: 0;
|
|
||||||
max-width: auto;
|
|
||||||
min-width: auto;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-content: center;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
transition: color 0.5s, background-color 0.5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-chapters:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: var(--theme-hover);
|
|
||||||
transition: background-color 0.15s, color 0.15s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-wrapper {
|
|
||||||
margin-top: 50px;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-nav-chapters {
|
|
||||||
font-size: 2.5em;
|
|
||||||
text-align: center;
|
|
||||||
text-decoration: none;
|
|
||||||
width: 90px;
|
|
||||||
border-radius: 5px;
|
|
||||||
background-color: var(--sidebar-bg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.previous {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.next {
|
|
||||||
float: right;
|
|
||||||
right: var(--page-padding);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 1080px) {
|
|
||||||
.nav-wide-wrapper { display: none; }
|
|
||||||
.nav-wrapper { display: block; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 1380px) {
|
|
||||||
.sidebar-visible .nav-wide-wrapper { display: none; }
|
|
||||||
.sidebar-visible .nav-wrapper { display: block; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Inline code */
|
|
||||||
|
|
||||||
:not(pre) > .hljs {
|
|
||||||
display: inline;
|
|
||||||
padding: 0.1em 0.3em;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:not(pre):not(a) > .hljs {
|
|
||||||
color: var(--inline-code-color);
|
|
||||||
overflow-x: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover > .hljs {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
pre > .buttons {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 100;
|
|
||||||
right: 0px;
|
|
||||||
top: 2px;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 2px 0px;
|
|
||||||
|
|
||||||
color: var(--sidebar-fg);
|
|
||||||
cursor: pointer;
|
|
||||||
visibility: hidden;
|
|
||||||
opacity: 0;
|
|
||||||
transition: visibility 0.1s linear, opacity 0.1s linear;
|
|
||||||
}
|
|
||||||
pre:hover > .buttons {
|
|
||||||
visibility: visible;
|
|
||||||
opacity: 1
|
|
||||||
}
|
|
||||||
pre > .buttons :hover {
|
|
||||||
color: var(--sidebar-active);
|
|
||||||
border-color: var(--icons-hover);
|
|
||||||
background-color: var(--theme-hover);
|
|
||||||
}
|
|
||||||
pre > .buttons i {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
pre > .buttons button {
|
|
||||||
cursor: inherit;
|
|
||||||
margin: 0px 5px;
|
|
||||||
padding: 3px 5px;
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px;
|
|
||||||
border-radius: 4px;
|
|
||||||
border-color: var(--icons);
|
|
||||||
background-color: var(--theme-popup-bg);
|
|
||||||
transition: 100ms;
|
|
||||||
transition-property: color,border-color,background-color;
|
|
||||||
color: var(--icons);
|
|
||||||
}
|
|
||||||
@media (pointer: coarse) {
|
|
||||||
pre > .buttons button {
|
|
||||||
/* On mobile, make it easier to tap buttons. */
|
|
||||||
padding: 0.3rem 1rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pre > code {
|
|
||||||
padding: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: ACE editors overlap their buttons because ACE does absolute
|
|
||||||
positioning within the code block which breaks padding. The only solution I
|
|
||||||
can think of is to move the padding to the outer pre tag (or insert a div
|
|
||||||
wrapper), but that would require fixing a whole bunch of CSS rules.
|
|
||||||
*/
|
|
||||||
.hljs.ace_editor {
|
|
||||||
padding: 0rem 0rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre > .result {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Search */
|
|
||||||
|
|
||||||
#searchresults a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
mark {
|
|
||||||
border-radius: 2px;
|
|
||||||
padding: 0 3px 1px 3px;
|
|
||||||
margin: 0 -3px -1px -3px;
|
|
||||||
background-color: var(--search-mark-bg);
|
|
||||||
transition: background-color 300ms linear;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
mark.fade-out {
|
|
||||||
background-color: rgba(0,0,0,0) !important;
|
|
||||||
cursor: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.searchbar-outer {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
max-width: var(--content-max-width);
|
|
||||||
}
|
|
||||||
|
|
||||||
#searchbar {
|
|
||||||
width: 100%;
|
|
||||||
margin: 5px auto 0px auto;
|
|
||||||
padding: 10px 16px;
|
|
||||||
transition: box-shadow 300ms ease-in-out;
|
|
||||||
border: 1px solid var(--searchbar-border-color);
|
|
||||||
border-radius: 3px;
|
|
||||||
background-color: var(--searchbar-bg);
|
|
||||||
color: var(--searchbar-fg);
|
|
||||||
}
|
|
||||||
#searchbar:focus,
|
|
||||||
#searchbar.active {
|
|
||||||
box-shadow: 0 0 3px var(--searchbar-shadow-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.searchresults-header {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 1em;
|
|
||||||
padding: 18px 0 0 5px;
|
|
||||||
color: var(--searchresults-header-fg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.searchresults-outer {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
max-width: var(--content-max-width);
|
|
||||||
border-bottom: 1px dashed var(--searchresults-border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
ul#searchresults {
|
|
||||||
list-style: none;
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
ul#searchresults li {
|
|
||||||
margin: 10px 0px;
|
|
||||||
padding: 2px;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
ul#searchresults li.focus {
|
|
||||||
background-color: var(--searchresults-li-bg);
|
|
||||||
}
|
|
||||||
ul#searchresults span.teaser {
|
|
||||||
display: block;
|
|
||||||
clear: both;
|
|
||||||
margin: 5px 0 0 20px;
|
|
||||||
font-size: 0.8em;
|
|
||||||
}
|
|
||||||
ul#searchresults span.teaser em {
|
|
||||||
font-weight: bold;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sidebar */
|
|
||||||
|
|
||||||
.sidebar {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: var(--sidebar-width);
|
|
||||||
font-size: 1em;
|
|
||||||
box-sizing: border-box;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
overscroll-behavior-y: contain;
|
|
||||||
background-color: var(--sidebar-bg);
|
|
||||||
color: var(--sidebar-fg);
|
|
||||||
}
|
|
||||||
.sidebar-resizing {
|
|
||||||
-moz-user-select: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
.js:not(.sidebar-resizing) .sidebar {
|
|
||||||
transition: transform 0.3s; /* Animation: slide away */
|
|
||||||
}
|
|
||||||
.sidebar code {
|
|
||||||
line-height: 2em;
|
|
||||||
}
|
|
||||||
.sidebar .sidebar-scrollbox {
|
|
||||||
overflow-y: auto;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
padding: 10px 10px;
|
|
||||||
}
|
|
||||||
.sidebar .sidebar-resize-handle {
|
|
||||||
position: absolute;
|
|
||||||
cursor: col-resize;
|
|
||||||
width: 0;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
.js .sidebar .sidebar-resize-handle {
|
|
||||||
cursor: col-resize;
|
|
||||||
width: 5px;
|
|
||||||
}
|
|
||||||
.sidebar-hidden .sidebar {
|
|
||||||
transform: translateX(calc(0px - var(--sidebar-width)));
|
|
||||||
}
|
|
||||||
.sidebar::-webkit-scrollbar {
|
|
||||||
background: var(--sidebar-bg);
|
|
||||||
}
|
|
||||||
.sidebar::-webkit-scrollbar-thumb {
|
|
||||||
background: var(--scrollbar);
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-visible .page-wrapper {
|
|
||||||
transform: translateX(var(--sidebar-width));
|
|
||||||
}
|
|
||||||
@media only screen and (min-width: 620px) {
|
|
||||||
.sidebar-visible .page-wrapper {
|
|
||||||
transform: none;
|
|
||||||
margin-left: var(--sidebar-width);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.chapter {
|
|
||||||
list-style: none outside none;
|
|
||||||
padding-left: 0;
|
|
||||||
line-height: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chapter ol {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chapter li {
|
|
||||||
display: flex;
|
|
||||||
color: var(--sidebar-non-existant);
|
|
||||||
}
|
|
||||||
.chapter li a {
|
|
||||||
display: block;
|
|
||||||
padding: 0;
|
|
||||||
text-decoration: none;
|
|
||||||
color: var(--sidebar-fg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.chapter li a:hover {
|
|
||||||
color: var(--sidebar-active);
|
|
||||||
}
|
|
||||||
|
|
||||||
.chapter li a.active {
|
|
||||||
color: var(--sidebar-active);
|
|
||||||
}
|
|
||||||
|
|
||||||
.chapter li > a.toggle {
|
|
||||||
cursor: pointer;
|
|
||||||
display: block;
|
|
||||||
margin-left: auto;
|
|
||||||
padding: 0 10px;
|
|
||||||
user-select: none;
|
|
||||||
opacity: 0.68;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chapter li > a.toggle div {
|
|
||||||
transition: transform 0.5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* collapse the section */
|
|
||||||
.chapter li:not(.expanded) + li > ol {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chapter li.chapter-item {
|
|
||||||
line-height: 1.5em;
|
|
||||||
margin-top: 0.6em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chapter li.expanded > a.toggle div {
|
|
||||||
transform: rotate(90deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.spacer {
|
|
||||||
width: 100%;
|
|
||||||
height: 3px;
|
|
||||||
margin: 5px 0px;
|
|
||||||
}
|
|
||||||
.chapter .spacer {
|
|
||||||
background-color: var(--sidebar-spacer);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (-moz-touch-enabled: 1), (pointer: coarse) {
|
|
||||||
.chapter li a { padding: 5px 0; }
|
|
||||||
.spacer { margin: 10px 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.section {
|
|
||||||
list-style: none outside none;
|
|
||||||
padding-left: 20px;
|
|
||||||
line-height: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Theme Menu Popup */
|
|
||||||
|
|
||||||
.theme-popup {
|
|
||||||
position: absolute;
|
|
||||||
left: 10px;
|
|
||||||
top: var(--menu-bar-height);
|
|
||||||
z-index: 1000;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 0.7em;
|
|
||||||
color: var(--fg);
|
|
||||||
background: var(--theme-popup-bg);
|
|
||||||
border: 1px solid var(--theme-popup-border);
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
display: none;
|
|
||||||
/* Don't let the children's background extend past the rounded corners. */
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.theme-popup .default {
|
|
||||||
color: var(--icons);
|
|
||||||
}
|
|
||||||
.theme-popup .theme {
|
|
||||||
width: 100%;
|
|
||||||
border: 0;
|
|
||||||
margin: 0;
|
|
||||||
padding: 2px 20px;
|
|
||||||
line-height: 25px;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-align: left;
|
|
||||||
cursor: pointer;
|
|
||||||
color: inherit;
|
|
||||||
background: inherit;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
.theme-popup .theme:hover {
|
|
||||||
background-color: var(--theme-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
.theme-selected::before {
|
|
||||||
display: inline-block;
|
|
||||||
content: "✓";
|
|
||||||
margin-left: -14px;
|
|
||||||
width: 14px;
|
|
||||||
}
|
|
203
docs/theme/css/general.css
vendored
@ -1,203 +0,0 @@
|
|||||||
/* Base styles and content styles */
|
|
||||||
|
|
||||||
@import 'variables.css';
|
|
||||||
|
|
||||||
:root {
|
|
||||||
/* Browser default font-size is 16px, this way 1 rem = 10px */
|
|
||||||
font-size: 70%;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-family: "Open Sans", sans-serif;
|
|
||||||
color: var(--fg);
|
|
||||||
background-color: var(--bg);
|
|
||||||
text-size-adjust: none;
|
|
||||||
-webkit-text-size-adjust: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-family: var(--mono-font) !important;
|
|
||||||
font-size: 0.9em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* make long words/inline code not x overflow */
|
|
||||||
main {
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* make wide tables scroll if they overflow */
|
|
||||||
.table-wrapper {
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Don't change font size in headers. */
|
|
||||||
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
|
||||||
font-size: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.left { float: left; }
|
|
||||||
.right { float: right; }
|
|
||||||
.boring { opacity: 0.6; }
|
|
||||||
.hide-boring .boring { display: none; }
|
|
||||||
.hidden { display: none !important; }
|
|
||||||
|
|
||||||
h2, h3 { margin-top: 2.5em; }
|
|
||||||
h4, h5 { margin-top: 2em; }
|
|
||||||
|
|
||||||
.header + .header h3,
|
|
||||||
.header + .header h4,
|
|
||||||
.header + .header h5 {
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1:target::before,
|
|
||||||
h2:target::before,
|
|
||||||
h3:target::before,
|
|
||||||
h4:target::before,
|
|
||||||
h5:target::before,
|
|
||||||
h6:target::before {
|
|
||||||
display: inline-block;
|
|
||||||
content: "»";
|
|
||||||
margin-left: -30px;
|
|
||||||
width: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This is broken on Safari as of version 14, but is fixed
|
|
||||||
in Safari Technology Preview 117 which I think will be Safari 14.2.
|
|
||||||
https://bugs.webkit.org/show_bug.cgi?id=218076
|
|
||||||
*/
|
|
||||||
:target {
|
|
||||||
scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
|
|
||||||
}
|
|
||||||
|
|
||||||
.page {
|
|
||||||
outline: 0;
|
|
||||||
padding: 0 var(--page-padding);
|
|
||||||
margin-top: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
|
|
||||||
}
|
|
||||||
.page-wrapper {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
.js:not(.sidebar-resizing) .page-wrapper {
|
|
||||||
transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
overflow-y: auto;
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
.content main {
|
|
||||||
margin-left: 2%;
|
|
||||||
margin-right: 2%;
|
|
||||||
max-width: var(--content-max-width);
|
|
||||||
}
|
|
||||||
.content p { line-height: 1.45em; }
|
|
||||||
.content ol { line-height: 1.45em; }
|
|
||||||
.content ul { line-height: 1.45em; }
|
|
||||||
.content a { text-decoration: none; }
|
|
||||||
.content a:hover { text-decoration: underline; }
|
|
||||||
.content img, .content video { max-width: 100%; }
|
|
||||||
.content .header:link,
|
|
||||||
.content .header:visited {
|
|
||||||
color: var(--fg);
|
|
||||||
}
|
|
||||||
.content .header:link,
|
|
||||||
.content .header:visited:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
margin: 0 auto;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
table td {
|
|
||||||
padding: 3px 20px;
|
|
||||||
border: 1px var(--table-border-color) solid;
|
|
||||||
}
|
|
||||||
table thead {
|
|
||||||
background: var(--table-header-bg);
|
|
||||||
}
|
|
||||||
table thead td {
|
|
||||||
font-weight: 700;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
table thead th {
|
|
||||||
padding: 3px 20px;
|
|
||||||
}
|
|
||||||
table thead tr {
|
|
||||||
border: 1px var(--table-header-bg) solid;
|
|
||||||
}
|
|
||||||
/* Alternate background colors for rows */
|
|
||||||
table tbody tr:nth-child(2n) {
|
|
||||||
background: var(--table-alternate-bg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
margin: 20px 0;
|
|
||||||
padding: 0 20px;
|
|
||||||
color: var(--fg);
|
|
||||||
background-color: var(--quote-bg);
|
|
||||||
border-top: .1em solid var(--quote-border);
|
|
||||||
border-bottom: .1em solid var(--quote-border);
|
|
||||||
}
|
|
||||||
|
|
||||||
kbd {
|
|
||||||
background-color: var(--table-border-color);
|
|
||||||
border-radius: 4px;
|
|
||||||
border: solid 1px var(--theme-popup-border);
|
|
||||||
box-shadow: inset 0 -1px 0 var(--theme-hover);
|
|
||||||
display: inline-block;
|
|
||||||
font-size: var(--code-font-size);
|
|
||||||
font-family: var(--mono-font);
|
|
||||||
line-height: 10px;
|
|
||||||
padding: 4px 5px;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
:not(.footnote-definition) + .footnote-definition,
|
|
||||||
.footnote-definition + :not(.footnote-definition) {
|
|
||||||
margin-top: 2em;
|
|
||||||
}
|
|
||||||
.footnote-definition {
|
|
||||||
font-size: 0.9em;
|
|
||||||
margin: 0.5em 0;
|
|
||||||
}
|
|
||||||
.footnote-definition p {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltiptext {
|
|
||||||
position: absolute;
|
|
||||||
visibility: hidden;
|
|
||||||
color: #fff;
|
|
||||||
background-color: #333;
|
|
||||||
transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
|
|
||||||
left: -8px; /* Half of the width of the icon */
|
|
||||||
top: -35px;
|
|
||||||
font-size: 0.8em;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 5px 8px;
|
|
||||||
margin: 5px;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
.tooltipped .tooltiptext {
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chapter li.part-title {
|
|
||||||
color: var(--sidebar-fg);
|
|
||||||
margin: 5px 0px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result-no-output {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
263
docs/theme/css/variables.css
vendored
@ -1,263 +0,0 @@
|
|||||||
|
|
||||||
/* Globals */
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--sidebar-width: 300px;
|
|
||||||
--page-padding: 15px;
|
|
||||||
--content-max-width: 82%;
|
|
||||||
--menu-bar-height: 40px;
|
|
||||||
--mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
|
|
||||||
--code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */
|
|
||||||
--pagetoc-width: 13%;
|
|
||||||
--pagetoc-fontsize: 14.5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width:1439px) {
|
|
||||||
:root{
|
|
||||||
--content-max-width: 98%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Themes */
|
|
||||||
|
|
||||||
.ayu {
|
|
||||||
--bg: hsl(210, 25%, 8%);
|
|
||||||
--fg: #c5c5c5;
|
|
||||||
|
|
||||||
--sidebar-bg: #14191f;
|
|
||||||
--sidebar-fg: #c8c9db;
|
|
||||||
--sidebar-non-existant: #5c6773;
|
|
||||||
--sidebar-active: #ffb454;
|
|
||||||
--sidebar-spacer: #2d334f;
|
|
||||||
|
|
||||||
--scrollbar: var(--sidebar-fg);
|
|
||||||
|
|
||||||
--icons: #737480;
|
|
||||||
--icons-hover: #b7b9cc;
|
|
||||||
|
|
||||||
--links: #0096cf;
|
|
||||||
|
|
||||||
--inline-code-color: #ffb454;
|
|
||||||
|
|
||||||
--theme-popup-bg: #14191f;
|
|
||||||
--theme-popup-border: #5c6773;
|
|
||||||
--theme-hover: #191f26;
|
|
||||||
|
|
||||||
--quote-bg: hsl(226, 15%, 17%);
|
|
||||||
--quote-border: hsl(226, 15%, 22%);
|
|
||||||
|
|
||||||
--table-border-color: hsl(210, 25%, 13%);
|
|
||||||
--table-header-bg: hsl(210, 25%, 28%);
|
|
||||||
--table-alternate-bg: hsl(210, 25%, 11%);
|
|
||||||
|
|
||||||
--searchbar-border-color: #848484;
|
|
||||||
--searchbar-bg: #424242;
|
|
||||||
--searchbar-fg: #fff;
|
|
||||||
--searchbar-shadow-color: #d4c89f;
|
|
||||||
--searchresults-header-fg: #666;
|
|
||||||
--searchresults-border-color: #888;
|
|
||||||
--searchresults-li-bg: #252932;
|
|
||||||
--search-mark-bg: #e3b171;
|
|
||||||
}
|
|
||||||
|
|
||||||
.coal {
|
|
||||||
--bg: hsl(200, 7%, 8%);
|
|
||||||
--fg: #98a3ad;
|
|
||||||
|
|
||||||
--sidebar-bg: #292c2f;
|
|
||||||
--sidebar-fg: #a1adb8;
|
|
||||||
--sidebar-non-existant: #505254;
|
|
||||||
--sidebar-active: #3473ad;
|
|
||||||
--sidebar-spacer: #393939;
|
|
||||||
|
|
||||||
--scrollbar: var(--sidebar-fg);
|
|
||||||
|
|
||||||
--icons: #43484d;
|
|
||||||
--icons-hover: #b3c0cc;
|
|
||||||
|
|
||||||
--links: #2b79a2;
|
|
||||||
|
|
||||||
--inline-code-color: #c5c8c6;
|
|
||||||
|
|
||||||
--theme-popup-bg: #141617;
|
|
||||||
--theme-popup-border: #43484d;
|
|
||||||
--theme-hover: #1f2124;
|
|
||||||
|
|
||||||
--quote-bg: hsl(234, 21%, 18%);
|
|
||||||
--quote-border: hsl(234, 21%, 23%);
|
|
||||||
|
|
||||||
--table-border-color: hsl(200, 7%, 13%);
|
|
||||||
--table-header-bg: hsl(200, 7%, 28%);
|
|
||||||
--table-alternate-bg: hsl(200, 7%, 11%);
|
|
||||||
|
|
||||||
--searchbar-border-color: #aaa;
|
|
||||||
--searchbar-bg: #b7b7b7;
|
|
||||||
--searchbar-fg: #000;
|
|
||||||
--searchbar-shadow-color: #aaa;
|
|
||||||
--searchresults-header-fg: #666;
|
|
||||||
--searchresults-border-color: #98a3ad;
|
|
||||||
--searchresults-li-bg: #2b2b2f;
|
|
||||||
--search-mark-bg: #355c7d;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light {
|
|
||||||
--bg: hsl(0, 0%, 100%);
|
|
||||||
--fg: hsl(0, 0%, 0%);
|
|
||||||
|
|
||||||
--sidebar-bg: #fafafa;
|
|
||||||
--sidebar-fg: hsl(0, 0%, 0%);
|
|
||||||
--sidebar-non-existant: #aaaaaa;
|
|
||||||
--sidebar-active: #1f1fff;
|
|
||||||
--sidebar-spacer: #f4f4f4;
|
|
||||||
|
|
||||||
--scrollbar: #8F8F8F;
|
|
||||||
|
|
||||||
--icons: #747474;
|
|
||||||
--icons-hover: #000000;
|
|
||||||
|
|
||||||
--links: #1f1fff;
|
|
||||||
|
|
||||||
--inline-code-color: #F42C4C;
|
|
||||||
|
|
||||||
--theme-popup-bg: #fafafa;
|
|
||||||
--theme-popup-border: #cccccc;
|
|
||||||
--theme-hover: #e6e6e6;
|
|
||||||
|
|
||||||
--quote-bg: hsl(197, 37%, 96%);
|
|
||||||
--quote-border: hsl(197, 37%, 91%);
|
|
||||||
|
|
||||||
--table-border-color: hsl(0, 0%, 95%);
|
|
||||||
--table-header-bg: hsl(0, 0%, 80%);
|
|
||||||
--table-alternate-bg: hsl(0, 0%, 97%);
|
|
||||||
|
|
||||||
--searchbar-border-color: #aaa;
|
|
||||||
--searchbar-bg: #fafafa;
|
|
||||||
--searchbar-fg: #000;
|
|
||||||
--searchbar-shadow-color: #aaa;
|
|
||||||
--searchresults-header-fg: #666;
|
|
||||||
--searchresults-border-color: #888;
|
|
||||||
--searchresults-li-bg: #e4f2fe;
|
|
||||||
--search-mark-bg: #a2cff5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navy {
|
|
||||||
--bg: hsl(226, 23%, 11%);
|
|
||||||
--fg: #bcbdd0;
|
|
||||||
|
|
||||||
--sidebar-bg: #282d3f;
|
|
||||||
--sidebar-fg: #c8c9db;
|
|
||||||
--sidebar-non-existant: #505274;
|
|
||||||
--sidebar-active: #2b79a2;
|
|
||||||
--sidebar-spacer: #2d334f;
|
|
||||||
|
|
||||||
--scrollbar: var(--sidebar-fg);
|
|
||||||
|
|
||||||
--icons: #737480;
|
|
||||||
--icons-hover: #b7b9cc;
|
|
||||||
|
|
||||||
--links: #2b79a2;
|
|
||||||
|
|
||||||
--inline-code-color: #c5c8c6;
|
|
||||||
|
|
||||||
--theme-popup-bg: #161923;
|
|
||||||
--theme-popup-border: #737480;
|
|
||||||
--theme-hover: #282e40;
|
|
||||||
|
|
||||||
--quote-bg: hsl(226, 15%, 17%);
|
|
||||||
--quote-border: hsl(226, 15%, 22%);
|
|
||||||
|
|
||||||
--table-border-color: hsl(226, 23%, 16%);
|
|
||||||
--table-header-bg: hsl(226, 23%, 31%);
|
|
||||||
--table-alternate-bg: hsl(226, 23%, 14%);
|
|
||||||
|
|
||||||
--searchbar-border-color: #aaa;
|
|
||||||
--searchbar-bg: #aeaec6;
|
|
||||||
--searchbar-fg: #000;
|
|
||||||
--searchbar-shadow-color: #aaa;
|
|
||||||
--searchresults-header-fg: #5f5f71;
|
|
||||||
--searchresults-border-color: #5c5c68;
|
|
||||||
--searchresults-li-bg: #242430;
|
|
||||||
--search-mark-bg: #a2cff5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rust {
|
|
||||||
--bg: hsl(60, 9%, 87%);
|
|
||||||
--fg: #262625;
|
|
||||||
|
|
||||||
--sidebar-bg: #3b2e2a;
|
|
||||||
--sidebar-fg: #c8c9db;
|
|
||||||
--sidebar-non-existant: #505254;
|
|
||||||
--sidebar-active: #e69f67;
|
|
||||||
--sidebar-spacer: #45373a;
|
|
||||||
|
|
||||||
--scrollbar: var(--sidebar-fg);
|
|
||||||
|
|
||||||
--icons: #737480;
|
|
||||||
--icons-hover: #262625;
|
|
||||||
|
|
||||||
--links: #2b79a2;
|
|
||||||
|
|
||||||
--inline-code-color: #6e6b5e;
|
|
||||||
|
|
||||||
--theme-popup-bg: #e1e1db;
|
|
||||||
--theme-popup-border: #b38f6b;
|
|
||||||
--theme-hover: #99908a;
|
|
||||||
|
|
||||||
--quote-bg: hsl(60, 5%, 75%);
|
|
||||||
--quote-border: hsl(60, 5%, 70%);
|
|
||||||
|
|
||||||
--table-border-color: hsl(60, 9%, 82%);
|
|
||||||
--table-header-bg: #b3a497;
|
|
||||||
--table-alternate-bg: hsl(60, 9%, 84%);
|
|
||||||
|
|
||||||
--searchbar-border-color: #aaa;
|
|
||||||
--searchbar-bg: #fafafa;
|
|
||||||
--searchbar-fg: #000;
|
|
||||||
--searchbar-shadow-color: #aaa;
|
|
||||||
--searchresults-header-fg: #666;
|
|
||||||
--searchresults-border-color: #888;
|
|
||||||
--searchresults-li-bg: #dec2a2;
|
|
||||||
--search-mark-bg: #e69f67;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
.light.no-js {
|
|
||||||
--bg: hsl(200, 7%, 8%);
|
|
||||||
--fg: #98a3ad;
|
|
||||||
|
|
||||||
--sidebar-bg: #292c2f;
|
|
||||||
--sidebar-fg: #a1adb8;
|
|
||||||
--sidebar-non-existant: #505254;
|
|
||||||
--sidebar-active: #3473ad;
|
|
||||||
--sidebar-spacer: #393939;
|
|
||||||
|
|
||||||
--scrollbar: var(--sidebar-fg);
|
|
||||||
|
|
||||||
--icons: #43484d;
|
|
||||||
--icons-hover: #b3c0cc;
|
|
||||||
|
|
||||||
--links: #2b79a2;
|
|
||||||
|
|
||||||
--inline-code-color: #c5c8c6;
|
|
||||||
|
|
||||||
--theme-popup-bg: #141617;
|
|
||||||
--theme-popup-border: #43484d;
|
|
||||||
--theme-hover: #1f2124;
|
|
||||||
|
|
||||||
--quote-bg: hsl(234, 21%, 18%);
|
|
||||||
--quote-border: hsl(234, 21%, 23%);
|
|
||||||
|
|
||||||
--table-border-color: hsl(200, 7%, 13%);
|
|
||||||
--table-header-bg: hsl(200, 7%, 28%);
|
|
||||||
--table-alternate-bg: hsl(200, 7%, 11%);
|
|
||||||
|
|
||||||
--searchbar-border-color: #aaa;
|
|
||||||
--searchbar-bg: #b7b7b7;
|
|
||||||
--searchbar-fg: #000;
|
|
||||||
--searchbar-shadow-color: #aaa;
|
|
||||||
--searchresults-header-fg: #666;
|
|
||||||
--searchresults-border-color: #98a3ad;
|
|
||||||
--searchresults-li-bg: #2b2b2f;
|
|
||||||
--search-mark-bg: #355c7d;
|
|
||||||
}
|
|
||||||
}
|
|
341
docs/theme/index.hbs
vendored
@ -1,341 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}">
|
|
||||||
<head>
|
|
||||||
<!-- Book generated using mdBook -->
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>{{ title }}</title>
|
|
||||||
{{#if is_print }}
|
|
||||||
<meta name="robots" content="noindex" />
|
|
||||||
{{/if}}
|
|
||||||
{{#if base_url}}
|
|
||||||
<base href="{{ base_url }}">
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Custom HTML head -->
|
|
||||||
{{> head}}
|
|
||||||
|
|
||||||
<meta name="description" content="{{ description }}">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<meta name="theme-color" content="#ffffff" />
|
|
||||||
|
|
||||||
{{#if favicon_svg}}
|
|
||||||
<link rel="icon" href="{{ path_to_root }}favicon.svg">
|
|
||||||
{{/if}}
|
|
||||||
{{#if favicon_png}}
|
|
||||||
<link rel="shortcut icon" href="{{ path_to_root }}favicon.png">
|
|
||||||
{{/if}}
|
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}css/variables.css">
|
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}css/general.css">
|
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}css/chrome.css">
|
|
||||||
{{#if print_enable}}
|
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}css/print.css" media="print">
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<!-- Fonts -->
|
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css">
|
|
||||||
{{#if copy_fonts}}
|
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css">
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<!-- Highlight.js Stylesheets -->
|
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}highlight.css">
|
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}tomorrow-night.css">
|
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}ayu-highlight.css">
|
|
||||||
|
|
||||||
<!-- Custom theme stylesheets -->
|
|
||||||
{{#each additional_css}}
|
|
||||||
<link rel="stylesheet" href="{{ ../path_to_root }}{{ this }}">
|
|
||||||
{{/each}}
|
|
||||||
|
|
||||||
{{#if mathjax_support}}
|
|
||||||
<!-- MathJax -->
|
|
||||||
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
|
||||||
{{/if}}
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="body-container">
|
|
||||||
<!-- Provide site root to javascript -->
|
|
||||||
<script>
|
|
||||||
var path_to_root = "{{ path_to_root }}";
|
|
||||||
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
|
||||||
<script>
|
|
||||||
try {
|
|
||||||
var theme = localStorage.getItem('mdbook-theme');
|
|
||||||
var sidebar = localStorage.getItem('mdbook-sidebar');
|
|
||||||
|
|
||||||
if (theme.startsWith('"') && theme.endsWith('"')) {
|
|
||||||
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
|
||||||
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
|
||||||
}
|
|
||||||
} catch (e) { }
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Set the theme before any content is loaded, prevents flash -->
|
|
||||||
<script>
|
|
||||||
var theme;
|
|
||||||
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
|
||||||
if (theme === null || theme === undefined) { theme = default_theme; }
|
|
||||||
var html = document.querySelector('html');
|
|
||||||
html.classList.remove('no-js')
|
|
||||||
html.classList.remove('{{ default_theme }}')
|
|
||||||
html.classList.add(theme);
|
|
||||||
html.classList.add('js');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Hide / unhide sidebar before it is displayed -->
|
|
||||||
<script>
|
|
||||||
var html = document.querySelector('html');
|
|
||||||
var sidebar = null;
|
|
||||||
if (document.body.clientWidth >= 1080) {
|
|
||||||
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
|
||||||
sidebar = sidebar || 'visible';
|
|
||||||
} else {
|
|
||||||
sidebar = 'hidden';
|
|
||||||
}
|
|
||||||
html.classList.remove('sidebar-visible');
|
|
||||||
html.classList.add("sidebar-" + sidebar);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
|
||||||
<div class="sidebar-scrollbox">
|
|
||||||
{{#toc}}{{/toc}}
|
|
||||||
</div>
|
|
||||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- Track and set sidebar scroll position -->
|
|
||||||
<script>
|
|
||||||
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
|
||||||
sidebarScrollbox.addEventListener('click', function(e) {
|
|
||||||
if (e.target.tagName === 'A') {
|
|
||||||
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
|
||||||
}
|
|
||||||
}, { passive: true });
|
|
||||||
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
|
||||||
sessionStorage.removeItem('sidebar-scroll');
|
|
||||||
if (sidebarScrollTop) {
|
|
||||||
// preserve sidebar scroll position when navigating via links within sidebar
|
|
||||||
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
|
||||||
} else {
|
|
||||||
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
|
||||||
var activeSection = document.querySelector('#sidebar .active');
|
|
||||||
if (activeSection) {
|
|
||||||
activeSection.scrollIntoView({ block: 'center' });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div id="page-wrapper" class="page-wrapper">
|
|
||||||
|
|
||||||
<div class="page">
|
|
||||||
{{> header}}
|
|
||||||
<div id="menu-bar-hover-placeholder"></div>
|
|
||||||
<div id="menu-bar" class="menu-bar sticky">
|
|
||||||
<div class="left-buttons">
|
|
||||||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
|
||||||
<i class="fa fa-bars"></i>
|
|
||||||
</button>
|
|
||||||
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
|
||||||
<i class="fa fa-paint-brush"></i>
|
|
||||||
</button>
|
|
||||||
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
|
||||||
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
|
|
||||||
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
|
||||||
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
|
||||||
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
|
||||||
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
|
||||||
</ul>
|
|
||||||
{{#if search_enabled}}
|
|
||||||
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
|
||||||
<i class="fa fa-search"></i>
|
|
||||||
</button>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h1 class="menu-title">{{ book_title }}</h1>
|
|
||||||
|
|
||||||
<div class="right-buttons">
|
|
||||||
{{#if print_enable}}
|
|
||||||
<a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book">
|
|
||||||
<i id="print-button" class="fa fa-print"></i>
|
|
||||||
</a>
|
|
||||||
{{/if}}
|
|
||||||
{{#if git_repository_url}}
|
|
||||||
<a href="{{git_repository_url}}" title="Git repository" aria-label="Git repository">
|
|
||||||
<i id="git-repository-button" class="fa {{git_repository_icon}}"></i>
|
|
||||||
</a>
|
|
||||||
{{/if}}
|
|
||||||
{{#if git_repository_edit_url}}
|
|
||||||
<a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit">
|
|
||||||
<i id="git-edit-button" class="fa fa-edit"></i>
|
|
||||||
</a>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{#if search_enabled}}
|
|
||||||
<div id="search-wrapper" class="hidden">
|
|
||||||
<form id="searchbar-outer" class="searchbar-outer">
|
|
||||||
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
|
||||||
</form>
|
|
||||||
<div id="searchresults-outer" class="searchresults-outer hidden">
|
|
||||||
<div id="searchresults-header" class="searchresults-header"></div>
|
|
||||||
<ul id="searchresults">
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
|
||||||
<script>
|
|
||||||
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
|
||||||
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
|
||||||
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
|
||||||
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div id="content" class="content">
|
|
||||||
<main>
|
|
||||||
<div class="sidetoc"><nav class="pagetoc"></nav></div>
|
|
||||||
|
|
||||||
{{{ content }}}
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<nav class="nav-wrapper" aria-label="Page navigation">
|
|
||||||
<!-- Mobile navigation buttons -->
|
|
||||||
{{#previous}}
|
|
||||||
<a rel="prev" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
|
||||||
<i class="fa fa-angle-left"></i>
|
|
||||||
</a>
|
|
||||||
{{/previous}}
|
|
||||||
|
|
||||||
{{#next}}
|
|
||||||
<a rel="next" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
{{/next}}
|
|
||||||
|
|
||||||
<div style="clear: both"></div>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
|
||||||
{{#previous}}
|
|
||||||
<a rel="prev" href="{{ path_to_root }}{{link}}" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
|
||||||
<i class="fa fa-angle-left"></i>
|
|
||||||
</a>
|
|
||||||
{{/previous}}
|
|
||||||
|
|
||||||
{{#next}}
|
|
||||||
<a rel="next" href="{{ path_to_root }}{{link}}" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
{{/next}}
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{#if live_reload_endpoint}}
|
|
||||||
<!-- Livereload script (if served using the cli tool) -->
|
|
||||||
<script>
|
|
||||||
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
||||||
const wsAddress = wsProtocol + "//" + location.host + "/" + "{{{live_reload_endpoint}}}";
|
|
||||||
const socket = new WebSocket(wsAddress);
|
|
||||||
socket.onmessage = function (event) {
|
|
||||||
if (event.data === "reload") {
|
|
||||||
socket.close();
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
window.onbeforeunload = function() {
|
|
||||||
socket.close();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if google_analytics}}
|
|
||||||
<!-- Google Analytics Tag -->
|
|
||||||
<script>
|
|
||||||
var localAddrs = ["localhost", "127.0.0.1", ""];
|
|
||||||
|
|
||||||
// make sure we don't activate google analytics if the developer is
|
|
||||||
// inspecting the book locally...
|
|
||||||
if (localAddrs.indexOf(document.location.hostname) === -1) {
|
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
||||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
||||||
|
|
||||||
ga('create', '{{google_analytics}}', 'auto');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if playground_line_numbers}}
|
|
||||||
<script>
|
|
||||||
window.playground_line_numbers = true;
|
|
||||||
</script>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if playground_copyable}}
|
|
||||||
<script>
|
|
||||||
window.playground_copyable = true;
|
|
||||||
</script>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if playground_js}}
|
|
||||||
<script src="{{ path_to_root }}ace.js"></script>
|
|
||||||
<script src="{{ path_to_root }}editor.js"></script>
|
|
||||||
<script src="{{ path_to_root }}mode-rust.js"></script>
|
|
||||||
<script src="{{ path_to_root }}theme-dawn.js"></script>
|
|
||||||
<script src="{{ path_to_root }}theme-tomorrow_night.js"></script>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if search_js}}
|
|
||||||
<script src="{{ path_to_root }}elasticlunr.min.js"></script>
|
|
||||||
<script src="{{ path_to_root }}mark.min.js"></script>
|
|
||||||
<script src="{{ path_to_root }}searcher.js"></script>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<script src="{{ path_to_root }}clipboard.min.js"></script>
|
|
||||||
<script src="{{ path_to_root }}highlight.js"></script>
|
|
||||||
<script src="{{ path_to_root }}book.js"></script>
|
|
||||||
|
|
||||||
<!-- Custom JS scripts -->
|
|
||||||
{{#each additional_js}}
|
|
||||||
<script src="{{ ../path_to_root }}{{this}}"></script>
|
|
||||||
{{/each}}
|
|
||||||
|
|
||||||
{{#if is_print}}
|
|
||||||
{{#if mathjax_support}}
|
|
||||||
<script>
|
|
||||||
window.addEventListener('load', function() {
|
|
||||||
MathJax.Hub.Register.StartupHook('End', function() {
|
|
||||||
window.setTimeout(window.print, 100);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{{else}}
|
|
||||||
<script>
|
|
||||||
window.addEventListener('load', function() {
|
|
||||||
window.setTimeout(window.print, 100);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
47
docs/theme/pagetoc.css
vendored
@ -1,47 +0,0 @@
|
|||||||
/* src: https://github.com/JorelAli/mdBook-pagetoc */
|
|
||||||
|
|
||||||
@media only screen and (max-width:1439px) {
|
|
||||||
.sidetoc {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (min-width:1440px) {
|
|
||||||
main {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.sidetoc {
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
/* left: calc(90% + (var(--content-min-width))/4 - 110px); */
|
|
||||||
left: 101%;
|
|
||||||
position: absolute;
|
|
||||||
font-size: var(--pagetoc-fontsize);
|
|
||||||
}
|
|
||||||
.pagetoc {
|
|
||||||
position: fixed;
|
|
||||||
width: var(--pagetoc-width);
|
|
||||||
}
|
|
||||||
.pagetoc a {
|
|
||||||
border-left: 1px solid var(--sidebar-bg);
|
|
||||||
/* color: var(--fg); */
|
|
||||||
/* color: var(--sidebar-fg); */
|
|
||||||
color: var(--links);
|
|
||||||
display: block;
|
|
||||||
padding-bottom: 5px;
|
|
||||||
padding-top: 5px;
|
|
||||||
padding-left: 10px;
|
|
||||||
text-align: left;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: normal;
|
|
||||||
background: var(--sidebar-bg);
|
|
||||||
}
|
|
||||||
.pagetoc a:hover,
|
|
||||||
.pagetoc a.active {
|
|
||||||
background: var(--sidebar-bg);
|
|
||||||
/* color: var(--sidebar-fg); */
|
|
||||||
color: var(--sidebar-active);
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: var(--pagetoc-fontsize);
|
|
||||||
}
|
|
||||||
}
|
|
68
docs/theme/pagetoc.js
vendored
@ -1,68 +0,0 @@
|
|||||||
// src: https://github.com/JorelAli/mdBook-pagetoc
|
|
||||||
|
|
||||||
// Un-active everything when you click it
|
|
||||||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el, i) {
|
|
||||||
el.addEventHandler("click", function() {
|
|
||||||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el, i) {
|
|
||||||
el.classList.remove("active");
|
|
||||||
});
|
|
||||||
el.classList.add("active");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
var updateFunction = function() {
|
|
||||||
|
|
||||||
var id;
|
|
||||||
var elements = document.getElementsByClassName("header");
|
|
||||||
Array.prototype.forEach.call(elements, function(el, i) {
|
|
||||||
if (window.pageYOffset >= el.offsetTop) {
|
|
||||||
id = el;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el, i) {
|
|
||||||
el.classList.remove("active");
|
|
||||||
});
|
|
||||||
|
|
||||||
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el, i) {
|
|
||||||
if (id.href.localeCompare(el.href) == 0) {
|
|
||||||
el.classList.add("active");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// Populate sidebar on load
|
|
||||||
window.addEventListener('load', function() {
|
|
||||||
var pagetoc = document.getElementsByClassName("pagetoc")[0];
|
|
||||||
var elements = document.getElementsByClassName("header");
|
|
||||||
Array.prototype.forEach.call(elements, function(el, i) {
|
|
||||||
var link = document.createElement("a");
|
|
||||||
|
|
||||||
// Indent shows hierarchy
|
|
||||||
var indent = "";
|
|
||||||
switch (el.parentElement.tagName) {
|
|
||||||
case "H2":
|
|
||||||
indent = "20px";
|
|
||||||
break;
|
|
||||||
case "H3":
|
|
||||||
indent = "40px";
|
|
||||||
break;
|
|
||||||
case "H4":
|
|
||||||
indent = "60px";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
link.appendChild(document.createTextNode(el.text));
|
|
||||||
link.style.paddingLeft = indent;
|
|
||||||
link.href = el.href;
|
|
||||||
pagetoc.appendChild(link);
|
|
||||||
});
|
|
||||||
updateFunction.call();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Handle active elements on scroll
|
|
||||||
window.addEventListener("scroll", updateFunction);
|
|