Improve the Flatpak build process
.desktop file, icon and appdata are now properly exported by flatpak. "Wayland first" flatpak, falling back to X11 if not on Wayland. Note: this is currently potentially broken on many systems (ie. font rendering is broken). See https://github.com/flatpak/flatpak/issues/2861. Might work when using Wayland + Gnome, does not seem to work on Arch + Sway (couldn't get it working with any workaround for now). Several smaller issues addressed. A few untested issues might remain (Screensharing, WebRTC/Camera access) Addresses (at least partially): #128, #132, #131, #118
This commit is contained in:
parent
561ff61674
commit
9c0fcc0de5
|
@ -11,6 +11,7 @@ This project follows the official Firefox releases, but also uses
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Flatpak now properly provides a .desktop-file (and some other small improvements)
|
||||||
- Fixed AppImage crashes when `XDG_DATA_DIRS` is unset (fixes #139)
|
- Fixed AppImage crashes when `XDG_DATA_DIRS` is unset (fixes #139)
|
||||||
|
|
||||||
## [84.0-1] - 2020-12-25
|
## [84.0-1] - 2020-12-25
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<component type="desktop-application">
|
<component type="desktop-application">
|
||||||
<id>io.gitlab.LibreWolf</id>
|
<id>io.gitlab.LibreWolf</id>
|
||||||
<launchable type="desktop-id">io.gitlab.LibreWolf</launchable>
|
<launchable type="desktop-id">io.gitlab.LibreWolf.desktop</launchable>
|
||||||
<name>LibreWolf</name>
|
<name>LibreWolf</name>
|
||||||
<summary>LibreWolf Web Browser</summary>
|
<summary>LibreWolf Web Browser</summary>
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
|
|
|
@ -10,7 +10,7 @@ FLATPAK_REPO=$2;
|
||||||
FLATPAK_BUNDLE=$3;
|
FLATPAK_BUNDLE=$3;
|
||||||
_SCRIPT_FOLDER=$(realpath $(dirname $0));
|
_SCRIPT_FOLDER=$(realpath $(dirname $0));
|
||||||
_FLATHUB_REPO="flathub https://flathub.org/repo/flathub.flatpakrepo";
|
_FLATHUB_REPO="flathub https://flathub.org/repo/flathub.flatpakrepo";
|
||||||
_FLATHUB_PACKAGES_TO_INSTALL="org.gnome.Platform/${CARCH}/3.36 org.gnome.Sdk/${CARCH}/3.36";
|
_FLATHUB_PACKAGES_TO_INSTALL="org.gnome.Platform/${CARCH}/3.36 org.gnome.Sdk/${CARCH}/3.36 org.freedesktop.Platform//19.08 org.freedesktop.Sdk//19.08";
|
||||||
_EXTRACTED_BINARY_TARBALL_FOLDER=$_SCRIPT_FOLDER/librewolf
|
_EXTRACTED_BINARY_TARBALL_FOLDER=$_SCRIPT_FOLDER/librewolf
|
||||||
_FLATPAK_JSON_FILE=$_SCRIPT_FOLDER/content/io.gitlab.LibreWolf.json;
|
_FLATPAK_JSON_FILE=$_SCRIPT_FOLDER/content/io.gitlab.LibreWolf.json;
|
||||||
_FLATPAK_BUILD_SOURCE_FOLDER=$_SCRIPT_FOLDER/source;
|
_FLATPAK_BUILD_SOURCE_FOLDER=$_SCRIPT_FOLDER/source;
|
||||||
|
@ -50,16 +50,17 @@ mv $_EXTRACTED_BINARY_TARBALL_FOLDER $_FLATPAK_BUILD_SOURCE_FOLDER;
|
||||||
# Build Repo
|
# Build Repo
|
||||||
printf "\nBuilding flatpak repository\n";
|
printf "\nBuilding flatpak repository\n";
|
||||||
cp "$_FLATPAK_JSON_FILE" ./;
|
cp "$_FLATPAK_JSON_FILE" ./;
|
||||||
flatpak-builder --disable-rofiles-fuse --repo="$FLATPAK_REPO" "$_FLATPAK_BUILD_FOLDER" io.gitlab.LibreWolf.json;
|
|
||||||
|
|
||||||
# add appstream metadata
|
# add appstream metadata
|
||||||
# TODO: firefox uses files/share/appdata/ in their flatpak, but https://docs.flatpak.org/en/latest/conventions.html says otherwise. which is "more" correct?
|
# TODO: firefox uses files/share/appdata/ in their flatpak, but https://docs.flatpak.org/en/latest/conventions.html says otherwise. which is "more" correct? => using both for now, just in case...
|
||||||
install -Dvm644 "$_FLATPAK_BUILD_SOURCE_FOLDER/librewolf/io.gitlab.LibreWolf.appdata.xml" "$_FLATPAK_BUILD_FOLDER/files/share/metainfo/io.gitlab.LibreWolf.appdata.xml"
|
install -Dvm644 "$_FLATPAK_BUILD_SOURCE_FOLDER/librewolf/io.gitlab.LibreWolf.appdata.xml" "$_SCRIPT_FOLDER/source/share/metainfo/io.gitlab.LibreWolf.appdata.xml"
|
||||||
|
install -Dvm644 "$_FLATPAK_BUILD_SOURCE_FOLDER/librewolf/io.gitlab.LibreWolf.appdata.xml" "$_SCRIPT_FOLDER/source/share/appdata/LibreWolf.appdata.xml"
|
||||||
|
|
||||||
# add .desktop file
|
install -Dvm644 "$_SCRIPT_FOLDER/content/io.gitlab.LibreWolf.desktop" "$_SCRIPT_FOLDER/source/share/applications/LibreWolf.desktop"
|
||||||
install -Dvm644 "$_SCRIPT_FOLDER/content/librewolf.desktop" "$_FLATPAK_BUILD_FOLDER/files/share/application/librewolf.desktop"
|
|
||||||
# it's not clear if the above is sufficient; follow what mozilla does
|
install -Dvm644 "$_FLATPAK_BUILD_SOURCE_FOLDER/librewolf/browser/chrome/icons/default/default128.png" "$_SCRIPT_FOLDER/source/share/icons/hicolor/128x128/apps/io.gitlab.LibreWolf.png"
|
||||||
install -Dvm644 "$_SCRIPT_FOLDER/content/librewolf.desktop" "$_FLATPAK_BUILD_FOLDER/export/share/application/librewolf.desktop"
|
|
||||||
|
flatpak-builder --disable-rofiles-fuse --repo="$FLATPAK_REPO" "$_FLATPAK_BUILD_FOLDER" io.gitlab.LibreWolf.json;
|
||||||
|
|
||||||
# Build bundle
|
# Build bundle
|
||||||
printf "\nBuilding flatpak bundle\n";
|
printf "\nBuilding flatpak bundle\n";
|
||||||
|
|
25
flatpak/content/io.gitlab.LibreWolf.desktop
Normal file
25
flatpak/content/io.gitlab.LibreWolf.desktop
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=LibreWolf
|
||||||
|
Exec=librewolf %u
|
||||||
|
Icon=io.gitlab.LibreWolf
|
||||||
|
Type=Application
|
||||||
|
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json;
|
||||||
|
StartupWMClass=LibreWolf
|
||||||
|
Categories=Network;WebBrowser;
|
||||||
|
StartupNotify=true
|
||||||
|
Terminal=false
|
||||||
|
X-MultipleArgs=false
|
||||||
|
Keywords=Internet;WWW;Browser;Web;Explorer;
|
||||||
|
Actions=new-window;new-private-window;profilemanager;
|
||||||
|
|
||||||
|
[Desktop Action new-window]
|
||||||
|
Name=Open a New Window
|
||||||
|
Exec=librewolf %u
|
||||||
|
|
||||||
|
[Desktop Action new-private-window]
|
||||||
|
Name=Open a New Private Window
|
||||||
|
Exec=librewolf --private-window %u
|
||||||
|
|
||||||
|
[Desktop Action profilemanager]
|
||||||
|
Name=Open the Profile Manager
|
||||||
|
Exec=librewolf --ProfileManager %u
|
|
@ -4,6 +4,9 @@
|
||||||
"runtime-version": "3.36",
|
"runtime-version": "3.36",
|
||||||
"sdk": "org.gnome.Sdk",
|
"sdk": "org.gnome.Sdk",
|
||||||
"command": "librewolf",
|
"command": "librewolf",
|
||||||
|
"rename-desktop-file": "LibreWolf.desktop",
|
||||||
|
"rename-appdata-file": "LibreWolf.appdata.xml",
|
||||||
|
"rename-icon": "io.gitlab.LibreWolf",
|
||||||
"modules": [
|
"modules": [
|
||||||
"flatpak/content/shared-modules/dbus-glib/dbus-glib-0.110.json",
|
"flatpak/content/shared-modules/dbus-glib/dbus-glib-0.110.json",
|
||||||
{
|
{
|
||||||
|
@ -11,6 +14,10 @@
|
||||||
"buildsystem": "simple",
|
"buildsystem": "simple",
|
||||||
"build-commands": [
|
"build-commands": [
|
||||||
"mkdir -p /app/share && mv librewolf -t /app/share",
|
"mkdir -p /app/share && mv librewolf -t /app/share",
|
||||||
|
"mv share/appdata /app/share",
|
||||||
|
"mv share/applications /app/share",
|
||||||
|
"mv share/icons /app/share",
|
||||||
|
"mv share/metainfo /app/share",
|
||||||
"mkdir -p /app/bin && ln -s /app/share/librewolf/librewolf /app/bin/"
|
"mkdir -p /app/bin && ln -s /app/share/librewolf/librewolf /app/bin/"
|
||||||
],
|
],
|
||||||
"sources": [
|
"sources": [
|
||||||
|
@ -23,20 +30,23 @@
|
||||||
],
|
],
|
||||||
"finish-args": [
|
"finish-args": [
|
||||||
"--share=ipc",
|
"--share=ipc",
|
||||||
"--socket=x11",
|
"--socket=wayland",
|
||||||
|
"--socket=fallback-x11",
|
||||||
"--socket=pcsc",
|
"--socket=pcsc",
|
||||||
"--socket=pulseaudio",
|
"--socket=pulseaudio",
|
||||||
"--persist=.librewolf",
|
"--persist=.librewolf",
|
||||||
"--persist=.mozilla",
|
"--persist=.mozilla",
|
||||||
"--filesystem=xdg-download:rw",
|
"--filesystem=xdg-download:rw",
|
||||||
"--device=all",
|
"--device=dri",
|
||||||
|
"--filesystem=~/.config/dconf:ro",
|
||||||
|
"--env=DCONF_USER_CONFIG_DIR=.config/dconf",
|
||||||
"--talk-name=org.freedesktop.FileManager1",
|
"--talk-name=org.freedesktop.FileManager1",
|
||||||
"--system-talk-name=org.freedesktop.NetworkManager",
|
"--system-talk-name=org.freedesktop.NetworkManager",
|
||||||
"--talk-name=org.a11y.Bus",
|
"--talk-name=org.a11y.Bus",
|
||||||
"--talk-name=org.gnome.SessionManager",
|
"--talk-name=org.gnome.SessionManager",
|
||||||
"--talk-name=org.freedesktop.ScreenSaver",
|
"--talk-name=org.freedesktop.ScreenSaver",
|
||||||
"--talk-name=org.gtk.vfs.*",
|
"--talk-name=org.gtk.vfs.*",
|
||||||
"--socket=wayland",
|
"--socket=session-bus",
|
||||||
"--share=network"
|
"--share=network"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Name=LibreWolf
|
|
||||||
Exec=librewolf %u
|
|
||||||
Icon=librewolf
|
|
||||||
Type=Application
|
|
||||||
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json;
|
|
||||||
StartupWMClass=LibreWolf
|
|
||||||
Categories=Network;WebBrowser;
|
|
||||||
StartupNotify=true
|
|
||||||
Terminal=false
|
|
||||||
X-MultipleArgs=false
|
|
||||||
Keywords=Internet;WWW;Browser;Web;Explorer
|
|
Loading…
Reference in a new issue