From 087af4187177c8f06fa91a8640cd0b4e4bca05f4 Mon Sep 17 00:00:00 2001 From: Kari Oikarinen Date: Wed, 2 May 2018 16:38:07 +0300 Subject: [PATCH] Wizards: Add deployment rules to Widgets and Console applications Otherwise they can't be deployed to Boot2Qt (and other) devices. Quick application wizards already have these deployment rules. Task-number: QTCREATORBUG-20358 Change-Id: I5a19ada3f6a382e8553750769478c398a50352c9 Reviewed-by: Alessandro Portale Reviewed-by: Kari Hormi --- .../qtcreator/templates/wizards/projects/consoleapp/file.pro | 5 +++++ src/plugins/qmakeprojectmanager/wizards/guiappwizard.cpp | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/templates/wizards/projects/consoleapp/file.pro b/share/qtcreator/templates/wizards/projects/consoleapp/file.pro index bcd25cfa3b3..8cbe4523ae2 100644 --- a/share/qtcreator/templates/wizards/projects/consoleapp/file.pro +++ b/share/qtcreator/templates/wizards/projects/consoleapp/file.pro @@ -16,3 +16,8 @@ DEFINES += QT_DEPRECATED_WARNINGS SOURCES += \\ %{CppFileName} + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/src/plugins/qmakeprojectmanager/wizards/guiappwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/guiappwizard.cpp index 2e211758df8..00f32d47db1 100644 --- a/src/plugins/qmakeprojectmanager/wizards/guiappwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/guiappwizard.cpp @@ -200,7 +200,10 @@ Core::GeneratedFiles GuiAppWizard::generateFiles(const QWizard *w, << "\nMOBILITY = " << "\n"; } - proStr << '\n'; + proStr << "\n\n# Default rules for deployment.\n" + "qnx: target.path = /tmp/$${TARGET}/bin\n" + "else: unix:!android: target.path = /opt/$${TARGET}/bin\n" + "!isEmpty(target.path): INSTALLS += target\n"; } profile.setContents(contents); // List