From aba638f7bef1a25e35a2abba54da71d141c35d0a Mon Sep 17 00:00:00 2001 From: MitSchoko Date: Wed, 5 Nov 2014 10:27:23 +0100 Subject: [PATCH 1/2] build process now creates propper app bundle under mac --HG-- branch : develop --- src/app/app.pro | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/src/app/app.pro b/src/app/app.pro index 111fcbacf..1d5f9af6b 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -180,6 +180,9 @@ isEmpty(PREFIX){ PREFIX = $$DEFAULT_PREFIX } +# Keep path to all files with standard measurements we support right now +INSTALL_STANDARD_MEASHUREMENTS += share/resources/tables/standard/GOST_man_ru.vst + # Prefix for binary file. unix:!macx{ # Add to this variable all translation files that you want install with program. @@ -194,8 +197,7 @@ unix:!macx{ share/translations/valentina_it_IT.qm \ share/translations/valentina_nl_NL.qm - # Keep path to all files with standard measurements we support right now - INSTALL_STANDARD_MEASHUREMENTS += share/resources/tables/standard/GOST_man_ru.vst + DATADIR =$$PREFIX/share DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" @@ -226,14 +228,15 @@ unix:!macx{ translations \ standard } -}else{ +} +macx{ # Some macx stuff - QMAKE_MAC_SDK = "/Developer/SDKs/MacOSX10.6.sdk" - QMAKE_MACOSX_DEPLOYMENT_TARGET = "10.5" + QMAKE_MAC_SDK = macosx + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 # Path to resources in app bundle RESOURCES_DIR = "Contents/Resources" - + FRAMEWORKS_DIR = "Contents/Frameworks" # On macx we will use app bundle. Bundle doesn't need bin directory inside. # See issue #166: Creating OSX Homebrew (Mac OS X package manager) formula. target.path = $$PREFIX/ @@ -302,10 +305,13 @@ unix:!macx{ TRANSLATION_nl_NL.path = "$$RESOURCES_DIR/translations/nl_NL.lproj" QMAKE_BUNDLE_DATA += TRANSLATION_nl_NL } - + frameworks.path = $$FRAMEWORKS_DIR + frameworks.files += $$files($${OUT_PWD}/../libs/qmuparser/$${DESTDIR}/*) + frameworks.files += $$files($${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR}/*) + message( framework files $$frameworks.files ) # logo on macx. - icon.files = "Valentina.icns" - icon.path = $$RESOURCES_DIR + ICON = share/resources/icon/64x64/icon64x64.ico + # Copy to bundle standard measurements files standard.path = $$RESOURCES_DIR/tables/standard/ @@ -314,6 +320,9 @@ unix:!macx{ QMAKE_BUNDLE_DATA += \ standard \ icons \ + frameworks + + } # Run generation *.qm file for available *.ts files each time you run qmake. @@ -358,6 +367,8 @@ else:unix: LIBS += -L$${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR} -lvproper INCLUDEPATH += $${PWD}/../libs/vpropertyexplorer DEPENDPATH += $${PWD}/../libs/vpropertyexplorer +message( $$[QT_INSTALL_BINS]/macdeployqt $${OUT_PWD}/$${DESTDIR}/$${TARGET} ) + # Strip after you link all libaries. CONFIG(release, debug|release){ unix:!macx{ @@ -367,3 +378,9 @@ CONFIG(release, debug|release){ QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET) } } + + +macx{ + # run macdeployqt to include all qt libraries in packet + QMAKE_POST_LINK += $$[QT_INSTALL_BINS]/macdeployqt $${OUT_PWD}/$${DESTDIR}/$${TARGET}.app +} From db0333987b0bc26bf93d8b95ec7c8b37faf55bc8 Mon Sep 17 00:00:00 2001 From: MitSchoko Date: Fri, 7 Nov 2014 09:25:53 +0100 Subject: [PATCH 2/2] Fixed bugs to .pro file see link below for detailed dicussion. https://bitbucket.org/dismine/valentina/pull-request/34/build-process-now-creates-propper-app/diff --HG-- branch : develop --- src/app/app.pro | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/app.pro b/src/app/app.pro index 1d5f9af6b..87857f750 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -233,7 +233,7 @@ macx{ # Some macx stuff QMAKE_MAC_SDK = macosx - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 # Path to resources in app bundle RESOURCES_DIR = "Contents/Resources" FRAMEWORKS_DIR = "Contents/Frameworks" @@ -310,7 +310,7 @@ macx{ frameworks.files += $$files($${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR}/*) message( framework files $$frameworks.files ) # logo on macx. - ICON = share/resources/icon/64x64/icon64x64.ico + ICON = ../../dist/Valentina.icns # Copy to bundle standard measurements files @@ -319,7 +319,6 @@ macx{ QMAKE_BUNDLE_DATA += \ standard \ - icons \ frameworks @@ -367,7 +366,6 @@ else:unix: LIBS += -L$${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR} -lvproper INCLUDEPATH += $${PWD}/../libs/vpropertyexplorer DEPENDPATH += $${PWD}/../libs/vpropertyexplorer -message( $$[QT_INSTALL_BINS]/macdeployqt $${OUT_PWD}/$${DESTDIR}/$${TARGET} ) # Strip after you link all libaries. CONFIG(release, debug|release){