AppImage for Linux
It would be great to have Zotero as AppImage.
I've just created Zotero-5.0.86_linux-x86_64.AppImage using a modified version of this script:
https://github.com/Eothred/zotero/blob/appimage/packaging/AppImage/build.sh
It's working fine in Linux Mint 19.3.
I've just created Zotero-5.0.86_linux-x86_64.AppImage using a modified version of this script:
https://github.com/Eothred/zotero/blob/appimage/packaging/AppImage/build.sh
It's working fine in Linux Mint 19.3.
1) download the latest Zotero-${VERSION}_linux-x86_64.tar.bz2
2) download the latest appimagetool needed to build the AppImage file
3) uncompress, modify and build Zotero-${VERSION}_linux-x86_64.AppImage
4) remove temporary files and folders
Just copy following code into a zotero_to_appimage.sh
---------------------------------------
# Create Zotero-${VERSION}_linux-x86_64.AppImage from latest version
# Coder: omvsj
# Version: 1
content=$(wget https://www.zotero.org/download -q -O -)
VERSION=$(echo $content | grep -o -P '(?<="linux-x86_64":").*(?="})')
if [ ! -e Zotero-${VERSION}_linux-x86_64.tar.bz2 ]
then
wget "https://www.zotero.org/download/client/dl?channel=release&platform=linux-x86_64&version=$VERSION" -O Zotero-${VERSION}_linux-x86_64.tar.bz2
fi
if [ -d Zotero-${VERSION}_linux-x86_64 ]
then
rm -rf Zotero-${VERSION}_linux-x86_64
fi
echo "Extracting..."
tar -jxf Zotero-${VERSION}_linux-x86_64.tar.bz2
mv Zotero_linux-x86_64 Zotero-${VERSION}_linux-x86_64
if [ ! -f appimagetool-x86_64.AppImage ]
then
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool-x86_64.AppImage
fi
echo "Configuring..."
cd Zotero-${VERSION}_linux-x86_64
mv zotero AppRun
sed "s/Exec=.*/Exec=zotero-bin -url %U/g" zotero.desktop | sed "s#MimeType=text/plain#MimeType=text/plain;#" | sed "s/zotero.ico/zotero/g"> zotero-new.desktop
mv zotero-new.desktop zotero.desktop
cp chrome/icons/default/main-window.ico zotero.ico
convert zotero.ico zotero.png
mv zotero-0.png zotero.png
rm zotero-*.png zotero.ico
echo "Packaging..."
cd ..
./appimagetool-x86_64.AppImage Zotero-${VERSION}_linux-x86_64
mv Zotero-x86_64.AppImage Zotero-${VERSION}_linux-x86_64.AppImage
rm -rf Zotero-${VERSION}_linux-x86_64
rm Zotero-${VERSION}_linux-x86_64.tar.bz2
rm appimagetool-x86_64.AppImage
This script can be run from anywhere, and doesn't have any scary "rm -rf"s in it. It would be great if Zotero distributed these images, they're really handy and quick to build, and easier to install, without need to create a .desktop file manually.
I would keep this two lines to "find" latest version:
content=$(wget https://www.zotero.org/download -q -O -)
version=$(echo $content | grep -o -P '(?<="linux-'${arch}'":").*(?="})')
Not that I think that drive letters are a great idea. A throwback to the days that the fortunate would have two floppy drives instead of one that we still live with today. Can't even put the user data on a 2nd drive.
On a related issue, I guess, as things stand now, for me, an unskilled Linux user, it would be great if after install Zotero could have a script to register the application for launcher/OS searches like other applications do. I couldn't manage to do it myself.
The recommended set_launcher_icon script could do that I guess.
For instance I have installed OBS project using `sudo apt-get install obs-studio' and it is immeadiately available to launch by the main OS search (on xfce/Xubuntu).