Statistiques
| Révision :

root / tmp / org.txm.setups / nsis / Examples / NSISMenu.nsi @ 3097

Historique | Voir | Annoter | Télécharger (12,23 ko)

1 2956 mdecorde
OutFile "NSIS.exe"
2 2956 mdecorde
Name "NSIS Menu"
3 2956 mdecorde
Unicode True
4 2956 mdecorde
RequestExecutionLevel User
5 2956 mdecorde
XPStyle On
6 2956 mdecorde
ManifestDPIAware System
7 2956 mdecorde
SetCompressor LZMA
8 2956 mdecorde
ChangeUI IDD_INST "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"
9 2956 mdecorde
Icon "${NSISDIR}\Contrib\Graphics\Icons\nsis-menu.ico"
10 2956 mdecorde
BrandingText " "
11 2956 mdecorde
MiscButtonText " " " " " " " "
12 2956 mdecorde
InstallButtonText " "
13 2956 mdecorde
CompletedText " "
14 2956 mdecorde
LangString ^ClickInstall 0 " "
15 2956 mdecorde
Caption "$(^Name)"
16 2956 mdecorde
17 2956 mdecorde
!macro UNPACKVERFIELD out in shr mask fmt
18 2956 mdecorde
!define /redef /math ${out} ${in} >>> ${shr}
19 2956 mdecorde
!define /redef /math ${out} ${${out}} & ${mask}
20 2956 mdecorde
!define /redef /intfmt ${out} "${fmt}" ${${out}}
21 2956 mdecorde
!macroend
22 2956 mdecorde
23 2956 mdecorde
!ifndef VER_MAJOR & VER_MINOR
24 2956 mdecorde
!ifdef NSIS_PACKEDVERSION
25 2956 mdecorde
!insertmacro UNPACKVERFIELD VER_MAJOR ${NSIS_PACKEDVERSION} 24 0x0ff "%X"
26 2956 mdecorde
!insertmacro UNPACKVERFIELD VER_MINOR ${NSIS_PACKEDVERSION} 12 0xfff "%X"
27 2956 mdecorde
!insertmacro UNPACKVERFIELD VER_REVISION ${NSIS_PACKEDVERSION} 4 255 "%X"
28 2956 mdecorde
!insertmacro UNPACKVERFIELD VER_BUILD ${NSIS_PACKEDVERSION} 00 0x00f "%X"
29 2956 mdecorde
!endif
30 2956 mdecorde
!endif
31 2956 mdecorde
!ifdef VER_MAJOR & VER_MINOR
32 2956 mdecorde
!define /ifndef VER_REVISION 0
33 2956 mdecorde
!define /ifndef VER_BUILD 0
34 2956 mdecorde
!searchreplace VERSTR "${NSIS_VERSION}" "v" ""
35 2956 mdecorde
VIProductVersion ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD}
36 2956 mdecorde
VIAddVersionKey "ProductName" "NSIS"
37 2956 mdecorde
VIAddVersionKey "ProductVersion" "${VERSTR}"
38 2956 mdecorde
VIAddVersionKey "FileVersion" "${VERSTR}"
39 2956 mdecorde
VIAddVersionKey "FileDescription" "NSIS Menu"
40 2956 mdecorde
VIAddVersionKey "LegalCopyright" "http://nsis.sf.net/License"
41 2956 mdecorde
!endif
42 2956 mdecorde
43 2956 mdecorde
!include nsDialogs.nsh
44 2956 mdecorde
!include WinMessages.nsh
45 2956 mdecorde
!include LogicLib.nsh
46 2956 mdecorde
!define /IfNDef IDC_CHILDRECT 1018
47 2956 mdecorde
!define QUIT_ON_EXECUTE
48 2956 mdecorde
!define PR $ExeDir ; Local root path
49 2956 mdecorde
!define PD "Docs" ; Local with WWW fallback (located at the same relative path)
50 2956 mdecorde
!define WWW "http://nsis.sf.net"
51 2956 mdecorde
52 2956 mdecorde
!define CB_HEADER '0x755585 0x222222'
53 2956 mdecorde
!define UY_HEADER 28
54 2956 mdecorde
!define CT_PAGE '0x000000 0xaaaaaa'
55 2956 mdecorde
!define CB_PAGE '0xffffff 0x111111'
56 2956 mdecorde
!define CT_SECTION '0x666666 0xeeeeee'
57 2956 mdecorde
!define CB_SECTION '${CB_PAGE}'
58 2956 mdecorde
!define UY_SECTION 11 ; Height of a section
59 2956 mdecorde
!define UY_SECTIONBPAD 2 ; Extra padding on the bottom of section headers
60 2956 mdecorde
!define UY_TXT 9 ; Height of a normal item
61 2956 mdecorde
!define UY_TXTBPAD 1 ; Extra padding on the bottom of normal items
62 2956 mdecorde
!define UX_COLPAD 7 ; Spacing between columns
63 2956 mdecorde
!define UY_ROW2 104 ; Absolute position of the 2nd row
64 2956 mdecorde
!define CT_LINK '0x0c6e97 0x0c6e97' ; SYSCLR:HOTLIGHT
65 2956 mdecorde
!define /Math UX_PAGE 00 + ${UX_COLPAD}
66 2956 mdecorde
!define /Math UY_PAGE ${UY_HEADER} + 20
67 2956 mdecorde
!define UX ${UX_PAGE}
68 2956 mdecorde
!define CB_FOOTERLINE '0xc4c4c4 0x333333'
69 2956 mdecorde
!define CT_FOOTER '0xbbbbbb 0x444444'
70 2956 mdecorde
71 2956 mdecorde
Var UseLightTheme
72 2956 mdecorde
73 2956 mdecorde
Function .onGUIInit
74 2956 mdecorde
ReadRegDWORD $UseLightTheme HKCU "Software\NSIS" "UseLightTheme"
75 2956 mdecorde
StrCmp $UseLightTheme "" 0 +2
76 2956 mdecorde
ReadRegDWORD $UseLightTheme HKCU "Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" "AppsUseLightTheme"
77 2956 mdecorde
StrCmp $UseLightTheme "" 0 +2
78 2956 mdecorde
StrCpy $UseLightTheme 1 ; Default
79 2956 mdecorde
80 2956 mdecorde
StrCmp $UseLightTheme "0" 0 +2
81 2956 mdecorde
System::Call 'USER32::SetProp(p$hWndParent,t"UseImmersiveDarkModeColors",i1)'
82 2956 mdecorde
FunctionEnd
83 2956 mdecorde
84 2956 mdecorde
!define SetCtlColors "!insertmacro SetCtlColors "
85 2956 mdecorde
!macro SetCtlColors hWnd ctlig ctdar cblig cbdar
86 2956 mdecorde
StrCmp $UseLightTheme "0" 0 +3
87 2956 mdecorde
SetCtlColors ${hWnd} "${ctdar}" ${cbdar}
88 2956 mdecorde
Goto +2
89 2956 mdecorde
SetCtlColors ${hWnd} "${ctlig}" ${cblig}
90 2956 mdecorde
!macroend
91 2956 mdecorde
92 2956 mdecorde
93 2956 mdecorde
Function PageLeave
94 2956 mdecorde
System::Call 'USER32::GetFocus()p.r0'
95 2956 mdecorde
System::Call 'USER32::GetDlgCtrlID(pr0)i.r1'
96 2956 mdecorde
System::Call 'USER32::GetParent(pr0)p.r2'
97 2956 mdecorde
SendMessage $2 ${WM_COMMAND} $1 $0 ; Handle <ENTER> in dialog by pretending it was a click on the active control
98 2956 mdecorde
Abort
99 2956 mdecorde
FunctionEnd
100 2956 mdecorde
101 2956 mdecorde
Function PageCreate
102 2956 mdecorde
GetDlgItem $0 $hWndParent 1
103 2956 mdecorde
ShowWindow $0 0
104 2956 mdecorde
GetDlgItem $0 $hWndParent 2
105 2956 mdecorde
ShowWindow $0 0
106 2956 mdecorde
107 2956 mdecorde
System::Call 'USER32::GetClientRect(p$hWndParent,@r0)'
108 2956 mdecorde
System::Call '*$0(i,i,i.r3,i.r4)'
109 2956 mdecorde
GetDlgItem $0 $hWndParent ${IDC_CHILDRECT}
110 2956 mdecorde
System::Call 'USER32::MoveWindow(pr0,i0,i0,ir3,ir4,i0)'
111 2956 mdecorde
112 2956 mdecorde
nsDialogs::Create ${IDC_CHILDRECT}
113 2956 mdecorde
Pop $R9
114 2956 mdecorde
${SetCtlColors} $R9 ${CT_PAGE} ${CB_PAGE}
115 2956 mdecorde
116 2956 mdecorde
!macro StartColumn W
117 2956 mdecorde
!define /ReDef UY ${UY_PAGE}
118 2956 mdecorde
!define /ReDef UX_W ${W}
119 2956 mdecorde
!ifdef UX_INTERNAL_PREV_W
120 2956 mdecorde
!define /ReDef /Math UX ${UX} + ${UX_INTERNAL_PREV_W}
121 2956 mdecorde
!define /ReDef /Math UX ${UX} + ${UX_COLPAD}
122 2956 mdecorde
!define /ReDef UX_INTERNAL_PREV_W ${UX_W}
123 2956 mdecorde
!else
124 2956 mdecorde
!define /Math UX_INTERNAL_PREV_W 0 + ${UX_W}
125 2956 mdecorde
!endif
126 2956 mdecorde
!macroend
127 2956 mdecorde
!macro CreateHeader Txt W
128 2956 mdecorde
!define /ReDef /Math W ${W} + 4 ; Make it slightly wider
129 2956 mdecorde
${NSD_CreateLabel} ${UX}u ${UY}u ${W}u ${UY_SECTION}u "${Txt}"
130 2956 mdecorde
Pop $0
131 2956 mdecorde
${SetCtlColors} $0 ${CT_SECTION} transparent transparent
132 2956 mdecorde
SendMessage $0 ${WM_SETFONT} ${HF_HEADER} 1
133 2956 mdecorde
!define /ReDef /Math UY ${UY} + ${UY_SECTION}
134 2956 mdecorde
!define /ReDef /Math UY ${UY} + ${UY_SECTIONBPAD}
135 2956 mdecorde
!macroend
136 2956 mdecorde
!macro CreateControl Class Txt W H
137 2956 mdecorde
${NSD_Create${Class}} ${UX}u ${UY}u ${W}u ${H}u "${Txt}"
138 2956 mdecorde
!define /ReDef /Math UY ${UY} + ${H}
139 2956 mdecorde
!define /ReDef /Math UY ${UY} + ${UY_TXTBPAD}
140 2956 mdecorde
!macroend
141 2956 mdecorde
!macro CreateSimpleLinkHelper Txt Url W
142 2956 mdecorde
!insertmacro CreateControl Link "${Txt}|${Url}" ${W} ${UY_TXT}
143 2956 mdecorde
!macroend
144 2956 mdecorde
!macro CreateSimpleLink Txt Url W
145 2956 mdecorde
!insertmacro CreateSimpleLinkHelper "${Txt}" "${Url}" ${W}
146 2956 mdecorde
Call ConfigureLink
147 2956 mdecorde
!macroend
148 2956 mdecorde
149 2956 mdecorde
150 2956 mdecorde
; --- Header ---
151 2956 mdecorde
!define HF_HEADER $R8
152 2956 mdecorde
CreateFont ${HF_HEADER} "Arial" ${UY_SECTION} 700
153 2956 mdecorde
154 2956 mdecorde
nsDialogs::CreateControl ${__NSD_Label_CLASS} ${__NSD_Label_STYLE} ${__NSD_Label_EXSTYLE} 33u 0 -33u ${UY_HEADER}u ""
155 2956 mdecorde
Pop $0
156 2956 mdecorde
${SetCtlColors} $0 0xffffff 0xffffff ${CB_HEADER}
157 2956 mdecorde
158 2956 mdecorde
nsDialogs::CreateControl ${__NSD_Icon_CLASS} ${__NSD_Icon_STYLE}|${SS_CENTERIMAGE}|${SS_CENTER} ${__NSD_Icon_EXSTYLE} 0 0 33u ${UY_HEADER}u ""
159 2956 mdecorde
Pop $0
160 2956 mdecorde
${SetCtlColors} $0 "" "" ${CB_HEADER}
161 2956 mdecorde
${NSD_SetIconFromInstaller} $0 $1
162 2956 mdecorde
163 2956 mdecorde
CreateFont $1 "Trebuchet MS" 17
164 2956 mdecorde
!searchreplace VERSTR "${NSIS_VERSION}" "v" ""
165 2956 mdecorde
nsDialogs::CreateControl ${__NSD_Label_CLASS} ${__NSD_Label_STYLE}|${SS_CENTERIMAGE}|${SS_ENDELLIPSIS} ${__NSD_Label_EXSTYLE} 34u 1u -34u ${UY_HEADER}u "nullsoft scriptable install system ${VERSTR}"
166 2956 mdecorde
Pop $0
167 2956 mdecorde
SetCtlColors $0 0x3A2A42 transparent
168 2956 mdecorde
SendMessage $0 ${WM_SETFONT} $1 1
169 2956 mdecorde
nsDialogs::CreateControl ${__NSD_Label_CLASS} ${__NSD_Label_STYLE}|${SS_CENTERIMAGE}|${SS_ENDELLIPSIS} ${__NSD_Label_EXSTYLE} 33u 0 -33u ${UY_HEADER}u "nullsoft scriptable install system ${VERSTR}"
170 2956 mdecorde
Pop $0
171 2956 mdecorde
SetCtlColors $0 0xffffff transparent
172 2956 mdecorde
SendMessage $0 ${WM_SETFONT} $1 1
173 2956 mdecorde
174 2956 mdecorde
175 2956 mdecorde
; --- Page ---
176 2956 mdecorde
!insertmacro StartColumn 90
177 2956 mdecorde
!insertmacro CreateHeader "Compiler" ${UX_W}
178 2956 mdecorde
!insertmacro CreateSimpleLink "Compile NSI scripts" "${PR}\MakeNSISW" ${UX_W}
179 2956 mdecorde
!insertmacro CreateSimpleLink "Installer based on .ZIP file" "${PR}\bin\Zip2Exe" ${UX_W}
180 2956 mdecorde
181 2956 mdecorde
182 2956 mdecorde
!define /ReDef UY ${UY_ROW2}
183 2956 mdecorde
!insertmacro CreateHeader "Developer Center" ${UX_W}
184 2956 mdecorde
!define /ReDef UY_MULTILINE 42
185 2956 mdecorde
!insertmacro CreateControl Label "Many more examples, tutorials, plug-ins and NSIS-releted software are available at the online Developer Center." ${UX_W} ${UY_MULTILINE}
186 2956 mdecorde
Pop $0
187 2956 mdecorde
${SetCtlColors} $0 ${CT_PAGE} ${CB_PAGE}
188 2956 mdecorde
189 2956 mdecorde
190 2956 mdecorde
!insertmacro StartColumn 80
191 2956 mdecorde
!insertmacro CreateHeader "Documentation" ${UX_W}
192 2956 mdecorde
!insertmacro CreateSimpleLink "NSIS Users Manual" "${PR}\NSIS.chm|${WWW}/Docs/" ${UX_W}
193 2956 mdecorde
!insertmacro CreateSimpleLink "Example scripts" "${PR}\Examples|${WWW}/Examples" ${UX_W}
194 2956 mdecorde
!insertmacro CreateSimpleLink "Modern UI 2" "${PD}\Modern UI 2\Readme.html" ${UX_W}
195 2956 mdecorde
196 2956 mdecorde
197 2956 mdecorde
!define /ReDef UY ${UY_ROW2}
198 2956 mdecorde
!insertmacro CreateHeader "Online Help" ${UX_W}
199 2956 mdecorde
!insertmacro CreateSimpleLink "Developer Center" "${WWW}/Developer_Center" ${UX_W}
200 2956 mdecorde
!insertmacro CreateSimpleLink "FAQ" "${WWW}/FAQ" ${UX_W}
201 2956 mdecorde
!insertmacro CreateSimpleLink "Forum" "http://forums.winamp.com/forumdisplay.php?forumid=65" ${UX_W}
202 2956 mdecorde
;"Project Tracker" "http://sourceforge.net/tracker/?group_id=22049"
203 2956 mdecorde
!insertmacro CreateSimpleLink "Bug Tracker" "http://sourceforge.net/tracker/?group_id=22049&atid=373085" ${UX_W}
204 2956 mdecorde
!insertmacro CreateSimpleLink "Stackoverflow" "http://stackoverflow.com/questions/tagged/nsis" ${UX_W}
205 2956 mdecorde
!insertmacro CreateSimpleLink "Slack collaboration hub" "${WWW}/r/Slack" ${UX_W}
206 2956 mdecorde
;insertmacro CreateSimpleLink "IRC channel" "irc://irc.landoleet.org/nsis" ${UX_W}
207 2956 mdecorde
;"Pastebin" "http://nsis.pastebin.com/index/1FtyKP89"
208 2956 mdecorde
;"Search" "http://www.google.com/cse/home?cx=005317984255499820329:c_glv1-6a6a"
209 2956 mdecorde
210 2956 mdecorde
211 2956 mdecorde
!insertmacro StartColumn 130
212 2956 mdecorde
!insertmacro CreateHeader "Plug-ins" ${UX_W}
213 2956 mdecorde
!macro CreatePluginLink Name Desc Url
214 2956 mdecorde
!define /ReDef SAVE_UY ${UY}
215 2956 mdecorde
!insertmacro CreateSimpleLinkHelper "${Name}" "${Url}" ${UX_W} ; AdjustLinkPair will configure this link
216 2956 mdecorde
!define /ReDef UY ${SAVE_UY}
217 2956 mdecorde
!insertmacro CreateControl Label "${Name} - ${Desc}" ${UX_W} ${UY_TXT}
218 2956 mdecorde
Call AdjustLinkPair
219 2956 mdecorde
!macroend
220 2956 mdecorde
!insertmacro CreatePluginLink "AdvSplash" "splash with fade in/out"     "${PD}\AdvSplash\advsplash.txt"
221 2956 mdecorde
!insertmacro CreatePluginLink "Banner"    "banner with custom text"     "${PD}\Banner\Readme.txt"
222 2956 mdecorde
!insertmacro CreatePluginLink "BgImage"   "background image"            "${PD}\BgImage\BgImage.txt"
223 2956 mdecorde
!insertmacro CreatePluginLink "Dialer"    "internet connection"         "${PD}\Dialer\Dialer.txt"
224 2956 mdecorde
!insertmacro CreatePluginLink "Math"      "math operations"             "${PD}\Math\Math.txt"
225 2956 mdecorde
!insertmacro CreatePluginLink "nsDialogs" "custom wizard pages"         "${PD}\nsDialogs\Readme.html"
226 2956 mdecorde
!insertmacro CreatePluginLink "nsExec"    "launch command line tools"   "${PD}\nsExec\nsExec.txt"
227 2956 mdecorde
!insertmacro CreatePluginLink "NSISdl"    "download files"              "${PD}\NSISdl\Readme.txt"
228 2956 mdecorde
!insertmacro CreatePluginLink "Splash"    "splash screen"               "${PD}\Splash\splash.txt"
229 2956 mdecorde
!insertmacro CreatePluginLink "StartMenu" "Start Menu folder selection" "${PD}\StartMenu\Readme.txt"
230 2956 mdecorde
!insertmacro CreatePluginLink "System"    "Windows API calls"           "${PD}\System\System.html"
231 2956 mdecorde
!insertmacro CreatePluginLink "VPatch"    "update existing files"       "${PD}\VPatch\Readme.html"
232 2956 mdecorde
233 2956 mdecorde
234 2956 mdecorde
; --- Footer ---
235 2956 mdecorde
${NSD_CreateLabel} 0 -22u 100% 1 ""
236 2956 mdecorde
Pop $0
237 2956 mdecorde
${SetCtlColors} $0 000000 000000 ${CB_FOOTERLINE}
238 2956 mdecorde
239 2956 mdecorde
nsDialogs::CreateControl ${__NSD_Label_CLASS} ${__NSD_Label_STYLE}|${SS_CENTERIMAGE}|${SS_NOTIFY} ${__NSD_Label_EXSTYLE} -110u -20u 100% 20u "nsis.sourceforge.net"
240 2956 mdecorde
Pop $0
241 2956 mdecorde
${SetCtlColors} $0 ${CT_FOOTER} transparent transparent
242 2956 mdecorde
SendMessage $0 ${WM_SETFONT} ${HF_HEADER} 1
243 2956 mdecorde
nsDialogs::SetUserData $0 "https://nsis.sourceforge.io"
244 2956 mdecorde
${NSD_OnClick} $0 OnLinkClick
245 2956 mdecorde
246 2956 mdecorde
nsDialogs::Show
247 2956 mdecorde
FunctionEnd
248 2956 mdecorde
249 2956 mdecorde
Function OnLinkClick
250 2956 mdecorde
Pop $1 ; HWND
251 2956 mdecorde
nsDialogs::GetUserData $1
252 2956 mdecorde
Call SplitPipe
253 2956 mdecorde
Pop $0 ; First URL in UserData from SplitPipe
254 2956 mdecorde
StrCpy $3 ""
255 2956 mdecorde
StrCpy $1 $0 4 ; Copy length of ${PD}
256 2956 mdecorde
${IfThen} $1 == "${PD}" ${|} StrCpy $3 "${PR}\" ${|}
257 2956 mdecorde
!ifdef QUIT_ON_EXECUTE
258 2956 mdecorde
System::Call 'USER32::GetKeyState(i0x11)i.r9' ; VK_CONTROL
259 2956 mdecorde
!endif
260 2956 mdecorde
ClearErrors
261 2956 mdecorde
ExecShell "" "$3$0"
262 2956 mdecorde
Pop $1 ; ... the rest of SplitPipe ...
263 2956 mdecorde
${If} $1 != ""  ; ... might contain a fallback location
264 2956 mdecorde
	StrCpy $0 $1
