From 7ae76c00e557b0aa54294b2b1c6ac9b04214f426 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 18 Nov 2009 09:20:01 +0000 Subject: Also install debug CRT (needed by vcxsrv_dbg.exe) --- xorg-server/installer/genruntimeinclude.py | 43 +++++++++++++++++++++++++----- xorg-server/installer/vcxsrv.nsi | 7 +++++ 2 files changed, 44 insertions(+), 6 deletions(-) (limited to 'xorg-server/installer') diff --git a/xorg-server/installer/genruntimeinclude.py b/xorg-server/installer/genruntimeinclude.py index ffc1c8d9f..b346770eb 100644 --- a/xorg-server/installer/genruntimeinclude.py +++ b/xorg-server/installer/genruntimeinclude.py @@ -8,14 +8,25 @@ Template=r"""!define MSVC_PUBLICTOKEN "" !define MSVC_CAT "\manifests\x86_Microsoft.VC90.CRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION}_.cat" !define MSVC_MANIFEST_PART "x86_Microsoft.VC90.CRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION}_.manifest" !define MSVC_MANIFEST "\manifests\${MSVC_MANIFEST_PART}" + +!define MSVC_VERSION_D "" +!define MSVCR90_DLL_D "\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_\msvcr90d.dll" +!define MSVCM90_DLL_D "\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_\msvcm90d.dll" +!define MSVCP90_DLL_D "\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_\msvcp90d.dll" +!define MSVC_CAT_D "\manifests\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_.cat" +!define MSVC_MANIFEST_PART_D "x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_.manifest" +!define MSVC_MANIFEST_D "\manifests\${MSVC_MANIFEST_PART_D}" """ import glob,re,sys,os Files=glob.glob(r"c:\windows\winsxs\x86_Microsoft.VC90.CRT_%s_9.0.*"%PublicToken) +DebugFiles=glob.glob(r"c:\windows\winsxs\x86_Microsoft.VC90.DebugCRT_%s_9.0.*"%PublicToken) SearchRe=re.compile(r"c:\\windows\\winsxs\\x86_Microsoft\.VC90\.CRT_%s_9\.0\.([0-9]+)\.([0-9]+)_(.*)"%PublicToken,re.I) +DebugSearchRe=re.compile(r"c:\\windows\\winsxs\\x86_Microsoft\.VC90\.DebugCRT_%s_9\.0\.([0-9]+)\.([0-9]+)_(.*)"%PublicToken,re.I) +# Release Dlls MajorVersion=0 MinorVersion=0 LatestFile=None @@ -37,15 +48,35 @@ for File in Files: Template=re.sub("","%d.%d"%(MajorVersion,MinorVersion),Template) -Template=re.sub("",PublicToken,Template) Template=re.sub("",Suffix,Template) +# Debug dlls +MajorVersion=0 +MinorVersion=0 +LatestFile=None +#Now Select the one with the latest version +for File in DebugFiles: + # Extract version + Search=DebugSearchRe.search(File) + Major=int(Search.group(1)) + Minor=int(Search.group(2)) + if Major>MajorVersion: + MajorVersion=Major + MinorVersion=Minor + LatestFile=File + Suffix=Search.group(3) + elif Major==MajorVersion and Minor>MinorVersion: + MinorVersion=Minor + LatestFile=File + Suffix=Search.group(3) + + +Template=re.sub("","%d.%d"%(MajorVersion,MinorVersion),Template) +Template=re.sub("",Suffix,Template) + +# Adjust common stuff +Template=re.sub("",PublicToken,Template) WinSxsDir=os.path.join(os.getenv("systemroot"),"WinSxS") Template=re.sub("",WinSxsDir,Template) -if len(sys.argv)==3 and sys.argv[2]=="1": - Template=re.sub("","Debug",Template) -else: - Template=re.sub("","",Template) - open("runtime","w").write(Template) diff --git a/xorg-server/installer/vcxsrv.nsi b/xorg-server/installer/vcxsrv.nsi index b312b047f..2661c4998 100644 --- a/xorg-server/installer/vcxsrv.nsi +++ b/xorg-server/installer/vcxsrv.nsi @@ -111,6 +111,11 @@ Section "VcXsrv (required)" File "${MSVCP90_DLL}" File "${MSVC_CAT}" File "${MSVC_MANIFEST}" + File "${MSVCR90_DLL_D}" + File "${MSVCM90_DLL_D}" + File "${MSVCP90_DLL_D}" + File "${MSVC_CAT_D}" + File "${MSVC_MANIFEST_D}" DetailPrint "Installing CRT assembly..." System::Call "sxs::CreateAssemblyCache(*i .r0, i 0) i.r1" StrCmp $1 0 0 fail @@ -124,6 +129,7 @@ Section "VcXsrv (required)" Pop $2 # IAssemblyCache::InstallAssembly(0, manifestPath, fir) System::Call "$0->7(i 0, w '$PLUGINSDIR\${MSVC_MANIFEST_PART}', i r2) i.r1" + System::Call "$0->7(i 0, w '$PLUGINSDIR\${MSVC_MANIFEST_PART_D}', i r2) i.r1" System::Free $2 StrCmp $1 0 0 fail2 System::Call "$0->2()" @@ -206,6 +212,7 @@ Section "Uninstall" System::Call "*(i 32, i 0, i 2364391957, i 1217113163, i 178634899, i 3090139977, w 'nsissxs', w '') i.s" Pop $2 System::Call "$0->3(i 0, w 'Microsoft.VC90.CRT,version=$\"9.0.${MSVC_VERSION}$\",type=$\"win32$\",processorArchitecture=$\"x86$\",publicKeyToken=$\"${MSVC_PUBLICTOKEN}$\"', i r2, *i . r3) i.r1" + System::Call "$0->3(i 0, w 'Microsoft.VC90.DebugCRT,version=$\"9.0.${MSVC_VERSION_D}$\",type=$\"win32$\",processorArchitecture=$\"x86$\",publicKeyToken=$\"${MSVC_PUBLICTOKEN}$\"', i r2, *i . r3) i.r1" StrCmp $1 0 0 fail2 DetailPrint "Disposition returned is $3" System::Call "$0->2()" -- cgit v1.2.3