diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d69139..90f49d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: build_matrix: strategy: matrix: - os: [windows-latest, macos-15-intel, ubuntu-latest] + os: [windows-latest, macos-15-intel, ubuntu-latest, macos-latest] if: github.event.pull_request.merged == true runs-on: ${{ matrix.os }} @@ -23,6 +23,12 @@ jobs: sudo installer -verbose -pkg ./python-3.10.6-macos11.pkg -target / echo "/Library/Frameworks/Python.framework/Versions/3.10/bin" >> $GITHUB_PATH + - name: Install Python (macOS ARM) + if: ${{ matrix.os == 'macos-latest' }} + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install Python (Windows) if: ${{ matrix.os == 'windows-latest' }} uses: actions/setup-python@v5 @@ -42,6 +48,11 @@ jobs: run: | pip3 install -r requirements.txt + - name: Install Requirements (MacOS ARM) + if: ${{ matrix.os == 'macos-latest' }} + run: | + pip3 install -r requirements.txt + - name: Install Requirements (Windows) if: ${{ matrix.os == 'windows-latest' }} run: | @@ -57,6 +68,11 @@ jobs: run: | pyinstaller PySN.py -w --onefile --add-data "Icons/AphIcon.png:." --icon="Icons/AphIcon.icns" + - name: Run PyInstaller (MacOS ARM) + if: ${{ matrix.os == 'macos-latest' }} + run: | + pyinstaller PySN.py -w --onefile --add-data "Icons/AphIcon.png:." --icon="Icons/AphIcon.icns" + - name: Run PyInstaller (Windows) if: ${{ matrix.os == 'windows-latest' }} run: | @@ -74,6 +90,13 @@ jobs: cp dist/PySN macos (cd macos/ && zip -r -X ../PySN_MacOS.zip .) + - name: Move and Zip (MacOS ARM) + if: ${{ matrix.os == 'macos-latest' }} + run: | + mkdir macos_ARM + cp dist/PySN macos_ARM + (cd macos_ARM/ && zip -r -X ../PySN_MacOS_ARM.zip .) + - name: Move and Zip (Windows) if: ${{ matrix.os == 'windows-latest' }} run: | @@ -95,6 +118,13 @@ jobs: name: PySN_MacOS.zip path: PySN_MacOS.zip + - name: Upload Artifact (MacOS ARM) + if: ${{ matrix.os == 'macos-latest' }} + uses: actions/upload-artifact@v4 + with: + name: PySN_MacOS_ARM.zip + path: PySN_MacOS_ARM.zip + - name: Upload Artifact (Windows) if: ${{ matrix.os == 'windows-latest' }} uses: actions/upload-artifact@v4 @@ -122,6 +152,12 @@ jobs: name: PySN_MacOS.zip path: ./artifacts + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: PySN_MacOS_ARM.zip + path: ./artifacts + - name: Download Artifacts uses: actions/download-artifact@v4 with: @@ -140,15 +176,16 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: v2.5.9 - name: v2.5.9 + tag_name: v2.5.10 + name: v2.5.10 body: | - Fix Linux/MacOS builds. + Add MacOS ARM Build. - I was trying to configure a widget before creating it. Not sure why this worked on Windows... + Hopefully fix yml parsing on Linux and MacOS. draft: false prerelease: false files: | ./artifacts/PySN_MacOS.zip + ./artifacts/PySN_MacOS_ARM.zip ./artifacts/PySN_Windows.zip ./artifacts/PySN_Linux.zip diff --git a/PySN.py b/PySN.py index 0c24bca..28728b0 100644 --- a/PySN.py +++ b/PySN.py @@ -488,7 +488,7 @@ def search_type(self): console = 'PlayStation 3' if sys.platform.startswith('linux'): yml_dir = Path.home() / '.config' / 'rpcs3' / 'games.yml' - if sys.platform.startswith('darwin'): + elif sys.platform.startswith('darwin'): yml_dir = Path.home() / 'Library' / 'Application Support' / 'rpcs3' / 'games.yml' else: yml_dir = Path(rpcs3_dir) / 'config' / 'games.yml' if os.path.isfile(yml_dir):