ayaports/user/zotero/zotero_build-modifications.patch

144 lines
5.2 KiB
Diff

diff --git a/zotero/app/build.sh b/zotero/app/build.sh
index 649d629..7d078b8 100755
--- a/zotero/app/build.sh
+++ b/zotero/app/build.sh
@@ -59,10 +59,7 @@ function abspath {
}
function check_lfs_file {
- if [ "$(head --bytes 5 "$1")" = "versi" ]; then
- echo "$1 not checked out -- install Git LFS and run 'git lfs pull'" >&2
- exit 1
- fi
+ return 0
}
SOURCE_DIR=""
@@ -840,18 +837,13 @@ if [ $BUILD_LINUX == 1 ]; then
cp -r "$runtime_path/"!(application.ini|browser|defaults|devtools-files|crashreporter|crashreporter.ini|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR"
# Use our own launcher that calls the original Firefox executable with -app
- mv "$APPDIR"/firefox-bin "$APPDIR"/zotero-bin
+ mv "$APPDIR"/firefox-esr "$APPDIR"/zotero-bin
cp "$CALLDIR/linux/zotero" "$APPDIR"/zotero
# 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/"
@@ -860,6 +852,7 @@ if [ $BUILD_LINUX == 1 ]; then
cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice"
# Copy icons
+ mkdir -p "$APPDIR"/icons
cp "$CALLDIR/linux/icons/icon32.png" "$APPDIR/icons/"
cp "$CALLDIR/linux/icons/icon64.png" "$APPDIR/icons/"
cp "$CALLDIR/linux/icons/icon128.png" "$APPDIR/icons/"
diff --git a/zotero/app/build.sh.orig b/zotero/app/build.sh
index 702f499..3ee7e34 100755
--- a/zotero/app/build.sh.orig
+++ b/zotero/app/build.sh
@@ -189,7 +189,7 @@ BUILD_ID=`date +%Y%m%d%H%M%S`
# Paths to Gecko runtimes
MAC_RUNTIME_PATH="$CALLDIR/xulrunner/Firefox.app"
WIN_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox-"
-LINUX_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox-"
+LINUX_RUNTIME_PATH_PREFIX="$CALLDIR/xulrunner/firefox"
base_dir="$BUILD_DIR/base"
app_dir="$BUILD_DIR/base/app"
@@ -223,8 +223,8 @@ elif [ $BUILD_WIN == 1 ]; then
unzip -qj "${WIN_RUNTIME_PATH_PREFIX}win-x64"/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/
elif [ $BUILD_LINUX == 1 ]; then
# Non-arch-specific files, so just use 64-bit version
- cp -Rp "${LINUX_RUNTIME_PATH_PREFIX}x86_64"/browser/omni "$app_dir"
- unzip -qj "${LINUX_RUNTIME_PATH_PREFIX}x86_64"/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/
+ cp -Rp "${LINUX_RUNTIME_PATH_PREFIX}"/browser/omni "$app_dir"
+ unzip -qj "${LINUX_RUNTIME_PATH_PREFIX}"/omni.ja "hyphenation/*" -d "$app_dir"/hyphenation/
fi
set -e
cd $omni_dir
@@ -825,11 +825,11 @@ if [ $BUILD_LINUX == 1 ]; then
fi
for arch in $archs; do
- runtime_path="${LINUX_RUNTIME_PATH_PREFIX}${arch}"
+ runtime_path="${LINUX_RUNTIME_PATH_PREFIX}"
# Set up directory
- echo 'Building Zotero_linux-'$arch
- APPDIR="$STAGE_DIR/Zotero_linux-$arch"
+ echo 'Building Zotero_linux'
+ APPDIR="$STAGE_DIR/Zotero_linux"
rm -rf "$APPDIR"
mkdir "$APPDIR"
diff --git a/zotero/app/scripts/fetch_xulrunner.orig b/zotero/app/scripts/fetch_xulrunner
index 2b57bfb..2bbc110 100755
--- a/zotero/app/scripts/fetch_xulrunner.orig
+++ b/zotero/app/scripts/fetch_xulrunner
@@ -134,15 +134,6 @@ function modify_omni {
# Continue using app.update.auto in prefs.js on Windows
replace_line 'PER_INSTALLATION_PREFS_PLATFORMS = \["win"\]' 'PER_INSTALLATION_PREFS_PLATFORMS = []' modules/UpdateUtils.sys.mjs
- # Prompt if major update is available instead of installing automatically on restart
- replace_line 'if \(!updateAuto\) \{' 'if (update.type == "major") {
- LOG("UpdateService:_selectAndInstallUpdate - prompting because it is a major update");
- AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_SHOWPROMPT_PREF);
- Services.obs.notifyObservers(update, "update-available", "show-prompt");
- return;
- }
- if (!updateAuto) {' modules/UpdateService.sys.mjs
-
# Avoid console warning about resource://gre/modules/FxAccountsCommon.js
replace_line 'const logins = this._data.logins;' 'const logins = this._data.logins; if (this._data.logins.length != -1) return;' modules/LoginStore.sys.mjs
@@ -516,36 +507,10 @@ fi
if [ $BUILD_LINUX == 1 ]; then
GECKO_VERSION="$GECKO_VERSION_LINUX"
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
-
- # Include 32-bit build if not in CI
- if [[ "${CI:-}" = "1" ]] || [[ "${SKIP_32:-}" = "1" ]]; then
- arches="x86_64"
- else
- arches="i686 x86_64"
- fi
- for arch in $arches; do
- xdir="firefox-$arch"
- rm -rf $xdir
-
- archived_file="firefox-$GECKO_VERSION-$arch.tar.bz2"
- if [ -e "$archived_file" ]; then
- echo "Using $archived_file"
- cp "$archived_file" "firefox-$GECKO_VERSION.tar.bz2"
- else
- curl -O "$DOWNLOAD_URL/linux-$arch/en-US/firefox-$GECKO_VERSION.tar.bz2"
- fi
-
- tar xvf firefox-$GECKO_VERSION.tar.bz2
- mv firefox firefox-$arch
-
- pushd firefox-$arch
- modify_omni $arch
- popd
- echo $($SCRIPT_DIR/xulrunner_hash -p l) > hash-linux
- rm "firefox-$GECKO_VERSION.tar.bz2"
- done
+ pushd firefox
+ modify_omni linux64
+ popd
fi
echo Done