Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Subnautica (use latest Wine devel version, disable nvapi workaround, set environment variables) #1197

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions Applications/Games/Subnautica/Steam/script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const SteamScript = include("engines.wine.quick_script.steam_script");
const { getLatestStableVersion } = include("engines.wine.engine.versions");

const { getLatestDevelopmentVersion } = include("engines.wine.engine.versions");
const OverrideDLL = include("engines.wine.plugins.override_dll");
const { touch, writeToFile } = include("utils.functions.filesystem.files");
const VirtualDesktop = include("engines.wine.plugins.virtual_desktop");
const Vcrun2013 = include("engines.wine.verbs.vcrun2013");
const Corefonts = include("engines.wine.verbs.corefonts");
Expand All @@ -12,29 +13,32 @@ new SteamScript()
.author("Zemogiter")
.applicationHomepage("https://unknownworlds.com/subnautica/")
.wineDistribution("upstream")
.wineVersion(getLatestStableVersion)
.wineVersion(getLatestDevelopmentVersion)
.wineArchitecture("amd64")
.appId(264710)
.preInstall((wine) => {
const wizard = wine.wizard();

wizard.message(
tr("You can make the game smoother by using this: https://github.com/lutris/lutris/wiki/How-to:-Esync")
);

new Vcrun2013(wine).go();
new Corefonts(wine).go();
new DXVK(wine).go();

new OverrideDLL(wine)
.withMode("disabled", ["nvapi", "nvapi64"])
.go();
new VirtualDesktop(wine).go();
const dxvkConfigFile = wine.prefixDirectory() + "/drive_c/dxvk.conf";
touch(dxvkConfigFile);
writeToFile(dxvkConfigFile, "dxgi.nvapiHack = False");
})
.postInstall((wine) => {
const wizard = wine.wizard();

wizard.message(
tr(
"Due to a potential conflict with Vulkan, shader mods break the game (the executable file works but no window is displayed)."
"Due to a potential conflict with Vulkan, shader mods may break the game (the executable file works but no window is displayed)."
)
);
})
.gameOverlay(false);
.gameOverlay(false)
.environment((wine) => {
const dxvkConfigFile = wine.prefixDirectory() + "/drive_c/dxvk.conf";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


return '{"DXVK_CONFIG_FILE": "${dxvkConfigFile}", "STAGING_SHARED_MEMORY": "0", "WINEESYNC": "1"}';
})