mirror of https://github.com/python/cpython
Merged revisions 61038,61042-61045,61047,61050,61053,61055-61056,61061-61062,61066,61068,61070,61083,61085,61092-61097,61103-61104,61109-61111 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r61109 | martin.v.loewis | 2008-02-28 20:57:34 +0100 (Thu, 28 Feb 2008) | 1 line Bundle msvcr90.dll as a "private assembly". ........
This commit is contained in:
parent
70e7ea23f1
commit
e1feb2ebb2
|
@ -845,21 +845,19 @@ def extract_msvcr90():
|
||||||
prod_dir = _winreg.QueryValueEx(k, "ProductDir")[0]
|
prod_dir = _winreg.QueryValueEx(k, "ProductDir")[0]
|
||||||
_winreg.CloseKey(k)
|
_winreg.CloseKey(k)
|
||||||
|
|
||||||
# Copy msvcr90*
|
result = []
|
||||||
dir = os.path.join(prod_dir, r'VC\redist\x86\Microsoft.VC90.CRT')
|
|
||||||
files = glob.glob1(dir, "*CRT*.dll") + glob.glob1(dir, "*VCR*.dll")
|
|
||||||
for file in files:
|
|
||||||
shutil.copy(os.path.join(dir, file), '.')
|
|
||||||
|
|
||||||
dir = os.path.join(prod_dir, r'VC\redist\Debug_NonRedist\x86\Microsoft.VC90.DebugCRT')
|
|
||||||
files = glob.glob1(dir, "*CRT*.dll") + glob.glob1(dir, "*VCR*.dll")
|
|
||||||
for file in files:
|
|
||||||
shutil.copy(os.path.join(dir, file), '.')
|
|
||||||
|
|
||||||
# Find the version/language of msvcr90.dll
|
|
||||||
installer = msilib.MakeInstaller()
|
installer = msilib.MakeInstaller()
|
||||||
return installer.FileVersion("msvcr90.dll", 0), \
|
dir = os.path.join(prod_dir, r'VC\redist\x86\Microsoft.VC90.CRT')
|
||||||
installer.FileVersion("msvcr90.dll", 1)
|
# omit msvcm90 and msvcp90, as they aren't really needed
|
||||||
|
files = ["Microsoft.VC90.CRT.manifest", "msvcr90.dll"]
|
||||||
|
for f in files:
|
||||||
|
path = os.path.join(dir, f)
|
||||||
|
kw = {'src':path}
|
||||||
|
if f.endswith('.dll'):
|
||||||
|
kw['version'] = installer.FileVersion(path, 0)
|
||||||
|
kw['language'] = installer.FileVersion(path, 1)
|
||||||
|
result.append((f, kw))
|
||||||
|
return result
|
||||||
|
|
||||||
class PyDirectory(Directory):
|
class PyDirectory(Directory):
|
||||||
"""By default, all components in the Python installer
|
"""By default, all components in the Python installer
|
||||||
|
@ -888,7 +886,10 @@ def add_files(db):
|
||||||
root.add_file("%s/pythonw.exe" % PCBUILD)
|
root.add_file("%s/pythonw.exe" % PCBUILD)
|
||||||
|
|
||||||
# msidbComponentAttributesSharedDllRefCount = 8, see "Component Table"
|
# msidbComponentAttributesSharedDllRefCount = 8, see "Component Table"
|
||||||
dlldir = PyDirectory(db, cab, root, srcdir, "DLLDIR", ".")
|
#dlldir = PyDirectory(db, cab, root, srcdir, "DLLDIR", ".")
|
||||||
|
#install python30.dll into root dir for now
|
||||||
|
dlldir = root
|
||||||
|
|
||||||
pydll = "python%s%s.dll" % (major, minor)
|
pydll = "python%s%s.dll" % (major, minor)
|
||||||
pydllsrc = os.path.join(srcdir, PCBUILD, pydll)
|
pydllsrc = os.path.join(srcdir, PCBUILD, pydll)
|
||||||
dlldir.start_component("DLLDIR", flags = 8, keyfile = pydll, uuid = pythondll_uuid)
|
dlldir.start_component("DLLDIR", flags = 8, keyfile = pydll, uuid = pythondll_uuid)
|
||||||
|
@ -901,17 +902,14 @@ def add_files(db):
|
||||||
dlldir.add_file("%s/python%s%s.dll" % (PCBUILD, major, minor),
|
dlldir.add_file("%s/python%s%s.dll" % (PCBUILD, major, minor),
|
||||||
version=pyversion,
|
version=pyversion,
|
||||||
language=installer.FileVersion(pydllsrc, 1))
|
language=installer.FileVersion(pydllsrc, 1))
|
||||||
|
DLLs = PyDirectory(db, cab, root, srcdir + "/" + PCBUILD, "DLLs", "DLLS|DLLs")
|
||||||
# XXX determine dependencies
|
# XXX determine dependencies
|
||||||
if MSVCR == "90":
|
if MSVCR == "90":
|
||||||
# XXX don't package the CRT for the moment;
|
root.start_component("msvcr90")
|
||||||
# this should probably use the merge module in the long run.
|
for file, kw in extract_msvcr90():
|
||||||
pass
|
root.add_file(file, **kw)
|
||||||
#version, lang = extract_msvcr90()
|
if file.endswith("manifest"):
|
||||||
#dlldir.start_component("msvcr90", flags=8, keyfile="msvcr90.dll",
|
DLLs.add_file(file, **kw)
|
||||||
# uuid=msvcr90_uuid)
|
|
||||||
#dlldir.add_file("msvcr90.dll", src=os.path.abspath("msvcr90.dll"),
|
|
||||||
# version=version, language=lang)
|
|
||||||
#tmpfiles.append("msvcr90.dll")
|
|
||||||
else:
|
else:
|
||||||
version, lang = extract_msvcr71()
|
version, lang = extract_msvcr71()
|
||||||
dlldir.start_component("msvcr71", flags=8, keyfile="msvcr71.dll",
|
dlldir.start_component("msvcr71", flags=8, keyfile="msvcr71.dll",
|
||||||
|
@ -1012,7 +1010,7 @@ def add_files(db):
|
||||||
pydirs.append((lib, f))
|
pydirs.append((lib, f))
|
||||||
# Add DLLs
|
# Add DLLs
|
||||||
default_feature.set_current()
|
default_feature.set_current()
|
||||||
lib = PyDirectory(db, cab, root, srcdir + "/" + PCBUILD, "DLLs", "DLLS|DLLs")
|
lib = DLLs
|
||||||
lib.add_file("py.ico", src=srcdir+"/PC/py.ico")
|
lib.add_file("py.ico", src=srcdir+"/PC/py.ico")
|
||||||
lib.add_file("pyc.ico", src=srcdir+"/PC/pyc.ico")
|
lib.add_file("pyc.ico", src=srcdir+"/PC/pyc.ico")
|
||||||
dlls = []
|
dlls = []
|
||||||
|
|
Loading…
Reference in New Issue