265 2956 mdecorde
	StrCpy $3 ""
266 2956 mdecorde
${ElseIf} $3 != "" ; Local docs path failed, use WWW fallback
267 2956 mdecorde
	StrCpy $3 0
268 2956 mdecorde
	slashconvloop:
269 2956 mdecorde
		StrCpy $2 $0 1 $3
270 2956 mdecorde
		${If} $2 == "\"
271 2956 mdecorde
			StrCpy $2 $0 $3
272 2956 mdecorde
			IntOp $3 $3 + 1
273 2956 mdecorde
			StrCpy $0 $0 "" $3
274 2956 mdecorde
			StrCpy $0 "$2/$0"
275 2956 mdecorde
		${Else}
276 2956 mdecorde
			IntOp $3 $3 + 1
277 2956 mdecorde
		${EndIf}
278 2956 mdecorde
		StrCmp $2 "" 0 slashconvloop
279 2956 mdecorde
	StrCpy $3 "${WWW}/"
280 2956 mdecorde
${EndIf}
281 2956 mdecorde
${If} "$3$1" != ""
282 2956 mdecorde
${AndIf} ${Errors}
283 2956 mdecorde
	ExecShell "" "$3$0"
284 2956 mdecorde
${EndIf}
285 2956 mdecorde
${If} ${Errors}
286 2956 mdecorde
	!ifdef QUIT_ON_EXECUTE
