feat: add linux support with osu-winello

This commit is contained in:
2025-07-12 22:56:15 +02:00
parent 5aec2d8245
commit 1a563e64d5
9 changed files with 117 additions and 24 deletions

View File

@@ -6,6 +6,8 @@ import type { Release } from './types';
export const currentView = writable<Component>(Loading);
export const platform = writable<string>("");
export const launcherVersion = writable<string>('');
export const newVersion = writable<Release | undefined>(undefined);

View File

@@ -116,3 +116,7 @@ export const exit = async () => await invoke('exit');
export const getPlatform = async () => await invoke<string>('get_platform');
export const isOsuCorrupted = async (folder: string) =>
await invoke<boolean>('check_for_corruption', { folder });
export const hasWMCTRL = async () =>
await invoke<boolean>('has_wmctrl');
export const hasOsuWinello = async () =>
await invoke<boolean>('has_osuwinello');

View File

@@ -14,6 +14,7 @@
newVersion,
osuBuild,
osuStream,
platform,
presenceLoading,
serverConnectionFails,
serverPing,
@@ -87,6 +88,8 @@
getSkin,
getSkinsCount,
getVersion,
hasOsuWinello,
hasWMCTRL,
isOsuCorrupted,
isOsuRunning,
isValidOsuFolder,
@@ -184,6 +187,23 @@
return;
}
if($platform === "linux"){
if(!(await hasWMCTRL())){
toast.error('Hmmm...', {
description: 'wmctrl seems to be missing, please install via AUR.',
});
launching.set(false);
return;
}
if(!(await hasOsuWinello())){
toast.error('Hmmm...', {
description: 'osu-winello seems to be missing, please install it.',
});
launching.set(false);
return;
}
}
try {
launchInfo = 'Looking for EZPPLauncher File updates...';
const updateResult = await getEZPPLauncherUpdateFiles(osuPath);
@@ -1028,11 +1048,12 @@
>
<div class="flex flex-col">
<Label class="text-sm" for="setting-custom-cursor">Patching</Label>
<div class="text-muted-foreground text-xs">Shows misses in Relax and Autopilot</div>
<div class="text-muted-foreground text-xs">Shows misses in Relax and Autopilot {#if $platform !== "windows"}<span class="text-red-500 bg-red-800/20 border border-red-600/20 p-0.5 mx-1 px-2 rounded-lg">currently only on windows!</span> {/if}</div>
</div>
<Checkbox
id="setting-custom-cursor"
checked={$patch}
checked={$platform === "windows" ? $patch : false}
disabled={$platform !== "windows"}
onCheckedChange={async (e) => {
patch.set(e);
$userSettings.save();

View File

@@ -9,6 +9,7 @@
discordPresence,
firstStartup,
launcherVersion,
platform,
presenceLoading,
setupValues,
} from '@/global';
@@ -90,7 +91,8 @@
disableReload();
setupValues();
launcherVersion.set(await getLauncherVersion());
if ((await getPlatform()) !== 'windows') unsupported_platform = true;
platform.set(await getPlatform());
if ($platform !== "windows" && $platform !== "linux") unsupported_platform = true;
const isFirstStartup = await $userSettings.init();
$userAuth.init();