DXGL r200 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r199
|
r200
|
r201
>
Date:
14:46, 5 July 2012
Author:
admin
Status:
new
Tags:
Comment:
Move Visual C++ redist to components page of installer. Show only if uninstalled.
Modified paths:
/Installer/dxgl.nsi
(modified) (
history
)
Diff
[
purge
]
Index: Installer/dxgl.nsi
—
—
@@ -25,6 +25,8 @@
26
26
!insertmacro MUI_PAGE_WELCOME
27
27
; License page
28
28
!insertmacro MUI_PAGE_LICENSE "..\COPYING.txt"
29
+; Components page
30
+!insertmacro MUI_PAGE_COMPONENTS
29
31
; Directory page
30
32
!insertmacro MUI_PAGE_DIRECTORY
31
33
; Instfiles page
—
—
@@ -43,7 +45,6 @@
44
46
45
47
; MUI end ------
46
48
47
-
48
49
!define HKEY_CURRENT_USER 0x80000001
49
50
!define RegOpenKeyEx "Advapi32::RegOpenKeyEx(i, t, i, i, *i) i"
50
51
!define RegQueryValueEx "Advapi32::RegQueryValueEx(i, t, i, *i, i, *i) i"
—
—
@@ -71,7 +72,8 @@
72
73
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "DXGL"
73
74
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${PRODUCT_VERSION}"
74
75
75
-Section "MainSection" SEC01
76
+Section "DXGL Components (required)" SEC01
77
+ SectionIn RO
76
78
SetOutPath "$INSTDIR"
77
79
SetOverwrite ifnewer
78
80
File "..\Release\dxgltest.exe"
—
—
@@ -151,19 +153,16 @@
152
154
regdone:
153
155
SetPluginUnload manual
154
156
ReadRegDWORD $0 HKLM SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86 Installed
155
- StrCmp $0 1 skipvcredist
156
- MessageBox MB_YESNO|MB_ICONQUESTION "The Microsoft Visual C++ 2010 Runtime does not seem to be installed. Do you want to download and install it now?" IDNO novc
157
+ WriteRegStr HKLM "Software\DXGL" "InstallDir" "$INSTDIR"
158
+ ExecWait '"$INSTDIR\dxgltest.exe" install'
159
+SectionEnd
160
+
161
+Section "Visual C++ 2010 Redistributable" SEC_VCREDIST
157
162
DetailPrint "Downloading Visual C++ 2010 Runtime"
158
163
NSISdl::download http://www.williamfeely.info/download/vc10/vcredist_x86.exe $TEMP\vcredist_x86.exe
159
164
DetailPrint "Installing Visual C++ 2010 Runtime"
160
165
ExecWait '"$TEMP\vcredist_x86.exe" /q /norestart'
161
166
Delete $TEMP\vcredist_x86.exe
162
- goto skipvcredist
163
- novc:
164
- MessageBox MB_OK|MB_ICONEXCLAMATION "DXGL will not work if the Visual C++ 2010 Runtime is not installed. Please install the Visual C++ 2010 Runtime before running DXGL."
165
- skipvcredist:
166
- WriteRegStr HKLM "Software\DXGL" "InstallDir" "$INSTDIR"
167
- ExecWait '"$INSTDIR\dxgltest.exe" install'
168
167
SectionEnd
169
168
170
169
Section -AdditionalIcons
—
—
@@ -184,6 +183,18 @@
185
184
SectionEnd
186
185
187
186
187
+
188
+Function .onInit
189
+ ReadRegDWORD $0 HKLM SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86 Installed
190
+ StrCmp $0 1 skipvcredist
191
+ goto vcinstall
192
+ skipvcredist:
193
+ SectionSetFlags ${SEC_VCREDIST} 0
194
+ SectionSetText ${SEC_VCREDIST} ""
195
+ vcinstall:
196
+FunctionEnd
197
+
198
+
188
199
Function un.onUninstSuccess
189
200
HideWindow
190
201
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
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