scripts icon indicating copy to clipboard operation
scripts copied to clipboard

Update Space Engineers, pass appId as number, remove faudio and disable NVAPI workarround

Open Zemogiter opened this issue 6 years ago • 28 comments

Description

By using the PPA linked in the script, vanilla Space Engineers is nearly free of audio stutters. Introducing mods changes that for the worse but nothing we can do about that.

What works

Everything

What was not tested

Nothing

Test

  • Operating system (and linux kernel version): Ubuntu 19.04 5.0.0-27-generic
  • Hardware (GPU/CPU): i7-7700K,GTX 1080 TI

Ready for review

  • [x] Script tested as a regular phoenicis user and working (if you have a problem -> create as draft and ask for help).
  • [x] json-align and eslint run according to the documentation.
  • [x] Codacy and travis checked.

Zemogiter avatar Sep 08 '19 12:09 Zemogiter

Blocked until #1137 is merged

Zemogiter avatar Oct 31 '19 17:10 Zemogiter

Blocked until #1138 is fixed.

Zemogiter avatar Nov 03 '19 13:11 Zemogiter

Ready for review.

Zemogiter avatar Nov 20 '19 09:11 Zemogiter

@madoar ~~can't test beause of https://github.com/PhoenicisOrg/phoenicis/issues/2115#issuecomment-558359796~~ UPDATE: @plata suggested mvn install before mvn exec:java and it helped. ~~But now I have this issue #1143 which prevent me from testing. But I know the game works because I've updated Lutris script to work practicly the same as this one.~~ See https://github.com/PhoenicisOrg/scripts/issues/1143#issuecomment-568417453

Zemogiter avatar Nov 26 '19 08:11 Zemogiter

Blocked until https://github.com/PhoenicisOrg/scripts/issues/1148 is fixed

Zemogiter avatar Dec 24 '19 15:12 Zemogiter

OK so after all "blocked by x" or "blocked until x is fixed/merged" comments have been solved, I've copied the version of this script from this repo to a local one. Clicking "install" results in this error:

TypeError: undefined is not a function
	at <js> QuickScript(Unnamed:25:926-972)
	at <js> SteamScript(Unnamed:15:679-685)
	at <js> :program(Unnamed:12:492-508)
	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)

Zemogiter avatar Jan 01 '20 17:01 Zemogiter

Can you locate where exactly this occurs?

madoar avatar Jan 01 '20 17:01 madoar

Where, as-in what line of the script cause the error? Update: terminal log

[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 @328902d5)
    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)

Zemogiter avatar Jan 01 '20 18:01 Zemogiter

You misunderstood me. I want to know where in the script code the error occurs, i.e. which accessed variable is undefined.

madoar avatar Jan 01 '20 19:01 madoar

@madoar I get it now but now I get this error when clicking on "install" button in any script. And everytime the same error shows up in terminal log.

Zemogiter avatar Jan 02 '20 09:01 Zemogiter

@Zemogiter please be sure to really use the latest master of the sofware, i.e. do mvn clean package (or mvn clean install for mvn exec:java).

plata avatar Jan 02 '20 10:01 plata

How to make the link in wizard.message clickable?

Zemogiter avatar Jan 02 '20 17:01 Zemogiter

I think that's not possible. The message step uses a plain text if I remember correctly.

plata avatar Jan 02 '20 19:01 plata

Lutris script have a pulse_latency: true option and I would like to know how to set this up in POL5.

Zemogiter avatar Jan 03 '20 11:01 Zemogiter

See https://github.com/lutris/lutris/blob/ad819ea0b5bde4ffd86e0803d45262341e3e7a64/lutris/game.py#L447

There are two options: Write a new verb or use the existing .environment() of QuickScript.

plata avatar Jan 03 '20 11:01 plata

@plata got it. Went for the second option. I'll see if it removes audio stutter like in Lutris script.

Zemogiter avatar Jan 03 '20 11:01 Zemogiter

After all those commits the game is working and the only audio stutter is at the main menu for about 5 first seconds of the song. However that is present on Windows as well. Ready for review.

Zemogiter avatar Jan 04 '20 08:01 Zemogiter

@madoar would you like to review this (you requested the last changes)?

plata avatar Jan 13 '20 18:01 plata

Blocked until #1198 is merged.

Zemogiter avatar Jan 14 '20 11:01 Zemogiter

