diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2017-10-30 16:17:18 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2017-11-03 09:49:33 +0000 |
commit | 0b6040b505b1b6a02cdc7d152c9ca7f27bf20974 (patch) | |
tree | 024f7764645b010dd7d499f0783900cabbfbd989 | |
parent | f1b4853a56ad2559d35fbcf667d0ba001c9ea9d0 (diff) |
Better support the Qt Installer usecases
Add wrapper scripts which make sure the needed libraries
are loaded and starting neptune-ui works on all supported
Installer targets.
Change the default INSTALL_PREFIX to QT_INSTALL_PREFIX to
align the install location with the final location inside
the installer. This also makes sure the wrapper scripts
work and can find their libraries.
Change the folder name from neptune to neptune-ui.
Task-number: QTAUTO-289
Change-Id: I69749ac29da864a63f8c1695f022c6e7a020c74b
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r-- | config.pri | 2 | ||||
-rw-r--r-- | neptune-ui.pro | 2 | ||||
-rw-r--r-- | plugins/comtqci18ndemo/comtqci18ndemo.pro | 2 | ||||
-rw-r--r-- | plugins/translation/translation.pro | 2 | ||||
-rw-r--r-- | qmake-features/qmlplugin.prf | 2 | ||||
-rw-r--r-- | src/neptune-ui_wrapper.bat | 37 | ||||
-rwxr-xr-x | src/neptune-ui_wrapper.sh | 37 | ||||
-rw-r--r-- | src/src.pro | 8 |
8 files changed, 85 insertions, 7 deletions
@@ -1,3 +1,3 @@ isEmpty(INSTALL_PREFIX) { -INSTALL_PREFIX=/opt +INSTALL_PREFIX=$$[QT_INSTALL_PREFIX] } diff --git a/neptune-ui.pro b/neptune-ui.pro index 524a832..917eebb 100644 --- a/neptune-ui.pro +++ b/neptune-ui.pro @@ -28,7 +28,7 @@ SUBDIRS += copydata # Install all required files qml.files = apps imports sysui examples styles am-config.yaml Main.qml -qml.path = $$INSTALL_PREFIX/neptune +qml.path = $$INSTALL_PREFIX/neptune-ui INSTALLS += qml OTHER_FILES += $$files($$PWD/*.qml, true) diff --git a/plugins/comtqci18ndemo/comtqci18ndemo.pro b/plugins/comtqci18ndemo/comtqci18ndemo.pro index 5715335..9528cbc 100644 --- a/plugins/comtqci18ndemo/comtqci18ndemo.pro +++ b/plugins/comtqci18ndemo/comtqci18ndemo.pro @@ -56,7 +56,7 @@ qm.CONFIG += no_link QMAKE_EXTRA_COMPILERS += qm qmfiles.files = $$prependAll(supportedLocales, $$shadowed($$qmlAppPath/translations)/i18napp_, .qm) -qmfiles.path = $$INSTALL_PREFIX/neptune/apps/com.theqtcompany.i18ndemo/translations +qmfiles.path = $$INSTALL_PREFIX/neptune-ui/apps/com.theqtcompany.i18ndemo/translations qmfiles.CONFIG += no_check_exist INSTALLS += qmfiles diff --git a/plugins/translation/translation.pro b/plugins/translation/translation.pro index 80ae4dc..6735cdc 100644 --- a/plugins/translation/translation.pro +++ b/plugins/translation/translation.pro @@ -51,7 +51,7 @@ qm.CONFIG += no_link QMAKE_EXTRA_COMPILERS += qm qmfiles.files = $$prependAll(supportedLocales, $$shadowed($$assetsPath/translations)/, .qm) -qmfiles.path = $$INSTALL_PREFIX/neptune/imports/assets/translations +qmfiles.path = $$INSTALL_PREFIX/neptune-ui/imports/assets/translations qmfiles.CONFIG += no_check_exist INSTALLS += qmfiles diff --git a/qmake-features/qmlplugin.prf b/qmake-features/qmlplugin.prf index af00494..591c77d 100644 --- a/qmake-features/qmlplugin.prf +++ b/qmake-features/qmlplugin.prf @@ -19,7 +19,7 @@ OTHER_FILES = qmldir include(../config.pri) qmldir.files = qmldir -installPath = $$INSTALL_PREFIX/neptune/imports/shared/$$replace(uri, \\., /) +installPath = $$INSTALL_PREFIX/neptune-ui/imports/shared/$$replace(uri, \\., /) qmldir.path = $$installPath target.path = $$installPath INSTALLS += target qmldir diff --git a/src/neptune-ui_wrapper.bat b/src/neptune-ui_wrapper.bat new file mode 100644 index 0000000..8aee0b6 --- /dev/null +++ b/src/neptune-ui_wrapper.bat @@ -0,0 +1,37 @@ +@echo off +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: +:: Copyright (C) 2017 Pelagicore AG +:: Contact: https://www.qt.io/licensing/ +:: +:: This file is part of the Neptune IVI UI. +:: +:: $QT_BEGIN_LICENSE:GPL-QTAS$ +:: Commercial License Usage +:: Licensees holding valid commercial Qt Automotive Suite licenses may use +:: this file in accordance with the commercial license agreement provided +:: with the Software or, alternatively, in accordance with the terms +:: contained in a written agreement between you and The Qt Company. For +:: licensing terms and conditions see https://www.qt.io/terms-conditions. +:: For further information use the contact form at https://www.qt.io/contact-us. +:: +:: GNU General Public License Usage +:: Alternatively, this file may be used under the terms of the GNU +:: General Public License version 3 or (at your option) any later version +:: approved by the KDE Free Qt Foundation. The licenses are as published by +:: the Free Software Foundation and appearing in the file LICENSE.GPL3 +:: included in the packaging of this file. Please review the following +:: information to ensure the GNU General Public License requirements will +:: be met: https://www.gnu.org/licenses/gpl-3.0.html. +:: +:: $QT_END_LICENSE$ +:: +:: SPDX-License-Identifier: GPL-3.0 +:: +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +SetLocal EnableDelayedExpansion +set WRAPPER_PWD=%~dp0 +set PATH=%WRAPPER_PWD%\..\bin;%PATH% +%WRAPPER_PWD%\neptune-ui %* +EndLocal diff --git a/src/neptune-ui_wrapper.sh b/src/neptune-ui_wrapper.sh new file mode 100755 index 0000000..be46f89 --- /dev/null +++ b/src/neptune-ui_wrapper.sh @@ -0,0 +1,37 @@ +#!/bin/sh +############################################################################# +## +## Copyright (C) 2017 Pelagicore AG +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Neptune IVI UI. +## +## $QT_BEGIN_LICENSE:GPL-QTAS$ +## Commercial License Usage +## Licensees holding valid commercial Qt Automotive Suite licenses may use +## this file in accordance with the commercial license agreement provided +## with the Software or, alternatively, in accordance with the terms +## contained in a written agreement between you and The Qt Company. For +## licensing terms and conditions see https://www.qt.io/terms-conditions. +## For further information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +## SPDX-License-Identifier: GPL-3.0 +## +############################################################################# + +WRAPPER_PWD=`dirname $0` +export DYLD_FRAMEWORK_PATH=$WRAPER_PWD/../lib +export DYLD_LIBRARY_PATH=$WRAPER_PWD/../lib +export LD_LIBRARY_PATH=$WRAPER_PWD/../lib +$WRAPPER_PWD/neptune-ui "$@" diff --git a/src/src.pro b/src/src.pro index d477d20..3a3e75a 100644 --- a/src/src.pro +++ b/src/src.pro @@ -22,5 +22,9 @@ unix:!macos:system($$pkgConfigExecutable() --libs x11 xi xcb) { DESTDIR = $$OUT_PWD/../ -target.path = $$INSTALL_PREFIX/neptune -INSTALLS += target +win32: wrapper.files = neptune-ui_wrapper.bat +else: wrapper.files = neptune-ui_wrapper.sh +wrapper.path = $$INSTALL_PREFIX/neptune-ui + +target.path = $$INSTALL_PREFIX/neptune-ui +INSTALLS += target wrapper |