s25client icon indicating copy to clipboard operation
s25client copied to clipboard

Flathub

Open Mailaender opened this issue 3 years ago • 5 comments

This is a notification that I submitted a package to Flathub which is an alternative to #1078.

Mailaender avatar May 08 '22 17:05 Mailaender

I just found this and your submission request for Flathub.

Couldn't you just add a simple start script, which checks if the games files are available and if not show a popup message, informing the user that the files are missing?

zocker-160 avatar Jun 21 '22 12:06 zocker-160

I haven't tried my initial approach with a native window yet. Will do a fallback when that doesn't work.

Mailaender avatar Jun 22 '22 18:06 Mailaender

@Mailaender I created a small script template, which should do everything you need

#! /usr/bin/env bash

TARGET_DIRECTORY=`pwd`
FILE="${TARGET_DIRECTORY}/lool"

if [ ! -s $FILE ]; then
    echo "$FILE does not exist"
    
    zenity --title="s25client data check" --width=300 --question --no-wrap --text="Missing required game files!" --cancel-label="Exit" --ok-label="Open folder"
    
    if [ $? == 0 ]; then
        xdg-open $TARGET_DIRECTORY
    else
        echo "exiting"
    fi
    
else
    # start s25client normally
    echo "starting s25client...."
fi

you could just put that as the start script into the flatpak, zenity and xdg-open are part of the runtime iirc

EDIT: you can either check a file with -s or a directory with -d, both should work, depending on what files / folders are needed for the game to work.

zocker-160 avatar Jun 22 '22 19:06 zocker-160

I know how Zenity works. Checking for a single file is not sufficient here.

Mailaender avatar Jun 25 '22 18:06 Mailaender

you can look at the MacOS Launcher application we have exactly for this on MacOS: https://github.com/Return-To-The-Roots/s25client/blob/master/extras/macosLauncher/starter.cpp

Flow86 avatar Jun 26 '22 14:06 Flow86

https://flathub.org/apps/details/info.rttr.Return-To-The-Roots was already created months ago.

Mailaender avatar Feb 19 '23 12:02 Mailaender