Hi,

I was wondering if there would be interest to create flatpak of either the gtk2 or java crossfire clients and place it in flathub? Since there are many people now with steam decks (runs modified version of arch linux), this could potentially increase the number of players quite a bit. In the desktop mode (KDE plasma), it comes with package manager called discover, which pulls packages from flathub (flatpaks; all this is separate from the steam store). So, if crossfire client would be available as flatpak from this repository then it would be easily accessible to steam deck users.

I am running the gtk2 and java clients on my steam deck. I compiled the former (pulling compilers etc from brew) and the latter requires java runtime (from brew). So, this is technically possible.  I use external monitor, keyboard and mouse as the gamepad etc. are somewhat useless with crossfire.

So, I played with flatpak and the java client a bit and came up with the following *very crude* write up (not sure if gtk2 is still supported by flathub runtime). And, by the way, I have never done anything (except install) with flatpak, so take this with grain and salt...

0. Flatpak does not like the dash in the domain name crossfire.real-time.com ... so this is replaced with underscore?

1. Before starting org.freedesktop.Platform and org.freedesktop.Sdk must be installed.

2. The following files need to be in the current directory:

com.real_time.crossfire.yml:
app-id: com.real_time.crossfire
runtime: org.freedesktop.Platform
runtime-version: '22.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
command: start.sh
modules:
  - name: openjdk
    buildsystem: simple
    build-commands:
      - /usr/lib/sdk/openjdk11/install.sh
  - name: Crossfire_client
    buildsystem: simple
    build-commands:
      - install -D download /app/bin/jxclient.jar
      - install -D start.sh /app/bin/start.sh
    sources:
      - type: file
        url: https://sourceforge.net/projects/crossfire/files/jxclient/jxclient.jar/download         sha256: e6af744ea986da0991233787be6c9bc5535a7f3fe8ea682fe3284f1152e67b77
      - type: file
        path: start.sh
finish-args:
      - --share=ipc
      - --socket=x11
      - --socket=wayland
      - --share=network

start.sh (do chmod+x on this):
#!/bin/sh
/app/jre/bin/java -jar /app/bin/jxclient.jar
exit 0

3. Build the package:

flatpak-builder --force-clean build --disable-rofiles-fuse com.real_time.crossfire.yml

Add --disable-cache  to force downloading jxclient.jar again.

4. Test the build locally:

flatpak-builder --user --install --force-clean build --disable-rofiles-fuse com.real_time.crossfire.yml

5. GPG sign:

flatpak-builder --gpg-sign=<key> --repo=<repository> com.real_time.crossfire.yml

6. Run the flatpak:

flatpak run com.real_time.crossfire

7. Procedure for adding the flatpak to flathub:

https://github.com/flathub/flathub/wiki/App-Submission


Jussi Eloranta ([email protected])

ps. Crossfire is still the best multi-user RPG out there! Nothing comes close to it in terms of playability.

_______________________________________________
crossfire mailing list
[email protected]
http://mailman.metalforge.org/mailman/listinfo/crossfire
IRC: http://crossfire.real-time.com/irc/index.html
Discord: http://crossfire.real-time.com/discord/index.html
Project Site: https://sourceforge.net/projects/crossfire/
Wiki: http://wiki.cross-fire.org/
Website: http://crossfire.real-time.com

Reply via email to