diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-03-06 00:04:26 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-03-06 00:04:26 +0000 |
commit | 43a40caa37e927efb490b31cdda8c69571ac22f3 (patch) | |
tree | b2cc5f5c6a61b7ebdab4aae3eb80bf0e9bbeaf62 /utils/common/deploy-themeeditor.py | |
parent | 71e4b03ed670f5ba3f42f1bcc80f05a87a3498be (diff) |
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
Diffstat (limited to 'utils/common/deploy-themeeditor.py')
-rwxr-xr-x | utils/common/deploy-themeeditor.py | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/utils/common/deploy-themeeditor.py b/utils/common/deploy-themeeditor.py index c769d924fa..820856cd77 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() |