From 99ba5989074302f8f788c7806f3075462ce6dac1 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sat, 9 Nov 2013 14:58:25 +0200 Subject: [PATCH 01/14] Builder: Added autobuild command to package the source tarball The tarball is then copied to the build directory. Next: Publish .tar.gz files. --- distrib/autobuild.py | 20 ++++++++++++++++++++ distrib/builder/utils.py | 8 ++++++++ distrib/platform_release.py | 5 +---- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/distrib/autobuild.py b/distrib/autobuild.py index 5697122581..27579a2189 100755 --- a/distrib/autobuild.py +++ b/distrib/autobuild.py @@ -175,6 +175,25 @@ def update_debian_changelog(): update_changes(debChanges=True) +def build_source_package(): + """Builds the source tarball and a Debian source package.""" + ev = builder.Event(latestAvailable=True) + print "Creating source tarball for build %i." % ev.number() + os.chdir(os.path.join(builder.config.DISTRIB_DIR)) + remkdir('srcwork') + os.chdir('srcwork') + if ev.release_type() == 'stable': + system_command('deng_package_source.sh ' + ev.version_base()) + else: + system_command('deng_package_source.sh build %i %s' % (ev.number(), + ev.version_base())) + for fn in os.listdir('.'): + if fn[:9] == 'doomsday-' and fn[-7:] == '.tar.gz': + remote_copy(fn, ev.file_path(fn)) + + #remote_copy('deng_buildlog.txt', ev.file_path('doomsday-out-%s.txt' % sys_id())) + + def rebuild_apt_repository(): """Rebuilds the Apt repository by running apt-ftparchive.""" aptDir = builder.config.APT_REPO_DIR @@ -454,6 +473,7 @@ def sorted_commands(): 'publish': publish_packages, 'changes': update_changes, 'debchanges': update_debian_changelog, + 'source': build_source_package, 'apt': rebuild_apt_repository, 'feed': update_feed, 'xmlfeed': update_xml_feed, diff --git a/distrib/builder/utils.py b/distrib/builder/utils.py index c87fc578d3..effe54feae 100644 --- a/distrib/builder/utils.py +++ b/distrib/builder/utils.py @@ -1,4 +1,5 @@ import os, sys, platform +import shutil import subprocess import string import glob @@ -8,6 +9,13 @@ import build_number import config +def remkdir(n): + if os.path.exists(n): + print n, 'exists, clearing it...' + shutil.rmtree(n, True) + os.mkdir(n) + + def omit_path(path, omitted): if path.startswith(omitted): path = path[len(omitted):] diff --git a/distrib/platform_release.py b/distrib/platform_release.py index 6042194925..0111fa765e 100755 --- a/distrib/platform_release.py +++ b/distrib/platform_release.py @@ -44,10 +44,7 @@ def mkdir(n): def remkdir(n): - if os.path.exists(n): - print n, 'exists, clearing it...' - shutil.rmtree(n, True) - os.mkdir(n) + builder.utils.remkdir(n) def remove(n): From a40b31c3cd418efae12be63d367f90eefa89f3d9 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sat, 9 Nov 2013 15:04:16 +0200 Subject: [PATCH 02/14] Builder: Cleanup --- distrib/autobuild.py | 2 -- distrib/builder/event.py | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/distrib/autobuild.py b/distrib/autobuild.py index 27579a2189..08b952b867 100755 --- a/distrib/autobuild.py +++ b/distrib/autobuild.py @@ -191,8 +191,6 @@ def build_source_package(): if fn[:9] == 'doomsday-' and fn[-7:] == '.tar.gz': remote_copy(fn, ev.file_path(fn)) - #remote_copy('deng_buildlog.txt', ev.file_path('doomsday-out-%s.txt' % sys_id())) - def rebuild_apt_repository(): """Rebuilds the Apt repository by running apt-ftparchive.""" diff --git a/distrib/builder/event.py b/distrib/builder/event.py index 0fd8681118..a3911819c2 100644 --- a/distrib/builder/event.py +++ b/distrib/builder/event.py @@ -334,6 +334,7 @@ def html_description(self, encoded=True): return msg def release_type(self): + """Returns the release type as a lower-case string.""" fn = self.file_path('releaseType.txt') if os.path.exists(fn): return file(fn).read().lower().strip() From e4c43e28b1e283f0f27898289ffca4fcc0f6f3c4 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sat, 9 Nov 2013 18:57:18 +0200 Subject: [PATCH 03/14] Builder|Debian|Ubuntu: Create a source package and upload it to Launchpad After putting together a tarball, also create a Debian source package and upload it to a Launchpad PPA (ppa:sjke/doomsday). --- distrib/.gitignore | 1 + distrib/autobuild.py | 23 ++++++++++++++++++++++- distrib/debian/control.template | 9 ++++----- distrib/debian/rules | 6 ++++-- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/distrib/.gitignore b/distrib/.gitignore index af22a228aa..c5f2b3586d 100644 --- a/distrib/.gitignore +++ b/distrib/.gitignore @@ -2,6 +2,7 @@ builddir build-stamp work +srcwork plugins build*.txt products diff --git a/distrib/autobuild.py b/distrib/autobuild.py index 08b952b867..34a9ce5601 100755 --- a/distrib/autobuild.py +++ b/distrib/autobuild.py @@ -189,7 +189,28 @@ def build_source_package(): ev.version_base())) for fn in os.listdir('.'): if fn[:9] == 'doomsday-' and fn[-7:] == '.tar.gz': - remote_copy(fn, ev.file_path(fn)) + remote_copy(fn, ev.file_path(fn)) + break + + # Create a source Debian package and upload it to Launchpad. + orig = 'doomsday_%s-build%i.orig.tar.gz' % (ev.version_base(), ev.number()) + os.rename(fn, orig) + shutil.copyfile(orig, 'doomsday_%s.orig.tar.gz' % (ev.version_base())) + system_command('tar xzf %s' % orig) + os.chdir(fn[:-7]) + system_command('echo "" | dh_make -s -c gpl2') + os.chdir('debian') + for fn in os.listdir('.'): + if fn[-3:].lower() == '.ex': os.remove(fn) + os.remove('README.Debian') + os.remove('README.source') + shutil.copyfile('../../../debian/changelog', 'changelog') + system_command("sed 's/${Arch}/all/' ../../../debian/control.template > control") + system_command("sed 's/..\/build_/..\/distrib\/build_/;s/..\/..\/doomsday/..\/doomsday/' ../../../debian/rules > rules") + os.chdir('..') + system_command('debuild -S') + os.chdir('..') + system_command('dput ppa:sjke/doomsday %s_source.changes' % (orig[:-12])) def rebuild_apt_repository(): diff --git a/distrib/debian/control.template b/distrib/debian/control.template index ffde195270..4a18a31fe8 100644 --- a/distrib/debian/control.template +++ b/distrib/debian/control.template @@ -2,11 +2,11 @@ Source: doomsday Section: universe/games Priority: optional Maintainer: Jaakko Keränen -Build-Depends: debhelper (>= 7.0.50~) -Standards-Version: 3.9.1 +Build-Depends: debhelper (>= 8.0.0), python, libsdl1.2-dev, libsdl-mixer1.2-dev, libxrandr-dev, libxxf86vm-dev, libqt4-network (>= 4.7), libqtcore4 (>= 4.7), libqtgui4 (>= 4.7), qt4-qmake (>= 4.7), libqt4-opengl-dev (>= 4.7), zlib1g-dev, libfluidsynth-dev +Standards-Version: 3.9.3 Homepage: http://dengine.net/ -Vcs-Git: git://deng.git.sourceforge.net/gitroot/deng/deng -Vcs-Browser: http://deng.git.sourceforge.net/git/gitweb.cgi?p=deng/deng;a=summary +Vcs-Git: https://github.com/skyjake/Doomsday-Engine.git +Vcs-Browser: http://github.com/skyjake/Doomsday-Engine Package: doomsday Architecture: ${Arch} @@ -18,4 +18,3 @@ Description: Doom/Heretic/Hexen port with enhanced graphics models, and dynamic lighting effects. Data files from the original games are not included; you must acquire a copy of the original games from id Software and/or Raven Software. - diff --git a/distrib/debian/rules b/distrib/debian/rules index 96a8ab3cf4..23efac6a55 100755 --- a/distrib/debian/rules +++ b/distrib/debian/rules @@ -4,9 +4,11 @@ builddir: mkdir -p builddir builddir/Makefile: builddir - cd builddir && qmake-qt4 PREFIX=/usr CONFIG+=release DENG_BUILD=`../build_number.py --print` ../../doomsday/$(APPNAME).pro + cd builddir && qmake-qt4 PREFIX=/usr CONFIG+=deng_fluidsynth CONFIG+=release DENG_BUILD=`../build_number.py --print` ../../doomsday/$(APPNAME).pro -build: build-stamp +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp build-stamp: builddir/Makefile dh_testdir From d45a473b6753ec097b5ae95e8b1dc421a4cb45bd Mon Sep 17 00:00:00 2001 From: skyjake Date: Sat, 9 Nov 2013 20:37:02 +0200 Subject: [PATCH 04/14] Fixed|Builder|Debian|Ubuntu: Version number of source package The Debian convention is that a version number suffix is used for the Debian-specific version number and it is not part of the actual/original version number. Therefore it is not appropriate to use the "-buildxxx" suffix. The build number is now appended as the fourth version number component, i.e., 1.13.0.1042. --- distrib/autobuild.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/distrib/autobuild.py b/distrib/autobuild.py index 34a9ce5601..2d625d3bad 100755 --- a/distrib/autobuild.py +++ b/distrib/autobuild.py @@ -193,24 +193,25 @@ def build_source_package(): break # Create a source Debian package and upload it to Launchpad. - orig = 'doomsday_%s-build%i.orig.tar.gz' % (ev.version_base(), ev.number()) - os.rename(fn, orig) - shutil.copyfile(orig, 'doomsday_%s.orig.tar.gz' % (ev.version_base())) - system_command('tar xzf %s' % orig) - os.chdir(fn[:-7]) - system_command('echo "" | dh_make -s -c gpl2') + pkgVer = '%s.%i' % (ev.version_base(), ev.number()) + pkgDir = 'doomsday-%s' % pkgVer + system_command('tar xzf %s' % fn) + os.rename(fn[:-7], pkgDir) + os.chdir(pkgDir) + system_command('echo "" | dh_make -s -c gpl2 --file ../%s' % fn) os.chdir('debian') for fn in os.listdir('.'): if fn[-3:].lower() == '.ex': os.remove(fn) os.remove('README.Debian') os.remove('README.source') - shutil.copyfile('../../../debian/changelog', 'changelog') - system_command("sed 's/${Arch}/all/' ../../../debian/control.template > control") + system_command("sed 's/%s-build%i/%s/' ../../../debian/changelog > changelog" % + (ev.version_base(), ev.number(), pkgVer)) + system_command("sed 's/${Arch}/i386 amd64/' ../../../debian/control.template > control") system_command("sed 's/..\/build_/..\/distrib\/build_/;s/..\/..\/doomsday/..\/doomsday/' ../../../debian/rules > rules") os.chdir('..') system_command('debuild -S') os.chdir('..') - system_command('dput ppa:sjke/doomsday %s_source.changes' % (orig[:-12])) + system_command('dput ppa:sjke/doomsday doomsday_%s_source.changes' % (pkgVer)) def rebuild_apt_repository(): From 4603d576c1723344a2b2ebddc6d8186a9e0de677 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sat, 9 Nov 2013 21:04:20 +0200 Subject: [PATCH 05/14] Builder|Debian|Ubuntu: Set a fixed build number in the build rules By default the rules are set to build for today's number, but a packaged source should use a fixed build number. --- distrib/autobuild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distrib/autobuild.py b/distrib/autobuild.py index 2d625d3bad..832d3c88b9 100755 --- a/distrib/autobuild.py +++ b/distrib/autobuild.py @@ -207,7 +207,7 @@ def build_source_package(): system_command("sed 's/%s-build%i/%s/' ../../../debian/changelog > changelog" % (ev.version_base(), ev.number(), pkgVer)) system_command("sed 's/${Arch}/i386 amd64/' ../../../debian/control.template > control") - system_command("sed 's/..\/build_/..\/distrib\/build_/;s/..\/..\/doomsday/..\/doomsday/' ../../../debian/rules > rules") + system_command("sed 's/`..\/build_number.py --print`/%i/;s/..\/..\/doomsday/..\/doomsday/' ../../../debian/rules > rules" % ev.number()) os.chdir('..') system_command('debuild -S') os.chdir('..') From e4039541bf6c2735fcdfc125cd623ccea3d4cd42 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sat, 9 Nov 2013 21:22:31 +0200 Subject: [PATCH 06/14] Builder|Pilot: After binary build, package the source The source package will be included in the signed files and will then be published to SourceForge. The source package will also be pushed to the sjke/doomsday PPA. --- distrib/pilot.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/distrib/pilot.py b/distrib/pilot.py index a5482cffb0..43780dc3bd 100755 --- a/distrib/pilot.py +++ b/distrib/pilot.py @@ -326,6 +326,10 @@ def doTask(task): msg("BUILD RELEASE") return autobuild('platform_release') + elif task == 'source': + msg("PACKAGE SOURCE") + return autobuild('source') + elif task == 'sign': msg("SIGN PACKAGES") return autobuild('sign') @@ -390,7 +394,10 @@ def handleCompletedTasks(): newTask('generate_wiki', forClient='master') elif task == 'build': - newTask('sign', forClient='master') + newTask('source', forClient='ubuntu') + + elif task == 'source': + newTask('sign', forClient='master') elif task == 'sign': newTask('publish', forClient='master') From e351b5a39a39c1c1a583eede074ea286ddb085a7 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sun, 10 Nov 2013 09:57:35 +0200 Subject: [PATCH 07/14] Builder: Cleanup --- distrib/autobuild.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/distrib/autobuild.py b/distrib/autobuild.py index 832d3c88b9..42701d7745 100755 --- a/distrib/autobuild.py +++ b/distrib/autobuild.py @@ -204,8 +204,12 @@ def build_source_package(): if fn[-3:].lower() == '.ex': os.remove(fn) os.remove('README.Debian') os.remove('README.source') - system_command("sed 's/%s-build%i/%s/' ../../../debian/changelog > changelog" % - (ev.version_base(), ev.number(), pkgVer)) + + def gen_changelog(src, dst, extraSub=''): + system_command("sed 's/%s-build%i/%s/;%s' %s > %s" % ( + ev.version_base(), ev.number(), pkgVer, extraSub, src, dst)) + + gen_changelog('../../../debian/changelog', 'changelog') system_command("sed 's/${Arch}/i386 amd64/' ../../../debian/control.template > control") system_command("sed 's/`..\/build_number.py --print`/%i/;s/..\/..\/doomsday/..\/doomsday/' ../../../debian/rules > rules" % ev.number()) os.chdir('..') From 0f3190d94955bd45d8af226955ae4378de81f7f4 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sun, 10 Nov 2013 10:27:18 +0200 Subject: [PATCH 08/14] Builder: Include source tarball in RSS/XML feeds In the XML feed, the source package uses the platform identifier "source". --- distrib/builder/event.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/distrib/builder/event.py b/distrib/builder/event.py index a3911819c2..8648d0cac4 100644 --- a/distrib/builder/event.py +++ b/distrib/builder/event.py @@ -50,7 +50,8 @@ def __init__(self, build=None, latestAvailable=False): ('Mac OS X 10.6+ (x86_64/i386)', 'mac10_6.dmg', 'darwin-64bit'), ('Mac OS X 10.4+ (ppc/i386)', '32bit.dmg', 'darwin-32bit'), ('Ubuntu (x86_64)', 'amd64.deb', 'linux2-64bit'), - ('Ubuntu (x86)', 'i386.deb', 'linux2-32bit')] + ('Ubuntu (x86)', 'i386.deb', 'linux2-32bit'), + ('Source', '.tar.gz', 'source')] if self.has_version() and utils.version_cmp(self.version_base(), '1.11') >= 0: del self.oses[3] # no more OS X 10.4 @@ -76,7 +77,8 @@ def __init__(self, build=None, latestAvailable=False): 'darwin-64bit': 'mac10_6-x86-x86_64', 'macx8-64bit': 'mac10_8-x86_64', 'linux2-32bit': 'linux-x86', - 'linux2-64bit': 'linux-x86_64'} + 'linux2-64bit': 'linux-x86_64', + 'source': 'source'} # Prepare compiler logs present in the build dir. self.compress_logs() @@ -161,7 +163,8 @@ def clean(self): def list_package_files(self): files = glob.glob(os.path.join(self.buildDir, '*.dmg')) + \ glob.glob(os.path.join(self.buildDir, '*.exe')) + \ - glob.glob(os.path.join(self.buildDir, '*.deb')) + glob.glob(os.path.join(self.buildDir, '*.deb')) + \ + glob.glob(os.path.join(self.buildDir, '*.tar.gz')) return [os.path.basename(f) for f in files] @@ -198,7 +201,7 @@ def text_summary(self): if commitCount == 100: moreThan = 'more than ' msg += " contains %s%i commits and" % (moreThan, commitCount) - msg += " produced %i installable binary package%s." % \ + msg += " produced %i package%s." % \ (pkgCount, 's' if (pkgCount != 1) else '') return msg From 6d4375a689ff08a973ec4b2938d927d06b512604 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sun, 10 Nov 2013 12:52:17 +0200 Subject: [PATCH 09/14] Fixed|Client: Build error and a warning According to ISO C++, enums cannot be forward-declared. --- doomsday/client/include/render/drawlist.h | 3 +-- doomsday/client/src/render/drawlists.cpp | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doomsday/client/include/render/drawlist.h b/doomsday/client/include/render/drawlist.h index 02353d6b8c..a63954b39b 100644 --- a/doomsday/client/include/render/drawlist.h +++ b/doomsday/client/include/render/drawlist.h @@ -22,12 +22,11 @@ #define DENG_CLIENT_RENDER_DRAWLIST_H #include "gl/gltextureunit.h" +#include "api_gl.h" // blendmode_e #include #include #include -enum blendmode_e; - /// Semantic geometry group identifiers. enum GeomGroup { diff --git a/doomsday/client/src/render/drawlists.cpp b/doomsday/client/src/render/drawlists.cpp index f7805149a0..be7c12ef23 100644 --- a/doomsday/client/src/render/drawlists.cpp +++ b/doomsday/client/src/render/drawlists.cpp @@ -55,6 +55,8 @@ DENG2_PIMPL(DrawLists) case LightGeom: return dynHash; case ShadowGeom: return shadowHash; case ShineGeom: return shinyHash; + + case SkyMaskGeom: break; // n/a? } DENG2_ASSERT(false); return unlitHash; From 99cf08cf535922a54cfea54f6ac651f7d6bdc857 Mon Sep 17 00:00:00 2001 From: danij Date: Sun, 10 Nov 2013 11:23:52 +0000 Subject: [PATCH 10/14] Homepage|Build Repository: Source code packages now available in the repository Doomsday Source code packages produced by the auto builder are now made available from the build repository. As usual, the latest source code packages also can queried for with a "latestbuild?platform=source" query and JSON object graph info is also available. --- web/plugins/buildrepository/buildrepository.php | 16 ++++++++++++++-- .../abstractunstablebuilderpackage.class.php | 6 +++++- .../packages/basepackage.class.php | 6 +++++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/web/plugins/buildrepository/buildrepository.php b/web/plugins/buildrepository/buildrepository.php index b8cfafcfc8..db7edf5449 100644 --- a/web/plugins/buildrepository/buildrepository.php +++ b/web/plugins/buildrepository/buildrepository.php @@ -36,6 +36,7 @@ define('PID_MAC10_8_X86_64', 4); define('PID_LINUX_X86', 5); define('PID_LINUX_X86_64', 6); +define('PID_SOURCE', 7); ///@} /** @@ -76,7 +77,8 @@ class BuildRepositoryPlugin extends Plugin implements Actioner, RequestInterpret PID_MAC10_6_X86_X86_64 => array('id'=>PID_MAC10_6_X86_X86_64, 'name'=>'mac10_6-x86-x86_64', 'nicename'=>'OS X 10.6+'), PID_MAC10_8_X86_64 => array('id'=>PID_MAC10_8_X86_64, 'name'=>'mac10_8-x86_64', 'nicename'=>'OS X 10.8+'), PID_LINUX_X86 => array('id'=>PID_LINUX_X86, 'name'=>'linux-x86', 'nicename'=>'Ubuntu (32bit)'), - PID_LINUX_X86_64 => array('id'=>PID_LINUX_X86_64, 'name'=>'linux-x86_64', 'nicename'=>'Ubuntu (64bit)') + PID_LINUX_X86_64 => array('id'=>PID_LINUX_X86_64, 'name'=>'linux-x86_64', 'nicename'=>'Ubuntu (64bit)'), + PID_SOURCE => array('id'=>PID_SOURCE, 'name'=>'source', 'nicename'=>'Source code') ); private static $unknownPlatform = array( 'id'=>PID_ANY, 'name'=>'unknown', 'nicename'=>'Unknown'); @@ -528,6 +530,16 @@ private function populateSymbolicPackages(&$packages) NULL/*no version*/, 'latestbuild?platform='. $plat['name']. '&unstable'); $packages[] = $pack; + $plat = $this->platform(PID_SOURCE); + $pack = PackageFactory::newDistribution($plat['id'], 'Latest Doomsday', + NULL/*no version*/, 'latestbuild?platform='. $plat['name']); + $packages[] = $pack; + + $plat = $this->platform(PID_SOURCE); + $pack = PackageFactory::newDistributionUnstable($plat['id'], 'Latest Doomsday', + NULL/*no version*/, 'latestbuild?platform='. $plat['name']. '&unstable'); + $packages[] = $pack; + return TRUE; } @@ -1211,7 +1223,7 @@ private function outputBuildPackageList(&$build) ?>compileLogUri())) { $logUri = $pack->compileLogUri(); diff --git a/web/plugins/buildrepository/packages/abstractunstablebuilderpackage.class.php b/web/plugins/buildrepository/packages/abstractunstablebuilderpackage.class.php index 0ab24c5c11..f67dcfea04 100644 --- a/web/plugins/buildrepository/packages/abstractunstablebuilderpackage.class.php +++ b/web/plugins/buildrepository/packages/abstractunstablebuilderpackage.class.php @@ -45,7 +45,11 @@ public function composeFullTitle($includeVersion=true, $includePlatformName=true if($includePlatformName && $this->platformId !== PID_ANY) { $plat = &BuildRepositoryPlugin::platform($this->platformId); - $title .= ' for '. $plat['nicename']; + if($this->platformId !== PID_SOURCE) + { + $title .= ' for'; + } + $title .= ' '. $plat['nicename']; } return $title; } diff --git a/web/plugins/buildrepository/packages/basepackage.class.php b/web/plugins/buildrepository/packages/basepackage.class.php index 0f45f64513..4fc4d162d0 100644 --- a/web/plugins/buildrepository/packages/basepackage.class.php +++ b/web/plugins/buildrepository/packages/basepackage.class.php @@ -67,7 +67,11 @@ public function composeFullTitle($includeVersion=true, $includePlatformName=true if($includePlatformName && $this->platformId !== PID_ANY) { $plat = &BuildRepositoryPlugin::platform($this->platformId); - $title .= ' for '. $plat['nicename']; + if($this->platformId !== PID_SOURCE) + { + $title .= ' for'; + } + $title .= ' '. $plat['nicename']; } return $title; } From 33fc1570aa70a0134c809a470c8f664eb75a233d Mon Sep 17 00:00:00 2001 From: danij Date: Thu, 14 Nov 2013 21:07:03 +0000 Subject: [PATCH 11/14] Qt 4.7|Client: Fixed Qt 4.7 compatibility (no foreach with QVarLengthArray) --- doomsday/client/src/world/map.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doomsday/client/src/world/map.cpp b/doomsday/client/src/world/map.cpp index 34b6d30a74..1a0f94521c 100644 --- a/doomsday/client/src/world/map.cpp +++ b/doomsday/client/src/world/map.cpp @@ -1658,8 +1658,9 @@ int Map::mobjTouchedLineIterator(mobj_t *mo, int (*callback) (Line *, void *), linkStore.append(reinterpret_cast(tn[nix].ptr)); } - foreach(Line *line, linkStore) + for(int i = 0; i < linkStore.count(); ++i) { + Line *line = linkStore[i]; if(int result = callback(line, context)) return result; } @@ -1711,8 +1712,9 @@ int Map::mobjTouchedSectorIterator(mobj_t *mo, int (*callback) (Sector *, void * } } - foreach(Sector *sector, linkStore) + for(int i = 0; i < linkStore.count(); ++i) { + Sector *sector = linkStore[i]; if(int result = callback(sector, context)) return result; } @@ -1733,8 +1735,9 @@ int Map::lineTouchingMobjIterator(Line *line, int (*callback) (mobj_t *, void *) linkStore.append(reinterpret_cast(ln[nix].ptr)); } - foreach(mobj_t *mobj, linkStore) + for(int i = 0; i < linkStore.count(); ++i) { + mobj_t *mobj = linkStore[i]; if(int result = callback(mobj, context)) return result; } @@ -1775,8 +1778,9 @@ int Map::sectorTouchingMobjIterator(Sector *sector, } // Process all collected mobjs. - foreach(mobj_t *mobj, linkStore) + for(int i = 0; i < linkStore.count(); ++i) { + mobj_t *mobj = linkStore[i]; if(int result = callback(mobj, context)) return result; } From de7f9f0e323328fe828c53ca12e15edf8d7b6a5f Mon Sep 17 00:00:00 2001 From: danij Date: Thu, 14 Nov 2013 21:32:58 +0000 Subject: [PATCH 12/14] Debug|Map Renderer|Client: Investigating further vertex color clamping issues --- doomsday/client/src/render/rend_main.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/doomsday/client/src/render/rend_main.cpp b/doomsday/client/src/render/rend_main.cpp index f9d9306d47..8c35789de4 100644 --- a/doomsday/client/src/render/rend_main.cpp +++ b/doomsday/client/src/render/rend_main.cpp @@ -3845,7 +3845,7 @@ void Rend_UpdateLightModMatrix() { if(novideo) return; - std::memset(lightModRange, 0, sizeof(float) * 255); + zap(lightModRange); if(!App_World().hasMap()) { @@ -3855,9 +3855,13 @@ void Rend_UpdateLightModMatrix() int mapAmbient = App_World().map().ambientLightLevel(); if(mapAmbient > ambientLight) + { rAmbient = mapAmbient; + } else + { rAmbient = ambientLight; + } for(int i = 0; i < 255; ++i) { @@ -3879,16 +3883,25 @@ void Rend_UpdateLightModMatrix() // Lower than the ambient limit? if(rAmbient != 0 && i+lightlevel <= rAmbient) + { lightlevel = rAmbient - i; + } // Clamp the result as a modifier to the light value (j). if((i + lightlevel) >= 255) + { lightlevel = 255 - i; + } else if((i + lightlevel) <= 0) + { lightlevel = -i; + } - // Insert it into the matrix + // Insert it into the matrix. lightModRange[i] = lightlevel / 255.0f; + + // Ensure the resultant value never exceeds the expected [0..1] range. + DENG2_ASSERT(INRANGE_OF(i / 255.0f + lightModRange[i], 0.f, 1.f)); } } From 775efc3ead87d820147a0f2b32c1d5310f7ef62d Mon Sep 17 00:00:00 2001 From: skyjake Date: Fri, 15 Nov 2013 09:19:26 +0200 Subject: [PATCH 13/14] Builder|OS X|Fixed: Detecting OS X 10.9 (log filenames) --- distrib/builder/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/distrib/builder/utils.py b/distrib/builder/utils.py index effe54feae..1c6512e940 100644 --- a/distrib/builder/utils.py +++ b/distrib/builder/utils.py @@ -79,12 +79,13 @@ def sys_id(): # Special case: the Snow Leopard builder targets 64-bit. if plat == 'darwin': - if platform.mac_ver()[0][:4] == '10.8': + macVer = mac_os_version() + if macVer == '10.8' or macVer == '10.9': plat = 'macx8' bits = '64bit' - elif platform.mac_ver()[0][:4] == '10.6': + elif macVer == '10.6': bits = '64bit' - elif platform.mac_ver()[0][:4] == '10.5': + elif macVer == '10.5': plat = 'macx5' return "%s-%s" % (plat, bits) From bf039d45274b8663ec80dc8a9d533869e0a216a0 Mon Sep 17 00:00:00 2001 From: skyjake Date: Fri, 15 Nov 2013 09:53:02 +0200 Subject: [PATCH 14/14] Fixed|DialogWidget: Modal dialog should not flash when Shift pressed As far as the UI is concerned, Shift and other modifiers should not be considered actionable input. --- doomsday/client/src/ui/widgets/dialogwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doomsday/client/src/ui/widgets/dialogwidget.cpp b/doomsday/client/src/ui/widgets/dialogwidget.cpp index 468773458b..f833ac63b9 100644 --- a/doomsday/client/src/ui/widgets/dialogwidget.cpp +++ b/doomsday/client/src/ui/widgets/dialogwidget.cpp @@ -527,7 +527,7 @@ bool DialogWidget::handleEvent(Event const &event) if(d->modality == Modal) { // The event should already have been handled by the children. - if(event.isKeyDown() || + if((event.isKeyDown() && !(event.as().qtKey() == Qt::Key_Shift)) || (event.type() == Event::MouseButton && event.as().state() == MouseEvent::Pressed && !hitTest(event)))