diff --git a/dist/debian/menu b/dist/debian/menu index b532336ea..ce328f563 100644 --- a/dist/debian/menu +++ b/dist/debian/menu @@ -1,2 +1,2 @@ -?package(valentina):needs="X11|text|vc|wm" section="Applications/Graphics"\ - title="valentina" command="/usr/bin/valentina" +?package(valentina): needs="X11|text|vc" section="Applications/Graphics" title="Valentina" command="valentina" +?package(valentina): needs="X11|text|vc" section="Applications/Data Management" title="Tape" command="tape" diff --git a/dist/debian/valentina.dirs b/dist/debian/valentina.dirs index 4b6b4b91a..313736524 100644 --- a/dist/debian/valentina.dirs +++ b/dist/debian/valentina.dirs @@ -1,3 +1,4 @@ +/usr/share/valentina /usr/share/valentina/translations /usr/share/valentina/tables/standard /usr/share/valentina/tables/templates diff --git a/dist/debian/valentina.install b/dist/debian/valentina.install index 87d2b3ce9..a779a45fc 100644 --- a/dist/debian/valentina.install +++ b/dist/debian/valentina.install @@ -1,5 +1,6 @@ usr/bin/* usr/lib/* +usr/share/valentina/* usr/share/valentina/translations/* usr/share/valentina/tables/standard/* usr/share/valentina/tables/templates/* diff --git a/src/app/tape/tape.pro b/src/app/tape/tape.pro index 66af1df14..5412c8011 100644 --- a/src/app/tape/tape.pro +++ b/src/app/tape/tape.pro @@ -171,52 +171,75 @@ include(../tables.pri) copyToDestdir($$INSTALL_STANDARD_TEMPLATES, $$shell_path($${OUT_PWD}/$${DESTDIR}/tables/templates)) include(../translations.pri) -macx{ - # Some macx stuff - QMAKE_MAC_SDK = macosx +# Set "make install" command for Unix-like systems. +unix{ + # Prefix for binary file. + isEmpty(PREFIX){ + PREFIX = $$DEFAULT_PREFIX + } - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 - # Path to resources in app bundle - #RESOURCES_DIR = "Contents/Resources" defined in translation.pri - FRAMEWORKS_DIR = "Contents/Frameworks" - MACOS_DIR = "Contents/MacOS" - # 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 = $$MACOS_DIR + unix:!macx{ + DATADIR =$$PREFIX/share + DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" - #languages added inside translations.pri + # Path to bin file after installation + target.path = $$PREFIX/bin - # Symlinks also good names for copying. Make will take origin file and copy them with using symlink name. - # For bundle this names more then enough. We don't need care much about libraries versions. - libraries.path = $$FRAMEWORKS_DIR - libraries.files += $${OUT_PWD}/../../libs/qmuparser/$${DESTDIR}/libqmuparser.2.dylib - libraries.files += $${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR}/libvpropertyexplorer.1.dylib + rcc_diagrams.path = /usr/share/valentina/ + rcc_diagrams.files = $${OUT_PWD}/$${DESTDIR}/diagrams.rcc + rcc_diagrams.CONFIG = no_check_exist - # logo on macx. - ICON = $$PWD/../../../dist/Tape.icns + INSTALLS += \ + target \ + rcc_diagrams + } + macx{ + # Some macx stuff + QMAKE_MAC_SDK = macosx - QMAKE_INFO_PLIST = $$PWD/../../../dist/macx/tape/Info.plist + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 + # Path to resources in app bundle + #RESOURCES_DIR = "Contents/Resources" defined in translation.pri + FRAMEWORKS_DIR = "Contents/Frameworks" + MACOS_DIR = "Contents/MacOS" + # 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 = $$MACOS_DIR - # Copy to bundle standard measurements files - standard.path = $$RESOURCES_DIR/tables/standard/ - standard.files = $$INSTALL_STANDARD_MEASHUREMENTS + #languages added inside translations.pri - # Copy to bundle templates files - templates.path = $$RESOURCES_DIR/tables/templates/ - templates.files = $$INSTALL_STANDARD_TEMPLATES + # Symlinks also good names for copying. Make will take origin file and copy them with using symlink name. + # For bundle this names more then enough. We don't need care much about libraries versions. + libraries.path = $$FRAMEWORKS_DIR + libraries.files += $${OUT_PWD}/../../libs/qmuparser/$${DESTDIR}/libqmuparser.2.dylib + libraries.files += $${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR}/libvpropertyexplorer.1.dylib - # Copy to bundle standard measurements files - # We cannot add none exist files to bundle through QMAKE_BUNDLE_DATA. That's why we must do this manually. - forceCopyToDestdir($${OUT_PWD}/$${DESTDIR}/diagrams.rcc, $$shell_path($${OUT_PWD}/$$DESTDIR/$${TARGET}.app/$$RESOURCES_DIR/)) + # logo on macx. + ICON = $$PWD/../../../dist/Tape.icns - format.path = $$RESOURCES_DIR/ - format.files = $$PWD/../../../dist/macx/measurements.icns + QMAKE_INFO_PLIST = $$PWD/../../../dist/macx/tape/Info.plist - QMAKE_BUNDLE_DATA += \ - templates \ - standard \ - libraries \ - format + # Copy to bundle standard measurements files + standard.path = $$RESOURCES_DIR/tables/standard/ + standard.files = $$INSTALL_STANDARD_MEASHUREMENTS + + # Copy to bundle templates files + templates.path = $$RESOURCES_DIR/tables/templates/ + templates.files = $$INSTALL_STANDARD_TEMPLATES + + # Copy to bundle standard measurements files + # We cannot add none exist files to bundle through QMAKE_BUNDLE_DATA. That's why we must do this manually. + forceCopyToDestdir($${OUT_PWD}/$${DESTDIR}/diagrams.rcc, $$shell_path($${OUT_PWD}/$$DESTDIR/$${TARGET}.app/$$RESOURCES_DIR/)) + + format.path = $$RESOURCES_DIR/ + format.files = $$PWD/../../../dist/macx/measurements.icns + + QMAKE_BUNDLE_DATA += \ + templates \ + standard \ + libraries \ + format + } } # Compilation will fail without this files after we added them to this section. diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index ccc13070d..70937f11b 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -235,9 +235,6 @@ unix{ templates.path = /usr/share/$${TARGET}/tables/templates/ templates.files = $$INSTALL_STANDARD_TEMPLATES - diagrams.path = /usr/share/$${TARGET}/ - diagrams.files = $${OUT_PWD}/../tape/$${DESTDIR}/diagrams.rcc - INSTALLS += \ target \ tape \ @@ -245,8 +242,7 @@ unix{ pixmaps \ translations \ standard \ - templates \ - diagrams + templates } macx{ # Some macx stuff @@ -289,10 +285,6 @@ unix{ templates.path = $$RESOURCES_DIR/tables/templates/ templates.files = $$INSTALL_STANDARD_TEMPLATES - # Copy to bundle standard measurements files - diagrams.path = $$RESOURCES_DIR/ - diagrams.files = $${OUT_PWD}/../tape/$${DESTDIR}/diagrams.rcc - format.path = $$RESOURCES_DIR/ format.files = $$PWD/../../../dist/macx/measurements.icns @@ -302,7 +294,6 @@ unix{ libraries \ tape \ xpdf \ - diagrams \ format } }