Skip to content

Commit 8442875

Browse files
authored
Merge pull request #2 from OoMrFlibble/master
Major overhaul
2 parents 4449c8f + 148127f commit 8442875

23 files changed

+918
-190
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ name: build
44

55
on:
66
workflow_dispatch:
7-
push:
7+
# push:
8+
# branches: [ main ]
9+
# pull_request:
810
# branches: [ main ]
9-
pull_request:
10-
branches: [ main ]
1111

1212
jobs:
1313
semver:
@@ -54,7 +54,7 @@ jobs:
5454
echo "MACOS_MAJORMINORPATCH=${GitVersion_MajorMinorPatch}" >> "$GITHUB_OUTPUT"
5555
fi
5656
57-
package-linux:
57+
package-linux-x86_64:
5858
needs: [semver]
5959
runs-on: ubuntu-latest
6060

@@ -64,34 +64,18 @@ jobs:
6464
with:
6565
fetch-depth: 0
6666

67-
- name: setup pyenv
68-
run: |
69-
sudo apt-get install python3-tk python3-venv python3-pip
70-
venv="$HOME/python3/pyinstaller"
71-
rm -Rf "$venv" # uncomment to make fresh venv.
72-
python3 -m venv "$venv"
73-
source "${venv}"/bin/activate
74-
pip install pyinstaller
75-
pip install twisted
76-
77-
- name: Build using pyinstaller
67+
- name: make installable tarball
7868
run: |
79-
venv="$HOME/python3/pyinstaller"
80-
source "${venv}"/bin/activate
81-
pyinstaller \
82-
--onefile \
83-
--add-binary "oojsc.xbm:." \
84-
--add-binary "OoJSC.ico:." \
85-
DebugConsole.py
69+
cd builder
70+
cd Linux
71+
./make.sh debdeps
72+
./make.sh onefile Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-linux-x86_64-installable /tmp
8673
87-
- name: create archive
88-
run: |
89-
tar cvfz Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-linux.tgz dist/
90-
9174
- uses: actions/upload-artifact@v4
9275
with:
93-
name: Oolite-Debug-Console-Ubuntu
94-
path: ./Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-linux.tgz
76+
name: Oolite-Debug-Console-Linux-x86_64-Installable
77+
path: /tmp/Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-linux-x86_64-installable-onefile.tgz
78+
9579

9680
package-windows:
9781
needs: [semver]
@@ -105,9 +89,12 @@ jobs:
10589
- name: Install pyinstaller
10690
run: |
10791
pip install -U pyinstaller
92+
pip install -U click
10893
pip install -U twisted
10994
pip install -U pywin32
11095
96+
#Flibble. Wonder if this is actually used now? pip install -U pywin32
97+
11198
# in Windows PowerShell the backtick indicates a multiline command
11299
# see https://stackoverflow.com/questions/3235850/how-to-enter-a-multi-line-command
113100
- name: Build using pyinstaller
@@ -118,10 +105,10 @@ jobs:
118105
--log-level=WARN `
119106
--onefile `
120107
--name OoDebugConsole `
121-
--add-binary "OoJSC.ico:." `
122-
--add-binary "oojsc.xbm:." `
108+
--add-binary "images\OoJSC.ico:." `
109+
--add-binary "images\oojsc.xbm:." `
123110
--noconsole `
124-
--icon=OoJSC.ico `
111+
--icon=images\OoJSC.ico `
125112
DebugConsole.py
126113
127114
# --version-file=OoDebug_version_info.txt `
@@ -141,7 +128,7 @@ jobs:
141128
name: Oolite-Debug-Console-Windows
142129
path: Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-win.zip
143130

144-
package-macos:
131+
package-macos-arm64:
145132
needs: [semver]
146133
runs-on: macos-latest
147134

@@ -151,29 +138,19 @@ jobs:
151138
with:
152139
fetch-depth: 0
153140

154-
- name: Install pyinstaller
155-
run: |
156-
pip install -U pyinstaller
157-
158-
- name: Build using pyinstaller
159-
run: |
160-
pyinstaller \
161-
--onefile \
162-
--add-binary "oojsc.xbm:." \
163-
--add-binary "OoJSC.ico:." \
164-
DebugConsole.py
165-
166-
- name: create archive
141+
- name: make installable tarball
167142
run: |
168-
tar cvfz Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-macos.tgz dist/
143+
cd builder
144+
cd MacOS
145+
./make.sh app Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-macos-arm64 /tmp
169146
170147
- uses: actions/upload-artifact@v4
171148
with:
172-
name: Oolite-Debug-Console-MacOs
173-
path: ./Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-macos.tgz
149+
name: Oolite-Debug-Console-MacOs-arm64
150+
path: /tmp/Oolite-Debug-Console-${{ needs.semver.outputs.GITVERSION_SEMVER }}-macos-arm64-app.tgz
174151

175152
release:
176-
needs: [semver,package-linux,package-windows,package-macos]
153+
needs: [semver,package-linux-x86_64,package-windows,package-macos-arm64]
177154
runs-on: ubuntu-latest
178155

179156
steps:
@@ -211,9 +188,9 @@ jobs:
211188
prerelease: true
212189
title: "Debug Console v${{ needs.semver.outputs.GITVERSION_SEMVER }}"
213190
files: |
214-
artifacts/Oolite-Debug-Console-Ubuntu/*.tgz
191+
artifacts/Oolite-Debug-Console-Linux-x86_64-Installable/*.tgz
215192
artifacts/Oolite-Debug-Console-Windows/*.zip
216-
artifacts/Oolite-Debug-Console-MacOs/*.tgz
193+
artifacts/Oolite-Debug-Console-MacOs-arm64/*.tgz
217194
218195
- name: Remove old releases
219196
if: github.ref == 'refs/heads/master'
@@ -237,7 +214,7 @@ jobs:
237214
prerelease: false
238215
title: "Debug Console v${{ needs.semver.outputs.GITVERSION_SEMVER }}"
239216
files: |
240-
artifacts/Oolite-Debug-Console-Ubuntu/*.tgz
217+
artifacts/Oolite-Debug-Console-Linux-x86_64-Installable/*.tgz
241218
artifacts/Oolite-Debug-Console-Windows/*.zip
242-
artifacts/Oolite-Debug-Console-MacOs/*.tgz
219+
artifacts/Oolite-Debug-Console-MacOs-arm64/*.tgz
243220

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,21 @@ Icon?
99
# Python cruft
1010
*.pyc
1111
*.pyo
12+
*/__pycache__/
1213

1314
# pyinstaller cruft
1415
*.spec
1516
build/
1617
dist/
18+
19+
# VS code
20+
*/launch.json
21+
*/settings.json
22+
23+
# NotePad++ cruft
24+
*/nppBackup/
25+
26+
# OoDC cruft
27+
*.cfg
28+
*.log
29+
*.dat

0 commit comments

Comments
 (0)