287 2956 mdecorde
	StrCpy $9 0 ; Don't allow close
288 2956 mdecorde
	!endif
289 2956 mdecorde
	MessageBox MB_IconStop 'Error: Unable to open "$0"!'
290 2956 mdecorde
${EndIf}
291 2956 mdecorde
!ifdef QUIT_ON_EXECUTE
292 2956 mdecorde
${IfThen} $9 < 0 ${|} SendMessage $hWndParent ${WM_CLOSE} 0 0 ${|}
293 2956 mdecorde
!endif
294 2956 mdecorde
FunctionEnd
295 2956 mdecorde
296 2956 mdecorde
Function ConfigureLink
297 2956 mdecorde
Pop $1 ; HWND
298 2956 mdecorde
${NSD_OnClick} $1 OnLinkClick
299 2956 mdecorde
${SetCtlColors} $1 ${CT_LINK} ${CB_PAGE}
300 2956 mdecorde
${NSD_GetText} $1 $4
301 2956 mdecorde
Push $4
302 2956 mdecorde
Call SplitPipe
303 2956 mdecorde
Pop $4
304 2956 mdecorde
Pop $2
305 2956 mdecorde
${NSD_SetText} $1 $4
306 2956 mdecorde
nsDialogs::SetUserData $1 $2
307 2956 mdecorde
System::Call 'USER32::GetDC(pr1)p.r3'
308 2956 mdecorde
SendMessage $1 ${WM_GETFONT} 0 0 $5
309 2956 mdecorde
System::Call 'GDI32::SelectObject(pr3,pr5)p.s'
310 2956 mdecorde
StrLen $5 $4
311 2956 mdecorde
System::Call 'GDI32::GetTextExtentPoint32(pr3,tr4,ir5,@r5)'
312 2956 mdecorde
System::Call '*$5(i.r6)'
313 2956 mdecorde
System::Call 'GDI32::SelectObject(pr3,ps)'
314 2956 mdecorde
System::Call 'USER32::ReleaseDC(pr1,pr3)'
315 2956 mdecorde
System::Call 'USER32::GetWindowRect(pr1,@r3)'
316 2956 mdecorde
System::Call '*$3(i,i.r5,i,i.r7)'
317 2956 mdecorde
IntOp $7 $7 - $5
318 2956 mdecorde
IntOp $6 $6 + 4 ; Padding for focus rect
319 2956 mdecorde
System::Call 'USER32::SetWindowPos(pr1,p,i,i,ir6,ir7,i0x16)'
320 2956 mdecorde
FunctionEnd
321 2956 mdecorde
322 2956 mdecorde
Function AdjustLinkPair
323 2956 mdecorde
Pop $2 ; Label
324 2956 mdecorde
${SetCtlColors} $2 ${CT_PAGE} ${CB_PAGE}
325 2956 mdecorde
Call ConfigureLink
326 2956 mdecorde
FunctionEnd
327 2956 mdecorde
328 2956 mdecorde
Function SplitPipe
329 2956 mdecorde
Exch $0
330 2956 mdecorde
Push $1
331 2956 mdecorde
Push $2
332 2956 mdecorde
StrCpy $2 0
333 2956 mdecorde
findSep:
334 2956 mdecorde
StrCpy $1 $0 1 $2
335 2956 mdecorde
IntOp $2 $2 + 1
336 2956 mdecorde
StrCmp $1 "" +2
337 2956 mdecorde
StrCmp $1 "|" "" findSep
338 2956 mdecorde
StrCpy $1 $0 "" $2
339 2956 mdecorde
IntOp $2 $2 - 1
340 2956 mdecorde
StrCpy $0 $0 $2
341 2956 mdecorde
Pop $2
342 2956 mdecorde
Exch $1
343 2956 mdecorde
Exch
344 2956 mdecorde
Exch $0
345 2956 mdecorde
FunctionEnd
346 2956 mdecorde
347 2956 mdecorde
Section
348 2956 mdecorde
SectionEnd
349 2956 mdecorde
350 2956 mdecorde
Page Custom PageCreate PageLeave
351 2956 mdecorde
!pragma warning disable 8000 ; Page instfiles not used