Skip to content

Commit 24d3da3

Browse files
committed
[UX] Add Proton-Sarek to wine manager
1 parent 230aa02 commit 24d3da3

8 files changed

Lines changed: 52 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ Heroic would not be possible without the work done in many other projects:
323323
- Nile: https://github.com/imLinguin/nile
324324
- Comet: https://github.com/imLinguin/comet
325325
- GE-Proton: https://github.com/GloriousEggroll/proton-ge-custom
326+
- Proton-Sarek: https://github.com/pythonlover02/Proton-Sarek
326327
- umu-launcher: https://github.com/Open-Wine-Components/umu-launcher
327328
- DXVK: https://github.com/doitsujin/dxvk
328329
- VKD3D: https://github.com/HansKristian-Work/vkd3d-proton

public/locales/en/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,7 @@
10241024
},
10251025
"wineExplanation": {
10261026
"proton-ge": "GE-Proton is a Proton variant created by Glorious Eggroll. It is meant to be used along with the umu launcher (default in Heroic).",
1027+
"proton-sarek": "Proton-Sarek is a Proton variant created by pythonlover02. It is meant to be used with GPUs that do not support Vulkan 1.3+.",
10271028
"wine-ge": "Wine-GE-Proton is a Wine variant created by Glorious Eggroll. It has been deprecated in favor of GE-Proton with the umu launcher."
10281029
},
10291030
"winetricks": {

src/backend/tools/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ function getDxvkUrl(): string {
815815
}
816816
if (any_gpu_supports_version([1, 1, 0])) {
817817
logInfo(
818-
'The GPU(s) in this system only support Vulkan 1.1/1.2, falling back to DXVK 1.10.3',
818+
'The GPU(s) in this system only support Vulkan 1.1/1.2, falling back to DXVK 1.10.3 for Wine, or use Proton-Sarek.',
819819
LogPrefix.ToolInstaller
820820
)
821821
return 'https://api.github.com/repos/doitsujin/dxvk/releases/tags/v1.10.3'
@@ -851,7 +851,7 @@ function getVkd3dUrl(): string {
851851
}
852852
if (any_gpu_supports_version([1, 1, 0])) {
853853
logInfo(
854-
'The GPU(s) in this system only support Vulkan 1.1/1.2, falling back to VKD3D 2.6',
854+
'The GPU(s) in this system only support Vulkan 1.1/1.2, falling back to VKD3D 2.6 for Wine, or use Proton-Sarek.',
855855
LogPrefix.ToolInstaller
856856
)
857857
return 'https://api.github.com/repos/Heroic-Games-Launcher/vkd3d-proton/releases/tags/v2.6'

src/backend/wine/manager/downloader/constants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ export const WINESTAGINGMACOS_URL =
2525
/// Url to Game Porting Toolkit from Gcenx github release page
2626
export const GPTK_URL =
2727
'https://api.github.com/repos/Gcenx/game-porting-toolkit/releases'
28+
29+
/// Url for Proton Sarek github release page
30+
export const PROTON_SAREK_URL =
31+
'https://api.github.com/repos/pythonlover02/Proton-Sarek/releases'

src/backend/wine/manager/downloader/main.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import {
1616
WINELUTRIS_URL,
1717
WINECROSSOVER_URL,
1818
WINESTAGINGMACOS_URL,
19-
GPTK_URL
19+
GPTK_URL,
20+
PROTON_SAREK_URL
2021
} from './constants'
2122
import { VersionInfo, Repositorys, WineVersionInfo } from 'common/types'
2223
import {
@@ -150,6 +151,21 @@ async function getAvailableVersions({
150151
})
151152
break
152153
}
154+
case Repositorys.PROTONSAREK: {
155+
await fetchReleases({
156+
url: PROTON_SAREK_URL,
157+
type: 'Proton-Sarek',
158+
count: count
159+
})
160+
.then((fetchedReleases: VersionInfo[]) => {
161+
console.log(fetchedReleases)
162+
releases.push(...fetchedReleases)
163+
})
164+
.catch((error: Error) => {
165+
logError(error, LogPrefix.WineDownloader)
166+
})
167+
break
168+
}
153169
default: {
154170
logWarning(
155171
`Unknown and not supported repository key passed! Skip fetch for ${repo}`,

src/backend/wine/manager/utils.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ function getLatestLocalVersions(): Record<string, string | undefined> {
4242
?.date,
4343
latestGEProton: localWines.find(
4444
(wine) => wine.version === 'GE-Proton-latest'
45+
)?.date,
46+
latestProtonSarek: localWines.find(
47+
(wine) => wine.version === 'Proton-Sarek-latest'
4548
)?.date
4649
}
4750
}
@@ -104,6 +107,14 @@ export function updateWineListsIfOutdated(releasesData: ReleasesInfo) {
104107
)
105108
)
106109
repositoriesToFetch.push(Repositorys.WINEGE)
110+
111+
if (
112+
localVersionIsOlder(
113+
latestLocalVersions.latestProtonSarek,
114+
releasesData['proton-sarek']
115+
)
116+
)
117+
repositoriesToFetch.push(Repositorys.PROTONSAREK)
107118
}
108119

109120
if (isMac) {
@@ -155,7 +166,7 @@ async function updateWineVersionInfos(
155166
Repositorys.WINESTAGINGMACOS,
156167
Repositorys.GPTK
157168
]
158-
: [Repositorys.WINEGE, Repositorys.PROTONGE]
169+
: [Repositorys.WINEGE, Repositorys.PROTONGE, Repositorys.PROTONSAREK]
159170
}
160171

161172
await getAvailableVersions({

src/common/types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,7 @@ export type Type =
739739
| 'Wine-GE'
740740
| 'GE-Proton'
741741
| 'Proton'
742+
| 'Proton-Sarek'
742743
| 'Wine-Lutris'
743744
| 'Wine-Kron4ek'
744745
| 'Wine-Crossover'
@@ -775,7 +776,8 @@ export enum Repositorys {
775776
WINELUTRIS,
776777
WINECROSSOVER,
777778
WINESTAGINGMACOS,
778-
GPTK
779+
GPTK,
780+
PROTONSAREK
779781
}
780782

781783
export type WineManagerStatus =
@@ -850,6 +852,7 @@ export type ReleasesInfo = Record<
850852
| 'game-porting-toolkit'
851853
| 'wine-staging'
852854
| 'wine-crossover'
855+
| 'proton-sarek'
853856
| 'dxvk'
854857
| 'dxvk-mac'
855858
| 'dxmt'

src/frontend/screens/WineManager/index.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export default function WineManager(): JSX.Element | null {
9191
WineManagerUISettings[]
9292
>([
9393
protonge,
94+
{ type: 'Proton-Sarek', value: 'protonsarek', enabled: isLinux },
9495
{ type: 'Wine-GE', value: 'winege', enabled: isLinux },
9596
gamePortingToolkit,
9697
wineCrossover,
@@ -160,6 +161,16 @@ export default function WineManager(): JSX.Element | null {
160161
)}
161162
</div>
162163
)
164+
case 'Proton-Sarek':
165+
return (
166+
<div className="infoBox">
167+
<FontAwesomeIcon icon={faCheck} color={'green'} />
168+
{t(
169+
'wineExplanation.proton-sarek',
170+
'Proton-Sarek is a Proton variant created by pythonlover02. It is meant to be used with GPUs that do not support Vulkan 1.3+.'
171+
)}
172+
</div>
173+
)
163174
default:
164175
return <></>
165176
}

0 commit comments

Comments
 (0)