Skip to content

Commit

Permalink
Start updating Windows release bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
SaladDais committed Jan 9, 2024
1 parent f355138 commit 5637892
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/bundle_windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Have to manually unzip this (it gets double zipped) and add it
# onto the release after it gets created. Don't want actions with repo write.
name: Bundle Windows EXE


Expand All @@ -10,7 +8,8 @@ on:
- created
workflow_dispatch:
env:
target_tag: ${{ github.ref_name }}
target_tag: ${{ github.ref_name || github.event.inputs.ref_name }}
sha: ${{ github.sha || github.event.inputs.ref_name }}


jobs:
Expand All @@ -21,7 +20,7 @@ jobs:
contents: write
strategy:
matrix:
python-version: [3.9]
python-version: [3.12]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -51,10 +50,11 @@ jobs:
- name: Upload the artifact
uses: actions/upload-artifact@v2
with:
name: hippolyzer-windows-${{ github.sha }}
name: hippolyzer-windows-${{ env.sha }}
path: ./hippolyzer-windows-${{ env.target_tag }}.zip

- uses: ncipollo/[email protected]
if: github.event_name != 'workflow_dispatch'
with:
artifacts: hippolyzer-windows-${{ env.target_tag }}.zip
tag: ${{ env.target_tag }}
Expand Down
39 changes: 21 additions & 18 deletions setup_cxfreeze.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import glob

import setuptools # noqa

import os
Expand Down Expand Up @@ -32,20 +34,20 @@
"lib/aiohttp/_http_writer.c",
"lib/aiohttp/_websocket.c",
# Improve this to work with different versions.
"lib/aiohttp/python39.dll",
"lib/lazy_object_proxy/python39.dll",
"lib/lxml/python39.dll",
"lib/markupsafe/python39.dll",
"lib/multidict/python39.dll",
"lib/numpy/core/python39.dll",
"lib/numpy/fft/python39.dll",
"lib/numpy/linalg/python39.dll",
"lib/numpy/random/python39.dll",
"lib/python39.dll",
"lib/recordclass/python39.dll",
"lib/regex/python39.dll",
"lib/aiohttp/python3*.dll",
"lib/lazy_object_proxy/python3*.dll",
"lib/lxml/python3*.dll",
"lib/markupsafe/python3*.dll",
"lib/multidict/python3*.dll",
"lib/numpy/core/python3*.dll",
"lib/numpy/fft/python3*.dll",
"lib/numpy/linalg/python3*.dll",
"lib/numpy/random/python3*.dll",
"lib/python3*.dll",
"lib/recordclass/python3*.dll",
"lib/regex/python3*.dll",
"lib/test",
"lib/yarl/python39.dll",
"lib/yarl/python3*.dll",
]

COPY_TO_ZIP = [
Expand Down Expand Up @@ -77,11 +79,12 @@ def run(self):
if path.name.startswith("exe.") and path.is_dir():
for cleanse_suffix in TO_DELETE:
cleanse_path = path / cleanse_suffix
shutil.rmtree(cleanse_path, ignore_errors=True)
try:
os.unlink(cleanse_path)
except:
pass
for globbed in glob.glob(str(cleanse_path)):
shutil.rmtree(globbed, ignore_errors=True)
try:
os.unlink(globbed)
except:
pass
for to_copy in COPY_TO_ZIP:
shutil.copy(BASE_DIR / to_copy, path / to_copy)
shutil.copytree(BASE_DIR / "addon_examples", path / "addon_examples")
Expand Down

0 comments on commit 5637892

Please sign in to comment.