Skip to content

Commit

Permalink
feat: add Dolphin Release Channels (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilNarayana authored Oct 17, 2023
1 parent eb4e313 commit 0ad65f8
Show file tree
Hide file tree
Showing 25 changed files with 755 additions and 209 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ jobs:
- name: Prepare artifacts
shell: bash
run: |
msg="$(git log -1 --no-merges --pretty=%B)"
if [[ ! $msg =~ "^release.*" ]];
then
rm release/build/*-mac.zip || true;
fi
mkdir artifacts
mv release/build/{*.exe*,*.deb,*.AppImage,*.dmg*,*.zip,*.yml} artifacts || true
- name: Upload artifacts
Expand Down
14 changes: 11 additions & 3 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ A single delay frame is equal to 4 buffer in traditional Dolphin netplay. Our re

If you want to change this value, first open Dolphin (if using the Launcher go to Settings -> Netplay -> Configure Dolphin) and go to `Config` -> `GameCube`. At the bottom you will see the option to update the Delay Frames. You can update this value at any time but it will only update for the next game you play.

## Can I use Widescreen when playing Slippi Online?

Yes. To enable Widescreen for Slippi Online follow these steps. Open Dolphin (if using the Launcher go to Settings -> Netplay -> Configure Dolphin), right click on your Melee in the games list, go to Properties -> Gecko Codes. Then enable the Widescreen gecko code and set the Dolphin aspect ratio to 16:9 under the Graphics settings. Do not use the dolphin widescreen hack, it does not have the same effect as the gecko code.
## Can I use Widescreen (16:9) when playing Slippi Online?

Yes, to enable widescreen go to the Netplay in the Launcher settings depending > `Manage Gecko Codes` > and enable the Widescreen gecko code. You can do the same for replays by going to the Playback tab instead.
## Is UCF included in Slippi Online?

Yes, we currently ship with UCF 0.8 and it is applied everywhere by default.
Expand All @@ -88,3 +87,12 @@ Some computers will have issues polling the adapter at the correct rate on some
## Where are my replays?

Replays are stored by default in `Documents/Slippi` on Windows and `~/Slippi` on macOS and Linux. The replay directory is configurable in the `Replays` settings tab of the Launcher.

## Mainline Slippi Dolphin (Beta)

### Updated OS Requirements
- Windows 10 or newer
- macOS Catalina (10.15) or newer
- Ubuntu 22.04 or newer and the following packages
- libfuse2
- qt6-qpa-plugins
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"@mui/material": "^5.12.1",
"@slippi/slippi-js": "^6.7.0",
"@xmcl/nat-api": "^0.4.1",
"async-mutex": "^0.4.0",
"compare-func": "^2.0.0",
"cross-fetch": "^3.1.5",
"default-gateway": "^7.2.2",
Expand Down Expand Up @@ -195,6 +196,7 @@
"react-virtualized-auto-sizer": "^1.0.3",
"react-window": "^1.8.6",
"semver": "^7.5.4",
"semver-regex": "^3.1.2",
"stun": "^2.1.0",
"wget-improved": "^3.3.1",
"zustand": "^3.2.0"
Expand Down
37 changes: 34 additions & 3 deletions src/dolphin/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,28 @@ export async function addGamePath(iniFile: IniFile, gameDir: string): Promise<vo
await iniFile.save();
}

export async function setSlippiSettings(iniFile: IniFile, options: Partial<SyncedDolphinSettings>): Promise<void> {
export async function setSlippiMainlineSettings(
iniFile: IniFile,
options: Partial<SyncedDolphinSettings>,
): Promise<void> {
const useMonthlySubfolders = options.useMonthlySubfolders ? "True" : "False";
const enableJukebox = options.enableJukebox ? "True" : "False";
const slippiSection = iniFile.getOrCreateSection("Slippi");

if (options.replayPath !== undefined) {
slippiSection.set("ReplayDir", options.replayPath);
}
if (options.useMonthlySubfolders !== undefined) {
slippiSection.set("ReplayMonthlyFolders", useMonthlySubfolders);
}
if (options.enableJukebox !== undefined) {
slippiSection.set("EnableJukebox", enableJukebox);
}

await iniFile.save();
}

export async function setSlippiIshiiSettings(iniFile: IniFile, options: Partial<SyncedDolphinSettings>): Promise<void> {
const useMonthlySubfolders = options.useMonthlySubfolders ? "True" : "False";
const enableJukebox = options.enableJukebox ? "True" : "False";
const coreSection = iniFile.getOrCreateSection("Core");
Expand All @@ -34,11 +55,21 @@ export async function setSlippiSettings(iniFile: IniFile, options: Partial<Synce
await iniFile.save();
}

export async function getSlippiSettings(iniFile: IniFile): Promise<SyncedDolphinSettings> {
export async function getSlippiMainlineSettings(iniFile: IniFile): Promise<SyncedDolphinSettings> {
const slippiSection = iniFile.getOrCreateSection("Slippi");

const replayPath = slippiSection.get("ReplayDir", defaultAppSettings.settings.rootSlpPath);
const useMonthlySubfolders = slippiSection.get("ReplayMonthlyFolders", "True") === "True";
const enableJukebox = slippiSection.get("EnableJukebox", "True") === "True";

return { useMonthlySubfolders, replayPath, enableJukebox };
}

export async function getSlippiIshiiSettings(iniFile: IniFile): Promise<SyncedDolphinSettings> {
const coreSection = iniFile.getOrCreateSection("Core");

const useMonthlySubfolders = coreSection.get("SlippiReplayMonthFolders", "False") === "True";
const replayPath = coreSection.get("SlippiReplayDir", defaultAppSettings.settings.rootSlpPath);
const useMonthlySubfolders = coreSection.get("SlippiReplayMonthFolders", "False") === "True";
const enableJukebox = coreSection.get("SlippiJukeboxEnabled", "True") === "True";

return { useMonthlySubfolders, replayPath, enableJukebox };
Expand Down
4 changes: 2 additions & 2 deletions src/dolphin/install/extractDmg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function extractDmg(filename: string, destination: string): Promise
return files;
}

async function mountDmg(filename: string): Promise<string> {
export async function mountDmg(filename: string): Promise<string> {
return new Promise((resolve, reject) => {
dmg.mount(filename, (err, value) => {
if (err) {
Expand All @@ -29,7 +29,7 @@ async function mountDmg(filename: string): Promise<string> {
});
}

async function unmountDmg(mountPath: string): Promise<void> {
export async function unmountDmg(mountPath: string): Promise<void> {
return new Promise((resolve, reject) => {
dmg.unmount(mountPath, (err) => {
if (err) {
Expand Down
10 changes: 7 additions & 3 deletions src/dolphin/install/fetchLatestVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type DolphinVersionResponse = {
};
};

const log = electronLog.scope("dolphin/checkVersion");
const log = electronLog.scope("dolphin/fetchLatestVersion");
const isDevelopment = process.env.NODE_ENV !== "production";

const httpLink = new HttpLink({ uri: process.env.SLIPPI_GRAPHQL_ENDPOINT, fetch });
Expand Down Expand Up @@ -73,16 +73,20 @@ const handleErrors = (errors: readonly GraphQLError[] | undefined) => {
}
};

// this function is relied by getInstallation in DolphinManager to decide which dolphin (folder) to use
// it isn't the prettiest execution but will suffice since we want to be able to let users play even if
// the stable dolphin updates before the beta dolphin. The backend will interleave the versions from github
// and return the version that is most recently published if includeBeta is true.
export async function fetchLatestVersion(
dolphinType: DolphinLaunchType,
beta = false,
includeBeta = false,
): Promise<DolphinVersionResponse> {
const res = await client.query({
query: getLatestDolphinQuery,
fetchPolicy: "network-only",
variables: {
purpose: dolphinType.toUpperCase(),
includeBeta: beta,
includeBeta: includeBeta,
},
});

Expand Down
Loading

0 comments on commit 0ad65f8

Please sign in to comment.