Closed infeo closed 3 years ago
Blocked by #25
The jpackage apporach is not flexible enough, we need a shell script again.
Blocked by #25
Still we won't start #25 until we know for sure there is a way to determine via shell if GTK 2 or 3 should be used.
The usage depends on if the appropiate gtk version is installed.
One way is to check is using the package manger. There are not so many, so for me this seems a feasible approach. With commands for dpkg
and rpm
we would already cover many major distributions (except ArchLinux):
for Debian based distros
user@ubuntu:~$ dpkg -l libgtk* | grep -e '^i' | grep -e 'libgtk-*[0-9]'
ii libgtk-3-0:amd64 3.24.18-1ubuntu1 amd64 GTK graphical user interface library
ii libgtk-3-bin 3.24.18-1ubuntu1 amd64 programs for the GTK graphical user interface library
ii libgtk-3-common 3.24.18-1ubuntu1 all common files for the GTK graphical user interface library
ii libgtk2.0-0:amd64 2.24.32-4ubuntu4 amd64 GTK graphical user interface library - old version
ii libgtk2.0-bin 2.24.32-4ubuntu4 amd64 programs for the GTK graphical user interface library
ii libgtk2.0-common 2.24.32-4ubuntu4 all common files for the GTK graphical user interface library
ii libgtk3-perl 0.037-1 all Perl bindings for the GTK+ graphical user interface library
for Fedora, CentOS, OpenSuse, etc
[user@localhost ~]$rpm -qa | grep -e '^gtk[0-9]-[0-9][0-9]*'
gtk3-3.24.20-1.fc32.x86_64
gtk2-2.24.32-7.fc32.x86_64
I would say it is impossible to determine it for sure and use the flag only when we are able to detect that GTK+-2.x is installed.
If GTK+-2.0 is not installed on the system, the packaged app refuses to start because it is build with passing
jdk.gtk.version=2
to the JVM: https://github.com/cryptomator/cryptomator-linux/blob/5a5da37085eaaa57599158fba3ee7a3c5aa00a7a/.github/workflows/appimage.yml#L56The current workaround is to unpack the resulting AppImage and edit the
Cryptomator.cfg
file, see https://github.com/cryptomator/cryptomator/issues/1167#issuecomment-625097731.But the flag cannot be just removed, resulting application start failure on other systems, see https://github.com/cryptomator/cryptomator-linux/issues/9#issuecomment-624107896.