diff options
author | marha <marha@users.sourceforge.net> | 2009-11-18 09:20:01 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-11-18 09:20:01 +0000 |
commit | 7ae76c00e557b0aa54294b2b1c6ac9b04214f426 (patch) | |
tree | ab6ce755b81d2f2a1a23afe169b227e9d53c123d /xorg-server | |
parent | 67c6a9832ddc1494822837936b629f638f37dae0 (diff) | |
download | vcxsrv-7ae76c00e557b0aa54294b2b1c6ac9b04214f426.tar.gz vcxsrv-7ae76c00e557b0aa54294b2b1c6ac9b04214f426.tar.bz2 vcxsrv-7ae76c00e557b0aa54294b2b1c6ac9b04214f426.zip |
Also install debug CRT (needed by vcxsrv_dbg.exe)
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/installer/genruntimeinclude.py | 43 | ||||
-rw-r--r-- | xorg-server/installer/vcxsrv.nsi | 7 |
2 files changed, 44 insertions, 6 deletions
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 "<PUBLICTOKEN>" !define MSVC_CAT "<WINSXSDIR>\manifests\x86_Microsoft.VC90.CRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION}_<SUFFIX>.cat"
!define MSVC_MANIFEST_PART "x86_Microsoft.VC90.CRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION}_<SUFFIX>.manifest"
!define MSVC_MANIFEST "<WINSXSDIR>\manifests\${MSVC_MANIFEST_PART}"
+
+!define MSVC_VERSION_D "<VERSION>"
+!define MSVCR90_DLL_D "<WINSXSDIR>\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_<DSUFFIX>\msvcr90d.dll"
+!define MSVCM90_DLL_D "<WINSXSDIR>\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_<DSUFFIX>\msvcm90d.dll"
+!define MSVCP90_DLL_D "<WINSXSDIR>\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_<DSUFFIX>\msvcp90d.dll"
+!define MSVC_CAT_D "<WINSXSDIR>\manifests\x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_<DSUFFIX>.cat"
+!define MSVC_MANIFEST_PART_D "x86_Microsoft.VC90.DebugCRT_${MSVC_PUBLICTOKEN}_9.0.${MSVC_VERSION_D}_<DSUFFIX>.manifest"
+!define MSVC_MANIFEST_D "<WINSXSDIR>\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("<VERSION>","%d.%d"%(MajorVersion,MinorVersion),Template)
-Template=re.sub("<PUBLICTOKEN>",PublicToken,Template)
Template=re.sub("<SUFFIX>",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("<DVERSION>","%d.%d"%(MajorVersion,MinorVersion),Template)
+Template=re.sub("<DSUFFIX>",Suffix,Template)
+
+# Adjust common stuff
+Template=re.sub("<PUBLICTOKEN>",PublicToken,Template)
WinSxsDir=os.path.join(os.getenv("systemroot"),"WinSxS")
Template=re.sub("<WINSXSDIR>",WinSxsDir,Template)
-if len(sys.argv)==3 and sys.argv[2]=="1":
- Template=re.sub("<DEBUG>","Debug",Template)
-else:
- Template=re.sub("<DEBUG>","",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()"
|