Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Dolphin Release Channels #388

Merged
merged 61 commits into from
Oct 17, 2023
Merged

feat: add Dolphin Release Channels #388

merged 61 commits into from
Oct 17, 2023

Conversation

NikhilNarayana
Copy link
Member

@NikhilNarayana NikhilNarayana commented Aug 15, 2023

What and Why

This PR builds out functionality to support installations of dolphin betas that live side by side with the stable version. This is to ensure users can swap between the two at will as well as allow us to automatically swap back to stable if beta dolphin is lagging behind release-wise.

How

This PR makes DolphinInstallation an interface that gets implemented by IshiirukaDolphinInstallation and MainlineDolphinInstallation. There are a limited number of changes made to Ishiiruka's installation method such as the installation folder no longer being a setting that is passed in and fetchLatestVersion being called from the Dolphin manager side.

Order of operations for installing/updating dolphin

Current

  1. DolphinManager calls this.getInstallation() and then installation.validate() or installation.downloadAndInstall().
  2. fetchLatestVersion() gets called from within the functions above and accepts the DolphinLaunchType. it will only ever return the current stable release since the beta flag is hard coded to false.
  3. Installation continues like usual by downloading the artifact and doing the appropriate steps for the given OS.

New

  1. DolphinManager calls fetchLatestVersion() before calling this.getInstallation()
  2. fetchLatestVersion() accepts the DolphinLaunchType, includeBeta flag, and a reference to settingsManager. it will pass the beta flag into the gql request to get either the stable release or latest release.
  3. fetchLatestVersion() will check the version returned by the backend for -beta, then it will call settingsManager.setDolphinBetaAvailable() to allow the rest of the app to know if it should use beta Dolphin
  4. fetchLatestVersion() returns DolphinVersionResponse.
  5. this.getInstallation() is called and will return MainlineDolphinInstallation if a beta is available or promoteToStable is true and IshiirukaDolphinInstallation otherwise.
  6. Installation continues like usual by downloading the artifact and doing the appropriate steps for the given OS.

currently this is for netplay only because mainline playback still has a lot of work to be done

image

@NikhilNarayana NikhilNarayana changed the title feat: add betaNetplay and betaPlayback settings feat: add Dolphin Release Channels Aug 15, 2023
@NikhilNarayana NikhilNarayana marked this pull request as ready for review September 28, 2023 01:09
@NikhilNarayana NikhilNarayana force-pushed the feat/beta-dolphin branch 3 times, most recently from d275baf to 901ad4b Compare September 30, 2023 03:39
@NikhilNarayana NikhilNarayana force-pushed the feat/beta-dolphin branch 2 times, most recently from f6165c0 to aca6dd5 Compare October 10, 2023 04:18
Copy link
Member

@vinceau vinceau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one suggestion.

import { downloadLatestDolphin } from "./download";
import type { DolphinVersionResponse } from "./fetchLatestVersion";

const log = electronLog.scope("dolphin/installation");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const log = electronLog.scope("dolphin/installation");
const log = electronLog.scope("dolphin/mainlineInstallation");

Do you think this would be helpful?

@NikhilNarayana NikhilNarayana merged commit 0ad65f8 into main Oct 17, 2023
@NikhilNarayana NikhilNarayana deleted the feat/beta-dolphin branch October 17, 2023 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants