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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
453b16f
feat: add betaNetplay and betaPlayback settings
NikhilNarayana Sep 28, 2023
48ad2e8
feat: dolphin release channel option for netplay
NikhilNarayana Sep 28, 2023
2e8a5be
feat: disable buttons when changing channels
NikhilNarayana Sep 28, 2023
a869881
make import form windows only
NikhilNarayana Sep 28, 2023
87ce461
update to isResetType
NikhilNarayana Sep 28, 2023
e02c2ac
put beta dolphin in a separate directory
NikhilNarayana Sep 28, 2023
acf809e
actually hook up the beta state to the gql query
NikhilNarayana Sep 28, 2023
1fb5cab
fix tests
NikhilNarayana Sep 28, 2023
050071a
handle mainline config values
NikhilNarayana Sep 28, 2023
7c42fef
handled interleaved dolphin versions from the backend
NikhilNarayana Sep 28, 2023
134e516
fix syncing settings when import dolphin config
NikhilNarayana Sep 28, 2023
a7d0adc
add promote to stable flag and handle more cases
NikhilNarayana Sep 28, 2023
7fe3bc7
add dolphin repo to newsFeed
NikhilNarayana Sep 28, 2023
0b07048
try catch fetchLatestVersion
NikhilNarayana Sep 28, 2023
d8b47fc
set{Netplay,Playback}BetaDolphin -> setUse{Netplay,Playback}Beta
NikhilNarayana Sep 28, 2023
ecf7b3c
remove beta folder and move stable folder on promotion
NikhilNarayana Sep 28, 2023
c6595eb
try catch calls in case of new install
NikhilNarayana Sep 28, 2023
658777d
separate out installation methods
NikhilNarayana Sep 29, 2023
f0f3944
revert some unnecessary changes
NikhilNarayana Sep 29, 2023
c9f2a68
fix import
NikhilNarayana Sep 29, 2023
5b53c07
clean up diff
NikhilNarayana Sep 29, 2023
573db83
separate functions for installing on macOS
NikhilNarayana Sep 30, 2023
22d563c
attempt to fix install on macOS
NikhilNarayana Sep 30, 2023
8ad3a0b
update comment
NikhilNarayana Sep 30, 2023
fabc5a7
move ternary out
NikhilNarayana Sep 30, 2023
893f831
update mainline linux user folder names
NikhilNarayana Sep 30, 2023
724a0a0
don't copy *-mac.zip if not release
NikhilNarayana Sep 30, 2023
8174a78
don't deref macOS
NikhilNarayana Sep 30, 2023
125fcb3
try overwriting
NikhilNarayana Sep 30, 2023
93d5978
deref but also filter
NikhilNarayana Sep 30, 2023
0fe216a
adjust filter check
NikhilNarayana Sep 30, 2023
8af4350
refactor: move find user json code into DolphinInstallation
NikhilNarayana Oct 3, 2023
4857c59
fix: move old user folder on promotion
NikhilNarayana Oct 3, 2023
eebb98b
update netplay appimage prefix
NikhilNarayana Oct 4, 2023
ba47103
pass in a filter for ishiiruka's install
NikhilNarayana Oct 4, 2023
bf0cfe7
try deref = true on ishii
NikhilNarayana Oct 4, 2023
5a5d6ec
fix up macOS install
NikhilNarayana Oct 7, 2023
83db184
add mutex around _set in settingsManager
NikhilNarayana Oct 7, 2023
b6e240c
undo changes in extractDmg
NikhilNarayana Oct 7, 2023
5640134
clean up flag updates in the manager instead
NikhilNarayana Oct 7, 2023
bd3d2b4
use semver-regex
NikhilNarayana Oct 7, 2023
45a43f7
make constructor parameters readonly and clean up interface
NikhilNarayana Oct 7, 2023
fa1830f
handle betaAvailable and promoteToStable
NikhilNarayana Oct 7, 2023
1b8da95
undo type change
NikhilNarayana Oct 7, 2023
a34b169
one more readonly
NikhilNarayana Oct 7, 2023
c9125d6
simplify settings
NikhilNarayana Oct 7, 2023
d6d3455
add semver-regex explicitly
NikhilNarayana Oct 7, 2023
a0162d5
don't just lowercase the enum value
NikhilNarayana Oct 7, 2023
b432caf
use the existing semver-regex package
NikhilNarayana Oct 7, 2023
438d2a9
key beta flags by dolphin type
NikhilNarayana Oct 7, 2023
bf4b4e2
move findDolphinExecutable into installation
NikhilNarayana Oct 9, 2023
93f94c7
fix fetching install path for linux
NikhilNarayana Oct 10, 2023
774d476
add extra info about OS requirements for mainline
NikhilNarayana Oct 10, 2023
471b9b0
move radio button behind guard
NikhilNarayana Oct 10, 2023
609bd7f
drop guard
NikhilNarayana Oct 10, 2023
96ff874
persist promoteToStable
NikhilNarayana Oct 14, 2023
aceca45
move promoteToStable flag back to settingsManager
NikhilNarayana Oct 14, 2023
25d9bcb
handle promotion locally
NikhilNarayana Oct 16, 2023
ea9a2fb
update log scopes
NikhilNarayana Oct 16, 2023
ee2fdf8
minor wording change
NikhilNarayana Oct 16, 2023
e9e98e9
fix setting promoted flag and some clean up
NikhilNarayana Oct 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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