From d1bb751a38b70268f208998ce817b549e07a2cf5 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Thu, 23 May 2013 22:42:16 +0200 Subject: introduce no_app_bundle.pri - it tries to copy the needed qt_menu.nib dir Change-Id: I04fe564f62e16847a417e47c9a0719c043c1f027 Reviewed-by: Karsten Heimrich --- installerfw.pri | 1 - no_app_bundle.pri | 28 ++++++++++++++++++++++ src/sdk/sdk.pro | 2 ++ tests/auto/qttest.pri | 2 +- tests/downloadspeed/downloadspeed.pro | 4 +++- tests/environmentvariable/environmentvariable.pro | 3 ++- tests/fileengineclient/fileengineclient.pro | 3 ++- tests/fileengineserver/fileengineserver.pro | 3 ++- tools/archivegen/archivegen.pro | 2 ++ tools/binarycreator/binarycreator.pro | 2 ++ tools/extractbinarydata/extractbinarydata.pro | 3 ++- .../getrepositorycontent/getrepositorycontent.pro | 1 + tools/repocompare/repocompare.pro | 3 ++- tools/repogen/repogen.pro | 2 ++ 14 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 no_app_bundle.pri diff --git a/installerfw.pri b/installerfw.pri index c5b4a8b4a..64af534e6 100644 --- a/installerfw.pri +++ b/installerfw.pri @@ -102,7 +102,6 @@ DEFINES += QT_NO_CAST_FROM_ASCII "_GIT_SHA1_=$$GIT_SHA1" IFW_VERSION=$$IFW_VERSI static { LIBS += -l7z win32-g++*: LIBS += -lmpr -luuid - macx:equals(TEMPLATE, app):CONFIG -= app_bundle win32:exists($$IFW_LIB_PATH/installer.lib):POST_TARGETDEPS += $$IFW_LIB_PATH/installer.lib unix:exists($$IFW_LIB_PATH/libinstaller.a):POST_TARGETDEPS += $$IFW_LIB_PATH/libinstaller.a diff --git a/no_app_bundle.pri b/no_app_bundle.pri new file mode 100644 index 000000000..631317193 --- /dev/null +++ b/no_app_bundle.pri @@ -0,0 +1,28 @@ +!isEmpty(NO_APP_BUNDLE_PRI_INCLUDED) { + error("no_app_bundle.pri already included") +} +NO_APP_BUNDLE_PRI_INCLUDED = 1 + +equals(TEMPLATE, app):CONFIG -= app_bundle + +isEqual(QT_MAJOR_VERSION, 4):static:contains(QT, gui) { + isEmpty(DESTDIR) { + MY_DEST_DIR=$$OUT_PWD + } else { + MY_DEST_DIR=$$DESTDIR + } + + !exists($$(MY_DEST_DIR)/qt_menu.nib) { + # try to get the qt_menu.nib path from the environment variable + isEmpty(QT_MENU_NIB_DIR): QT_MENU_NIB_DIR = $$(QT_MENU_NIB_DIR) + + # everything which has not the IFW_APP_PATH as target can try to copy it from there + exists($$IFW_APP_PATH/qt_menu.nib):QT_MENU_NIB_DIR=$$IFW_APP_PATH/qt_menu.nib + + isEmpty(QT_MENU_NIB_DIR) { + warning(Please call qmake with QT_MENU_NIB_DIR=/src/gui/mac/qt_menu.nib) + } else { + system($$QMAKE_COPY -r $$quote($$QT_MENU_NIB_DIR) $$quote($$MY_DEST_DIR)) + } + } +} diff --git a/src/sdk/sdk.pro b/src/sdk/sdk.pro index a986b41ef..7bb0fb06c 100644 --- a/src/sdk/sdk.pro +++ b/src/sdk/sdk.pro @@ -96,3 +96,5 @@ win32 { QMAKE_MANIFEST = installerbase.manifest } } + +macx:include(../../no_app_bundle.pri) diff --git a/tests/auto/qttest.pri b/tests/auto/qttest.pri index f6be301e8..be8526933 100644 --- a/tests/auto/qttest.pri +++ b/tests/auto/qttest.pri @@ -4,7 +4,6 @@ include(../../installerfw.pri) isEmpty(TEMPLATE):TEMPLATE=app QT += testlib CONFIG += qt warn_on console depend_includepath testcase -CONFIG -= app_bundle DEFINES -= QT_NO_CAST_FROM_ASCII # prefix test binary with tst_ @@ -16,3 +15,4 @@ DEFINES -= QT_NO_CAST_FROM_ASCII # # the below gets added to later by testcase.prf # check.commands = cd . & set PATH=$$lib;%PATH%& cmd /c #} +macx:include(../../no_app_bundle.pri) diff --git a/tests/downloadspeed/downloadspeed.pro b/tests/downloadspeed/downloadspeed.pro index e9aeeea70..0ffd8b991 100644 --- a/tests/downloadspeed/downloadspeed.pro +++ b/tests/downloadspeed/downloadspeed.pro @@ -8,7 +8,9 @@ QT -= gui QT += network CONFIG += console -CONFIG -= app_bundle + DESTDIR = $$IFW_APP_PATH SOURCES += main.cpp + +macx:include(../../no_app_bundle.pri) diff --git a/tests/environmentvariable/environmentvariable.pro b/tests/environmentvariable/environmentvariable.pro index 41648390a..39cc7e99e 100644 --- a/tests/environmentvariable/environmentvariable.pro +++ b/tests/environmentvariable/environmentvariable.pro @@ -8,8 +8,9 @@ QT -= gui QT += testlib CONFIG += console -CONFIG -= app_bundle DESTDIR = $$IFW_APP_PATH HEADERS = environmentvariabletest.h SOURCES = environmentvariabletest.cpp + +macx:include(../../no_app_bundle.pri) diff --git a/tests/fileengineclient/fileengineclient.pro b/tests/fileengineclient/fileengineclient.pro index 617ac9796..8b0538a55 100644 --- a/tests/fileengineclient/fileengineclient.pro +++ b/tests/fileengineclient/fileengineclient.pro @@ -8,7 +8,8 @@ QT -= gui QT += network CONFIG += console -CONFIG -= app_bundle DESTDIR = $$IFW_APP_PATH SOURCES += fileengineclient.cpp + +macx:include(../../no_app_bundle.pri) diff --git a/tests/fileengineserver/fileengineserver.pro b/tests/fileengineserver/fileengineserver.pro index 5c6f46e70..e4c125992 100644 --- a/tests/fileengineserver/fileengineserver.pro +++ b/tests/fileengineserver/fileengineserver.pro @@ -7,7 +7,8 @@ include(../../installerfw.pri) QT -= gui CONFIG += console -CONFIG -= app_bundle DESTDIR = $$IFW_APP_PATH SOURCES += fileengineserver.cpp + +macx:include(../../no_app_bundle.pri) diff --git a/tools/archivegen/archivegen.pro b/tools/archivegen/archivegen.pro index f6a40da4f..51bccb11b 100644 --- a/tools/archivegen/archivegen.pro +++ b/tools/archivegen/archivegen.pro @@ -13,3 +13,5 @@ DESTDIR = $$IFW_APP_PATH SOURCES += archive.cpp \ ../common/repositorygen.cpp HEADERS += ../common/repositorygen.h + +macx:include(../../no_app_bundle.pri) diff --git a/tools/binarycreator/binarycreator.pro b/tools/binarycreator/binarycreator.pro index 342cde286..88e3464d9 100644 --- a/tools/binarycreator/binarycreator.pro +++ b/tools/binarycreator/binarycreator.pro @@ -16,3 +16,5 @@ SOURCES = binarycreator.cpp \ ../common/repositorygen.cpp HEADERS = rcc/rcc.h RESOURCES += binarycreator.qrc + +macx:include(../../no_app_bundle.pri) diff --git a/tools/extractbinarydata/extractbinarydata.pro b/tools/extractbinarydata/extractbinarydata.pro index c22ff41c4..8df54e9d6 100644 --- a/tools/extractbinarydata/extractbinarydata.pro +++ b/tools/extractbinarydata/extractbinarydata.pro @@ -8,7 +8,8 @@ QT -= gui LIBS += -linstaller -l7z CONFIG += console -CONFIG -= app_bundle DESTDIR = $$IFW_APP_PATH SOURCES += main.cpp + +macx:include(../../no_app_bundle.pri) diff --git a/tools/getrepositorycontent/getrepositorycontent.pro b/tools/getrepositorycontent/getrepositorycontent.pro index d3412c63a..46a6efd13 100644 --- a/tools/getrepositorycontent/getrepositorycontent.pro +++ b/tools/getrepositorycontent/getrepositorycontent.pro @@ -20,3 +20,4 @@ HEADERS += \ downloader.h \ domnodedebugstreamoperator.h +macx:include(../../no_app_bundle.pri) diff --git a/tools/repocompare/repocompare.pro b/tools/repocompare/repocompare.pro index 8bdb83516..04f50dc5a 100644 --- a/tools/repocompare/repocompare.pro +++ b/tools/repocompare/repocompare.pro @@ -5,7 +5,6 @@ TARGET = repocompare include(../../installerfw.pri) QT += network -CONFIG -= app_bundle DESTDIR = $$IFW_APP_PATH SOURCES += main.cpp\ @@ -16,3 +15,5 @@ HEADERS += mainwindow.h \ repositorymanager.h FORMS += mainwindow.ui + +macx:include(../../no_app_bundle.pri) diff --git a/tools/repogen/repogen.pro b/tools/repogen/repogen.pro index 20566d600..7fad2ad96 100644 --- a/tools/repogen/repogen.pro +++ b/tools/repogen/repogen.pro @@ -13,3 +13,5 @@ DESTDIR = $$IFW_APP_PATH SOURCES += repogen.cpp \ ../common/repositorygen.cpp HEADERS += ../common/repositorygen.h + +macx:include(../../no_app_bundle.pri) -- cgit v1.2.3