aboutsummaryrefslogtreecommitdiff
path: root/flatpak
diff options
context:
space:
mode:
Diffstat (limited to 'flatpak')
-rwxr-xr-xflatpak/build_flatpak.sh17
-rw-r--r--flatpak/content/io.gitlab.LibreWolf.desktop25
-rw-r--r--flatpak/content/io.gitlab.LibreWolf.json16
-rw-r--r--flatpak/content/librewolf.desktop12
4 files changed, 47 insertions, 23 deletions
diff --git a/flatpak/build_flatpak.sh b/flatpak/build_flatpak.sh
index cc297e6..4fe57d8 100755
--- a/flatpak/build_flatpak.sh
+++ b/flatpak/build_flatpak.sh
@@ -10,7 +10,7 @@ FLATPAK_REPO=$2;
FLATPAK_BUNDLE=$3;
_SCRIPT_FOLDER=$(realpath $(dirname $0));
_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
_FLATPAK_JSON_FILE=$_SCRIPT_FOLDER/content/io.gitlab.LibreWolf.json;
_FLATPAK_BUILD_SOURCE_FOLDER=$_SCRIPT_FOLDER/source;
@@ -50,16 +50,17 @@ mv $_EXTRACTED_BINARY_TARBALL_FOLDER $_FLATPAK_BUILD_SOURCE_FOLDER;
# Build Repo
printf "\nBuilding flatpak repository\n";
cp "$_FLATPAK_JSON_FILE" ./;
-flatpak-builder --disable-rofiles-fuse --repo="$FLATPAK_REPO" "$_FLATPAK_BUILD_FOLDER" io.gitlab.LibreWolf.json;
# 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?
-install -Dvm644 "$_FLATPAK_BUILD_SOURCE_FOLDER/librewolf/io.gitlab.LibreWolf.appdata.xml" "$_FLATPAK_BUILD_FOLDER/files/share/metainfo/io.gitlab.LibreWolf.appdata.xml"
+# 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" "$_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"
+
+install -Dvm644 "$_SCRIPT_FOLDER/content/io.gitlab.LibreWolf.desktop" "$_SCRIPT_FOLDER/source/share/applications/LibreWolf.desktop"
-# add .desktop file
-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 "$_SCRIPT_FOLDER/content/librewolf.desktop" "$_FLATPAK_BUILD_FOLDER/export/share/application/librewolf.desktop"
+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"
+
+flatpak-builder --disable-rofiles-fuse --repo="$FLATPAK_REPO" "$_FLATPAK_BUILD_FOLDER" io.gitlab.LibreWolf.json;
# Build bundle
printf "\nBuilding flatpak bundle\n";
diff --git a/flatpak/content/io.gitlab.LibreWolf.desktop b/flatpak/content/io.gitlab.LibreWolf.desktop
new file mode 100644
index 0000000..d55cf7d
--- /dev/null
+++ b/flatpak/content/io.gitlab.LibreWolf.desktop
@@ -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
diff --git a/flatpak/content/io.gitlab.LibreWolf.json b/flatpak/content/io.gitlab.LibreWolf.json
index 4bd5bbd..2392b32 100644
--- a/flatpak/content/io.gitlab.LibreWolf.json
+++ b/flatpak/content/io.gitlab.LibreWolf.json
@@ -4,6 +4,9 @@
"runtime-version": "3.36",
"sdk": "org.gnome.Sdk",
"command": "librewolf",
+ "rename-desktop-file": "LibreWolf.desktop",
+ "rename-appdata-file": "LibreWolf.appdata.xml",
+ "rename-icon": "io.gitlab.LibreWolf",
"modules": [
"flatpak/content/shared-modules/dbus-glib/dbus-glib-0.110.json",
{
@@ -11,6 +14,10 @@
"buildsystem": "simple",
"build-commands": [
"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/"
],
"sources": [
@@ -23,20 +30,23 @@
],
"finish-args": [
"--share=ipc",
- "--socket=x11",
+ "--socket=wayland",
+ "--socket=fallback-x11",
"--socket=pcsc",
"--socket=pulseaudio",
"--persist=.librewolf",
"--persist=.mozilla",
"--filesystem=xdg-download:rw",
- "--device=all",
+ "--device=dri",
+ "--filesystem=~/.config/dconf:ro",
+ "--env=DCONF_USER_CONFIG_DIR=.config/dconf",
"--talk-name=org.freedesktop.FileManager1",
"--system-talk-name=org.freedesktop.NetworkManager",
"--talk-name=org.a11y.Bus",
"--talk-name=org.gnome.SessionManager",
"--talk-name=org.freedesktop.ScreenSaver",
"--talk-name=org.gtk.vfs.*",
- "--socket=wayland",
+ "--socket=session-bus",
"--share=network"
]
}
diff --git a/flatpak/content/librewolf.desktop b/flatpak/content/librewolf.desktop
deleted file mode 100644
index c6d6de1..0000000
--- a/flatpak/content/librewolf.desktop
+++ /dev/null
@@ -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
bgstack15