zotero: Fix darwin
By placing firefox at the expected place. Also adapt installPhase.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/app/scripts/fetch_xulrunner b/app/scripts/fetch_xulrunner
|
||||
index 30c3a9073d..fb7c2f367d 100755
|
||||
index 30c3a9073d..aa953744f8 100755
|
||||
--- a/app/scripts/fetch_xulrunner
|
||||
+++ b/app/scripts/fetch_xulrunner
|
||||
@@ -148,15 +148,6 @@ function modify_omni {
|
||||
@@ -68,8 +68,7 @@ index 30c3a9073d..fb7c2f367d 100755
|
||||
- echo
|
||||
- fi
|
||||
-
|
||||
- pushd Firefox.app/Contents/Resources
|
||||
+ pushd firefox
|
||||
pushd Firefox.app/Contents/Resources
|
||||
modify_omni mac
|
||||
popd
|
||||
-
|
||||
@@ -90,20 +89,20 @@ index 30c3a9073d..fb7c2f367d 100755
|
||||
fi
|
||||
|
||||
if [ $BUILD_WIN == 1 ]; then
|
||||
@@ -709,44 +639,9 @@ if [ $BUILD_WIN == 1 ]; then
|
||||
@@ -709,9 +639,6 @@ if [ $BUILD_WIN == 1 ]; then
|
||||
fi
|
||||
|
||||
if [ $BUILD_LINUX == 1 ]; then
|
||||
- GECKO_VERSION="$GECKO_VERSION_LINUX"
|
||||
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
|
||||
-
|
||||
- if [[ -n $arch ]]; then
|
||||
- arch_list=("$arch")
|
||||
- else
|
||||
- arch_list=(x86_64 arm64 i686)
|
||||
- fi
|
||||
- for arch in "${arch_list[@]}"; do
|
||||
- xdir="firefox-linux-$arch"
|
||||
if [[ -n $arch ]]; then
|
||||
arch_list=("$arch")
|
||||
else
|
||||
@@ -719,33 +646,11 @@ if [ $BUILD_LINUX == 1 ]; then
|
||||
fi
|
||||
for arch in "${arch_list[@]}"; do
|
||||
xdir="firefox-linux-$arch"
|
||||
- rm -rf $xdir
|
||||
-
|
||||
- archived_file="firefox-$GECKO_VERSION-$arch.tar.xz"
|
||||
@@ -123,17 +122,14 @@ index 30c3a9073d..fb7c2f367d 100755
|
||||
-
|
||||
- tar xvf firefox-$GECKO_VERSION.tar.xz
|
||||
- mv firefox $xdir
|
||||
-
|
||||
- pushd $xdir
|
||||
- modify_omni $arch
|
||||
+ pushd firefox-linux-x86_64
|
||||
+ modify_omni linux
|
||||
|
||||
pushd $xdir
|
||||
modify_omni $arch
|
||||
popd
|
||||
-
|
||||
|
||||
- rm "firefox-$GECKO_VERSION.tar.xz"
|
||||
-
|
||||
- echo "$( $SCRIPT_DIR/xulrunner_hash -p l -a "$arch" )" > "hash-linux-${arch}"
|
||||
- done
|
||||
done
|
||||
fi
|
||||
|
||||
echo Done
|
||||
|
||||
@@ -1,27 +1,7 @@
|
||||
diff --git a/app/build.sh b/app/build.sh
|
||||
index de092bde16..b2d92287a7 100755
|
||||
index de092bde16..af6008e25c 100755
|
||||
--- a/app/build.sh
|
||||
+++ b/app/build.sh
|
||||
@@ -244,7 +244,7 @@ if [ -z "$UPDATE_CHANNEL" ]; then UPDATE_CHANNEL="default"; fi
|
||||
BUILD_ID=`date +%Y%m%d%H%M%S`
|
||||
|
||||
# Paths to Gecko runtimes
|
||||
-MAC_RUNTIME_PATH="$CALLDIR/xulrunner/Firefox.app"
|
||||
+MAC_RUNTIME_PATH="$CALLDIR/xulrunner/firefox"
|
||||
WIN_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox-"
|
||||
LINUX_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox-linux-"
|
||||
|
||||
@@ -272,8 +272,8 @@ cd "$app_dir"
|
||||
# This works around https://bugzilla.mozilla.org/show_bug.cgi?id=1772900
|
||||
set +e
|
||||
if [ $BUILD_MAC == 1 ]; then
|
||||
- cp -Rp "$MAC_RUNTIME_PATH"/Contents/Resources/browser/omni "$app_dir"
|
||||
- unzip -qj "$MAC_RUNTIME_PATH"/Contents/Resources/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/
|
||||
+ cp -Rp "$MAC_RUNTIME_PATH"/browser/omni "$app_dir"
|
||||
+ unzip -qj "$MAC_RUNTIME_PATH"/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/
|
||||
|
||||
elif [[ $BUILD_WIN == 1 ]]; then
|
||||
# These are non-arch-specific files, so just find a runtime we fetched:
|
||||
@@ -644,11 +644,6 @@ if [ $BUILD_MAC == 1 ]; then
|
||||
cp "$MAC_RUNTIME_PATH/../MacOS/XUL" "$CONTENTSDIR/MacOS/"
|
||||
fi
|
||||
@@ -34,18 +14,18 @@ index de092bde16..b2d92287a7 100755
|
||||
# Modify Info.plist
|
||||
perl -pi -e "s/\{\{VERSION\}\}/$VERSION/" "$CONTENTSDIR/Info.plist"
|
||||
perl -pi -e "s/\{\{VERSION_NUMERIC\}\}/$VERSION_NUMERIC/" "$CONTENTSDIR/Info.plist"
|
||||
@@ -1028,11 +1023,6 @@ if [ $BUILD_LINUX == 1 ]; then
|
||||
@@ -1027,11 +1022,6 @@ if [ $BUILD_LINUX == 1 ]; then
|
||||
# Copy Ubuntu launcher files
|
||||
cp "$CALLDIR/linux/zotero.desktop" "$APPDIR"
|
||||
cp "$CALLDIR/linux/set_launcher_icon" "$APPDIR"
|
||||
|
||||
-
|
||||
- # Use our own updater, because Mozilla's requires updates signed by Mozilla
|
||||
- check_lfs_file "$CALLDIR/linux/updater.tar.xz"
|
||||
- tar xf "$CALLDIR/linux/updater.tar.xz" --to-stdout updater-$arch > "$APPDIR/updater"
|
||||
- chmod 755 "$APPDIR/updater"
|
||||
-
|
||||
|
||||
# Copy app files
|
||||
rsync -a "$base_dir/" "$APPDIR/"
|
||||
|
||||
@@ -1041,6 +1031,7 @@ if [ $BUILD_LINUX == 1 ]; then
|
||||
cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice"
|
||||
|
||||
|
||||
@@ -191,8 +191,12 @@ buildNpmPackage rec {
|
||||
|
||||
# Place firefox files at the right place.
|
||||
# The correct firefox version can be found in zotero/app/config.sh at `GECKO_VERSION_LINUX`.
|
||||
mkdir -p app/xulrunner/firefox-${stdenv.targetPlatform.parsed.kernel.name}-${stdenv.targetPlatform.parsed.cpu.name}
|
||||
cp -r ${firefox-esr-140-unwrapped}/lib/firefox/. app/xulrunner/firefox-${stdenv.targetPlatform.parsed.kernel.name}-${stdenv.targetPlatform.parsed.cpu.name}
|
||||
mkdir -p app/xulrunner/
|
||||
if ${lib.boolToString stdenv.targetPlatform.isDarwin}; then
|
||||
cp -r '${firefox-esr-140-unwrapped}/Applications/Firefox ESR.app' app/xulrunner/Firefox.app
|
||||
else
|
||||
cp -r '${firefox-esr-140-unwrapped}/lib/firefox' app/xulrunner/firefox-${stdenv.targetPlatform.parsed.kernel.name}-${stdenv.targetPlatform.parsed.cpu.name}
|
||||
fi
|
||||
chmod -R u+w app/xulrunner/
|
||||
|
||||
app/scripts/dir_build
|
||||
@@ -233,18 +237,28 @@ buildNpmPackage rec {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
# Copy package contents
|
||||
mkdir -p $out/lib/ $out/bin/
|
||||
cp -r app/staging/*/. $out/lib/
|
||||
if ${lib.boolToString stdenv.targetPlatform.isDarwin}; then
|
||||
|
||||
# Add binary to bin/
|
||||
ln -s ../lib/zotero $out/bin/zotero
|
||||
# Copy package contents
|
||||
mkdir -p $out/Applications
|
||||
cp -r app/staging/Zotero.app $out/Applications/
|
||||
|
||||
# Install icons
|
||||
for size in 32 64 128; do
|
||||
install -Dm444 "app/linux/icons/icon$size.png" "$out/share/icons/hicolor/''${size}x$size/apps/zotero.png"
|
||||
done
|
||||
install -Dm444 "app/linux/icons/symbolic.svg" "$out/share/icons/hicolor/scalable/apps/zotero-symbolic.svg"
|
||||
else
|
||||
|
||||
# Copy package contents
|
||||
mkdir -p $out/lib/ $out/bin/
|
||||
cp -r app/staging/*/. $out/lib/
|
||||
|
||||
# Add binary to bin/
|
||||
ln -s ../lib/zotero $out/bin/zotero
|
||||
|
||||
# Install icons
|
||||
for size in 32 64 128; do
|
||||
install -Dm444 "app/linux/icons/icon$size.png" "$out/share/icons/hicolor/''${size}x$size/apps/zotero.png"
|
||||
done
|
||||
install -Dm444 "app/linux/icons/symbolic.svg" "$out/share/icons/hicolor/scalable/apps/zotero-symbolic.svg"
|
||||
|
||||
fi
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user