diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 03371c81..6814e806 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,8 +23,8 @@ jobs: run: | mkdir dist echo "::set-env name=VERSION::$(python scripts/get_version.py)" - echo "::set-env name=ARCH::$(/usr/bin/arch)" - echo "Building branch ${{env.GITHUB_REF}} - version ${{env.VERSION}}" + echo "::set-env name=ARCH::$(python -c 'import platform; print(\"arm64\" if \"arm64\" in platform.platform() else \"x86_64\")')" + echo "Building branch ${{env.GITHUB_REF}} - version ${{env.VERSION}} - on ${{env.ARCH}}" env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true diff --git a/FastFlix_Nix_OneFile.spec b/FastFlix_Nix_OneFile.spec index 1b05ec2d..40d1038a 100644 --- a/FastFlix_Nix_OneFile.spec +++ b/FastFlix_Nix_OneFile.spec @@ -3,7 +3,6 @@ from PyInstaller.utils.hooks import collect_submodules import toml import os import platform -from subprocess import check_output block_cipher = None @@ -41,9 +40,6 @@ a = Analysis(['fastflix/__main__.py'], pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) -arch = check_output("/usr/bin/arch").decode().strip() -print("Arch output:", arch) - exe = EXE(pyz, a.scripts, a.binaries, @@ -57,7 +53,7 @@ exe = EXE(pyz, upx=False, upx_exclude=[], runtime_tmpdir=None, - target_arch=arch, + target_arch='arm64' if 'arm64' in platform.platform() else 'x86_64', console=True, icon='fastflix/data/icon.ico' )