OpenJKDF2 icon indicating copy to clipboard operation
OpenJKDF2 copied to clipboard

Linux Flatpak version not detecting installation

Open TheCypher1 opened this issue 1 year ago • 3 comments

I am having two issues with the Linux Flatpak version. The Flatpak is installed, however when it doesn't detect the installation files, it asks if I want to install, then asks me to point to existing installation, however it crashes when I press the "install" button. It does provide the path where it expects the installation, so I placed it there manually and it still doesn't detect the installation.

For reference, I'm on Linux Mint 20.3 and I'm using the GOG version of the game.

TheCypher1 avatar May 08 '24 15:05 TheCypher1

The flatpak on flathub doesn't have any filesystem access (according to the flathub website), so it probably crashes because it attempted to access a directory which it wasn't allowed.

I was able to get it to work by manually copying the files to the resource and episode subdirectories in ~/.var/app/org.openjkdf2.OpenJKDF2/data/OpenJKDF2/openjkdf2. You can also create a MUSIC directory in there and copy the music if you like. I had to rename some of the files because the expected names had different lettercase, mostly the extensions were wrong iirc.

Or you can try addeding filesystem access to the directory containing the game resources, kde has a flatpak kmod which can do that, or there's also a program on flathub (forget the name). But it's probably easier to copy the files.

AsureDawn avatar May 26 '24 14:05 AsureDawn

The flatpak on flathub doesn't have any filesystem access (according to the flathub website), so it probably crashes because it attempted to access a directory which it wasn't allowed.

I was able to get it to work by manually copying the files to the resource and episode subdirectories in ~/.var/app/org.openjkdf2.OpenJKDF2/data/OpenJKDF2/openjkdf2. You can also create a MUSIC directory in there and copy the music if you like. I had to rename some of the files because the expected names had different lettercase, mostly the extensions were wrong iirc.

Or you can try addeding filesystem access to the directory containing the game resources, kde has a flatpak kmod which can do that, or there's also a program on flathub (forget the name). But it's probably easier to copy the files.

As a temporary thing, I ended up just downloading the Windows version of OpenJKDF2 and running it under Wine which worked perfectly but it would be nice to get the Linux version working ON Linux. I saw a YouTube video of a guy running the Linux version in a different distro, and I think on KDE and it allowed him to select the file path so maybe it's just a Mint/MATE thing? Idk, I'm gonna go back and try the manual filepath thing as there may be an issue with the case sensitive or extension stuff.

Thanks

TheCypher1 avatar May 26 '24 14:05 TheCypher1

tbh I might not actually be able to fix this one due to Flatpak's sandboxing, I think I originally tried to get the global filesystem access but they didn't want it if I could technically work around it (ie, you'll have to use one of those Flatpak un-sandboxing tools I forget the name of)

shinyquagsire23 avatar Nov 30 '24 05:11 shinyquagsire23

Hi, I've been playing around with the flatpak install today and I'm pretty happy with it. I initially had the same problems as above with it crashing, and then further problems with the directory rooting because I'd gone for a manual install of assets as discussed above. But doing some further testing I believe the flatpak build is working correctly.

Here are my steps. I was thinking of PR'ing this to the README but I didn't see other install guides there - feel free to use this directly or let me know if you want a PR.

Flatpak set up guide

  1. Install the app: flatpak install flathub org.openjkdf2.OpenJKDF2
  2. Allow the app access to your JKDF2 Steam installation: sudo flatpak override --filesystem=~/.local/share/Steam/steamapps/common/Star\ Wars\ Jedi\ Knight:ro org.openjkdf2.OpenJKDF2
  3. Run the app: flatpak run org.openjkdf2.OpenJKDF2
  4. The app will list missing required assets, press "OK"
  5. The app will ask if you'd like to install the assets, press "Install"
  6. The app will ask you to select your existing installation, press "OK"
  7. A file browser will open. Navigate to your home directory, press control + H (or equivalent) to view hidden files, then follow the directories down through: ~/.local/share/Steam/steamapps/common/Star\ Wars\ Jedi\ Knight/, then press "Open"
  8. The assets will install and the game will launch.
  9. The game continues to launch correctly when executing the flatpak run command in the future.

My system for reference:

[james@procyon ~]$ lsb_release -a
LSB Version:	n/a
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a
[james@procyon ~]$ flatpak --version
Flatpak 1.16.0
[james@procyon ~]$ flatpak list --app | grep openjkdf2
OpenJKDF2	org.openjkdf2.OpenJKDF2	0.9.6	stable	system

Now time to enjoy this great project! Cheers.

JamesBarwell avatar Mar 24 '25 20:03 JamesBarwell