DXGL r201 - Code Review

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 @@
5555 !define KEY_QUERY_VALUE 0x0001
5656 !define KEY_ENUMERATE_SUB_KEYS 0x0008
5757 !define ROOT_KEY ${HKEY_CURRENT_USER}
 58+!define GetVersion "Kernel32::GetVersion() i"
5859 Var SUBKEY
5960
6061 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
@@ -157,7 +158,7 @@
158159 ExecWait '"$INSTDIR\dxgltest.exe" install'
159160 SectionEnd
160161
161 -Section "Visual C++ 2010 Redistributable" SEC_VCREDIST
 162+Section "Download Visual C++ 2010 Redistributable" SEC_VCREDIST
162163 DetailPrint "Downloading Visual C++ 2010 Runtime"
163164 NSISdl::download http://www.williamfeely.info/download/vc10/vcredist_x86.exe $TEMP\vcredist_x86.exe
164165 DetailPrint "Installing Visual C++ 2010 Runtime"
@@ -165,6 +166,10 @@
166167 Delete $TEMP\vcredist_x86.exe
167168 SectionEnd
168169
 170+Section "Fix DDraw COM registration" SEC_COMFIX
 171+ DetailPrint "Setting DDraw Runtime path in registry"
 172+SectionEnd
 173+
169174 Section -AdditionalIcons
170175 WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
171176 CreateShortCut "$SMPROGRAMS\DXGL\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
@@ -192,6 +197,22 @@
193198 SectionSetFlags ${SEC_VCREDIST} 0
194199 SectionSetText ${SEC_VCREDIST} ""
195200 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+
196217 FunctionEnd
197218
198219