fix(macos): resolve osu updater loop and patcher wine compatibility

- Remove host Apple Braille font entries from Wine prefix registry to prevent cold-start GDI+ AccessViolationException.
- Purge .require_update, help.txt, and _pending prior to osu! launch so the game launches directly with -devserver ez-pp.farm instead of entering the updater.
- Reset _UpdateFailCount in osu!.cfg and ensure execute.bat points to ez-pp.farm.
- Update ensure_patcher_compatibility to patch osu!.patcher.exe and embedded ManagedInjector.Lib for .NET 4.0 compatibility under Wine.
- Include theme editor, cursor, and download button refinements on themes-v2 branch.
This commit is contained in:
HorizonCode committed 2026-11-01 10:52:39 +01:00
1 parent a2b03d3014
commit e52399911c
19 files changed
+1362 -265

No files matched your search

@@ -9,23 +9,60 @@
subtext?: string;
disabled?: boolean;
iconSet?: ThemeIconSet;
class?: string;
onClick?: () => void;
} = $props();
const radius = 16;
let buttonHeight = $state(48);
let buttonWidth = $state(200);
const baseDim = $derived(
Math.min(buttonHeight > 0 ? buttonHeight : 48, buttonWidth > 0 ? buttonWidth : 200)
);
// Circle scales with button dimensions: ~70% of base dimension (no artificial upper clamp)
const circleSize = $derived(Math.max(16, Math.round(baseDim * 0.7)));
// Icon scales with circle size: ~44% of circle size
const iconSize = $derived(Math.max(10, Math.round(circleSize * 0.44)));
// Progress font size scales with circle size
const percentFontSize = $derived(Math.max(8, Math.round(circleSize * 0.32)));
// Optical horizontal nudge for the play triangle
const iconNudge = $derived(Math.max(1, Math.round(circleSize * 0.04)));
// Responsive font scaling for label and subtext
const availableTextWidth = $derived(
Math.max(50, (buttonWidth > 0 ? buttonWidth : 200) - baseDim)
);
const textChars = $derived(Math.max(6, (prop.text || 'Launch').length));
const maxFontFromWidth = $derived((availableTextWidth * 0.85) / textChars);
const maxFontFromHeight = $derived(baseDim * (prop.subtext ? 0.24 : 0.32));
const labelFontSize = $derived(
Math.max(10, Math.round(Math.min(maxFontFromHeight, maxFontFromWidth)))
);
const subtextFontSize = $derived(Math.max(8, Math.round(labelFontSize * 0.72)));
const radius = 16.5;
const circumference = 2 * Math.PI * radius;
const strokeDashoffset = $derived(circumference - (prop.progress / 100) * circumference);
const strokeDashoffset = $derived(
circumference - (Math.max(0, Math.min(100, prop.progress)) / 100) * circumference
);
</script>
<button
class="group flex items-center h-12 rounded-full bg-primary disabled:bg-primary/70 shadow-lg shadow-primary/25 transition-all not-disabled:hover:shadow-primary/40 not-disabled:hover:brightness-110 not-disabled:active:scale-[0.98] cursor-pointer w-fit"
bind:clientHeight={buttonHeight}
bind:clientWidth={buttonWidth}
class="group flex items-center rounded-full bg-primary disabled:bg-primary/70 shadow-lg shadow-primary/25 transition-all not-disabled:hover:shadow-primary/40 not-disabled:hover:brightness-110 not-disabled:active:scale-[0.98] cursor-pointer {prop.class ??
'h-12 w-fit'}"
disabled={prop.disabled}
onclick={prop.onClick}
>
<div class="relative size-12 shrink-0 flex items-center justify-center">
<div class="relative h-full aspect-square shrink-0 flex items-center justify-center">
{#if prop.downloading}
{#if prop.progress === -1}
<svg class="absolute inset-0 animate-spin" viewBox="0 0 48 48">
<svg
class="absolute inset-0 h-full w-full animate-spin pointer-events-none"
viewBox="0 0 48 48"
>
<circle class="stroke-black/10" cx="24" cy="24" r={radius} fill="none" stroke-width="3" />
<circle
class="stroke-pink-950"
@@ -40,7 +77,10 @@
/>
</svg>
{:else}
<svg class="absolute inset-0 -rotate-90" viewBox="0 0 48 48">
<svg
class="absolute inset-0 h-full w-full -rotate-90 pointer-events-none"
viewBox="0 0 48 48"
>
<circle
cx="24"
cy="24"
@@ -64,35 +104,56 @@
</svg>
{/if}
{/if}
<div class="size-9 rounded-full bg-black/30 flex items-center justify-center relative z-10">
<div
class="aspect-square rounded-full bg-black/30 flex items-center justify-center relative z-10 max-h-[72%] max-w-[72%]"
style="width: {circleSize}px; height: {circleSize}px;"
>
{#if prop.downloading}
{#if prop.progress === -1}
<ThemeIcon
name="ellipsis"
set={prop.iconSet ?? DEFAULT_THEME_ICON_SET}
class="size-4 text-primary-foreground fill-current animate-pulse"
size={iconSize}
class="text-primary-foreground fill-current animate-pulse max-w-[50%] max-h-[50%]"
/>
{:else}
<span class="text-[10px] font-bold text-primary-foreground">
{prop.progress.toFixed()}
<span
class="font-bold text-primary-foreground leading-none"
style="font-size: {percentFontSize}px;"
>
{prop.progress.toFixed()}%
</span>
{/if}
{:else}
<ThemeIcon
name="launch"
set={prop.iconSet ?? DEFAULT_THEME_ICON_SET}
class="size-4 text-primary-foreground fill-current ml-0.5"
size={iconSize}
class="text-primary-foreground fill-current max-w-[50%] max-h-[50%]"
style="margin-left: {iconNudge}px;"
/>
{/if}
</div>
</div>
<div class="pr-6 pl-1 text-center w-52">
<p class="text-sm font-bold text-primary-foreground leading-tight">
<div
class="text-center flex-1 min-w-0 max-w-full {prop.class ? '' : 'w-48'}"
style="padding-right: {Math.max(8, Math.round(baseDim * 0.25))}px; padding-left: {Math.max(
4,
Math.round(baseDim * 0.08)
)}px;"
>
<p
class="font-bold text-primary-foreground leading-tight truncate"
style="font-size: {labelFontSize}px;"
>
{prop.text}
</p>
{#if prop.subtext}
<p class="text-[10px] text-primary-foreground/70 leading-tight">
<p
class="text-primary-foreground/70 leading-tight truncate"
style="font-size: {subtextFontSize}px;"
>
{prop.subtext}
</p>
{/if}