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 | |
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.
-rw-r--r-- | demos/demos.pro | 5 | ||||
-rw-r--r-- | demos/embedded/embedded.pro | 2 | ||||
-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 | ||||
-rw-r--r-- | src/src.pro | 6 | ||||
-rw-r--r-- | src/tools/bootstrap/bootstrap.pri | 5 | ||||
-rw-r--r-- | src/tools/bootstrap/bootstrap.pro | 6 | ||||
-rw-r--r-- | translations/translations.pro | 7 |
9 files changed, 168 insertions, 128 deletions
diff --git a/demos/demos.pro b/demos/demos.pro index 08dd8af..6340175 100644 --- a/demos/demos.pro +++ b/demos/demos.pro @@ -43,7 +43,7 @@ SUBDIRS += demos_boxes } mac*: SUBDIRS += demos_macmainwindow -wince*|symbian|embedded|x11: SUBDIRS += embedded +wince*|symbian|embedded|x11: SUBDIRS += demos_embedded !contains(QT_EDITION, Console):!cross_compile:!embedded:!wince*:SUBDIRS += demos_arthurplugin @@ -65,6 +65,9 @@ symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) demos_chip.subdir = chip demos_embeddeddialogs.subdir = embeddeddialogs +demos_embedded.subdir = embedded +# Because of fluidlauncher +demos_embedded.depends = demos_deform demos_pathstroke demos_shared.subdir = shared demos_deform.subdir = deform demos_gradients.subdir = gradients diff --git a/demos/embedded/embedded.pro b/demos/embedded/embedded.pro index 5bd3276..da764d1 100644 --- a/demos/embedded/embedded.pro +++ b/demos/embedded/embedded.pro @@ -4,6 +4,8 @@ SUBDIRS = styledemo raycasting flickable digiflip contains(QT_CONFIG, svg) { SUBDIRS += embeddedsvgviewer \ desktopservices + fluidlauncher.subdir = fluidlauncher + fluidlauncher.depends = styledemo desktopservices raycasting flickable digiflip lightmaps flightinfo !vxworks:!qnx:SUBDIRS += fluidlauncher } 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 diff --git a/src/src.pro b/src/src.pro index 2ce5642..ec7b14b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -6,7 +6,7 @@ win32:SRC_SUBDIRS += src_winmain wince*:{ SRC_SUBDIRS += src_corelib src_xml src_gui src_sql src_network src_testlib } else:symbian { - SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib src_s60installs + SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib !symbian-abld:!symbian-sbsv2 { include(tools/tools.pro) } @@ -32,6 +32,9 @@ contains(QT_CONFIG, script): SRC_SUBDIRS += src_script contains(QT_CONFIG, scripttools): SRC_SUBDIRS += src_scripttools contains(QT_CONFIG, declarative): SRC_SUBDIRS += src_declarative SRC_SUBDIRS += src_plugins +# s60installs need to be at the end, because projects.pro does an ordered build, +# and s60installs depends on all the others. +symbian:SRC_SUBDIRS += src_s60installs src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main src_s60main.target = sub-s60main @@ -106,6 +109,7 @@ src_declarative.target = sub-declarative src_tools_activeqt.depends = src_tools_idc src_gui src_declarative.depends = src_xml src_gui src_script src_network src_svg src_plugins.depends = src_gui src_sql src_svg + src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS contains(QT_CONFIG, webkit) { src_webkit.depends = src_gui src_sql src_network src_xml contains(QT_CONFIG, phonon):src_webkit.depends += src_phonon diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index c29d59d..c5e1e1c 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -62,3 +62,8 @@ mac { LIBS += -framework CoreServices } +# Make dummy "sis" target to keep recursive "make sis" working. +sis_target.target = sis +sis_target.commands = +sis_target.depends = first +QMAKE_EXTRA_TARGETS += sis_target diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 0dbb90f..d211f47 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -113,3 +113,9 @@ contains(QT_CONFIG, zlib) { lib.CONFIG = dummy_install INSTALLS += lib + +# Make dummy "sis" target to keep recursive "make sis" working. +sis_target.target = sis +sis_target.commands = +sis_target.depends = first +QMAKE_EXTRA_TARGETS += sis_target diff --git a/translations/translations.pro b/translations/translations.pro index 6f40b49..566458c 100644 --- a/translations/translations.pro +++ b/translations/translations.pro @@ -10,7 +10,7 @@ contains(TEMPLATE_PREFIX, vc):vcproj = 1 TEMPLATE = app TARGET = qm_phony_target -CONFIG -= qt separate_debug_info +CONFIG -= qt separate_debug_info sis_targets CONFIG += no_icon QT = LIBS = @@ -45,3 +45,8 @@ translations.files = $$TRANSLATIONS translations.files ~= s,\\.ts$,.qm,g translations.CONFIG += no_check_exist INSTALLS += translations + +# Make dummy "sis" target to keep recursive "make sis" working. +sis_target.target = sis +sis_target.commands = +QMAKE_EXTRA_TARGETS += sis_target |