Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2066)

Side by Side Diff: Tools/msi/msi.py

Issue 14843: support define_macros / undef_macros in setup.cfg
Patch Set: Created 11 months, 2 weeks ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Tools/buildbot/external-common.bat ('k') | Tools/scripts/pyvenv » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Python MSI Generator 1 # Python MSI Generator
2 # (C) 2003 Martin v. Loewis 2 # (C) 2003 Martin v. Loewis
3 # See "FOO" in comments refers to MSDN sections with the title FOO. 3 # See "FOO" in comments refers to MSDN sections with the title FOO.
4 import msilib, schema, sequence, os, glob, time, re, shutil, zipfile 4 import msilib, schema, sequence, os, glob, time, re, shutil, zipfile
5 import subprocess, tempfile 5 import subprocess, tempfile
6 from msilib import Feature, CAB, Directory, Dialog, Binary, add_data 6 from msilib import Feature, CAB, Directory, Dialog, Binary, add_data
7 import uisample 7 import uisample
8 from win32com.client import constants 8 from win32com.client import constants
9 from distutils.spawn import find_executable 9 from distutils.spawn import find_executable
10 10
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 prepend_path = Feature(db, "PrependPath", "Add python.exe to Path", 868 prepend_path = Feature(db, "PrependPath", "Add python.exe to Path",
869 "Prepend [TARGETDIR] to the system Path variable. " 869 "Prepend [TARGETDIR] to the system Path variable. "
870 "This allows you to type 'python' into a command " 870 "This allows you to type 'python' into a command "
871 "prompt without needing the full path.", 13, 871 "prompt without needing the full path.", 13,
872 parent = default_feature, attributes=2|8, 872 parent = default_feature, attributes=2|8,
873 level=2) 873 level=2)
874 874
875 def extract_msvcr100(): 875 def extract_msvcr100():
876 # Find the redistributable files 876 # Find the redistributable files
877 if msilib.Win64: 877 if msilib.Win64:
878 arch = "x64" 878 arch = "amd64"
879 else: 879 else:
880 arch = "x86" 880 arch = "x86"
881 dir = os.path.join(os.environ['VS100COMNTOOLS'], r"..\..\VC\redist\%s\Micros oft.VC100.CRT" % arch) 881 dir = os.path.join(os.environ['VS100COMNTOOLS'], r"..\..\VC\redist\%s\Micros oft.VC100.CRT" % arch)
882 882
883 result = [] 883 result = []
884 installer = msilib.MakeInstaller() 884 installer = msilib.MakeInstaller()
885 # At least for VS2010, manifests are no longer provided 885 # At least for VS2010, manifests are no longer provided
886 name = "msvcr100.dll" 886 name = "msvcr100.dll"
887 path = os.path.join(dir, name) 887 path = os.path.join(dir, name)
888 kw = {'src':path} 888 kw = {'src':path}
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 lib.glob("*.txt") 1115 lib.glob("*.txt")
1116 if f == "pynche": 1116 if f == "pynche":
1117 x = PyDirectory(db, cab, lib, "X", "X", "X|X") 1117 x = PyDirectory(db, cab, lib, "X", "X", "X|X")
1118 x.glob("*.txt") 1118 x.glob("*.txt")
1119 if os.path.exists(os.path.join(lib.absolute, "README")): 1119 if os.path.exists(os.path.join(lib.absolute, "README")):
1120 lib.add_file("README.txt", src="README") 1120 lib.add_file("README.txt", src="README")
1121 if f == 'Scripts': 1121 if f == 'Scripts':
1122 lib.add_file("2to3.py", src="2to3") 1122 lib.add_file("2to3.py", src="2to3")
1123 lib.add_file("pydoc3.py", src="pydoc3") 1123 lib.add_file("pydoc3.py", src="pydoc3")
1124 lib.add_file("pysetup3.py", src="pysetup3") 1124 lib.add_file("pysetup3.py", src="pysetup3")
1125 lib.add_file("pyvenv.py", src="pyvenv")
1126 if have_tcl: 1125 if have_tcl:
1127 lib.start_component("pydocgui.pyw", tcltk, keyfile="pydocgui.pyw ") 1126 lib.start_component("pydocgui.pyw", tcltk, keyfile="pydocgui.pyw ")
1128 lib.add_file("pydocgui.pyw") 1127 lib.add_file("pydocgui.pyw")
1129 # Add documentation 1128 # Add documentation
1130 htmlfiles.set_current() 1129 htmlfiles.set_current()
1131 lib = PyDirectory(db, cab, root, "Doc", "Doc", "DOC|Doc") 1130 lib = PyDirectory(db, cab, root, "Doc", "Doc", "DOC|Doc")
1132 lib.start_component("documentation", keyfile=docfile) 1131 lib.start_component("documentation", keyfile=docfile)
1133 lib.add_file(docfile, src="build/htmlhelp/"+docfile) 1132 lib.add_file(docfile, src="build/htmlhelp/"+docfile)
1134 1133
1135 cab.commit(db) 1134 cab.commit(db)
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 1377
1379 merge(msiname, "SharedCRT", "TARGETDIR", modules) 1378 merge(msiname, "SharedCRT", "TARGETDIR", modules)
1380 1379
1381 # certname (from config.py) should be (a substring of) 1380 # certname (from config.py) should be (a substring of)
1382 # the certificate subject, e.g. "Python Software Foundation" 1381 # the certificate subject, e.g. "Python Software Foundation"
1383 if certname: 1382 if certname:
1384 os.system('signtool sign /n "%s" /t http://timestamp.verisign.com/scripts/ti mestamp.dll %s' % (certname, msiname)) 1383 os.system('signtool sign /n "%s" /t http://timestamp.verisign.com/scripts/ti mestamp.dll %s' % (certname, msiname))
1385 1384
1386 if pdbzip: 1385 if pdbzip:
1387 build_pdbzip() 1386 build_pdbzip()
OLDNEW
« no previous file with comments | « Tools/buildbot/external-common.bat ('k') | Tools/scripts/pyvenv » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7