Skip to content

Commit 2d00fdc

Browse files
author
oocube
committed
Add Windows build
1 parent 95a2a8c commit 2d00fdc

File tree

1 file changed

+61
-30
lines changed

1 file changed

+61
-30
lines changed

.github/workflows/build.yml

Lines changed: 61 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ jobs:
7878
run: |
7979
venv="$HOME/python3/pyinstaller"
8080
source "${venv}"/bin/activate
81-
pyinstaller --onefile DebugConsole.py --add-binary "oojsc.xbm:." --add-binary "OoJSC.ico:."
81+
pyinstaller \
82+
--onefile \
83+
--add-binary "oojsc.xbm:." \
84+
--add-binary "OoJSC.ico:." \
85+
DebugConsole.py
8286
8387
- name: create archive
8488
run: |
@@ -98,24 +102,42 @@ jobs:
98102
with:
99103
fetch-depth: 0
100104

105+
- name: Install pyinstaller
106+
run: |
107+
pip install -U pyinstaller
108+
101109
# in Windows PowerShell the backtick indicates a multiline command
102110
# see https://stackoverflow.com/questions/3235850/how-to-enter-a-multi-line-command
103111
- name: Build using pyinstaller
104112
run: |
105-
pyinstaller `
106-
--noconfirm `
107-
--clean `
108-
--log-level=WARN `
109-
--paths "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86" `
110-
--onefile `
111-
--noconsole `
112-
--noupx `
113-
--name OoDebugConsole `
114-
--icon=OoliteDebugConsole\OoJSC.ico `
115-
--add-binary "OoliteDebugConsole\OoJSC.ico:." `
116-
--add-binary "OoliteDebugConsole\oojsc.xbm:." `
117-
--version-file=OoDebug_version_info.txt `
118-
DebugConsole.py
113+
pyinstaller `
114+
--noconfirm `
115+
--clean `
116+
--log-level=WARN `
117+
--onefile `
118+
--name OoDebugConsole `
119+
--add-binary "OoJSC.ico:." `
120+
--add-binary "oojsc.xbm:." `
121+
--noconsole `
122+
--icon=OoJSC.ico `
123+
DebugConsole.py
124+
125+
# --version-file=OoDebug_version_info.txt `
126+
# --paths "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86" `
127+
# --noupx `
128+
129+
- name: check filesystem
130+
run: |
131+
Get-ChildItem -Path "$env:GITHUB_WORKSPACE" –Recurse
132+
133+
- name: create archive
134+
run: |
135+
7z a -tzip -r -wdist Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-win.zip dist\*
136+
137+
- uses: actions/upload-artifact@v4
138+
with:
139+
name: Oolite-Debug-Console-Windows
140+
path: Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-win.zip
119141

120142
package-macos:
121143
needs: [semver]
@@ -127,22 +149,30 @@ jobs:
127149
with:
128150
fetch-depth: 0
129151

130-
- name: setup pyenv
152+
- name: Install pyinstaller
131153
run: |
132-
#sudo apt-get install python3-tk python3-venv python3-pip
133-
python3 -m ensurepip --upgrade
134-
venv="$HOME/python3/pyinstaller"
135-
rm -Rf "$venv" # uncomment to make fresh venv.
136-
python3 -m venv "$venv"
137-
source "${venv}"/bin/activate
138-
pip install python3-tk
139-
pip install pyinstaller
140-
pip install twisted
154+
pip install -U pyinstaller
155+
156+
- name: Build using pyinstaller
157+
run: |
158+
pyinstaller \
159+
--onefile \
160+
--add-binary "oojsc.xbm:." \
161+
--add-binary "OoJSC.ico:." \
162+
DebugConsole.py
141163
164+
- name: create archive
165+
run: |
166+
tar cvfz Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-macos.tgz dist/
167+
168+
- uses: actions/upload-artifact@v4
169+
with:
170+
name: Oolite-Debug-Console-MacOs
171+
path: ./Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-macos.tgz
142172

143173
release:
144174
# needs: [semver,package-linux,package-windows,package-macos]
145-
needs: [semver,package-linux]
175+
needs: [semver,package-linux,package-windows]
146176
runs-on: ubuntu-latest
147177

148178
steps:
@@ -181,8 +211,8 @@ jobs:
181211
title: "Oolite Debug Console v${{ needs.semver.outputs.GITVERSION_SEMVER }}"
182212
files: |
183213
artifacts/Oolite-Debug-Console-Ubuntu/*.tgz
184-
artifacts/Oolite-Debug-Console-Windows/*.exe
185-
artifacts/Oolite-Debug-Console-MacOS/Oolite-*
214+
artifacts/Oolite-Debug-Console-Windows/*.zip
215+
artifacts/Oolite-Debug-Console-MacOs/*.tgz
186216
187217
- name: Remove old releases
188218
if: github.ref == 'refs/heads/master'
@@ -207,5 +237,6 @@ jobs:
207237
title: "Oolite Debug Console v${{ needs.semver.outputs.GITVERSION_SEMVER }}"
208238
files: |
209239
artifacts/Oolite-Debug-Console-Ubuntu/*.tgz
210-
artifacts/Oolite-Debug-Console-Windows/*.exe
211-
artifacts/Oolite-Debug-Console-MacOS/Oolite-*
240+
artifacts/Oolite-Debug-Console-Windows/*.zip
241+
artifacts/Oolite-Debug-Console-MacOs/*.tgz
242+

0 commit comments

Comments
 (0)