]>
Commit | Line | Data |
---|---|---|
050caed9 | 1 | --- configure.py 2009-06-16 10:37:38.000000000 +0200 |
2 | +++ configure.py.new 2009-07-04 04:47:49.000000000 +0200 | |
3 | @@ -43,6 +43,7 @@ | |
4 | ||
5 | qt_version = 0 | |
6 | qt_edition = "" | |
7 | +qt_licensee = None | |
8 | qt_dir = None | |
9 | qt_incdir = None | |
10 | qt_libdir = None | |
11 | @@ -909,6 +910,9 @@ | |
12 | ||
13 | sipconfig.inform("Qt v%s %sis being used." % (sipconfig.version_to_string(qt_version), edstr)) | |
14 | ||
15 | + if qt_licensee: | |
16 | + sipconfig.inform("Qt is licensed to %s." % qt_licensee) | |
17 | + | |
18 | if sys.platform == "darwin" and qt_framework: | |
19 | sipconfig.inform("Qt is built as a framework.") | |
20 | ||
21 | @@ -1465,9 +1469,8 @@ | |
22 | sipconfig.inform("This is the %s version of PyQt %s (licensed under the %s) for Python %s on %s." % (ltype, pyqt_version_str, lname, sys.version.split()[0], sys.platform)) | |
23 | ||
24 | # Common checks. | |
25 | - if qt_edition and ltype != "internal": | |
26 | - if qt_edition != "free" and ltype == "GPL": | |
27 | - sipconfig.error("This version of PyQt and the %s edition of Qt have incompatible licenses." % qt_edition) | |
28 | + if qt_licensee and ltype == "GPL": | |
29 | + sipconfig.error("This version of PyQt and the commercial version of Qt have incompatible licenses.") | |
30 | ||
31 | # Confirm the license if not already done. | |
32 | if not opts.license_confirmed: | |
33 | @@ -1675,6 +1678,8 @@ | |
34 | out << QT_VERSION << '\\n'; | |
35 | out << QT_EDITION << '\\n'; | |
36 | ||
37 | + out << QLibraryInfo::licensee() << '\\n'; | |
38 | + | |
39 | #if defined(QT_SHARED) || defined(QT_DLL) | |
40 | out << "shared\\n"; | |
41 | #else | |
42 | @@ -1761,7 +1766,7 @@ | |
43 | f.close() | |
44 | ||
45 | global qt_dir, qt_incdir, qt_libdir, qt_bindir, qt_datadir, qt_pluginsdir | |
46 | - global qt_version, qt_edition, qt_shared, qt_xfeatures | |
47 | + global qt_version, qt_edition, qt_licensee, qt_shared, qt_xfeatures | |
48 | ||
49 | qt_dir = lines[0] | |
50 | qt_incdir = lines[1] | |
51 | @@ -1771,8 +1776,12 @@ | |
52 | qt_pluginsdir = lines[5] | |
53 | qt_version = lines[6] | |
54 | qt_edition = lines[7] | |
55 | - qt_shared = "y" | |
56 | - qt_xfeatures = lines[9:] | |
57 | + qt_licensee = lines[8] | |
58 | + qt_shared = "y" | |
59 | + qt_xfeatures = lines[10:] | |
60 | + | |
61 | + if qt_licensee == 'Open Source': | |
62 | + qt_licensee = None | |
63 | ||
64 | try: | |
65 | qt_version = int(qt_version) | |
66 | @@ -1789,6 +1798,10 @@ | |
67 | if qt_edition & 0x200: | |
68 | # It has ActiveQt. | |
69 | qt_edition = "Desktop" | |
70 | + | |
71 | + # ActiveQt became part of the open source version in v4.5.2. | |
72 | + if qt_version >= 0x040502 and qt_licensee is None: | |
73 | + qt_edition = "free" | |
74 | elif qt_edition & 0x008: | |
75 | # It has OpenGL. | |
76 | qt_edition = "free" |