aboutsummaryrefslogtreecommitdiff
path: root/mac
diff options
context:
space:
mode:
authorBeatLink <beatlink@protonmail.com>2019-08-16 20:00:38 -0500
committerBeatLink <beatlink@protonmail.com>2019-08-16 20:00:38 -0500
commitd16a5b29e81bb6e0e58af2a97484defccacf355c (patch)
tree4ef06da3e1d9548a99fc4ce8adf4587d7bd14621 /mac
parentmove toggle settings folder to linux script (diff)
downloadlibrewolf-linux-d16a5b29e81bb6e0e58af2a97484defccacf355c.tar.gz
librewolf-linux-d16a5b29e81bb6e0e58af2a97484defccacf355c.tar.bz2
librewolf-linux-d16a5b29e81bb6e0e58af2a97484defccacf355c.zip
Move branding and settings to seperate repos and move browser to top level
Diffstat (limited to 'mac')
-rw-r--r--mac/install_script.txt1
-rwxr-xr-xmac/package_macos.sh46
2 files changed, 47 insertions, 0 deletions
diff --git a/mac/install_script.txt b/mac/install_script.txt
new file mode 100644
index 0000000..d1f5970
--- /dev/null
+++ b/mac/install_script.txt
@@ -0,0 +1 @@
+Users/<username>/Library/Application Support/LibreWolf/Profiles/xxxxxxxx.default
diff --git a/mac/package_macos.sh b/mac/package_macos.sh
new file mode 100755
index 0000000..e4b2be9
--- /dev/null
+++ b/mac/package_macos.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# Usage: ./package_macos.sh /path/to/Firefox.dmg [--install]
+# If `--install` is passed, will copy Librefox.app into /Applications.
+# Otherwise, Librefox.dmg will be created next to Firefox.dmg
+
+repo=$(git rev-parse --show-toplevel)
+
+vol=$(hdiutil attach "$1" -shadow | tail -n 1 | cut -f 3)
+app="$(basename "$vol").app"
+
+cp "$repo/packaging/mac/background.png" "$vol/.background/"
+
+cd "$vol"
+codesign --remove-signature "$app"
+
+cd "$app/Contents"
+rm -rf _CodeSignature Library/LaunchServices/org.mozilla.updater
+
+cd MacOS
+rm -rf plugin-container.app/Contents/_CodeSignature \
+ crashreporter.app \
+ updater.app
+
+cd ../Resources
+rm -rf update-settings.ini updater.ini
+cp -R "$repo/librefox/." .
+
+cd browser/features
+rm -rf aushelper@mozilla.org.xpi \
+ firefox@getpocket.com.xpi \
+ onboarding@mozilla.org.xpi
+
+if [ "$2" == "--install" ]; then
+ cd "$vol"
+ cp -R "$app" /Applications/Librefox.app
+fi
+
+cd "$repo"
+hdiutil detach "$vol"
+
+if [ "$2" != "--install" ]; then
+ out_dir=$(dirname "$1")
+ rm -f "$out_dir/Librefox.dmg"
+ hdiutil convert -format UDZO -o "$out_dir/Librefox.dmg" "$1" -shadow
+fi
bgstack15