I have a problem. Merging #1198 in local repo results in this error when verifying steam installer:

org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.64) - TypeError: invokeMember (writeValue) on JavaObject[org.phoenicis.tools.config.CompatibleConfigFileFormat@3324f53a (org.phoenicis.tools.config.CompatibleConfigFileFormat)] failed due to: UnsupportedTypeException
	at <js> createContainer(Unnamed:359:13215-13271)
	at <js> prefix(Unnamed:79:2538-2603)
	at <js> go(Unnamed:129-131:7060-7201)
	at com.oracle.truffle.polyglot.ObjectProxyHandler.invoke(HostInteropReflect.java:678)
	at com.sun.proxy.$Proxy67.go(Unknown Source)
	at org.phoenicis.javafx.components.application.skin.ApplicationInformationPanelSkin.lambda$installScript$7(ApplicationInformationPanelSkin.java:237)
	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:830)

[WARNING] 
org.graalvm.polyglot.PolyglotException: TypeError: invokeMember (writeValue) on JavaObject[org.phoenicis.tools.config.CompatibleConfigFileFormat@3324f53a (org.phoenicis.tools.config.CompatibleConfigFileFormat)] failed due to: UnsupportedTypeException
    at <js>.createContainer (Unnamed:359)
    at <js>.prefix (Unnamed:79)
    at <js>.go (Unnamed:129)
    at com.oracle.truffle.polyglot.ObjectProxyHandler.invoke (HostInteropReflect.java:678)
    at com.sun.proxy.$Proxy67.go (Unknown Source)
    at org.phoenicis.javafx.components.application.skin.ApplicationInformationPanelSkin.lambda$installScript$7 (ApplicationInformationPanelSkin.java:237)
    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:830)

Zemogiter avatar May 12 '20 08:05 Zemogiter

It works if you do not use the .environment?

plata avatar May 14 '20 16:05 plata

@plata removed .environment from SE script, still crashes at the same point with the same message

Zemogiter avatar May 14 '20 17:05 Zemogiter

Then, how can it be related to #1198?

plata avatar May 14 '20 18:05 plata

Then I guess it's not.

Zemogiter avatar May 14 '20 18:05 Zemogiter

OK so I've removed any changes to QuickScript and SteamScript regarding environment() and pasted the changes from this PR to the local repo execpt the aforementioned environment(). Once I get to the step when the Steam installation should start, it dosen't and I get no error in terminal. It's stuck at "Please follow the steps of Steam installation...." message.

Zemogiter avatar Jun 22 '20 09:06 Zemogiter

Other Steam app installations work?

plata avatar Jun 22 '20 16:06 plata

Just tried the Space Colony steam script and the steam installer launched just fine. UPDATE: The script went though .preInstall() fine but upon launching steam again it crashed with this error:

[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.64) - /home/jonasz/.Phoenicis/containers/wineprefix/Space Colony/drive_c/Program Files/Steam/Steam.exe (no such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:212)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:154)
	at org.phoenicis.tools.win32.ExeAnalyser.isArchitecture(ExeAnalyser.java:61)
	at org.phoenicis.tools.win32.ExeAnalyser.is64Bits(ExeAnalyser.java:46)
	at <js> run(Unnamed:407:15350-15396)
	at <js> run(Unnamed:172:5961-6051)
	at <js> runInsidePrefix(Unnamed:139:4721-4822)
	at <js> go(Unnamed:174:8729-8833)
	at com.oracle.truffle.polyglot.ObjectProxyHandler.invoke(HostInteropReflect.java:678)
	at com.sun.proxy.$Proxy68.go(Unknown Source)
	at org.phoenicis.javafx.components.application.skin.ApplicationInformationPanelSkin.lambda$installScript$7(ApplicationInformationPanelSkin.java:237)
	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:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by host exception: java.io.FileNotFoundException: /home/jonasz/.Phoenicis/containers/wineprefix/Space Colony/drive_c/Program Files/Steam/Steam.exe (no such file or directory)

The issue is because its steam.exe not Steam.exe

Zemogiter avatar Jun 24 '20 12:06 Zemogiter

If the executable has been renamed, it must be changed in https://github.com/PhoenicisOrg/scripts/blob/dc0dd769a70e00c1d42c23545a282a27d8b8d5a2/Engines/Wine/QuickScript/Steam%20Script/script.js#L17

plata avatar Jun 24 '20 17:06 plata