diff options
author | axis <qt-info@nokia.com> | 2010-02-23 14:51:12 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-02-23 14:54:45 (GMT) |
commit | 3fc0b4194bffae9a0d7c7d87f97bb4d1e96e773b (patch) | |
tree | 9672a9193db2f87b501a7a221fa29ed990c1d935 /mkspecs | |
parent | 734596c1986f84f4c565f30fd436de94cf3cee1f (diff) | |
download | Qt-3fc0b4194bffae9a0d7c7d87f97bb4d1e96e773b.zip Qt-3fc0b4194bffae9a0d7c7d87f97bb4d1e96e773b.tar.gz Qt-3fc0b4194bffae9a0d7c7d87f97bb4d1e96e773b.tar.bz2 |
Implemented recursive "sis" target and enabled sis_targets feature.
The sis target will depend on the main build target of each project,
which should make it possible to simply run "make sis" in the root of
a clean tree (after configure, of course), and have sis packages
generated for everything. It works at least for Qt.
This required some changes to the dependency generation in Qt, to
make sure that s60installs builds its package after all of Qt, and
that fluidlauncher has all the required files before building a
package.
In addition, all the sis target code was moved into its own qmake
feature file, called sis_targets. It is currently enabled by default
for Symbian.
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/common/symbian/symbian.conf | 2 | ||||
-rw-r--r-- | mkspecs/features/sis_targets.prf | 139 | ||||
-rw-r--r-- | mkspecs/features/symbian/qt.prf | 124 |
3 files changed, 140 insertions, 125 deletions
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index a11f011..744ffda 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -3,7 +3,7 @@ # TEMPLATE = app -CONFIG += qt warn_on release incremental link_prl rvct_linker +CONFIG += qt warn_on release incremental link_prl rvct_linker sis_targets QT += core gui QMAKE_INCREMENTAL_STYLE = sublib diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf new file mode 100644 index 0000000..66a7a9d --- /dev/null +++ b/mkspecs/features/sis_targets.prf @@ -0,0 +1,139 @@ +# Sis file creation +contains(TEMPLATE, app)|!isEmpty(DEPLOYMENT) { + symbian-abld|symbian-sbsv2 { + sis_destdir = + make_cache_name = .make.cache + sis_target.target = sis + sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ + $(if $(wildcard $$make_cache_name), \ + $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \ + , \ + $(if $(QT_SIS_TARGET), \ + $(MAKE) -f $(MAKEFILE) ok_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ + ) \ + ) \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) + + ok_sis_target.target = ok_sis + ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ + $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + + target_sis_target.target = $${sis_destdir}$${TARGET}.sis + target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis + + installer_sis_target.target = installer_sis + installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \ + $(MAKE) -f $(MAKEFILE) ok_installer_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) + installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis + + ok_installer_sis_target.target = ok_installer_sis + ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ + $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + + fail_sis_nopkg_target.target = fail_sis_nopkg + fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)" + + fail_sis_nocache_target.target = fail_sis_nocache + fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)" + + stub_sis_target.target = stub_sis + stub_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ + $(if $(wildcard $$make_cache_name), \ + $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \ + , \ + $(if $(QT_SIS_TARGET), \ + $(MAKE) -f $(MAKEFILE) ok_stub_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ + ) \ + ) \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) + + ok_stub_sis_target.target = ok_stub_sis + ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ + $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + + QMAKE_EXTRA_TARGETS += sis_target \ + ok_sis_target \ + target_sis_target \ + installer_sis_target \ + ok_installer_sis_target \ + fail_sis_nopkg_target \ + fail_sis_nocache_target \ + stub_sis_target \ + ok_stub_sis_target + # Sbsv2 has its own store_build target which is using flms. + !symbian-sbsv2 { + contains(QMAKE_HOST.os, "Windows") { + shellFixedHash = $${LITERAL_HASH} + } else { + shellFixedHash = \\$${LITERAL_HASH} + } + store_build_target.target = store_build + store_build_target.commands = \ + @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \ + && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \ + && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \ + && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \ + && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \ + && echo $${shellFixedHash} make sis target. >> $$make_cache_name \ + && echo $${shellFixedHash} Version : >> $$make_cache_name \ + && echo $${shellFixedHash} >> $$make_cache_name \ + && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \ + && echo. >> $$make_cache_name \ + && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name + + QMAKE_EXTRA_TARGETS += store_build_target + } + } else { + sis_destdir = $$DESTDIR + !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\]$"):sis_destdir = $${sis_destdir}/ + contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\") + + sis_target.target = sis + sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ + - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + sis_target.depends = first + + target_sis_target.target = $${sis_destdir}$${TARGET}.sis + target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis + + installer_sis_target.target = installer_sis + installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ + $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis + + !isEmpty(DESTDIR) { + sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR + installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR + } + + QMAKE_EXTRA_TARGETS += sis_target \ + target_sis_target \ + installer_sis_target + } +} else { + contains(TEMPLATE, subdirs) { + # Enable recursive sis target. + sis_target.CONFIG = recursive + sis_target.recurse = $$SUBDIRS + } else { + # Make sure we build everything, since other sis targets in a recursive invocation + # may depend on them, even if this one is empty. + sis_target.depends = first + } + sis_target.commands = + sis_target.target = sis + QMAKE_EXTRA_TARGETS += sis_target +} + +QMAKE_DISTCLEAN += $${sis_destdir}$${TARGET}.sis diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf index e9b4ab8..99f5ece 100644 --- a/mkspecs/features/symbian/qt.prf +++ b/mkspecs/features/symbian/qt.prf @@ -39,127 +39,3 @@ contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0 isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000 isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000 - -# Sis file creation -symbian-abld|symbian-sbsv2 { - sis_destdir = - make_cache_name = .make.cache - sis_target.target = sis - sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ - $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \ - , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ - ) \ - ) \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) - - ok_sis_target.target = ok_sis - ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ - $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - - target_sis_target.target = $${sis_destdir}$${TARGET}.sis - target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis - - installer_sis_target.target = installer_sis - installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \ - $(MAKE) -f $(MAKEFILE) ok_installer_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) - installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis - - ok_installer_sis_target.target = ok_installer_sis - ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - - fail_sis_nopkg_target.target = fail_sis_nopkg - fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)" - - fail_sis_nocache_target.target = fail_sis_nocache - fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)" - - stub_sis_target.target = stub_sis - stub_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ - $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \ - , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_stub_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ - ) \ - ) \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) - - ok_stub_sis_target.target = ok_stub_sis - ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ - $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - - QMAKE_EXTRA_TARGETS += sis_target \ - ok_sis_target \ - target_sis_target \ - installer_sis_target \ - ok_installer_sis_target \ - fail_sis_nopkg_target \ - fail_sis_nocache_target \ - stub_sis_target \ - ok_stub_sis_target - # Sbsv2 has its own store_build target which is using flms. - !symbian-sbsv2 { - contains(QMAKE_HOST.os, "Windows") { - shellFixedHash = $${LITERAL_HASH} - } else { - shellFixedHash = \\$${LITERAL_HASH} - } - store_build_target.target = store_build - store_build_target.commands = \ - @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \ - && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \ - && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \ - && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \ - && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \ - && echo $${shellFixedHash} make sis target. >> $$make_cache_name \ - && echo $${shellFixedHash} Version : >> $$make_cache_name \ - && echo $${shellFixedHash} >> $$make_cache_name \ - && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \ - && echo. >> $$make_cache_name \ - && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name - - QMAKE_EXTRA_TARGETS += store_build_target - } -} else { - sis_destdir = $$DESTDIR - !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\]$"):sis_destdir = $${sis_destdir}/ - contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\") - - sis_target.target = sis - sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ - - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - - target_sis_target.target = $${sis_destdir}$${TARGET}.sis - target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis - - installer_sis_target.target = installer_sis - installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis - - !isEmpty(DESTDIR) { - sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR - installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR - } - - QMAKE_EXTRA_TARGETS += sis_target \ - target_sis_target \ - installer_sis_target -} - -QMAKE_DISTCLEAN += $${sis_destdir}$${TARGET}.sis |