forked from qt-creator/qt-creator
install qml files to the same path as target.path
An app with Qt Quick {1,2} Application template is installed under /opt/
and there is no easy way to change the installation path.
This change allows users to set installation path in the main pro file.
Change-Id: I0325c54187f781b1ceaaddfd41e913117fa445e6
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
committed by
Kai Koehne
parent
a17f96d42a
commit
ada9d1628e
@@ -17,6 +17,9 @@ QML_IMPORT_PATH =
|
||||
# The .cpp file which was generated for your project. Feel free to hack it.
|
||||
SOURCES += main.cpp
|
||||
|
||||
# Installation path
|
||||
# target.path =
|
||||
|
||||
# Please do not modify the following two lines. Required for deployment.
|
||||
include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
|
||||
# REMOVE_NEXT_LINE (wizard will remove the include and append deployment.pri to qmlapplicationviewer.pri, instead) #
|
||||
|
||||
@@ -21,6 +21,9 @@ QML_IMPORT_PATH =
|
||||
# The .cpp file which was generated for your project. Feel free to hack it.
|
||||
SOURCES += main.cpp
|
||||
|
||||
# Installation path
|
||||
# target.path =
|
||||
|
||||
# Please do not modify the following two lines. Required for deployment.
|
||||
include(qmlapplicationviewer/qmlapplicationviewer.pri)
|
||||
# REMOVE_NEXT_LINE (wizard will remove the include and append deployment.pri to qmlapplicationviewer.pri, instead) #
|
||||
|
||||
@@ -113,7 +113,11 @@ android {
|
||||
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
|
||||
}
|
||||
}
|
||||
!isEmpty(target.path) {
|
||||
installPrefix = $${target.path}
|
||||
} else {
|
||||
installPrefix = /opt/$${TARGET}
|
||||
}
|
||||
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
||||
item = item$${deploymentfolder}
|
||||
itemfiles = $${item}.files
|
||||
@@ -133,8 +137,10 @@ android {
|
||||
INSTALLS += icon desktopfile
|
||||
}
|
||||
|
||||
isEmpty(target.path) {
|
||||
target.path = $${installPrefix}/bin
|
||||
export(target.path)
|
||||
}
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user