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 Space Engineers, pass appId as number, remove faudio and disable NVAPI workarround #1119

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

Zemogiter
Copy link
Contributor

@Zemogiter Zemogiter commented Sep 8, 2019

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

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

@plata plata changed the title Update Space Engineers, parsing appId as a number and removed faudio Update Space Engineers, pass appId as number and remove faudio Sep 16, 2019
Using more standard const names and redid the faudio message to fit more scenarios.
@Zemogiter
Copy link
Contributor Author

Blocked until #1137 is merged

Added a DXVK config file to disable NVAPI workarround for extra performance with mods.
@Zemogiter Zemogiter changed the title Update Space Engineers, pass appId as number and remove faudio Update Space Engineers, pass appId as number, remove faudio and disable NVAPI workarround Nov 1, 2019
@Zemogiter
Copy link
Contributor Author

Blocked until #1138 is fixed.

@Zemogiter
Copy link
Contributor Author

Ready for review.

Copy link
Collaborator

@madoar madoar left a comment

Choose a reason for hiding this comment

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

@Zemogiter the script is tested?

Applications/Games/Space Engineers/Steam/script.js Outdated Show resolved Hide resolved
@madoar madoar added the requires testing This Pull Request requires by a user that actually owns the software label Nov 25, 2019
@Zemogiter
Copy link
Contributor Author

Zemogiter commented Nov 26, 2019

@madoar can't test beause of PhoenicisOrg/phoenicis#2115 (comment)
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 #1143 (comment)

@Zemogiter
Copy link
Contributor Author

Blocked until #1148 is fixed

Changed the 1st message, updated wine version.
Part of disabling the nvapi workaround.
@Zemogiter
Copy link
Contributor Author

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)

@madoar
Copy link
Collaborator

madoar commented Jan 1, 2020

Can you locate where exactly this occurs?

@Zemogiter
Copy link
Contributor Author

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.

@plata
Copy link
Collaborator

plata commented Jan 13, 2020

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

@Zemogiter
Copy link
Contributor Author

Blocked until #1198 is merged.

Trailing spaces removal
DXVK documentation uses `=` characters not `:`
codacy fix
Using proper json format
})
.executable("Steam.exe", ["-silent", "-applaunch", "244850", "-no-cef-sandbox", "-skipintro"])
.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.

@Zemogiter
Copy link
Contributor Author

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)

@plata
Copy link
Collaborator

plata commented May 14, 2020

It works if you do not use the .environment?

@Zemogiter
Copy link
Contributor Author

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

@plata
Copy link
Collaborator

plata commented May 14, 2020

Then, how can it be related to #1198?

@Zemogiter
Copy link
Contributor Author

Then I guess it's not.

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Jun 22, 2020

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.

@plata
Copy link
Collaborator

plata commented Jun 22, 2020

Other Steam app installations work?

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Jun 24, 2020

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

@plata
Copy link
Collaborator

plata commented Jun 24, 2020

If the executable has been renamed, it must be changed in

this._executable = "Steam.exe";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires testing This Pull Request requires by a user that actually owns the software
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants