Rename "unix wine" to "linux wine"

This commit is contained in:
Lncvrt committed 2026-03-24 22:50:09 -07:00
1 parent e7a61872b7
commit 387bd54ce2
5 files changed
+34 -33

No files matched your search

+2 -2
View File
@@ -64,8 +64,8 @@ type GlobalCtxType = {
settings: Store | null settings: Store | null
notificationsAllowed: boolean notificationsAllowed: boolean
sidebarAlwaysShowGames: boolean sidebarAlwaysShowGames: boolean
unixUseWine: boolean linuxUseWine: boolean
unixWineCommand: string linuxWineCommand: string
theme: string theme: string
} }
+7 -7
View File
@@ -31,8 +31,8 @@ export default function Installs () {
setDownloadedVersionsConfig, setDownloadedVersionsConfig,
downloadVersions, downloadVersions,
downloadProgress, downloadProgress,
unixUseWine, linuxUseWine,
unixWineCommand linuxWineCommand
} = useGlobal() } = useGlobal()
const params = useSearchParams() const params = useSearchParams()
@@ -130,7 +130,7 @@ export default function Installs () {
const info = getVersionInfo(v) const info = getVersionInfo(v)
if (!info) return false if (!info) return false
if (platform() == 'linux' && info.wine && !unixUseWine) if (platform() == 'linux' && info.wine && !linuxUseWine)
return false return false
return info.game === id && info.category === Number(key) return info.game === id && info.category === Number(key)
@@ -165,7 +165,7 @@ export default function Installs () {
if ( if (
platform() == 'linux' && platform() == 'linux' &&
info.wine && info.wine &&
!unixUseWine !linuxUseWine
) )
return false return false
return ( return (
@@ -196,7 +196,7 @@ export default function Installs () {
.filter(v => { .filter(v => {
const info = getVersionInfo(v) const info = getVersionInfo(v)
if (!info) return false if (!info) return false
if (platform() == 'linux' && info.wine && !unixUseWine) if (platform() == 'linux' && info.wine && !linuxUseWine)
return false return false
return ( return (
info.game === id && info.game === id &&
@@ -291,9 +291,9 @@ export default function Installs () {
useWine: !!( useWine: !!(
platform() == 'linux' && platform() == 'linux' &&
verInfo.wine && verInfo.wine &&
unixUseWine linuxUseWine
), ),
wineCommand: unixWineCommand wineCommand: linuxWineCommand
}) })
}} }}
onContextMenu={e => { onContextMenu={e => {
+14 -13
View File
@@ -90,8 +90,9 @@ export default function RootLayout ({
useState<boolean>(false) useState<boolean>(false)
const [sidebarAlwaysShowGames, setSidebarAlwaysShowGames] = const [sidebarAlwaysShowGames, setSidebarAlwaysShowGames] =
useState<boolean>(false) useState<boolean>(false)
const [unixUseWine, setUnixUseWine] = useState<boolean>(false) const [linuxUseWine, setLinuxUseWine] = useState<boolean>(false)
const [unixWineCommand, setUnixWineCommand] = useState<string>('wine %path%') const [linuxWineCommand, setLinuxWineCommand] =
useState<string>('wine %path%')
const [theme, setTheme] = useState<string>('dark') const [theme, setTheme] = useState<string>('dark')
function getSpecialVersionsList (game?: number): GameVersion[] { function getSpecialVersionsList (game?: number): GameVersion[] {
@@ -102,7 +103,7 @@ export default function RootLayout ({
v => !Object.keys(downloadedVersionsConfig?.list ?? []).includes(v.id) v => !Object.keys(downloadedVersionsConfig?.list ?? []).includes(v.id)
) )
.filter(v => { .filter(v => {
if (platformName == 'linux' && v.wine && unixUseWine) return false if (platformName == 'linux' && v.wine && linuxUseWine) return false
if (game && v.game != game) return false if (game && v.game != game) return false
if (category != -1 && v.category != category) return false if (category != -1 && v.category != category) return false
@@ -155,7 +156,7 @@ export default function RootLayout ({
} | null { } | null {
if (!downloadedVersionsConfig || !serverVersionList) return null if (!downloadedVersionsConfig || !serverVersionList) return null
const allowWine = platformName !== 'linux' || unixUseWine const allowWine = platformName !== 'linux' || linuxUseWine
const installed = Object.keys(downloadedVersionsConfig.list).filter(v => { const installed = Object.keys(downloadedVersionsConfig.list).filter(v => {
const info = getVersionInfo(v) const info = getVersionInfo(v)
@@ -363,8 +364,8 @@ export default function RootLayout ({
version: client, version: client,
notificationsAllowed: true, notificationsAllowed: true,
sidebarAlwaysShowGames: true, sidebarAlwaysShowGames: true,
unixUseWine: false, linuxUseWine: false,
unixWineCommand: 'wine %path%', linuxWineCommand: 'wine %path%',
theme: 'dark' theme: 'dark'
} }
}) })
@@ -408,12 +409,12 @@ export default function RootLayout ({
) )
if (raw.settings.useWineOnUnixWhenNeeded) if (raw.settings.useWineOnUnixWhenNeeded)
settingsLocal?.set( settingsLocal?.set(
'unixUseWine', 'linuxUseWine',
Boolean(raw.settings.useWineOnUnixWhenNeeded) Boolean(raw.settings.useWineOnUnixWhenNeeded)
) )
if (raw.settings.wineOnUnixCommand) if (raw.settings.wineOnUnixCommand)
settingsLocal?.set( settingsLocal?.set(
'unixWineCommand', 'linuxWineCommand',
String(raw.settings.wineOnUnixCommand) String(raw.settings.wineOnUnixCommand)
) )
if (raw.settings.theme) { if (raw.settings.theme) {
@@ -707,9 +708,9 @@ export default function RootLayout ({
watch<boolean>('sidebarAlwaysShowGames', v => watch<boolean>('sidebarAlwaysShowGames', v =>
setSidebarAlwaysShowGames(v ?? true) setSidebarAlwaysShowGames(v ?? true)
) )
watch<boolean>('unixUseWine', v => setUnixUseWine(v ?? false)) watch<boolean>('linuxUseWine', v => setLinuxUseWine(v ?? false))
watch<string>('unixWineCommand', v => watch<string>('linuxWineCommand', v =>
setUnixWineCommand(v ?? 'wine %path%') setLinuxWineCommand(v ?? 'wine %path%')
) )
return () => { return () => {
@@ -793,8 +794,8 @@ export default function RootLayout ({
settings, settings,
notificationsAllowed, notificationsAllowed,
sidebarAlwaysShowGames, sidebarAlwaysShowGames,
unixUseWine, linuxUseWine,
unixWineCommand, linuxWineCommand,
theme theme
}} }}
> >
+9 -9
View File
@@ -11,8 +11,8 @@ export default function Settings () {
version, version,
notificationsAllowed, notificationsAllowed,
sidebarAlwaysShowGames, sidebarAlwaysShowGames,
unixUseWine, linuxUseWine,
unixWineCommand, linuxWineCommand,
theme theme
} = useGlobal() } = useGlobal()
@@ -40,22 +40,22 @@ export default function Settings () {
title="This setting will make it so when you are on a page like this, the games won't disappear." title="This setting will make it so when you are on a page like this, the games won't disappear."
/> />
<Setting <Setting
label='Use wine when needed to launch games' label='Use wine if needed'
value={unixUseWine} value={linuxUseWine}
onChange={async () => { onChange={async () => {
await settings?.set('unixUseWine', !unixUseWine) await settings?.set('linuxUseWine', !linuxUseWine)
}} }}
className={platform() == 'linux' ? '' : 'hidden'} className={platform() == 'linux' ? '' : 'hidden'}
/> />
<p hidden={!(platform() == 'linux' && unixUseWine)}>Wine Command:</p> <p hidden={!(platform() == 'linux' && linuxUseWine)}>Wine Command:</p>
<input <input
type='text' type='text'
value={unixWineCommand} value={linuxWineCommand}
onChange={async e => { onChange={async e => {
await settings?.set('unixUseWine', e.target.value) await settings?.set('linuxWineCommand', e.target.value)
}} }}
className={`input-field my-1 ${ className={`input-field my-1 ${
platform() == 'linux' && unixUseWine ? '' : 'hidden' platform() == 'linux' && linuxWineCommand ? '' : 'hidden'
}`} }`}
></input> ></input>
<div title='The theme you want the launcher to use.'> <div title='The theme you want the launcher to use.'>
+2 -2
View File
@@ -37,7 +37,7 @@ export default function Sidebar () {
category, category,
setCategory, setCategory,
sidebarAlwaysShowGames, sidebarAlwaysShowGames,
unixUseWine linuxUseWine
} = useGlobal() } = useGlobal()
const pathname = usePathname() const pathname = usePathname()
@@ -137,7 +137,7 @@ export default function Sidebar () {
const info = getVersionInfo(v) const info = getVersionInfo(v)
if (!info) return false if (!info) return false
if (platform() == 'linux' && info.wine && !unixUseWine) if (platform() == 'linux' && info.wine && !linuxUseWine)
return false return false
return info.game === i.id && info.category === Number(key) return info.game === i.id && info.category === Number(key)