diff --git a/share/qtcreator/templates/qtquick2app/app.pro b/share/qtcreator/templates/qtquick2app/app.pro index df37cf767b2..2495771e53d 100644 --- a/share/qtcreator/templates/qtquick2app/app.pro +++ b/share/qtcreator/templates/qtquick2app/app.pro @@ -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) # diff --git a/share/qtcreator/templates/qtquickapp/app.pro b/share/qtcreator/templates/qtquickapp/app.pro index 9fe3c6fdcf4..e96d5e0c4be 100644 --- a/share/qtcreator/templates/qtquickapp/app.pro +++ b/share/qtcreator/templates/qtquickapp/app.pro @@ -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) # diff --git a/share/qtcreator/templates/shared/deployment.pri b/share/qtcreator/templates/shared/deployment.pri index e2a4bcab1f7..cf304118e84 100644 --- a/share/qtcreator/templates/shared/deployment.pri +++ b/share/qtcreator/templates/shared/deployment.pri @@ -113,7 +113,11 @@ android { QMAKE_EXTRA_TARGETS += first copydeploymentfolders } } - installPrefix = /opt/$${TARGET} + !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 } - target.path = $${installPrefix}/bin - export(target.path) + isEmpty(target.path) { + target.path = $${installPrefix}/bin + export(target.path) + } INSTALLS += target }