Skip to content

Commit

Permalink
Better support the Qt Installer usecases
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Gagi2k authored and Robert Griebl committed Nov 3, 2017
1 parent f1b4853 commit 0b6040b
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.pri
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
isEmpty(INSTALL_PREFIX) {
INSTALL_PREFIX=/opt
INSTALL_PREFIX=$$[QT_INSTALL_PREFIX]
}
2 changes: 1 addition & 1 deletion neptune-ui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion plugins/comtqci18ndemo/comtqci18ndemo.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion plugins/translation/translation.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion qmake-features/qmlplugin.prf
Original file line number Diff line number Diff line change
Expand Up @@ -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
37 changes: 37 additions & 0 deletions src/neptune-ui_wrapper.bat
Original file line number Diff line number Diff line change
@@ -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
37 changes: 37 additions & 0 deletions src/neptune-ui_wrapper.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"
8 changes: 6 additions & 2 deletions src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0b6040b

Please sign in to comment.