DXGL r201 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r200
|
r201
|
r202
>
Date:
15:24, 5 July 2012
Author:
admin
Status:
new
Tags:
Comment:
Detect Windows 8 and offer COM fix (not yet added) if Windows version is 6.2 or above.
Modified paths:
/Installer/dxgl.nsi
(modified) (
history
)
Diff
[
purge
]
Index: Installer/dxgl.nsi
—
—
@@ -54,6 +54,7 @@
55
55
!define KEY_QUERY_VALUE 0x0001
56
56
!define KEY_ENUMERATE_SUB_KEYS 0x0008
57
57
!define ROOT_KEY ${HKEY_CURRENT_USER}
58
+!define GetVersion "Kernel32::GetVersion() i"
58
59
Var SUBKEY
59
60
60
61
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
—
—
@@ -157,7 +158,7 @@
158
159
ExecWait '"$INSTDIR\dxgltest.exe" install'
159
160
SectionEnd
160
161
161
-Section "Visual C++ 2010 Redistributable" SEC_VCREDIST
162
+Section "Download Visual C++ 2010 Redistributable" SEC_VCREDIST
162
163
DetailPrint "Downloading Visual C++ 2010 Runtime"
163
164
NSISdl::download http://www.williamfeely.info/download/vc10/vcredist_x86.exe $TEMP\vcredist_x86.exe
164
165
DetailPrint "Installing Visual C++ 2010 Runtime"
—
—
@@ -165,6 +166,10 @@
166
167
Delete $TEMP\vcredist_x86.exe
167
168
SectionEnd
168
169
170
+Section "Fix DDraw COM registration" SEC_COMFIX
171
+ DetailPrint "Setting DDraw Runtime path in registry"
172
+SectionEnd
173
+
169
174
Section -AdditionalIcons
170
175
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
171
176
CreateShortCut "$SMPROGRAMS\DXGL\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
—
—
@@ -192,6 +197,22 @@
193
198
SectionSetFlags ${SEC_VCREDIST} 0
194
199
SectionSetText ${SEC_VCREDIST} ""
195
200
vcinstall:
201
+
202
+ System::Call "${GetVersion} () .r0"
203
+ IntOp $1 $0 & 255
204
+ IntOp $2 $0 >> 8
205
+ IntOp $2 $2 & 255
206
+ IntCmp $1 6 CheckMinor BelowEight EightOrAbove
207
+ CheckMinor:
208
+ IntCmp $2 2 EightOrAbove BelowEight EightOrAbove
209
+ EightOrAbove:
210
+ SectionSetText ${SEC_COMFIX} "Fix DDraw COM registration (recommended)"
211
+ goto VersionFinish
212
+ BelowEight:
213
+ SectionSetFlags ${SEC_COMFIX} 0
214
+ VersionFinish:
215
+
216
+
196
217
FunctionEnd
197
218
198
219
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version