File tree Expand file tree Collapse file tree 2 files changed +20
-24
lines changed
Expand file tree Collapse file tree 2 files changed +20
-24
lines changed Original file line number Diff line number Diff line change 4141
4242### 源码打包可执行文件
4343
44- + Windows
4544```
46451. 安装 Python3
47- 2. pip install -r requirements-windows.txt
48- 3. pip install pyinstaller
49- 4. pyinstaller -F -w --add-data "./assets;assets" KeymouseGo.py
50- ```
51-
52- + Linux或Mac
53- ```
54- 1. 安装 Python3
55- 2. pip3 install -r requirements-universal.txt
56- 3. pip3 install pyinstaller
57- 4. pyinstaller -F -w --add-data "./assets:assets" KeymouseGo.py
46+ 2. pip安装依赖
47+ - (Windows) pip install -r requirements-windows.txt
48+ - (Linux/MacOS) pip3 install -r requirements-universal.txt
49+ 3. pip安装pyinstaller
50+ - pip install pyinstaller
51+ 4. pyinstaller打包
52+ - (Windows) pyinstaller -F -w --add-data "./assets;assets" KeymouseGo.py
53+ - (Linux X11) pyinstaller -F -w --add-data "./assets:assets" --hidden-import "pynput.keyboard._xorg" --hidden-import "pynput.mouse._xorg" KeymouseGo.py
54+ - (Linux Wayland) pyinstaller -F -w --add-data "./assets:assets" --hidden-import "pynput.keyboard._uinput" --hidden-import "pynput.mouse._uinput" KeymouseGo.py
55+ - (MacOS) pyinstaller -F -w --add-data "./assets:assets" --hidden-import "pynput.keyboard._darwin" --hidden-import "pynput.mouse._darwin" KeymouseGo.py
5856```
5957
6058打包完成后,可执行文件在项目路径的` dist ` 文件夹内。
Original file line number Diff line number Diff line change @@ -50,20 +50,18 @@ This program is written in `Python` and packed as executable file. You can downl
5050
5151### Bundle with source code
5252
53- + Windows
5453```
55541. Install Python 3
56- 2. pip install -r requirements-windows.txt
57- 3. pip install pyinstaller
58- 4. pyinstaller -F -w --add-data "./assets;assets" KeymouseGo.py
59- ```
60-
61- + Linux or Mac
62- ```
63- 1. Install Python 3
64- 2. pip3 install -r requirements-universal.txt
65- 3. pip3 install pyinstaller
66- 4. pyinstaller -F -w --add-data "./assets:assets" KeymouseGo.py
55+ 2. Install requirement with pip3
56+ - (Windows) pip install -r requirements-windows.txt
57+ - (Linux/MacOS) pip3 install -r requirements-universal.txt
58+ 3. Install pyinstaller
59+ - pip install pyinstaller
60+ 4. Bundle with pyinstaller
61+ - (Windows) pyinstaller -F -w --add-data "./assets;assets" KeymouseGo.py
62+ - (Linux X11) pyinstaller -F -w --add-data "./assets:assets" --hidden-import "pynput.keyboard._xorg" --hidden-import "pynput.mouse._xorg" KeymouseGo.py
63+ - (Linux Wayland) pyinstaller -F -w --add-data "./assets:assets" --hidden-import "pynput.keyboard._uinput" --hidden-import "pynput.mouse._uinput" KeymouseGo.py
64+ - (MacOS) pyinstaller -F -w --add-data "./assets:assets" --hidden-import "pynput.keyboard._darwin" --hidden-import "pynput.mouse._darwin" KeymouseGo.py
6765```
6866
6967The executable program would appear at folder ` your_poject_location/dist ` .
You can’t perform that action at this time.
0 commit comments