Update for Github releases

This commit is contained in:
Mary 2022-01-22 18:16:14 +01:00
parent b6e8a65d54
commit e0cb92e196

View file

@ -14,30 +14,16 @@
</v-row> </v-row>
<v-row align="start" justify="center"> <v-row align="start" justify="center">
<v-col> <v-col>
<div class="text-h5"> <p class="text-h5">Automatically compiled builds</p>
Automatically compiled builds </v-col>
</div> </v-row>
<p> <v-row align="start" justify="center">
<v-btn <v-col>
text
small
target="_blank"
rel="noopener"
href="https://ci.appveyor.com/project/gdkchan/ryujinx?branch=master"
>
<g-image
width="140"
src="https://ci.appveyor.com/api/projects/status/ssg4jwu6ve3k594s?svg=true"
alt="AppVeyor Badge"
/>
</v-btn>
</p>
<DownloadButton <DownloadButton
color="orange" color="orange"
platform="windows" platform="windows"
:version="version" :version="version"
:href="`${downloadURL}-win_x64.zip`" :href="`${winDownloadURL}`"
:click="trackDownload" :click="trackDownload"
:loading="isLoading" :loading="isLoading"
:disabled="false" :disabled="false"
@ -47,7 +33,7 @@
color="orange" color="orange"
platform="linux" platform="linux"
:version="version" :version="version"
:href="`${downloadURL}-linux_x64.tar.gz`" :href="`${linuxDownloadURL}`"
:click="trackDownload" :click="trackDownload"
:loading="isLoading" :loading="isLoading"
:disabled="false" :disabled="false"
@ -57,7 +43,7 @@
color="orange" color="orange"
platform="apple" platform="apple"
:version="macos_notice" :version="macos_notice"
:href="`${downloadURL}-osx_x64.zip`" :href="`${macDownloadURL}`"
:click="trackDownload" :click="trackDownload"
:loading="isLoading" :loading="isLoading"
:disabled="true" :disabled="true"
@ -67,6 +53,9 @@
<v-btn dark depressed small color="yellow darken-4" href="https://github.com/Ryujinx/Ryujinx/wiki/Changelog" rel="noopener" target="_blank"> <v-btn dark depressed small color="yellow darken-4" href="https://github.com/Ryujinx/Ryujinx/wiki/Changelog" rel="noopener" target="_blank">
Changelog Changelog
</v-btn> </v-btn>
<v-btn dark depressed small color="grey darken-4" href="https://github.com/Ryujinx/release-channel-master/releases" rel="noopener" target="_blank">
Older Builds
</v-btn>
</p> </p>
</v-col> </v-col>
</v-row> </v-row>
@ -109,7 +98,9 @@ query {
export default { export default {
data() { data() {
return { return {
downloadURL: "", winDownloadURL: "",
linuxDownloadURL: "",
macDownloadURL: "",
isLoading: true, isLoading: true,
version: "Loading ...", version: "Loading ...",
macos_notice: "Currently not supported (Support planned)", macos_notice: "Currently not supported (Support planned)",
@ -122,15 +113,30 @@ export default {
this.isLoading = true; this.isLoading = true;
let _f = await fetch( let _f = await fetch(
"https://ci.appveyor.com/api/projects/gdkchan/ryujinx/branch/master" "https://api.github.com/repos/Ryujinx/release-channel-master/releases/latest"
); );
let json = await _f.json(); let json = await _f.json();
this.version = json.build.version; for (var i = 0; i < json.assets.length; i++) {
var asset = json.assets[i];
const jobId = json.build.jobs[0].jobId; // Ignore SDL2 headless for now (TODO: integrate that someday)
if (asset.name.startsWith("ryujinx-headless-sdl2"))
{
continue;
}
this.downloadURL = `https://ci.appveyor.com/api/buildjobs/${jobId}/artifacts/ryujinx-${this.version}`; if (asset.name.endsWith("win_x64.zip"))
{
this.winDownloadURL = asset.browser_download_url;
}
if (asset.name.endsWith("linux_x64.tar.gz"))
{
this.linuxDownloadURL = asset.browser_download_url;
}
}
this.version = json.name;
this.isLoading = false; this.isLoading = false;
}, },