From d5923e856b8e588e39aacf5591bf401e2ca064a7 Mon Sep 17 00:00:00 2001 From: noideaman Date: Thu, 28 May 2026 18:15:53 -0600 Subject: [PATCH 01/10] Add workflow, setup.py and icon for building installers --- .github/workflows/build-binaries.yml | 85 ++++++++++++++++++++++++++++ open_vrc_scaler_icon.svg | 1 + setup.py | 81 ++++++++++++++++++++++++++ 3 files changed, 167 insertions(+) create mode 100644 .github/workflows/build-binaries.yml create mode 100644 open_vrc_scaler_icon.svg create mode 100644 setup.py diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml new file mode 100644 index 0000000..4484f87 --- /dev/null +++ b/.github/workflows/build-binaries.yml @@ -0,0 +1,85 @@ +# .github/workflows/build.yml +name: Build CX_Freeze Binaries + +on: + release: + types: [created] + workflow_dispatch: +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true # ← opt into Node 24 now + +permissions: + contents: write + +jobs: + build: + strategy: + matrix: + include: + - os: ubuntu-latest + artifact-name: VRChatAvatarScaler + output-ext: ".AppImage" + - os: windows-latest + artifact-name: VRChatAvatarScaler + output-ext: ".msi" + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout main repo + uses: actions/checkout@v4 + + # --- Python + CX_Freeze --- + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install dependencies (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + pip install -r requirements.txt + pip install cx_Freeze freeze-core + + - name: Install dependencies (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + pip install -r requirements.txt + pip install cx_Freeze freeze-core + ##needed if adding a systemtray icon + #- name: Set up virtual display (Linux) + #if: runner.os == 'Linux' + #run: | + # sudo apt-get install -y xvfb + # Xvfb :99 -screen 0 1024x768x24 & + # echo "DISPLAY=:99" >> $GITHUB_ENV + + # --- Build --- + - name: Build with CX_Freeze (Linux) + if: runner.os == 'Linux' + ##needed if systray icon is added + #env: + #DISPLAY: ':99' + run: | + python setup.py bdist_appimage + + - name: Build with CX_Freeze (Windows) + if: runner.os == 'Windows' + shell: cmd + run: | + python setup.py bdist_msi + + # --- Upload --- + - name: Upload binary + uses: actions/upload-artifact@v6 + with: + name: ${{ matrix.artifact-name }} + path: dist/VRChatAvatarScaler${{ matrix.output-ext }} + retention-days: 30 + + - name: Upload to Release + uses: softprops/action-gh-release@v2 + with: + files: dist/VRChatAvatarScaler${{ matrix.output-ext }} diff --git a/open_vrc_scaler_icon.svg b/open_vrc_scaler_icon.svg new file mode 100644 index 0000000..767706d --- /dev/null +++ b/open_vrc_scaler_icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..6d69677 --- /dev/null +++ b/setup.py @@ -0,0 +1,81 @@ +import sys +import subprocess +from cx_Freeze import setup, Executable + +#force pysystray without a desktop +pystray_path = subprocess.check_output( + [sys.executable, '-c', + 'import importlib.util; import os; ' + 'spec = importlib.util.find_spec("pystray"); ' + 'print(os.path.dirname(spec.origin))'], + text=True +).strip() + +# Dependencies are automatically detected, but it might need +# fine tuning. +build_options = { + 'packages': [], + 'include_files': [], + 'zip_exclude_packages': [], + 'excludes': [], +} + +base = 'gui' + +directory_table = [ + ("ProgramMenuFolder", "TARGETDIR", "."), + ("MyProgramMenu", "ProgramMenuFolder", "MYPROG~1|My Program"), +] + +msi_data = { + "Directory": directory_table, + "ProgId": [ + ("Prog.Id", "2026.05.26.1", None, "Scale your avatar over OSC", "IconId", None), + ], + "Icon": [ + ("IconId", "open_vrc_scaler_icon.ico"), + ], + "Shortcut": [ + ("DesktopShortcut", "DesktopFolder", "VRChat Avatar Scaler", + "TARGETDIR", "[TARGETDIR]OpenVRCScaler.exe", + None, None, None, None, None, None, "TARGETDIR"), + ("StartMenuShortcut", "MyProgramMenu", "VRChat Avatar Scaler", + "TARGETDIR", "[TARGETDIR]OpenVRCScaler.exe", + None, None, None, None, None, None, "TARGETDIR"), + ], +} + +bdist_msi_options = { + "add_to_path": True, + "data": msi_data, + "upgrade_code": "{ae44905e-0759-43b3-813c-a31f3483d407}", + "output_name": "OpenVRCScaler.msi", +} +bdist_appimage_options = { + "target_name": "OpenVRCScaler.AppImage", +} + +# Pick the right icon per platform +if sys.platform == "win32": + icon = 'open_vrc_scaler_icon.ico' +else: + icon = 'open_vrc_scaler_icon.svg' + +executables = [ + Executable( + 'open_vrc_scaler.py', + base=base, + icon=icon, + ), +] + +setup(name='OpenVRCScaler', + version = '2026.05.26.1', + description = "Change your avatar's scale over osc", + license = "MIT License", + options = { + 'build_exe': build_options, + 'bdist_msi': bdist_msi_options, + 'bdist_appimage': bdist_appimage_options, + }, + executables = executables) From 001f9c53467dcd8a61b4bdebb5d00d7863ab1024 Mon Sep 17 00:00:00 2001 From: noideaman Date: Thu, 28 May 2026 18:19:35 -0600 Subject: [PATCH 02/10] cleanup old pystray stuff --- setup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 6d69677..bba7603 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,15 @@ import sys import subprocess from cx_Freeze import setup, Executable - +#stuff if using pystray #force pysystray without a desktop -pystray_path = subprocess.check_output( - [sys.executable, '-c', - 'import importlib.util; import os; ' - 'spec = importlib.util.find_spec("pystray"); ' - 'print(os.path.dirname(spec.origin))'], - text=True -).strip() +#pystray_path = subprocess.check_output( +# [sys.executable, '-c', +# 'import importlib.util; import os; ' +# 'spec = importlib.util.find_spec("pystray"); ' +# 'print(os.path.dirname(spec.origin))'], +# text=True +#).strip() # Dependencies are automatically detected, but it might need # fine tuning. From dea89f1469d2e4cf729b0c7e1c634921eb384fa9 Mon Sep 17 00:00:00 2001 From: noideaman Date: Thu, 28 May 2026 18:24:38 -0600 Subject: [PATCH 03/10] fix output name of built binary --- .github/workflows/build-binaries.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 4484f87..97a297b 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -17,10 +17,10 @@ jobs: matrix: include: - os: ubuntu-latest - artifact-name: VRChatAvatarScaler + artifact-name: OpenVRCScaler output-ext: ".AppImage" - os: windows-latest - artifact-name: VRChatAvatarScaler + artifact-name: OpenVRCScaler output-ext: ".msi" runs-on: ${{ matrix.os }} From 9ed42ae8a4ff73600b056faba333de95bf2bffc5 Mon Sep 17 00:00:00 2001 From: noideaman Date: Thu, 28 May 2026 18:26:39 -0600 Subject: [PATCH 04/10] i missed the one at the end --- .github/workflows/build-binaries.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 97a297b..3e3afbc 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -76,10 +76,10 @@ jobs: uses: actions/upload-artifact@v6 with: name: ${{ matrix.artifact-name }} - path: dist/VRChatAvatarScaler${{ matrix.output-ext }} + path: dist/OpenVRCScaler${{ matrix.output-ext }} retention-days: 30 - name: Upload to Release uses: softprops/action-gh-release@v2 with: - files: dist/VRChatAvatarScaler${{ matrix.output-ext }} + files: dist/OpenVRCScaler${{ matrix.output-ext }} From 44ddb340803f53b6cb448831164be3e38fc667d5 Mon Sep 17 00:00:00 2001 From: noideaman Date: Thu, 28 May 2026 18:33:52 -0600 Subject: [PATCH 05/10] fix windows shortcuts --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index bba7603..ba46cae 100644 --- a/setup.py +++ b/setup.py @@ -36,11 +36,11 @@ ("IconId", "open_vrc_scaler_icon.ico"), ], "Shortcut": [ - ("DesktopShortcut", "DesktopFolder", "VRChat Avatar Scaler", - "TARGETDIR", "[TARGETDIR]OpenVRCScaler.exe", + ("DesktopShortcut", "DesktopFolder", "OpenVRCScaler", + "TARGETDIR", "[TARGETDIR]open_vrc_scaler.exe", None, None, None, None, None, None, "TARGETDIR"), - ("StartMenuShortcut", "MyProgramMenu", "VRChat Avatar Scaler", - "TARGETDIR", "[TARGETDIR]OpenVRCScaler.exe", + ("StartMenuShortcut", "MyProgramMenu", "OpenVRCScaler", + "TARGETDIR", "[TARGETDIR]open_vrc_scaler.exe", None, None, None, None, None, None, "TARGETDIR"), ], } From 9af14b3e4193016ad4ec80752cfb54c916952590 Mon Sep 17 00:00:00 2001 From: noideaman Date: Thu, 28 May 2026 19:57:09 -0600 Subject: [PATCH 06/10] add standalone exe via pyinstaller and nuitka --- .github/workflows/build-binaries.yml | 58 +++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 3e3afbc..663f153 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -40,7 +40,7 @@ jobs: shell: pwsh run: | pip install -r requirements.txt - pip install cx_Freeze freeze-core + pip install cx_Freeze freeze-core Nuitka pyinstaller - name: Install dependencies (Linux) if: runner.os == 'Linux' @@ -56,7 +56,7 @@ jobs: # Xvfb :99 -screen 0 1024x768x24 & # echo "DISPLAY=:99" >> $GITHUB_ENV - # --- Build --- + # --- Build CX_Freeze --- - name: Build with CX_Freeze (Linux) if: runner.os == 'Linux' ##needed if systray icon is added @@ -71,6 +71,32 @@ jobs: run: | python setup.py bdist_msi + # --- Build pyinstaller --- + + - name: Build with pyinstaller (Windows) + if: runner.os == 'Windows' + shell: cmd + run: | + python -m pyinstaller ^ + --noconfirm ^ + --onefile ^ + --windowed ^ + --name OpenVRCScaler.exe ^ + --icon "open_vrc_scaler_icon.ico" ^ + "open_vrc_scaler.py" + + # --- Build Nuitka --- + - name: Build with Nuitka (Windows) + if: runner.os == 'Windows' + shell: cmd + run: | + python -m nuitka ^ + --windows-console-mode=disable ^ + --windows-icon-from-ico=open_vrc_scaler_icon.ico ^ + --output-filename=OpenVRCScaler-nuitka.exe ^ + --mode=onefile ^ + open_vrc_scaler.py + # --- Upload --- - name: Upload binary uses: actions/upload-artifact@v6 @@ -79,7 +105,35 @@ jobs: path: dist/OpenVRCScaler${{ matrix.output-ext }} retention-days: 30 + - name: Upload PyInstaller artifact (Windows) + if: runner.os == 'Windows' + uses: actions/upload-artifact@v6 + with: + name: ${{ matrix.artifact-name }} + path: dist/OpenVRCScaler.exe + retention-days: 30 + + - name: Upload Nuitka artifact (Windows) + if: runner.os == 'Windows' + uses: actions/upload-artifact@v6 + with: + name: ${{ matrix.artifact-name }}-nuitka + path: dist/OpenVRCScaler-nuitka.exe + retention-days: 30 + - name: Upload to Release uses: softprops/action-gh-release@v2 with: files: dist/OpenVRCScaler${{ matrix.output-ext }} + + - name: Upload PyInstaller build to Release (Windows) + if: runner.os == 'Windows' + uses: softprops/action-gh-release@v2 + with: + files: dist/OpenVRCScaler.exe + + - name: Upload Nuitka build to Release (Windows) + if: runner.os == 'Windows' + uses: softprops/action-gh-release@v2 + with: + files: dist/OpenVRCScaler-nuitka.exe From 359d381415b639b257166ab039a3ef25ce6f1ea5 Mon Sep 17 00:00:00 2001 From: noideaman Date: Thu, 28 May 2026 20:01:18 -0600 Subject: [PATCH 07/10] dont use python -m for nuitka and pyinstaller --- .github/workflows/build-binaries.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 663f153..07787e3 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -77,7 +77,7 @@ jobs: if: runner.os == 'Windows' shell: cmd run: | - python -m pyinstaller ^ + pyinstaller ^ --noconfirm ^ --onefile ^ --windowed ^ @@ -90,7 +90,7 @@ jobs: if: runner.os == 'Windows' shell: cmd run: | - python -m nuitka ^ + nuitka ^ --windows-console-mode=disable ^ --windows-icon-from-ico=open_vrc_scaler_icon.ico ^ --output-filename=OpenVRCScaler-nuitka.exe ^ From 458f24fd4a4eb818b6f494d9d01b6d655761dea8 Mon Sep 17 00:00:00 2001 From: noideaman Date: Thu, 28 May 2026 20:05:58 -0600 Subject: [PATCH 08/10] add answer for nuitka non-interactive mode, add support for tkinter to nuitka --- .github/workflows/build-binaries.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 07787e3..328fce0 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -91,9 +91,11 @@ jobs: shell: cmd run: | nuitka ^ + --assume-yes-for-downloads ^ --windows-console-mode=disable ^ --windows-icon-from-ico=open_vrc_scaler_icon.ico ^ --output-filename=OpenVRCScaler-nuitka.exe ^ + --enable-plugin=tk-inter ^ --mode=onefile ^ open_vrc_scaler.py From 87e99a890e599aa2e949db4ecc913db26e9399a2 Mon Sep 17 00:00:00 2001 From: noideaman Date: Thu, 28 May 2026 20:12:24 -0600 Subject: [PATCH 09/10] fix output naming conflicts --- .github/workflows/build-binaries.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 328fce0..877bfcd 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -81,7 +81,7 @@ jobs: --noconfirm ^ --onefile ^ --windowed ^ - --name OpenVRCScaler.exe ^ + --name OpenVRCScaler-pyinstaller.exe ^ --icon "open_vrc_scaler_icon.ico" ^ "open_vrc_scaler.py" @@ -96,6 +96,7 @@ jobs: --windows-icon-from-ico=open_vrc_scaler_icon.ico ^ --output-filename=OpenVRCScaler-nuitka.exe ^ --enable-plugin=tk-inter ^ + --output-dir=dist ^ --mode=onefile ^ open_vrc_scaler.py @@ -112,7 +113,7 @@ jobs: uses: actions/upload-artifact@v6 with: name: ${{ matrix.artifact-name }} - path: dist/OpenVRCScaler.exe + path: dist/OpenVRCScaler-pyinstaller.exe retention-days: 30 - name: Upload Nuitka artifact (Windows) @@ -132,7 +133,7 @@ jobs: if: runner.os == 'Windows' uses: softprops/action-gh-release@v2 with: - files: dist/OpenVRCScaler.exe + files: dist/OpenVRCScaler-pyinstaller.exe - name: Upload Nuitka build to Release (Windows) if: runner.os == 'Windows' From 3e6e23c408edf08e602d7ef2268813d4cce61fb2 Mon Sep 17 00:00:00 2001 From: noideaman Date: Thu, 28 May 2026 20:19:44 -0600 Subject: [PATCH 10/10] fix output naming conflicts again --- .github/workflows/build-binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 877bfcd..6d939df 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -112,7 +112,7 @@ jobs: if: runner.os == 'Windows' uses: actions/upload-artifact@v6 with: - name: ${{ matrix.artifact-name }} + name: ${{ matrix.artifact-name }}-pyinstaller path: dist/OpenVRCScaler-pyinstaller.exe retention-days: 30