Skip to content

Commit a224f50

Browse files
committed
docs(README): Modified Readme.md
Updated the "bundling from source" instruction as there exists issues that the program would miss pynput modules in linux/macos environment
1 parent 03cc3bd commit a224f50

File tree

2 files changed

+20
-24
lines changed

2 files changed

+20
-24
lines changed

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,18 @@
4141

4242
### 源码打包可执行文件
4343

44-
+ Windows
4544
```
4645
1. 安装 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`文件夹内。

README_en-US.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff 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
```
5554
1. 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

6967
The executable program would appear at folder `your_poject_location/dist`.

0 commit comments

Comments
 (0)