Update Subnautica (use latest Wine devel version, disable nvapi workaround, set environment variables)#1197
Update Subnautica (use latest Wine devel version, disable nvapi workaround, set environment variables)#1197Zemogiter wants to merge 7 commits intoPhoenicisOrg:masterfrom
Conversation
|
Ready for review. |
| }) | ||
| .gameOverlay(false); | ||
| .gameOverlay(false) | ||
| .environment('{"DXVK_CONFIG_FILE": "dxvkConfigFile", "STAGING_SHARED_MEMORY": "0", "WINEESYNC": "1"}') |
There was a problem hiding this comment.
This will simply put the string dxvkConfigFile in the environment variable. Even with the right syntax, there is no dxvkConfigFile variable defined. The variable is only present in the lambda function code you pass to .postInstall. This will not work.
There was a problem hiding this comment.
Should I change it to wine.prefixDirectory() + "/drive_c/dxvk.conf"?
There was a problem hiding this comment.
You cannot access wine is .environment since it is not defined. The best would be to modify .environment() function to get a lambda (wine) => {} so that .environment could call that lambda by sending it the wine object and get the string for the environment.
There was a problem hiding this comment.
Like this?
environment(environment) {
this._environment = environment;
lambda(wine) => {};
return this;
}
There was a problem hiding this comment.
Something like this:
environment(environmentFunc) {
this._environment = environmentFunc(this.wine());
return this;
}and you would call it like this
.environtment((wine) => {
//do things to obtain the jsonString
return jsonString;
})There was a problem hiding this comment.
OK now I get this error:
Error: The argument of environment() should be a function !
at <js> environment(Unnamed:139:3777-3845)
at <js> :program(Unnamed:14-45:689-1859)
at org.graalvm.polyglot.Context.eval(Context.java:370)
at org.phoenicis.scripts.engine.implementation.PolyglotScriptEngine.evalAndReturn(PolyglotScriptEngine.java:73)
at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
at
org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.64) - java.lang.ClassCastException: class java.lang.String cannot be cast to class org.graalvm.polyglot.Value (java.lang.String is in module java.base of loader 'bootstrap'; org.graalvm.polyglot.Value is in unnamed module of loader java.net.URLClassLoader @76c548f)
at org.phoenicis.javafx.components.application.skin.ApplicationInformationPanelSkin.lambda$installScript$7(ApplicationInformationPanelSkin.java:235)
at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
[WARNING]
java.lang.ClassCastException: class java.lang.String cannot be cast to class org.graalvm.polyglot.Value (java.lang.String is in module java.base of loader 'bootstrap'; org.graalvm.polyglot.Value is in unnamed module of loader java.net.URLClassLoader @76c548f)
at org.phoenicis.javafx.components.application.skin.ApplicationInformationPanelSkin.lambda$installScript$7 (ApplicationInformationPanelSkin.java:235)
at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval (PhoenicisInteractiveScriptSession.java:35)
at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1 (BackgroundScriptInterpreter.java:45)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
at java.lang.Thread.run (Thread.java:834)
Error: The argument of environment() should be a function !
at <js> environment(Unnamed:139:3777-3845)
at <js> :program(Unnamed:14-45:689-1859)
at org.graalvm.polyglot.Context.eval(Context.java:370)
at org.phoenicis.scripts.engine.implementation.PolyglotScriptEngine.evalAndReturn(PolyglotScriptEngine.java:73)
at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
There was a problem hiding this comment.
What is the argument of environment in your script ?
There was a problem hiding this comment.
@ImperatorS79 '{"DXVK_CONFIG_FILE": "dxvkConfigFile", "STAGING_SHARED_MEMORY": "0", "WINEESYNC": "1"}'
There was a problem hiding this comment.
It should be:
.environment((wine) => {
const dxvkConfigFile = wine.prefixDirectory() + "/drive_c/dxvk.conf";
return '{"DXVK_CONFIG_FILE": "${dxvkConfigFile}", "STAGING_SHARED_MEMORY": "0", "WINEESYNC": "1"}';
})or something like this for the template string.
There was a problem hiding this comment.
It's done but wine.log still shows info: DXGI: NvAPI workaround enabled, reporting AMD GPU
Added a proper variable reading in environment
|
@Zemogiter You should do a PR about the environment modification first. (Because it will be needed to modify each QuickScript + each script using environment) |
I know. |
|
Blocked until #1198 is merged. |
Using proper json format
| .gameOverlay(false); | ||
| .gameOverlay(false) | ||
| .environment((wine) => { | ||
| const dxvkConfigFile = wine.prefixDirectory() + "/drive_c/dxvk.conf"; |
There was a problem hiding this comment.
Issue found: 'dxvkConfigFile' is assigned a value but never used.
|
I'm receiving the same error as in #1119 (comment) |
Description
Tried playing this game today. It crashed with standard "Subnautica.exe stoped working" error. before displaying anything. Tried disabling any mods and QModManager. Still crashes. Reinstalling verbs via winetricks. Still crashes. Changing wine version from 4.0.3 to 5.0-rc3 finally did the trick.
What works
Game installation, starting the game, gameplay itself
What was not tested
Gameplay, will have some time after weekend to see if changes to the script affect the game in any negative wayNothingTest
Ready for review
json-alignandeslintrun according to the documentation.