Stop bundling the PDF tools
This commit is contained in:
parent
a497f501e9
commit
9a5275b92a
7 changed files with 1 additions and 104 deletions
1
app/.gitignore
vendored
1
app/.gitignore
vendored
|
@ -6,7 +6,6 @@ lastrev
|
||||||
staging
|
staging
|
||||||
tmp
|
tmp
|
||||||
xulrunner
|
xulrunner
|
||||||
pdftools
|
|
||||||
win/resource_hacker
|
win/resource_hacker
|
||||||
win/firefox-*.win32.zip
|
win/firefox-*.win32.zip
|
||||||
win/firefox-*.win64.zip
|
win/firefox-*.win64.zip
|
||||||
|
|
37
app/build.sh
37
app/build.sh
|
@ -435,11 +435,6 @@ if [ $BUILD_MAC == 1 ]; then
|
||||||
cd "$CONTENTSDIR/MacOS"
|
cd "$CONTENTSDIR/MacOS"
|
||||||
tar -xjf "$CALLDIR/mac/updater.tar.bz2"
|
tar -xjf "$CALLDIR/mac/updater.tar.bz2"
|
||||||
|
|
||||||
# Copy PDF tools and data
|
|
||||||
cp "$CALLDIR/pdftools/pdftotext-mac" "$CONTENTSDIR/MacOS/pdftotext"
|
|
||||||
cp "$CALLDIR/pdftools/pdfinfo-mac" "$CONTENTSDIR/MacOS/pdfinfo"
|
|
||||||
cp -R "$CALLDIR/pdftools/poppler-data" "$CONTENTSDIR/Resources/"
|
|
||||||
|
|
||||||
# Modify Info.plist
|
# Modify Info.plist
|
||||||
perl -pi -e "s/\{\{VERSION\}\}/$VERSION/" "$CONTENTSDIR/Info.plist"
|
perl -pi -e "s/\{\{VERSION\}\}/$VERSION/" "$CONTENTSDIR/Info.plist"
|
||||||
perl -pi -e "s/\{\{VERSION_NUMERIC\}\}/$VERSION_NUMERIC/" "$CONTENTSDIR/Info.plist"
|
perl -pi -e "s/\{\{VERSION_NUMERIC\}\}/$VERSION_NUMERIC/" "$CONTENTSDIR/Info.plist"
|
||||||
|
@ -488,8 +483,6 @@ if [ $BUILD_MAC == 1 ]; then
|
||||||
# Sign app
|
# Sign app
|
||||||
entitlements_file="$CALLDIR/mac/entitlements.xml"
|
entitlements_file="$CALLDIR/mac/entitlements.xml"
|
||||||
/usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" \
|
/usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" \
|
||||||
"$APPDIR/Contents/MacOS/pdftotext" \
|
|
||||||
"$APPDIR/Contents/MacOS/pdfinfo" \
|
|
||||||
"$APPDIR/Contents/MacOS/XUL" \
|
"$APPDIR/Contents/MacOS/XUL" \
|
||||||
"$APPDIR/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater"
|
"$APPDIR/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater"
|
||||||
find "$APPDIR/Contents" -name '*.dylib' -exec /usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" {} \;
|
find "$APPDIR/Contents" -name '*.dylib' -exec /usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" {} \;
|
||||||
|
@ -585,10 +578,6 @@ if [ $BUILD_WIN == 1 ]; then
|
||||||
COMMON_APPDIR="$STAGE_DIR/Zotero_common"
|
COMMON_APPDIR="$STAGE_DIR/Zotero_common"
|
||||||
mkdir "$COMMON_APPDIR"
|
mkdir "$COMMON_APPDIR"
|
||||||
|
|
||||||
# Copy PDF tools and data
|
|
||||||
cp "$CALLDIR/pdftools/pdftotext-win.exe" "$COMMON_APPDIR/pdftotext.exe"
|
|
||||||
cp "$CALLDIR/pdftools/pdfinfo-win.exe" "$COMMON_APPDIR/pdfinfo.exe"
|
|
||||||
|
|
||||||
# Package non-arch-specific components
|
# Package non-arch-specific components
|
||||||
if [ $PACKAGE -eq 1 ]; then
|
if [ $PACKAGE -eq 1 ]; then
|
||||||
# Copy installer files
|
# Copy installer files
|
||||||
|
@ -601,24 +590,8 @@ if [ $BUILD_WIN == 1 ]; then
|
||||||
cp "$CALLDIR/win/updater.exe" "$COMMON_APPDIR"
|
cp "$CALLDIR/win/updater.exe" "$COMMON_APPDIR"
|
||||||
cat "$CALLDIR/win/installer/updater_append.ini" >> "$COMMON_APPDIR/updater.ini"
|
cat "$CALLDIR/win/installer/updater_append.ini" >> "$COMMON_APPDIR/updater.ini"
|
||||||
|
|
||||||
# Sign PDF tools and updater
|
# Sign updater
|
||||||
if [ $SIGN -eq 1 ]; then
|
if [ $SIGN -eq 1 ]; then
|
||||||
"`cygpath -u \"$SIGNTOOL\"`" \
|
|
||||||
sign /n "$SIGNTOOL_CERT_SUBJECT" \
|
|
||||||
/d "$SIGNATURE_DESC PDF Converter" \
|
|
||||||
/fd SHA256 \
|
|
||||||
/tr "$SIGNTOOL_TIMESTAMP_SERVER" \
|
|
||||||
/td SHA256 \
|
|
||||||
"`cygpath -w \"$COMMON_APPDIR/pdftotext.exe\"`"
|
|
||||||
sleep $SIGNTOOL_DELAY
|
|
||||||
"`cygpath -u \"$SIGNTOOL\"`" \
|
|
||||||
sign /n "$SIGNTOOL_CERT_SUBJECT" \
|
|
||||||
/d "$SIGNATURE_DESC PDF Info" \
|
|
||||||
/fd SHA256 \
|
|
||||||
/tr "$SIGNTOOL_TIMESTAMP_SERVER" \
|
|
||||||
/td SHA256 \
|
|
||||||
"`cygpath -w \"$COMMON_APPDIR/pdfinfo.exe\"`"
|
|
||||||
sleep $SIGNTOOL_DELAY
|
|
||||||
"`cygpath -u \"$SIGNTOOL\"`" \
|
"`cygpath -u \"$SIGNTOOL\"`" \
|
||||||
sign /n "$SIGNTOOL_CERT_SUBJECT" \
|
sign /n "$SIGNTOOL_CERT_SUBJECT" \
|
||||||
/d "$SIGNATURE_DESC Updater" \
|
/d "$SIGNATURE_DESC Updater" \
|
||||||
|
@ -693,9 +666,6 @@ if [ $BUILD_WIN == 1 ]; then
|
||||||
cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice"
|
cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice"
|
||||||
cp -RH "$CALLDIR/modules/zotero-word-for-windows-integration/install" "$APPDIR/integration/word-for-windows"
|
cp -RH "$CALLDIR/modules/zotero-word-for-windows-integration/install" "$APPDIR/integration/word-for-windows"
|
||||||
|
|
||||||
# Copy PDF tools data
|
|
||||||
cp -R "$CALLDIR/pdftools/poppler-data" "$APPDIR/"
|
|
||||||
|
|
||||||
# Delete extraneous files
|
# Delete extraneous files
|
||||||
find "$APPDIR" -depth -type d -name .git -exec rm -rf {} \;
|
find "$APPDIR" -depth -type d -name .git -exec rm -rf {} \;
|
||||||
find "$APPDIR" \( -name .DS_Store -or -name '.git*' -or -name '.travis.yml' -or -name update.rdf -or -name '*.bak' \) -exec rm -f {} \;
|
find "$APPDIR" \( -name .DS_Store -or -name '.git*' -or -name '.travis.yml' -or -name update.rdf -or -name '*.bak' \) -exec rm -f {} \;
|
||||||
|
@ -832,11 +802,6 @@ if [ $BUILD_LINUX == 1 ]; then
|
||||||
# Use our own updater, because Mozilla's requires updates signed by Mozilla
|
# Use our own updater, because Mozilla's requires updates signed by Mozilla
|
||||||
cp "$CALLDIR/linux/updater-$arch" "$APPDIR"/updater
|
cp "$CALLDIR/linux/updater-$arch" "$APPDIR"/updater
|
||||||
|
|
||||||
# Copy PDF tools and data
|
|
||||||
cp "$CALLDIR/pdftools/pdftotext-linux-$arch" "$APPDIR/pdftotext"
|
|
||||||
cp "$CALLDIR/pdftools/pdfinfo-linux-$arch" "$APPDIR/pdfinfo"
|
|
||||||
cp -R "$CALLDIR/pdftools/poppler-data" "$APPDIR/"
|
|
||||||
|
|
||||||
# Copy app files
|
# Copy app files
|
||||||
rsync -a "$base_dir/" "$APPDIR/"
|
rsync -a "$base_dir/" "$APPDIR/"
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,6 @@ custom_components_url="https://download.zotero.org/dev/"
|
||||||
APP_NAME="Zotero"
|
APP_NAME="Zotero"
|
||||||
APP_ID="zotero\@zotero.org"
|
APP_ID="zotero\@zotero.org"
|
||||||
|
|
||||||
PDF_TOOLS_VERSION="0.0.5"
|
|
||||||
PDF_TOOLS_URL="https://zotero-download.s3.amazonaws.com/pdftools/pdftools-$PDF_TOOLS_VERSION.tar.gz"
|
|
||||||
|
|
||||||
# Whether to sign builds
|
# Whether to sign builds
|
||||||
SIGN=0
|
SIGN=0
|
||||||
|
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Copyright (c) 2018 Zotero
|
|
||||||
# Center for History and New Media
|
|
||||||
# George Mason University, Fairfax, Virginia, USA
|
|
||||||
# http://zotero.org
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
cd "$SCRIPT_DIR"
|
|
||||||
. config.sh
|
|
||||||
|
|
||||||
rm -rf pdftools
|
|
||||||
mkdir pdftools
|
|
||||||
cd pdftools
|
|
||||||
|
|
||||||
curl -o pdftools.tar.gz $PDF_TOOLS_URL
|
|
||||||
tar -zxvf pdftools.tar.gz
|
|
||||||
rm pdftools.tar.gz
|
|
||||||
|
|
||||||
echo Done
|
|
|
@ -56,15 +56,6 @@ if [ $platform = "w" ]; then
|
||||||
which rcedit || { $FAIL_CMD; FAILED=1; echo " -- Install with scripts/fetch_rcedit"; }
|
which rcedit || { $FAIL_CMD; FAILED=1; echo " -- Install with scripts/fetch_rcedit"; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Checking for PDF tools: "
|
|
||||||
if [ $platform = "w" ]; then
|
|
||||||
[ -f "$ROOT_DIR/pdftools/pdftotext-win.exe" ] && ls "$ROOT_DIR/pdftools/pdftotext-win.exe" || { $FAIL_CMD; FAILED=1; }
|
|
||||||
elif [ $platform = "m" ]; then
|
|
||||||
[ -f "$ROOT_DIR/pdftools/pdftotext-mac" ] && ls "$ROOT_DIR/pdftools/pdftotext-mac" || { $FAIL_CMD; FAILED=1; }
|
|
||||||
elif [ $platform = "l" ]; then
|
|
||||||
[ -f "$ROOT_DIR/pdftools/pdftotext-linux-x86_64" ] && ls "$ROOT_DIR/pdftools/pdftotext-linux-x86_64" || { $FAIL_CMD; FAILED=1; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $platform = "w" ]; then
|
if [ $platform = "w" ]; then
|
||||||
echo
|
echo
|
||||||
echo "${hdr_start}Checking Windows packaging requirements:${hdr_stop}"
|
echo "${hdr_start}Checking Windows packaging requirements:${hdr_stop}"
|
||||||
|
|
|
@ -22,8 +22,6 @@ DEVELOPER_ID="-"
|
||||||
|
|
||||||
entitlements_file="$ROOT_DIR/mac/entitlements.xml"
|
entitlements_file="$ROOT_DIR/mac/entitlements.xml"
|
||||||
#/usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" \
|
#/usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" \
|
||||||
# "$APPDIR/Contents/MacOS/pdftotext" \
|
|
||||||
# "$APPDIR/Contents/MacOS/pdfinfo" \
|
|
||||||
# "$APPDIR/Contents/MacOS/XUL" \
|
# "$APPDIR/Contents/MacOS/XUL" \
|
||||||
# "$APPDIR/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater"
|
# "$APPDIR/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater"
|
||||||
#find "$APPDIR/Contents" -name '*.dylib' -exec /usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" {} \;
|
#find "$APPDIR/Contents" -name '*.dylib' -exec /usr/bin/codesign --force --options runtime --entitlements "$entitlements_file" --sign "$DEVELOPER_ID" {} \;
|
||||||
|
|
|
@ -122,24 +122,6 @@ makePath ZOTERO_PATH "$ROOT_DIR/build"
|
||||||
# Create data directory
|
# Create data directory
|
||||||
mkdir "$TEMPDIR/Zotero"
|
mkdir "$TEMPDIR/Zotero"
|
||||||
|
|
||||||
# Download PDF tools if not cached in the source directory and copy to profile directory
|
|
||||||
PDF_TOOLS_VERSION="0.0.3"
|
|
||||||
PDF_TOOLS_URL="https://zotero-download.s3.amazonaws.com/pdftools/pdftools-$PDF_TOOLS_VERSION.tar.gz"
|
|
||||||
PDF_TOOLS_CACHE_DIR="$ROOT_DIR/tmp/pdftools"
|
|
||||||
PDF_TOOLS_DIR="$PROFILE/pdftools"
|
|
||||||
if [ ! -f "$PDF_TOOLS_CACHE_DIR/$PDF_TOOLS_VERSION" ]; then
|
|
||||||
echo "Fetching PDF tools version $PDF_TOOLS_VERSION"
|
|
||||||
echo
|
|
||||||
rm -rf "$PDF_TOOLS_CACHE_DIR"
|
|
||||||
mkdir -p "$PDF_TOOLS_CACHE_DIR"
|
|
||||||
curl -o "$PDF_TOOLS_CACHE_DIR/pdftools.tar.gz" $PDF_TOOLS_URL
|
|
||||||
tar -zxf "$PDF_TOOLS_CACHE_DIR/pdftools.tar.gz" -C $PDF_TOOLS_CACHE_DIR
|
|
||||||
rm "$PDF_TOOLS_CACHE_DIR/pdftools.tar.gz"
|
|
||||||
touch "$PDF_TOOLS_CACHE_DIR/$PDF_TOOLS_VERSION"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
cp -R $PDF_TOOLS_CACHE_DIR $PDF_TOOLS_DIR
|
|
||||||
|
|
||||||
touch "$PROFILE/prefs.js"
|
touch "$PROFILE/prefs.js"
|
||||||
cat <<EOF >> "$PROFILE/prefs.js"
|
cat <<EOF >> "$PROFILE/prefs.js"
|
||||||
user_pref("app.update.enabled", false);
|
user_pref("app.update.enabled", false);
|
||||||
|
|
Loading…
Reference in a new issue