From 43a40caa37e927efb490b31cdda8c69571ac22f3 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 6 Mar 2011 00:04:26 +0000 Subject: Support cross compiling for Windows target. Restructure deploy.py by moving the platform decisions out of the calling scripts. This is necessary when cross compiling since this is only decided in deploy.py. Add support for passing a cross compiler prefix on the command line and always build targeting Windows if set. Correct some whitespace errors and long lines while at it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29531 a1c6a512-1295-4272-9138-f99709370657 --- utils/common/deploy-themeeditor.py | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'utils/common/deploy-themeeditor.py') diff --git a/utils/common/deploy-themeeditor.py b/utils/common/deploy-themeeditor.py index c769d92..820856c 100755 --- a/utils/common/deploy-themeeditor.py +++ b/utils/common/deploy-themeeditor.py @@ -17,7 +17,6 @@ # import deploy -import sys deploy.program = "rbthemeeditor" deploy.project = "utils/themeeditor/themeeditor.pro" @@ -31,22 +30,28 @@ deploy.bundlecopy = { "resources/windowicon.icns" : "Contents/Resources/", "Info.plist" : "Contents/" } -# Windows nees some special treatment. Differentiate between program name -# and executable filename. -if sys.platform == "win32": - deploy.progexe = "Release/" + deploy.program + ".exe" - deploy.make = "mingw32-make" -elif sys.platform == "darwin": - deploy.progexe = deploy.program + ".app" - # OS X 10.6 defaults to gcc 4.2. Building universal binaries that are - # compatible with 10.4 requires using gcc-4.0. - if not "QMAKESPEC" in deploy.environment: - deploy.environment["QMAKESPEC"] = "macx-g++40" -else: - deploy.progexe = deploy.program +deploy.progexe = { + "win32" : "release/rbthemeeditor.exe", + "darwin" : "rbthemeeditor.app", + "linux" : "rbthemeeditor" +} +# OS X 10.6 defaults to gcc 4.2. Building universal binaries that are +# compatible with 10.4 requires using gcc-4.0. +deploy.qmakespec = { + "win32" : "", + "darwin" : "macx-g++40", + "linux" : "" +} +deploy.make = { + "win32" : "mingw32-make", + "darwin" : "make", + "linux" : "make" +} + # all files of the program. Will get put into an archive after building # (zip on w32, tar.bz2 on Linux). Does not apply on Mac which uses dmg. -deploy.programfiles = [ deploy.progexe ] +# progexe will get added automatically. +deploy.programfiles = [ ] deploy.nsisscript = "utils/themeeditor/themeeditor.nsi" deploy.deploy() -- cgit v1.1