From e0e205cee92dc7bdb509c9e74b622e49911c11be Mon Sep 17 00:00:00 2001 From: Mary Date: Sat, 26 Nov 2022 11:36:53 +0100 Subject: [PATCH] Update for macOS support --- .env.development | 1 + .env.production | 1 + src/i18n/locales/en/views/download.json | 1 + src/views/DownloadPage.vue | 37 ++++++++++++++++++++----- 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/.env.development b/.env.development index d133f5f..e42f50b 100644 --- a/.env.development +++ b/.env.development @@ -6,6 +6,7 @@ VITE_COMPATIBILITY_URL=https://github.com/Ryujinx/Ryujinx-Games-List/issues VITE_GUIDE_URL=https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide VITE_DISCORD_URL=https://discord.gg/VkQYXAZ VITE_RELEASE_URL=https://api.github.com/repos/Ryujinx/release-channel-master/releases/latest +VITE_RELEASE_MACOS_URL=https://api.github.com/repos/Ryujinx/release-channel-macos/releases/latest VITE_OLDER_BUILDS_URL=https://github.com/Ryujinx/release-channel-master/releases VITE_LDN_BUILD_URL=https://www.patreon.com/posts/ldn-2-5-vulkan-70757628 VITE_PATREON_URL=https://patreon.com/Ryujinx diff --git a/.env.production b/.env.production index d5de90e..0ef8fbd 100644 --- a/.env.production +++ b/.env.production @@ -6,6 +6,7 @@ VITE_COMPATIBILITY_URL=https://github.com/Ryujinx/Ryujinx-Games-List/issues VITE_GUIDE_URL=https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide VITE_DISCORD_URL=https://discord.gg/VkQYXAZ VITE_RELEASE_URL=https://api.github.com/repos/Ryujinx/release-channel-master/releases/latest +VITE_RELEASE_MACOS_URL=https://api.github.com/repos/Ryujinx/release-channel-macos/releases/latest VITE_OLDER_BUILDS_URL=https://github.com/Ryujinx/release-channel-master/releases VITE_LDN_BUILD_URL=https://www.patreon.com/posts/introducing-ldn3-74910544 VITE_PATREON_URL=https://patreon.com/Ryujinx diff --git a/src/i18n/locales/en/views/download.json b/src/i18n/locales/en/views/download.json index a1b0707..269ae4e 100644 --- a/src/i18n/locales/en/views/download.json +++ b/src/i18n/locales/en/views/download.json @@ -8,6 +8,7 @@ "supportPlanned": "Support planned", "supportWindows": "For Windows 10 & 11", "supportLinux": "For the most common Linux distros", + "supportMacOS": "For macOS 11 and later (Intel and Apple Silicon)", "buildInformation": "Build information", "buildRelease": "This build was released on {0}", "assets": "assets", diff --git a/src/views/DownloadPage.vue b/src/views/DownloadPage.vue index a6fcd6c..b4fa298 100644 --- a/src/views/DownloadPage.vue +++ b/src/views/DownloadPage.vue @@ -17,6 +17,8 @@ const OLDER_BUILD_URL = import.meta.env.VITE_OLDER_BUILDS_URL as string; const { t } = useI18n(); const isLoading = ref(true); const downloadRelease = ref({} as DownloadRelease); +const downloadMacOSRelease = ref({} as DownloadRelease); +const macosBuildUrl = ref(""); const linuxBuildUrl = ref(""); const windowBuildUrl = ref(""); @@ -37,6 +39,7 @@ const fetchBuilds = async () => { const result = await axios.get( import.meta.env.VITE_RELEASE_URL ); + downloadRelease.value = result.data; downloadRelease.value?.assets.forEach((asset) => { @@ -51,6 +54,22 @@ const fetchBuilds = async () => { } catch (err) { console.error(err); } + + try { + const result = await axios.get( + import.meta.env.VITE_RELEASE_MACOS_URL + ); + + downloadMacOSRelease.value = result.data; + downloadMacOSRelease.value?.assets.forEach((asset) => { + if (asset.name.toLowerCase().startsWith("ryujinx")) { + if (asset.name.endsWith(".app.tar.gz")) { + macosBuildUrl.value = asset.browser_download_url; + } + } + }); + } catch (err) {} + isLoading.value = false; }; @@ -153,29 +172,33 @@ const fetchBuilds = async () => { -
- {{ t("views.download.supportPlanned") }} + {{ downloadMacOSRelease.tag_name }}
macos logo

macOS

+

+ {{ t("views.download.supportMacOS") }} +

- {{ t("views.download.notSupported") }} + {{ t("views.download.download") }}
-
+