aboutsummaryrefslogtreecommitdiff
path: root/Src/installer/winamp/uninstall/uiEvents.nsh
blob: e18f7d6021757e4e666795c4c8bbb96565eebbed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
!ifndef NULLSOFT_WINAMP_UNINSTALLER_UI_EVENTS_HEADER
!define NULLSOFT_WINAMP_UNINSTALLER_UI_EVENTS_HEADER

!include ".\uninstall\ui.nsh"
!include ".\pages\groupCheckList.nsh"
!include ".\utils\wafuncs.nsh"
!include ".\utils\sectionDescription.nsh"
!include "windowText.nsh"

Function un.UI_OnComponentsPageCreate
	Push $0
	Push $1
	Push $2

	${NextButton_SetLastPageMode} $0

	StrCpy $0 ${IDX_UNINSTALL_COMPONENTS_GROUP}
	ClearErrors
	SectionGetText $0 $1
	${If} ${Errors}
		StrCpy $1 ""
	${EndIf}

	${GetSectionDescription} $0 $2
	!insertmacro MUI_HEADER_TEXT "$1"  "$2"

	${GroupCheckList_CreatePage} $0 "" "$(IDS_UNINSTALL_COMPONENTS_FOOTER)" "" "default" ""

	Pop $2
	Pop $1
	Pop $0
FunctionEnd

Function un.UI_OnFinishPageReadMe
	${If} ${IsWinXP}
		StrCpy $0 "XP"
	${ElseIf} ${IsWinVista}
		StrCpy $0 "Vista"
	${ElseIf} ${IsWin7}
		StrCpy $0 "7"
	${ElseIf} ${IsWin8}
		StrCpy $0 "8"
	${ElseIf} ${IsWin8.1}
		StrCpy $0 "8.1"
	${Else}
		StrCpy $0 "Unknown"
	${Endif}
	ExecShell "open" '"http://services.winamp.com/redirect/support?reason=uninstall&subject=Winamp Uninstall&product=Winamp Desktop&v=${VERSION_MAJOR}.${VERSION_MINOR}${VERSION_MINOR_SECOND} ${InstallType}&platform=Windows $0"'
FunctionEnd

Function un.UI_OnFinishPageRun
	ExecShell "open" '"$INSTDIR"'
FunctionEnd

Function un.UI_OnFinishPageShow

	!ifdef MUI_FINISHPAGE_RUN_VARIABLES
		${NX_OffsetWindowPos} $mui.FinishPage.Run 0 80
	!endif

	!ifdef MUI_FINISHPAGE_SHOREADME_VARAIBLES
		${NX_OffsetWindowPos} $mui.FinishPage.ShowReadme 0 70
	!endif

	${NX_IncreaseWindowSize} $mui.FinishPage.Text 0 70

	Push $0

	StrCpy $0 ""
	${If} $winamp.uninstall.checkFolder == "true"
		${DirState} "$INSTDIR" $0
		${If} $0 == 1
			StrCpy $0 "show_explorer"
		${Else}
			StrCpy $0 0
		${EndIf}
	${EndIf}

	${If} $0 == "show_explorer"
		${If} $mui.FinishPage.Text != 0
			${NX_SetWindowText} $mui.FinishPage.Text "$(IDS_UNINSTALL_SUBHEADER)$(IDS_UNINSTALL_FILES_NOT_REMOVED)"
		${EndIf}
	${Else}
		!ifdef MUI_FINISHPAGE_RUN_VARIABLES
			SendMessage $mui.FinishPage.Run ${BM_SETCHECK} 0 0
			ShowWindow $mui.FinishPage.Run ${SW_HIDE}
		!endif
	${EndIf}

	Pop $0

FunctionEnd

!endif ; NULLSOFT_WINAMP_UNINSTALLER_UI_EVENTS_HEADER