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

Need help running the program on Steam Deck #129

Open
Aepoh opened this issue Jul 14, 2024 · 8 comments
Open

Need help running the program on Steam Deck #129

Aepoh opened this issue Jul 14, 2024 · 8 comments

Comments

@Aepoh
Copy link

Aepoh commented Jul 14, 2024

Trying to run the program on Steam Deck throws a missing java.xml.bind error similar to other issues. The program is very out of date, relying on old versions of Java to operate that are not easily installed on a Steam Deck. It's a problem because of how necessary it is to the modern FTL experience, due to how the program speeds up crew skill farming.

@Aepoh
Copy link
Author

Aepoh commented Jul 15, 2024

I figured out how to get it working by using SDKman to install a version of Java 8 and then dragging the .command file onto a Konsole window.
https://sdkman.io/

I still need to figure out a way to get the program to run from game mode. Not sure how to do that since any other way of trying to run the program tells me that it can't find Java.

@Malanius
Copy link

What version of Java is Steam Deck running by default?

Some work has been done to run it on Java 11 in #115, but that might also be outdated, you can check at least.

Honestly, I'm not even sure if the project is still alive, @Vhati has been quiet for a while.

@Niels-NTG
Copy link

Tip: when you get it running, you might want to use this fork by @reseto instead, which should work with the latest version of the game https://github.com/reseto/ftl-profile-editor/, but it still is compiled for Java 7.

@Aepoh
Copy link
Author

Aepoh commented Jul 15, 2024

What version of Java is Steam Deck running by default?

Some work has been done to run it on Java 11 in #115, but that might also be outdated, you can check at least.

Honestly, I'm not even sure if the project is still alive, @Vhati has been quiet for a while.

There is no default. Steam Deck doesn't come with Java, you have to install it yourself or ape it from Minecraft or something.

A version of SlipStream that the Hyperspace mod tutorial included comes with its own prepacked java in a jre folder. What I did was use SDKman to install Java 8fx (Zulu repo) and now java -jar FTLProfileeditor.jar works, and so does dragging it onto the konsole window. I also replaced the .command script with the one that Slipstream has and replaced all instances of "x-terminal" in the script with "konsole" (and also changed the java -jar arg to point to profileeditor instead of slipstream) and now it works as a proper double click executable. I also took the jre folder from .sdkman/candidates/java8 and put it in the same folder as ftlprofileeditor.

It will even work in Gamemode when added to steam but due to some rendering error it just shows up as a big gray box on my screen. The UI is still interact-able but everything is invisible.

@Aepoh
Copy link
Author

Aepoh commented Jul 15, 2024

Tip: when you get it running, you might want to use this fork by @reseto instead, which should work with the latest version of the game https://github.com/reseto/ftl-profile-editor/, but it still is compiled for Java 7.

Honestly that might be what I'm already using. What I have I downloaded off of the subset forums. I'll still try the other one you linked and see if it fixes my rendering error issue.

Edit: I tried going there but I can't figure out how to download that in a way that I can actually use it. There are no releases and downloading it as a zip doesn't include a jar file. The compiled binaries link offered just links to Vhati's FTLpe

@Aepoh
Copy link
Author

Aepoh commented Jul 15, 2024

I wonder if the Hyperspace dev would be interested in working on a better and more modern profile editor. FTL really needs it.

@Vhati
Copy link
Owner

Vhati commented Nov 29, 2024

Hey all. I am alive. Just... away from software dev. Treading water. Burnt out and dealing with chronic family health issues. Account management stuff brought me to GitHub today, and I happened to click this notification. Thank you for caring about my work.

Sorry I know nothing of Steam Deck. Look for anything interesting in "ftl-editor-log.txt" in the working directory java ran from (presumably the editor's dir). Graphical glitching could mean something fundamental about Java swing GUIs not liking the environment. Or something strange occurred while the editor located and read FTL's resource files, from which it pulls icons. If a fix were possible, it'd likely require code changes.

From there, were I in your shoes, I'd write a hello world swing GUI just to prove it's possible. A main class that creates and shows a JFrame. Compile and run the bare class itself, without a jar wrapper. (JDK = JRE + compiler)

.
.
You are correct that the bind error is caused by later Java versions, which excised JAXB—what used to be part of their standard library—and moved it to an external dependency. The editor as-is doesn't bundle JAXB with itself to ensure JAXB is present.

.
.
Technical muttering

Glancing at that reseto repo, many of the modifications are minor polishing. Some are functional in ways I haven't yet assessed the ramifications of. Assumptions when refactoring might make the code brittle. (For example, enums in principle can stifle other packages from defining more values or preclude unforeseen values discovered at runtime. Loose coupling vs tight coupling, etc.)

  • One modification indeed points to the external JAXB library to make it run on later Java versions.

  • I'm wary of the commit to "Switch to JNI for speed" away from JNA. My intent with JNA was dynamically deferring NativeRandom to the end user's RNG, whatever their OS, so it would definitely match their own saved game (as opposed to explicitly choosing an algorithm to read someone else's "continue.sav"). From what I gather, JNI bundles precompiled native code for speed, baking the algorithm that whoever built it had, and restricting platforms the app can run on.

  • There's an added SeedSearch class that does lots of RNG calls to basically generate a random save game from scratch every time the editor starts, in the background, then throws it away; seemingly a forgotten experiment. That would explain the interest in speedy RNG calls.

@Aepoh
Copy link
Author

Aepoh commented Nov 29, 2024

Hi Vhati. It's always ok to take time away from dev work especially when it's due to dealing with family health crises.

In regards to this issue specifically there no great priority to deal with it. I already got the program working on Steam Deck at least in Desktop mode and that's good enough for me, not needing to move my save over to a windows machine and back every time I want to save edit.

I'm just a user, not a coder. So I don't know most of what you said, but maybe someone else does and could contribute to the project.

Wish you the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants