@@ -845,21 +845,19 @@ def extract_msvcr90():
845845 prod_dir = _winreg .QueryValueEx (k , "ProductDir" )[0 ]
846846 _winreg .CloseKey (k )
847847
848- # Copy msvcr90*
849- dir = os .path .join (prod_dir , r'VC\redist\x86\Microsoft.VC90.CRT' )
850- files = glob .glob1 (dir , "*CRT*.dll" ) + glob .glob1 (dir , "*VCR*.dll" )
851- for file in files :
852- shutil .copy (os .path .join (dir , file ), '.' )
853-
854- dir = os .path .join (prod_dir , r'VC\redist\Debug_NonRedist\x86\Microsoft.VC90.DebugCRT' )
855- files = glob .glob1 (dir , "*CRT*.dll" ) + glob .glob1 (dir , "*VCR*.dll" )
856- for file in files :
857- shutil .copy (os .path .join (dir , file ), '.' )
858-
859- # Find the version/language of msvcr90.dll
848+ result = []
860849 installer = msilib .MakeInstaller ()
861- return installer .FileVersion ("msvcr90.dll" , 0 ), \
862- installer .FileVersion ("msvcr90.dll" , 1 )
850+ dir = os .path .join (prod_dir , r'VC\redist\x86\Microsoft.VC90.CRT' )
851+ # omit msvcm90 and msvcp90, as they aren't really needed
852+ files = ["Microsoft.VC90.CRT.manifest" , "msvcr90.dll" ]
853+ for f in files :
854+ path = os .path .join (dir , f )
855+ kw = {'src' :path }
856+ if f .endswith ('.dll' ):
857+ kw ['version' ] = installer .FileVersion (path , 0 )
858+ kw ['language' ] = installer .FileVersion (path , 1 )
859+ result .append ((f , kw ))
860+ return result
863861
864862class PyDirectory (Directory ):
865863 """By default, all components in the Python installer
@@ -888,7 +886,10 @@ def add_files(db):
888886 root .add_file ("%s/pythonw.exe" % PCBUILD )
889887
890888 # msidbComponentAttributesSharedDllRefCount = 8, see "Component Table"
891- dlldir = PyDirectory (db , cab , root , srcdir , "DLLDIR" , "." )
889+ #dlldir = PyDirectory(db, cab, root, srcdir, "DLLDIR", ".")
890+ #install python30.dll into root dir for now
891+ dlldir = root
892+
892893 pydll = "python%s%s.dll" % (major , minor )
893894 pydllsrc = os .path .join (srcdir , PCBUILD , pydll )
894895 dlldir .start_component ("DLLDIR" , flags = 8 , keyfile = pydll , uuid = pythondll_uuid )
@@ -901,17 +902,14 @@ def add_files(db):
901902 dlldir .add_file ("%s/python%s%s.dll" % (PCBUILD , major , minor ),
902903 version = pyversion ,
903904 language = installer .FileVersion (pydllsrc , 1 ))
905+ DLLs = PyDirectory (db , cab , root , srcdir + "/" + PCBUILD , "DLLs" , "DLLS|DLLs" )
904906 # XXX determine dependencies
905907 if MSVCR == "90" :
906- # XXX don't package the CRT for the moment;
907- # this should probably use the merge module in the long run.
908- pass
909- #version, lang = extract_msvcr90()
910- #dlldir.start_component("msvcr90", flags=8, keyfile="msvcr90.dll",
911- # uuid=msvcr90_uuid)
912- #dlldir.add_file("msvcr90.dll", src=os.path.abspath("msvcr90.dll"),
913- # version=version, language=lang)
914- #tmpfiles.append("msvcr90.dll")
908+ root .start_component ("msvcr90" )
909+ for file , kw in extract_msvcr90 ():
910+ root .add_file (file , ** kw )
911+ if file .endswith ("manifest" ):
912+ DLLs .add_file (file , ** kw )
915913 else :
916914 version , lang = extract_msvcr71 ()
917915 dlldir .start_component ("msvcr71" , flags = 8 , keyfile = "msvcr71.dll" ,
@@ -1012,7 +1010,7 @@ def add_files(db):
10121010 pydirs .append ((lib , f ))
10131011 # Add DLLs
10141012 default_feature .set_current ()
1015- lib = PyDirectory ( db , cab , root , srcdir + "/" + PCBUILD , " DLLs" , "DLLS|DLLs" )
1013+ lib = DLLs
10161014 lib .add_file ("py.ico" , src = srcdir + "/PC/py.ico" )
10171015 lib .add_file ("pyc.ico" , src = srcdir + "/PC/pyc.ico" )
10181016 dlls = []
0 commit comments