configure.py on windows
Wolfgang Rohdewald
wolfgang at rohdewald.de
Sun Mar 20 00:21:36 CET 2011
I am using the kde-windows emerge tool for building
pyqt (msv2010 compiler), and I am building everything
in Debug mode only. No pyqt previously installed.
For that environment,
PyQt-win-gpl-4.8.3/configure.py needs some changes:
1. configure.py --debug should use the debug makefile
qtdirs.mk.Debug because the release makefile qtdirs.mk
is looking for qtmain.lib while only qtmaind.lib is
installed
2. make target "release" (or "debug") only makes nmake
generate an empty directory "release" or "debug", but
if I do not define the target it works. But I patched
it only for the debug target - because I tested only that.
3. the exe_file (qtdirs.exe) will be located in the
debug directory, not in the release directory
are those fixes correct or did I misunderstand something?
--- configure.py 2011-03-20 00:01:18.427835900 +0100
+++ /tmp/configure.py 2011-03-20 00:02:13.522375001 +0100
@@ -1913,8 +1913,11 @@
qmake_args = fix_qmake_args("-o " + make_file)
if sys.platform == 'win32':
- exe_file = os.path.join("release", app + ".exe")
- make_target = " release"
+ if sys.platform == 'win32' and opts.debug:
+ exe_file = os.path.join("debug", app + ".exe")
+ else:
+ exe_file = os.path.join("release", app + ".exe")
+ make_target = " release"
elif sys.platform == "darwin":
exe_file = os.path.join(app + ".app", "Contents",
"MacOS", app)
else:
@@ -2043,6 +2046,8 @@
remove_file(make_file)
run_command("%s %s %s" % (opts.qmake, qmake_args, pro_file))
+ if sys.platform == 'win32' and opts.debug:
+ make_file += '.Debug'
if not os.access(make_file, os.F_OK):
sipconfig.error("%s failed to create a makefile. %s" %
(opts.qmake, MSG_CHECK_QMAKE))
--
Wolfgang
More information about the Kde-windows
mailing list