Flathub
This is a notification that I submitted a package to Flathub which is an alternative to #1078.
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?
I haven't tried my initial approach with a native window yet. Will do a fallback when that doesn't work.
@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.
I know how Zenity works. Checking for a single file is not sufficient here.
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
https://flathub.org/apps/details/info.rttr.Return-To-The-Roots was already created months ago.