diff --git a/.github/workflows/bundle_windows.yml b/.github/workflows/bundle_windows.yml index c999570..b6bcdca 100644 --- a/.github/workflows/bundle_windows.yml +++ b/.github/workflows/bundle_windows.yml @@ -38,7 +38,6 @@ jobs: pip install pip-licenses pip-licenses --format=plain-vertical --with-license-file --no-license-path --output-file=lib_licenses.txt python setup_cxfreeze.py finalize_cxfreeze - python setup_cxfreeze.py build_zip - name: Upload the artifact uses: actions/upload-artifact@v2 diff --git a/README.md b/README.md index bccd312..0c525fa 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ with low-level SL details. See the [Local Animation addon example](https://githu ![Screenshot of proxy GUI](https://github.com/SaladDais/Hippolyzer/blob/master/static/screenshot.png?raw=true) ## Setup + +### From Source + * Python 3.8 or above is **required**. If you're unable to upgrade your system Python package due to being on a stable distro, you can use [pyenv](https://github.com/pyenv/pyenv) to create a self-contained Python install with the appropriate version. @@ -34,6 +37,11 @@ with low-level SL details. See the [Local Animation addon example](https://githu * * Under Windows it's `\Scripts\activate.bat` * Run `pip install hippolyzer`, or run `pip install -e .` in a cloned repo to install an editable version +### Binary Windows Builds + +Binary Windows builds are available on the [Releases page](https://github.com/SaladDais/Hippolyzer/releases/). +I don't extensively test these, building from source is recommended. + ## Proxy A proxy is provided with both a CLI and Qt-based interface. The proxy application wraps a diff --git a/setup.py b/setup.py index 8e3bfc8..8757b19 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) -version = '0.3.1' +version = '0.3.2' with open(path.join(here, 'README.md')) as readme_fh: readme = readme_fh.read() diff --git a/setup_cxfreeze.py b/setup_cxfreeze.py index 0857b78..f73544d 100644 --- a/setup_cxfreeze.py +++ b/setup_cxfreeze.py @@ -46,37 +46,21 @@ TO_DELETE = [ "lib/yarl/python39.dll", ] +COPY_TO_ZIP = [ + "LICENSE.txt", + "README.md", + "NOTICE.md", + # Must have been generated with pip-licenses before. Many dependencies + # require their license to be distributed with their binaries. + "lib_licenses.txt", +] + BASE_DIR = Path(__file__).parent.absolute() class FinalizeCXFreezeCommand(Command): - description = "Prepare cx_Freeze build dirs for zipping" - user_options = [] - - def initialize_options(self) -> None: - pass - - def finalize_options(self) -> None: - pass - - def run(self): - for path in (BASE_DIR / "build").iterdir(): - 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 - # Must have been generated with pip-licenses before. Many dependencies - # require their license to be distributed with their binaries. - shutil.copy(BASE_DIR / "lib_licenses.txt", path / "lib_licenses.txt") - - -class BuildZipArchiveCommand(Command): - description = "Make a distributable zip from an EXE build" + description = "Prepare cx_Freeze build dirs and create a zip" user_options = [] def initialize_options(self) -> None: @@ -89,7 +73,16 @@ class BuildZipArchiveCommand(Command): (BASE_DIR / "dist").mkdir(exist_ok=True) for path in (BASE_DIR / "build").iterdir(): if path.name.startswith("exe.") and path.is_dir(): - zip_path = BASE_DIR / "dist" / (path.name + ".zip") + 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 to_copy in COPY_TO_ZIP: + shutil.copy(BASE_DIR / to_copy, path / to_copy) + zip_path = BASE_DIR / "dist" / path.name shutil.make_archive(zip_path, "zip", path) @@ -118,12 +111,11 @@ executables = [ setup( name="hippolyzer_gui", - version="0.1", + version="0.3.2", description="Hippolyzer GUI", options=options, executables=executables, cmdclass={ "finalize_cxfreeze": FinalizeCXFreezeCommand, - "build_zip": BuildZipArchiveCommand, } )