From f0c92dbae31b12799d0622b8219d7841ab10464f Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Mon, 22 Oct 2018 11:25:59 +0200 Subject: updated version in header and added deploy scripts --- .gitignore | 3 +++ deploy-linux.sh | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ deploy-osx.sh | 2 +- deploy-win.bat | 7 +++++ src/tikzit.cpp | 2 +- src/tikzit.h | 2 +- 6 files changed, 95 insertions(+), 3 deletions(-) create mode 100755 deploy-linux.sh create mode 100755 deploy-win.bat diff --git a/.gitignore b/.gitignore index 6894d5e..0fb2e43 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ moc_*.h ui_*.h qrc_*.cpp tikzit +tikzlexer.h +dist + 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 + diff --git a/deploy-osx.sh b/deploy-osx.sh index a04f7f7..15d69f7 100755 --- a/deploy-osx.sh +++ b/deploy-osx.sh @@ -1,5 +1,5 @@ # deploy the Mac app bundle. Note the bin/ directory # of Qt should be in your PATH -macdeployqt tikzit.app +macdeployqt tikzit.app -dmg diff --git a/deploy-win.bat b/deploy-win.bat new file mode 100755 index 0000000..dbd6e9a --- /dev/null +++ b/deploy-win.bat @@ -0,0 +1,7 @@ +mkdir dist +cd dist +mkdir tikzit +cd tikzit +cp ..\..\tikzit.exe . + +windeployqt.exe --no-webkit2 --no-angle --no-opengl-sw --no-system-d3d-compiler --no-translations --no-quick-import .\tikzit.exe \ No newline at end of file diff --git a/src/tikzit.cpp b/src/tikzit.cpp index 5d1fef4..4fd4227 100644 --- a/src/tikzit.cpp +++ b/src/tikzit.cpp @@ -372,7 +372,7 @@ void Tikzit::updateReply(QNetworkReply *reply) QByteArray data = reply->read(200); QString strLatest = QString::fromUtf8(data).simplified(); - qDebug() << "got response:" << strLatest; + //qDebug() << "got response:" << strLatest; QVersionNumber current = QVersionNumber::fromString(TIKZIT_VERSION).normalized(); QVersionNumber latest = QVersionNumber::fromString(strLatest).normalized(); diff --git a/src/tikzit.h b/src/tikzit.h index 635ee5e..69e9237 100644 --- a/src/tikzit.h +++ b/src/tikzit.h @@ -49,7 +49,7 @@ #ifndef TIKZIT_H #define TIKZIT_H -#define TIKZIT_VERSION "2.0-rc3" +#define TIKZIT_VERSION "2.0" #include "mainwindow.h" #include "mainmenu.h" -- cgit v1.2.3