Skip to content

Commit 570c7f6

Browse files
committed
feat: Add version info to executable build command
1 parent bd4535d commit 570c7f6

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,4 @@ dmypy.json
127127

128128
debug/
129129
bf2-auto-spectator-debug/
130+
versionfile

BUILD.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22
In order to provide a simple way of running the spectator without having to install Python, releases as standalone executables can be found under [releases](https://github.com/cetteup/bf2-auto-spectator/releases).
33

44
## Prerequisites
5-
Make you sure you have all dependencies (see `requirements.txt`) as well as [pyinstaller](https://www.pyinstaller.org/) installed, before you run the build command.
5+
Make you sure you have all dependencies (see `requirements.txt`) as well as [pyinstaller](https://www.pyinstaller.org/) and [pyinstaller-versionfile](https://pypi.org/project/pyinstaller-versionfile/) installed, before you run the build command.
66

77
## Build command
8-
Run the following command to build the standalone executable.
8+
First, generate a version file.
99

1010
```commandline
11-
pyinstaller.exe .\src\main.py --onefile --clean --name="bf2-auto-spectator-standalone" --add-data="pickle/*.pickle;pickle/"
11+
create-version-file.exe versionfile.yaml --outfile versionfile
1212
```
1313

14-
This will create a `bf2-auto-spectator-standalone.exe` in `.\dist`.
14+
Then, run the following command to build the executable.
15+
16+
```commandline
17+
pyinstaller.exe .\src\main.py --onefile --clean --name="bf2-auto-spectator" --add-data="pickle/*.pickle;pickle/" --version-file="versionfile"
18+
```
19+
20+
This will create a `bf2-auto-spectator.exe` in `.\dist`.

versionfile.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Version: 0.4.0.0
2+
CompanyName: cetteup
3+
FileDescription: BF2 auto spectator
4+
InternalName: BF2 auto spectator
5+
OriginalFilename: bf2-auto-spectator.exe
6+
ProductName: BF2 auto spectator

0 commit comments

Comments
 (0)