diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 37c77c39..e4506a32 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -103,9 +103,37 @@ jobs: with: name: REAL-Video-Enhancer-2.0-MacOS_x86_64.zip path: REAL-Video-Enhancer-2.0-MacOS_x86_64.zip + build-MacOS_arm64: + runs-on: macos-14 + permissions: write-all + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.10.8 + + - name: Install Python Dependencies + run: | + python3 -m pip install -r requirements.txt + - name: Build + run: python3 build.py --build_exe + + - name: copy backend + run: cp -r backend dist/ + + - name: compress archive + run: zip -r REAL-Video-Enhancer-2.0-MacOS_arm64.zip dist/ + + - name: Save Archive as artifact + uses: actions/upload-artifact@v3 + with: + name: REAL-Video-Enhancer-2.0-MacOS_arm64.zip + path: REAL-Video-Enhancer-2.0-MacOS_arm64.zip Release: - needs: [build-Windows, build-Linux, build-MacOS] + needs: [build-Windows, build-Linux, build-MacOS, build-MacOS_arm64] runs-on: ubuntu-latest permissions: contents: write @@ -137,6 +165,7 @@ jobs: artifacts/REAL-Video-Enhancer-2.0-Windows.zip/REAL-Video-Enhancer-2.0-Windows.zip artifacts/REAL-Video-Enhancer-2.0-Linux.zip/REAL-Video-Enhancer-2.0-Linux.zip artifacts/REAL-Video-Enhancer-2.0-MacOS_x86_64.zip/REAL-Video-Enhancer-2.0-MacOS_x86_64.zip + artifacts/REAL-Video-Enhancer-2.0-MacOS_arm64.zip/REAL-Video-Enhancer-2.0-MacOS_arm64.zip diff --git a/src/DownloadDeps.py b/src/DownloadDeps.py index 752b763d..f1105c73 100644 --- a/src/DownloadDeps.py +++ b/src/DownloadDeps.py @@ -14,9 +14,7 @@ ) from .ui.QTcustom import DownloadProgressPopup, DisplayCommandOutputPopup import os -import subprocess -import shutil -import urllib.request +from platform import machine class DownloadDependencies: @@ -70,7 +68,10 @@ def downloadPython(self): case "win32": link += "x86_64-pc-windows-msvc-install_only.tar.gz" case "darwin": - link += "x86_64-apple-darwin-install_only.tar.gz" + if machine() == "arm64": + link += "aarch64-apple-darwin-install_only.tar.gz" + else: + link += "x86_64-apple-darwin-install_only.tar.gz" # probably can add macos support later printAndLog("Downloading Python") DownloadProgressPopup(