# # # patch "NEWS" # from [0edbb3bdb6fa7ecdd31755b888630c9c4ad18b30] # to [1bd15d54029a6a40f6805982065b80b73e45ed96] # # patch "README" # from [a7e7f7689ec27a4b43e254c15686466ce3b43cbe] # to [bca985a08fe53048e47fe37545ae7c3317ffead5] # # patch "guitone.pro" # from [f532a91cd1ed85e1bdd11513d5292bcf6c5e3861] # to [91c9c301a9983f78a8a07a48b1554f6221ee5a48] # ============================================================ --- NEWS 0edbb3bdb6fa7ecdd31755b888630c9c4ad18b30 +++ NEWS 1bd15d54029a6a40f6805982065b80b73e45ed96 @@ -16,6 +16,7 @@ xxxx-xx-xx (1.0rc3) - internal: build system improvements (check README for more details): * diagnostic messages if needed tools are not found * lrelease is now called automatically + * add a target to create a distributable tarball * include Mac OS X deploying and bundling as separate targets * add an install target for Linux and a desktop and mime file - internal: bind guitone's internal settings system late to the needed ============================================================ --- README a7e7f7689ec27a4b43e254c15686466ce3b43cbe +++ README bca985a08fe53048e47fe37545ae7c3317ffead5 @@ -30,6 +30,11 @@ The following additional make targets are available: + tarball (Linux / Mac OS X only): + Creates a clean, indentifyable tarball for distribution. + ATTENTION: The Makefile also comes with an autogenerated, but + bugg dist target from Qt - do _not_ use that! + install (Linux only): Installs the application and related files honoring PREFIX and INSTALL_ROOT (make INSTALL_ROOT=/tmp/install-root install) @@ -57,9 +62,9 @@ Path to Mac OS X' hdiutil disk utility (Default: hdiutil) PREFIX (Linux only): - Installation prefix (Default: /usr) + Installation prefix (Default: /usr) -The created binary and disk image can be found in bin/. +All created files can be found in bin/. Obtaining the source ============================================================ --- guitone.pro f532a91cd1ed85e1bdd11513d5292bcf6c5e3861 +++ guitone.pro 91c9c301a9983f78a8a07a48b1554f6221ee5a48 @@ -1,16 +1,16 @@ # # global definitions # -GUITONE_VERSION = "1.0rc3.dev" +VERSION = "1.0rc3.dev" # this is automatically determined if we are executing qmake in a monotone -# workspace, for source releases however we need to set it explicitely -GUITONE_REVISION = "" +# workspace and if we create a distributable tarball +REVISION = "" MIN_MTN_INT_VERSION = "12.0" MAX_MTN_INT_VERSION = "12.0" APPCAST_URL = "https://guitone.thomaskeller.biz/web/appcast.xml" DOCFILES = "README README.driver COPYING NEWS" -DEFINES += GUITONE_VERSION=\\\"$${GUITONE_VERSION}\\\" \ +DEFINES += GUITONE_VERSION=\\\"$${VERSION}\\\" \ MIN_MTN_INT_VERSION=\\\"$${MIN_MTN_INT_VERSION}\\\" \ MAX_MTN_INT_VERSION=\\\"$${MAX_MTN_INT_VERSION}\\\" \ APPCAST_URL=\\\"$${APPCAST_URL}\\\" @@ -32,24 +32,25 @@ isEmpty(LRELEASE):LRELEASE="lrelease" system($$LRELEASE guitone.pro $$shutup) } -isEmpty(GUITONE_REVISION):!exists(_MTN) { - warning("bookkeeping directory not found and GUITONE_REVISION \ +isEmpty(REVISION):!exists(_MTN) { + warning("bookkeeping directory not found and REVISION \ not defined will not include revision id in build") } -isEmpty(GUITONE_REVISION):exists(_MTN) { +isEmpty(REVISION):exists(_MTN) { isEmpty(MTN):MTN="mtn" !system($$MTN --version $$shutup) { warning("mtn command '$$MTN' not found - \ will not include revision id in build") + MTN="" } else { - GUITONE_REVISION = $$system($$MTN automate get_base_revision_id) + REVISION = $$system($$MTN automate get_base_revision_id) } } -isEmpty(GUITONE_REVISION):GUITONE_REVISION = "?" +isEmpty(REVISION):REVISION = "?" -DEFINES += GUITONE_REVISION=\\\"$${GUITONE_REVISION}\\\" +DEFINES += GUITONE_REVISION=\\\"$${REVISION}\\\" # # common configuration @@ -289,7 +290,8 @@ DESTDIR = bin MOC_DIR = tmp RCC_DIR = tmp DESTDIR = bin -TRANSLATIONS = res/i18n/guitone_de.ts +TRANSLATIONS = res/i18n/guitone_de.ts \ + res/i18n/guitone_pt.ts RESOURCES = res/guitone.qrc # add guitone ico resource @@ -303,7 +305,7 @@ unix:!macx { icon.files = res/icons/$${TARGET}.png icon.path = $$PREFIX/share/pixmaps docs.files = NEWS README README.driver COPYING - docs.path = $$PREFIX/share/doc/$$TARGET-$$GUITONE_VERSION + docs.path = $$PREFIX/share/doc/$$TARGET-$$VERSION desktop.files = res/linux/$${TARGET}.desktop desktop.path = $$PREFIX/share/applications mime.files = res/linux/x-monotone-database.xml @@ -318,7 +320,7 @@ macx { # copy i18n resources into the final app bundle and # put the current version number into Info.plist QMAKE_POST_LINK = cp -R res/osx/Resources bin/$$TARGET.app/Contents && \ - sed -e \'s|@@version@@|$$GUITONE_VERSION|g\' \ + sed -e \'s|@@version@@|$$VERSION|g\' \ < res/osx/Info.plist.in > bin/$$TARGET.app/Contents/Info.plist # add x86, ppc archs for universal release builds @@ -348,7 +350,7 @@ macx { } else { contains(QMAKE_EXTRA_TARGETS, macdeploy) { IMAGEROOT=$$DESTDIR/disk-image-root - IMAGEFILE=$$DESTDIR/$$TARGET-$${GUITONE_VERSION}.dmg + IMAGEFILE=$$DESTDIR/$$TARGET-$${VERSION}.dmg macdisk.depends = macdeploy macdisk.target = macdisk @@ -359,7 +361,7 @@ macx { for f in \$$(ls $$DOCFILES); do cp \$$f $$IMAGEROOT/\$$f.txt; done; \ rm -f $$IMAGEFILE; \ $$HDIUTIL create -srcfolder $$IMAGEROOT -format UDBZ \ - -volname \'$$TARGET $$GUITONE_VERSION\' $$IMAGEFILE; \ + -volname \'$$TARGET $$VERSION\' $$IMAGEFILE; \ rm -rf $$IMAGEROOT QMAKE_EXTRA_TARGETS += macdisk @@ -367,3 +369,25 @@ macx { } } +unix:!isEmpty(MTN) { + # Qt has its own, but buggy default dist target we cannot remove + # or overwrite, thats why we name ours differently and point the + # user to use that one instead + DISTNAME="$$TARGET-$$VERSION" + tarball.target = tarball + tarball.commands = \ + rev="\$$(mtn au get_base_revision_id | tr -d '\n')"; \ + rm -rf "$$DESTDIR/$$DISTNAME"; \ + mtn checkout -r\$$rev "$$DESTDIR/$$DISTNAME"; \ + sed -e \"s|^REVISION.*\$$|REVISION=\\\"\$$rev\\\"|g\" \ + < "$$DESTDIR/$$DISTNAME/guitone.pro" \ + > "$$DESTDIR/$$DISTNAME/guitone.pro.out" && \ + mv "$$DESTDIR/$$DISTNAME/guitone.pro.out" \ + "$$DESTDIR/$$DISTNAME/guitone.pro"; \ + rm -rf "$$DESTDIR/$$DISTNAME/{_MTN,.mtn-ignore,attic,notes}"; \ + (cd "$$DESTDIR" && tar czf "$${DISTNAME}.tgz" "$$DISTNAME"); \ + rm -rf "$$DESTDIR/$$DISTNAME"; + + QMAKE_EXTRA_TARGETS += tarball +} +