From 681174ac30c35500e6f976b13e36b4efef27812d Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sun, 17 Apr 2022 10:25:58 -0600 Subject: [PATCH] Fix Links --- .github/workflows/build-app-wxpython-offline.yml | 5 +++-- gui/gui_main.py | 11 ++++------- resources/constants.py | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-app-wxpython-offline.yml b/.github/workflows/build-app-wxpython-offline.yml index e51bed106..669d6b2dc 100644 --- a/.github/workflows/build-app-wxpython-offline.yml +++ b/.github/workflows/build-app-wxpython-offline.yml @@ -23,6 +23,7 @@ jobs: - run: cd dist; zip -r ../OpenCore-Patcher-wxPython.app.zip OpenCore-Patcher.app - run: ./../sign-wxpython.sh - run: packagesbuild ./payloads/InstallPackage/OCLP-Install-Setup.pkgproj + - run: zip -r ./OCLP-Install.pkg.zip ./dist/OCLP-Install.pkg - run: mv ./OpenCore-Patcher-wxPython.app.zip ./OpenCore-Patcher-GUI-Offline.app.zip - name: Upload App to Artifacts uses: actions/upload-artifact@v2 @@ -33,7 +34,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: OCLP-Install.pkg - path: ./dist/OCLP-Install.pkg + file: OCLP-Install.pkg.zip - name: Upload Binary to Release if: github.event_name == 'release' uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d @@ -47,6 +48,6 @@ jobs: uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./dist/OCLP-Install.pkg + file: OCLP-Install.pkg.zip tag: ${{ github.ref }} file_glob: true \ No newline at end of file diff --git a/gui/gui_main.py b/gui/gui_main.py index d900acdda..f79fd4a74 100644 --- a/gui/gui_main.py +++ b/gui/gui_main.py @@ -1479,13 +1479,10 @@ class wx_python_gui: print("- Manual backup is missing on Github, no more fallbacks remaining. Quitting") return - if link.endswith("zip"): - if utilities.download_file(link, self.constants.installer_pkg_zip_path): - if Path(self.constants.installer_pkg_path).exists(): - os.remove(self.constants.installer_pkg_path) - subprocess.run(["unzip", "-o", self.constants.installer_pkg_zip_path, "-d", self.constants.installer_pkg_path]) - else: - utilities.download_file(link, self.constants.installer_pkg_path) + if utilities.download_file(link, self.constants.installer_pkg_zip_path): + if Path(self.constants.installer_pkg_path).exists(): + os.remove(self.constants.installer_pkg_path) + subprocess.run(["unzip", "-o", self.constants.installer_pkg_zip_path, "-d", self.constants.installer_pkg_path]) def install_installer_pkg(self, disk): disk = disk + "s2" # ESP sits at 1, and we know macOS will have created the main partition at 2 diff --git a/resources/constants.py b/resources/constants.py index 2b86d5131..75bfabeb9 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -23,7 +23,7 @@ class Constants: self.repo_link = "https://github.com/dortania/OpenCore-Legacy-Patcher" self.repo_link_latest = f"{self.repo_link}/releases/tag/{self.patcher_version}" self.copyright_date = "Copyright © 2020-2022 Dortania" - self.installer_pkg_url = f"{self.repo_link_latest}/OCLP-Install.pkg" + self.installer_pkg_url = f"{self.repo_link_latest}/OCLP-Install.pkg.zip" self.installer_pkg_url_nightly = "https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-wxpython-offline/main/OCLP-Install.pkg" # OpenCore Versioning