-
Notifications
You must be signed in to change notification settings - Fork 267
enhance: support tools installed via flatpak #1517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I suggest directly creating a command-line tool for Flatpak
applications, so it can be used as normal application. For example:
- Create
/usr/bin/meld
,and fill it with following contents:
#!/bin/bash
/usr/bin/flatpak run org.gnome.meld $@
- Change the file mode with
chmod u+x /usr/bin/meld
Digging deeper, it looks like Flatpak already does this for me! Specifying the following install path works for my per-user Meld installation: /home/nathan/.local/share/flatpak/exports/bin/org.gnome.meld
👍
It would be cool if sourcegit could figure this out automatically, but at least I have something workable.
It would also be cool if it could automatically detect these in ExternalTool
, which is not something I can override in preferences.
5563305
to
cf819b8
Compare
I've updated this PR with much cleaner Flatpak external tool support based on inspecting the system-wide and per-user flatpak/exports/bin
folders. Changes are limited to Linux.cs
and ExternalMerger
is no longer touched.
If sourcegit can have special support for JetBrains Toolbox then it seems reasonable that it can also support Flatpak on Linux.
If sourcegit can have special support for JetBrains Toolbox then it seems reasonable that it can also support Flatpak on Linux.
It's because this is a cross-platform app, and there are so many JetBrains products (currently we support 16 JetBrains products), and their installation paths vary on different platforms. Also, different versions can coexist. To solve the startup problem, JetBrains itself provides the JetBrains Toolbox. This is not exactly the same as third-party package managers like Flatpak.
cf819b8
to
7e4e3a9
Compare
I agree with everything you've said.
I still don't see any reason why the Linux backend can't search in a couple of extra places to find tools installed with a popular distro-agnostic package manager. The same goes for tools installed via Mac App Store or Microsoft Store if they can be handled by their respective IBackend
.
7e4e3a9
to
87f9bf2
Compare
05dba32
to
6822ae3
Compare
072502a
to
5ce919a
Compare
f325aaf
to
6511d15
Compare
This PR is a bit experimental.
I have various tools installed via Flatpak (Meld, VSCodium, etc) that I'd like sourcegit to integrate with. Currently all diff and merge tools must resolve to a known binary file, whereas Flatpak apps are launched via the flatpak binary (eg
flatpak run org.gnome.meld
). I've figured out some workarounds to getExternalTool
andExternalMerger
working but I'm reluctant to make any significant changes because I can only test on Linux.