Open julianrichen opened 6 years ago
I've stumbled upon an article of a Wine Snap package and saw quickly that it has a GUI. A quick peek at it's source reveals they are using yad
, which is a "tool for creating graphical dialogs from shell scripts", specifically. Just trying to help, :hugs:.
I've been trying to figure out how to package some legal GOG games downloading them with lgogdownloader
and this seems like a quite good solution to enter login and password to the user GOG account. Yad can create forms too, so furthermore, the flatpak post-install could announce users they can sideload themselves the game to a directory of their choose, if they distrust to give passwords to third-party tools (like I'd do).
I actually never look before but the freedesktop Sdk & Platform package glib2 & gtk3: https://github.com/flatpak/freedesktop-sdk-images/blob/1.6/org.freedesktop.Sdk.json.in#L1073 https://github.com/flatpak/freedesktop-sdk-images/blob/1.6/org.freedesktop.Sdk.json.in#L2103
So we could actually make fairly decent looking windows using Python or yad
without having to package a toolkit or use the sub-par tkinter toolkit for Python. For Python pygobject
would still need to be packaged.
I'd like to have a closer look at this because I'm finding it too cumbersome to create new applications in any reasonable amount of time - I'd love to add more, but clearly we don't have a great workflow yet.
Before we can go about designing an installer, we'll probably need to have a look at how exactly we're modelling the installation process, and how we want to abstract things. I think drafting a manifest first is a good way to go about that.
Here's my first draft for a .yml format, applied to a few existing applications (we seem to be using yml almost everywhere, let's stick with it):
hearthstone:
installation-directory: "C:/Program Files (x86)/Hearthstone"
# We'd need to support vendor-specific launcher protocols, but I
# think that's ok
installer-url: "battlenet://WTCG"
command: ["wine64", "C:/Program Files (x86)/Battle.net/Battle.net Launcher.exe", "battlenet://WTCG"]
tweaks:
- win10
- d3dx9
fortninte:
installation-directory: "C:/Program Files (x86)/Epic Games/"
installer-url: "https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncherInstaller.msi"
command: ["wine64", "C:/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/EpicGamesLauncher.exe", "{@:--SkipBuildPatchPrereq -opengl}"]
tweaks:
- disable-winemenubuilder
- win10
- disable-shcore
wot:
installation-directory: "C:/Games/World_of_Tanks"
installer-url: "http://redirect.wargaming.net/WoT/latest_web_install_na"
command: ["wine", "C:/Games/World_of_Tanks/WoTLauncher.exe", "$@"]
extensions:
- d3dx9/bin/d3dx9-install64
- d3dx9/bin/d3dx9-install64-wow64
tweaks:
- disable-winemenubuilder
ie8:
installation-directory: "c:/Program Files/Internet Explorer"
installer-url: "file:///app/extra/ie8-installer.exe"
command: ["wine", "C:/Program Files (x86)/Internet Explorer/iexplore.exe"]
tweaks:
- disable-winemenubuilder
- winvista
# Perhaps we could add an API that lets you call python modules or
# bash scripts here to add application-specific things like
# removing iexplorer.exe?
This is pretty far from perfect yet, of course. It doesn't let you easily do the "Battle.net Helper.exe" check required for hearthstone, modify battle.net config, or tweak the installation/download commands much - but I think these are kinks that can be sorted out when we need that functionality.
I think we should also draft a script that can perform this without worrying about a GUI for now - it's a neat idea, but we don't have a GUI yet, so it doesn't regress anything and it would already simplify the process. As long as applications use the installer we'd get a GUI for installers for free whenever we implement that.
What do you think?
Currently applications each have their own installer script, like so:
This is less then ideal because:
Regarding the GUI. Each installer normally has to download a third-party executable/installer which can't be checksum-ed since the link is for the latest installer, many windows games do this. Using" window with progress and a terminal output. The GUI would be optional.
apply_extra
andextra-data
is out of the question as updating the checksum daily would be impossible. Since the installer downloads the script in the background if users don't launch the flatpak via the terminal for the first time they won't see the download progress via curl and might assume the flatpak is not working. Adding a GUI option would launch an "InstallingThe unified installer will probably be written in Python so
Tkinter
could be used, so no need for an extra toolkit.Example commands:
One line...
Maybe add the ability to write the installer in a json manifest:
GUI option: