diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-10-22 11:25:59 +0200 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-10-22 11:25:59 +0200 |
commit | f0c92dbae31b12799d0622b8219d7841ab10464f (patch) | |
tree | f5926503dcc7f98abe5104362d63a04cb5c11948 /deploy-linux.sh | |
parent | 24fbb3b7aca8dd5b957397a046d3cb71a00b324c (diff) |
updated version in header and added deploy scripts
Diffstat (limited to 'deploy-linux.sh')
-rwxr-xr-x | deploy-linux.sh | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/deploy-linux.sh b/deploy-linux.sh new file mode 100755 index 0000000..4e92b95 --- /dev/null +++ b/deploy-linux.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +# directory where libQt5XXX.so files can be found +LIBDIR=/usr/lib/x86_64-linux-gnu + +# directory where Qt plugins can be found +PLUGINDIR=$LIBDIR/qt5/plugins + +mkdir -p dist/tikzit +cd dist/tikzit +mkdir -p opt +mkdir -p bin +mkdir -p lib +mkdir -p plugins + +# add README file +cat > README << 'EOF' +This is a portable version of TikZiT 2.0. To launch TikZiT, simply run +'bin/tikzit'. To install launcher and icons for the current user, make +sure the 'bin' sub-directory is in your $PATH and run: + +# ./install-local.sh + +inside the tikzit directory. + + +TikZiT is released under the GNU General Public License, Version 3. See: + +http://tikzit.github.io + +for full details and source code. +EOF + +# add helper scripts +cat > install-local.sh << 'EOF' +#!/bin/bash + +mkdir -p ~/.local +cp -r share ~/.local/ +update-mime-database ~/.local/share/mime +update-desktop-database ~/.local/share/applications +EOF +chmod +x install-local.sh + +cat > bin/tikzit << 'EOF' +#!/bin/bash + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && cd .. && pwd )" +LD_LIBRARY_PATH=$DIR/lib:$LD_LIBRARY_PATH QT_PLUGIN_PATH=$DIR/plugins $DIR/opt/tikzit $@ +EOF +chmod +x bin/tikzit + +# add tikzit binary +cp ../../tikzit opt + +# add icons, desktop entry, and MIME data +cp -R ../../share . + +# add Qt libs. Keep shortened lib names as symlinks. +cp --no-dereference $LIBDIR/libQt5Core.so* lib +cp --no-dereference $LIBDIR/libQt5DBus.so* lib +cp --no-dereference $LIBDIR/libQt5Widgets.so* lib +cp --no-dereference $LIBDIR/libQt5Svg.so* lib +cp --no-dereference $LIBDIR/libQt5Network.so* lib +cp --no-dereference $LIBDIR/libQt5Gui.so* lib +cp --no-dereference $LIBDIR/libQt5XcbQpa.so* lib + +# add libicu, which is required by Qt5 for unicode support +cp --no-dereference $LIBDIR/libicuuc.so* lib +cp --no-dereference $LIBDIR/libicui18n.so* lib +cp --no-dereference $LIBDIR/libicudata.so* lib + +# add Qt plugins used by TikZiT +cp -R $PLUGINDIR/platforms plugins +cp -R $PLUGINDIR/imageformats plugins +cp -R $PLUGINDIR/platforminputcontexts plugins +cp -R $PLUGINDIR/xcbglintegrations plugins + +# create tar.gz +cd .. +tar czf tikzit.tar.gz tikzit + |