-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathgenerate.qt.props.py
29 lines (26 loc) · 1.26 KB
/
generate.qt.props.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Generate qt.props
import sys
qtdir=sys.argv[1]
pythonsearchpath=sys.argv[2]
pythonroots={'PYTHONROOT':pythonsearchpath+r'\Python36', 'PYTHONROOT37':pythonsearchpath+r'\Python37', 'PYTHONROOT38':pythonsearchpath+r'\Python38', 'PYTHONROOT39':pythonsearchpath+r'\Python39', 'PYTHONROOT310':pythonsearchpath+r'\Python310', 'PYTHONROOT311':pythonsearchpath+r'\Python311', 'PYTHONROOT312':pythonsearchpath+r'\Python312'}
print('<?xml version="1.0" encoding="utf-8"?>')
print('<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">')
print(' <ImportGroup Label="PropertySheets" />')
print(' <PropertyGroup Label="UserMacros">')
print(' <QTDIR>' + qtdir + '\</QTDIR>')
for root in pythonroots:
print(' <' + root + '>' + pythonroots[root] + '</' + root + '>')
print(' </PropertyGroup>')
print(' <PropertyGroup />')
print(' <ItemDefinitionGroup />')
print(' <ItemGroup>')
print(' <BuildMacro Include="QTDIR">')
print(' <Value>$(QTDIR)</Value>')
print(' <EnvironmentVariable>true</EnvironmentVariable>')
print(' </BuildMacro>')
for root in pythonroots:
print(' <BuildMacro Include="' + root + '">')
print(' <Value>$(' + root + ')</Value>')
print(' </BuildMacro>')
print(' </ItemGroup>')
print('</Project>')