Describe the bug
We have some problems with how we handle default wine prefixes:
- during installation, when a user clicks the
Use default wine settings option, it makes the game use the default wine prefix which is /Users/arielj/Games/Heroic/Prefixes/default
- if the user does NOT click the
Use default wine settings option, the game uses a prefix like /Users/arielj/Games/Heroic/Prefixes/default/observer_
This automatically breaks things, because the default prefix is a folder that contains other prefixes.
We also have some settings that are not super clear, like the WinePrefix option in Settings > Game Defaults. It should be more clear that that path will be the same for other games when checking that option in the install dialog and what that means.
Finally, in a new clean install of heroic, we have these settings in the config.json:
"defaultWinePrefix": "/Users/arielj/Games/Heroic/Prefixes/default",
"winePrefix": "/Users/arielj/Games/Heroic/Prefixes/default",
the first one is the folder where wine prefixes should go
the second one is the prefix path used with the Use default wine settings option
but from the keys it's impossible to know they are supposed to be different types of paths
Add logs
Steps to reproduce
- With a clean heroic install
- Open the install dialog of a game
- the prefix path is
.../default/game title
- install it
- open another install dialog
- check the
Use default wine settings option
- install the game
- look at the game's settings and see the prefix path is
.../default
now that game will fail to start, the prefix going to be a problem
Expected behavior
So I'm suggesting some changes:
- we have to differentiate the default prefixes dir (folder that holds prefixes) from the default prefix dir (the prefix path used by default). We do that in the constants file https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/main/src/backend/constants.ts#L55 but that distinction gets lost eventually in the code and in setting keys.
- the
Set Folder for new Wine Prefixes in the general settings can set a defaultWinePrefixesDir configuration instead of the defaultWinePrefix configuration for example. The setting name is confusing cause it's meant to be a directory to hold prefixes and not one prefix.
- we can rename the
WinePrefix Folder setting in Settings > Game Defaults to be Shared Wine Prefix (maybe even move it into Settings > General settings?)
- we can rename the
Use Default Wine Settings option in the install dialog as Use Shared Wine and Prefix (Advanced) which would set sharedWinePrefixPath. We can also add an (i) icon to show the wine version and the prefix this will set
- the suggested prefix path in the install dialog should be
defaultWinePrefixesDir joined with the game's title, to not have that /default in the middle of the path
- we can rename
default with shared for the default shared wine prefix: instead of .../Prefixes/default we can call it .../Prefixes/shared
Screenshots
No response
Heroic Version
Latest Stable
System Information
Linux and Mac
Additional information
No response
Describe the bug
We have some problems with how we handle default wine prefixes:
Use default wine settingsoption, it makes the game use the default wine prefix which is/Users/arielj/Games/Heroic/Prefixes/defaultUse default wine settingsoption, the game uses a prefix like/Users/arielj/Games/Heroic/Prefixes/default/observer_This automatically breaks things, because the
defaultprefix is a folder that contains other prefixes.We also have some settings that are not super clear, like the
WinePrefixoption in Settings > Game Defaults. It should be more clear that that path will be the same for other games when checking that option in the install dialog and what that means.Finally, in a new clean install of heroic, we have these settings in the config.json:
the first one is the folder where wine prefixes should go
the second one is the prefix path used with the
Use default wine settingsoptionbut from the keys it's impossible to know they are supposed to be different types of paths
Add logs
Steps to reproduce
.../default/game titleUse default wine settingsoption.../defaultnow that game will fail to start, the prefix going to be a problem
Expected behavior
So I'm suggesting some changes:
Set Folder for new Wine Prefixesin the general settings can set adefaultWinePrefixesDirconfiguration instead of thedefaultWinePrefixconfiguration for example. The setting name is confusing cause it's meant to be a directory to hold prefixes and not one prefix.WinePrefix Foldersetting in Settings > Game Defaults to beShared Wine Prefix(maybe even move it into Settings > General settings?)Use Default Wine Settingsoption in the install dialog asUse Shared Wine and Prefix (Advanced)which would setsharedWinePrefixPath. We can also add an(i)icon to show the wine version and the prefix this will setdefaultWinePrefixesDirjoined with the game's title, to not have that/defaultin the middle of the pathdefaultwithsharedfor the default shared wine prefix: instead of.../Prefixes/defaultwe can call it.../Prefixes/sharedScreenshots
No response
Heroic Version
Latest Stable
System Information
Linux and Mac
Additional information
No response