forked from LagoLunatic/wwrando
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multi-platform releases and custom model installation (LagoLunatic#230)
* Support other platforms in build.py * Automated builds via GitHub Actions * Add Windows and MacOS CI building * Try 3.9 for MacOS * Revert to 3.8 for Mac, use my fork of PyFastTextureUtils * Try to build .app for macos * Update PyFastTextureUtils commit * Update PyFastTextureUtils commit to upstream * Update PyInstaller to 4.2 (fixes building for macOS) * Use shutil to make zip instead of Zipfile This properly copies the mac .app bundle as a directory while preserving executable permissions * Place settings.txt in the correct place when running from a macOS .app * Bundle as .app for macOS * Fix typo * Test uploading artifacts * Set mac deployment target, glob for artifact * Use miniconda for macos * Set build env variable * Force python3 for macos build * Put env variable back * More conda stuff * Correct name * This shouldn't be here * Try conda install * check something * try python3 * Please activate conda * Activate this shell * Activate all shells * Upload Linux and Windows artifacts * Fix typo, remove unneeded lines * Use appdirs for settings and custom models * Upload regular unix executable artifact for testing purposes * Use userdata path for macOS only, remove unneeded code * Don't upload this artifact anymore * Custom model zip installation * Update PyFastTextureUtils * Verify contents of model zip file before unpacking * Don't bundle models folder for Mac * Add pushButton to install a custom model pack * Hook up model install button * add certifi to fix issue with ssl when built through github actions, bump PyInstaller version * Switch to new model after installing it * Remove unneeded comment and line spacing from workflow * Update player model after user clicks "OK" * Support custom model packs containing multiple models * Create userdata path if it does not exist * Try zipping in github action Co-authored-by: EthanArmbrust <EthanArmbrust@github.com> Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
- Loading branch information
1 parent
7a1d34b
commit a0ae163
Showing
11 changed files
with
288 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Add release key | ||
run: echo ${{ secrets.RELEASE_KEY }} > keys/build_key.txt | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements_full.txt | ||
- name: Build Linux App | ||
run: python -m PyInstaller wwrando.spec | ||
- name: Bundle Linux App | ||
run: python build.py | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: wwrando-linux | ||
path: dist/release_archive/* | ||
|
||
macos: | ||
runs-on: macos-latest | ||
|
||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
MACOSX_DEPLOYMENT_TARGET: 10.9 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Add release key | ||
run: echo ${{ secrets.RELEASE_KEY }} > keys/build_key.txt | ||
- name: Set up Miniconda with Python 3.8 | ||
uses: goanpeca/setup-miniconda@v1 | ||
with: | ||
architecture: x64 | ||
python-version: '3.8' | ||
miniconda-version: latest | ||
- run: | | ||
conda create -qyf -n py38 python=3.8 wheel -c anaconda | ||
conda activate py38 | ||
shell: bash -l {0} | ||
- name: Install dependencies | ||
run: | | ||
conda install pip | ||
python3 -m pip install -r requirements_full.txt | ||
shell: bash -l {0} | ||
- name: Build MacOS App | ||
run: python3 -m PyInstaller --onefile --windowed wwrando.spec | ||
shell: bash -l {0} | ||
- name: Bundle MacOS App | ||
run: python3 build.py | ||
shell: bash -l {0} | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: wwrando-macos | ||
path: dist/release_archive/* | ||
|
||
windows: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Add release key | ||
run: echo ${{ secrets.RELEASE_KEY }} > keys/build_key.txt | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements_full.txt | ||
- name: Build Windows App | ||
run: python -m PyInstaller wwrando.spec | ||
- name: Bundle Windows App | ||
run: python build.py | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: wwrando-windows | ||
path: dist/release_archive/* |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
python generate_key.py > temp_key | ||
key_1= < temp_key | ||
rm temp_key | ||
|
||
python generate_key.py > temp_key | ||
key_2= < temp_key | ||
rm temp_key | ||
|
||
python generate_key.py > temp_key | ||
key_3= < temp_key | ||
rm temp_key | ||
|
||
python generate_key.py > temp_key | ||
key_4= < temp_key | ||
rm temp_key | ||
|
||
echo SEED_KEY=str(0X%key_1%-(0X%key_2%+0X%key_3%)/0X%key_4%) > seed_key.py | ||
|
||
python generate_key.py > build_key.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
appdirs==1.4.4 | ||
certifi==2020.12.5 | ||
PySide2==5.15.2 | ||
PyYAML==5.4 | ||
Pillow==8.2.0 | ||
PyInstaller==4.1 | ||
PyInstaller==4.3 | ||
tinyaes==1.0.1 | ||
git+git://github.com/LagoLunatic/PyFastBTI.git@da01c14562a4711e031fd0a01c52d2131035e228#egg=PyFastBTI | ||
git+git://github.com/LagoLunatic/PyFastTextureUtils.git@4e6b9db2f7703f016225971f7842f7fd29a1a8a5#egg=PyFastTextureUtils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.