aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/installer/genruntimeinclude.py
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-11-18 09:20:01 +0000
committermarha <marha@users.sourceforge.net>2009-11-18 09:20:01 +0000
commit7ae76c00e557b0aa54294b2b1c6ac9b04214f426 (patch)
treeab6ce755b81d2f2a1a23afe169b227e9d53c123d /xorg-server/installer/genruntimeinclude.py
parent67c6a9832ddc1494822837936b629f638f37dae0 (diff)
downloadvcxsrv-7ae76c00e557b0aa54294b2b1c6ac9b04214f426.tar.gz
vcxsrv-7ae76c00e557b0aa54294b2b1c6ac9b04214f426.tar.bz2
vcxsrv-7ae76c00e557b0aa54294b2b1c6ac9b04214f426.zip
Also install debug CRT (needed by vcxsrv_dbg.exe)
Diffstat (limited to 'xorg-server/installer/genruntimeinclude.py')
-rw-r--r--xorg-server/installer/genruntimeinclude.py43
1 files changed, 37 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)