aboutsummaryrefslogtreecommitdiff
path: root/Src/installer/winamp/pages
diff options
context:
space:
mode:
Diffstat (limited to 'Src/installer/winamp/pages')
-rw-r--r--Src/installer/winamp/pages/express_mode_page.nsh294
-rw-r--r--Src/installer/winamp/pages/groupCheckList.nsh349
-rw-r--r--Src/installer/winamp/pages/waui_startmenu.nsh178
3 files changed, 821 insertions, 0 deletions
diff --git a/Src/installer/winamp/pages/express_mode_page.nsh b/Src/installer/winamp/pages/express_mode_page.nsh
new file mode 100644
index 00000000..439f55b0
--- /dev/null
+++ b/Src/installer/winamp/pages/express_mode_page.nsh
@@ -0,0 +1,294 @@
+!ifndef NULLSOFT_WINAMP_INSTALLER_EXPRESS_MODE_PAGE_HEADER
+!define NULLSOFT_WINAMP_INSTALLER_EXPRESS_MODE_PAGE_HEADER
+
+!include "LogicLib.nsh"
+!include "express_mode.nsh"
+!include "nx.nsh"
+!include "fileFunc.nsh"
+
+!ifdef EXPRESS_MODE
+
+Var expressMode.page.radiobuttonFont
+Var expressMode.page.dialog
+Var expressMode.page.descriptionText
+Var expressMode.page.standardRadiobutton
+Var expressMode.page.standardText
+Var expressMode.page.customRadiobutton
+Var expressMode.page.customText
+
+!macro ExpressMode_InitializePage
+ StrCpy $expressMode.page.radiobuttonFont 0
+
+ StrCpy $expressMode.page.dialog 0
+ StrCpy $expressMode.page.descriptionText 0
+ StrCpy $expressMode.page.standardRadiobutton 0
+ StrCpy $expressMode.page.standardText 0
+ StrCpy $expressMode.page.customRadiobutton 0
+ StrCpy $expressMode.page.customText 0
+!macroend
+
+!define ExpressMode_InitializePage "!insertmacro 'ExpressMode_InitializePage'"
+
+!macro ExpressMode_InsertPage
+ PageEx custom
+ PageCallbacks ExpressMode_OnPageCreate ExpressMode_OnPageLeave
+ PageExEnd
+!macroend
+
+!define ExpressMode_InsertPage "!insertmacro 'ExpressMode_InsertPage'"
+
+Function ExpressMode_OnPageCreate
+ ${If} ${AtLeastWinVista}
+ !insertmacro MUI_HEADER_TEXT $(IDS_EXPRESS_MODE_HEADER) $(IDS_EXPRESS_MODE_SUBHEADER)
+
+ nsDialogs::Create /NOUNLOAD 1018
+ Pop $expressMode.page.dialog
+
+ ${If} $expressMode.page.dialog == error
+ Abort
+ Return
+ ${EndIf}
+
+ nsDialogs::SetRTL $(^RTL)
+
+ Push $R0
+ Push $R1
+
+ StrCpy $R0 0 ;next avaliable top position
+
+ ; Create Radio Button Font
+ ${If} $expressMode.page.radiobuttonFont = 0
+ IntOp $0 $(^FontSize) + 0
+ CreateFont $expressMode.page.radiobuttonFont $(^Font) $0 600
+ ${EndIf}
+
+ ; Calculate Radio Button Text Offset
+ ${NX_ConvertHorzDLU} $expressMode.page.dialog 12 $R2
+ IntOp $R2 $R2 + 1
+
+ ; Description Text
+ StrCpy $0 ""
+ ${If} $0 != ""
+ ${NSD_CreateLabel} 0u $R0 100% 20u $0
+ Pop $expressMode.page.descriptionText
+ ${NX_GetWindowSize} $expressMode.page.descriptionText $0 $1
+ ${NX_GetLabelIdealSize} $expressMode.page.descriptionText $0 $2 $3
+ ${If} $3 <= $1
+ ${NX_SetWindowSize} $expressMode.page.descriptionText $2 $3
+ IntOp $R0 $R0 + $3
+ ${Else}
+ IntOp $R0 $R0 + $1
+ ${EndIf}
+ ${EndIf}
+
+ StrCpy $R1 $R0
+
+ ; Standard Installation Radio Button
+ ${NSD_CreateRadioButton} 0u $R0 100% 10u "$(IDS_EXPRESS_MODE_STANDARD_INSTALL_RADIO)"
+ Pop $expressMode.page.standardRadiobutton
+ ${If} $expressMode.page.standardRadiobutton <> 0
+ ${NSD_AddStyle} $expressMode.page.standardRadiobutton ${WS_GROUP}
+ ${NSD_OnClick} $expressMode.page.standardRadiobutton \
+ ExpressMode_OnStandardRadiobuttonClick
+ ${If} $expressMode.page.radiobuttonFont <> 0
+ SendMessage $expressMode.page.standardRadiobutton \
+ ${WM_SETFONT} \
+ $expressMode.page.radiobuttonFont 0
+ ${EndIf}
+ ${NX_GetWindowSize} $expressMode.page.standardRadiobutton $0 $1
+ IntOp $0 $0 - $R2
+ ${NSD_GetText} $expressMode.page.standardRadiobutton $4
+ ${NX_CalculateTextRect} $expressMode.page.standardRadiobutton \
+ $4 ${DT_WORDBREAK} \
+ $0 $2 $3
+ ${If} $3 < $1
+ StrCpy $3 $1
+ ${EndIf}
+ IntOp $2 $2 + $R2
+ ${NX_SetWindowSize} $expressMode.page.standardRadiobutton $2 $3
+ IntOp $R0 $R0 + $3
+
+ ; Standard Installation Text
+ ${NX_ConvertVertDLU} $expressMode.page.dialog 3 $3
+ IntOp $R0 $R0 + $3
+
+ ${IfNot} ${FileExists} "$INSTDIR\install.ini"
+ ; we don't have previous selection
+ StrCpy $0 "$(IDS_EXPRESS_MODE_STANDARD_INSTALL_TEXT)"
+ ${Else}
+ StrCpy $0 "$(IDS_EXPRESS_MODE_STANDARD_REINSTALL_TEXT)"
+ ${EndIf}
+
+ ${NSD_CreateLabel} 11u $R0 289u 30u $0
+ Pop $expressMode.page.standardText
+ ${If} $expressMode.page.standardText <> 0
+ ${NSD_AddStyle} $expressMode.page.standardText ${WS_GROUP}
+ ${NX_GetWindowSize} $expressMode.page.standardText $0 $1
+ ${NX_GetLabelIdealSize} $expressMode.page.standardText $0 $2 $3
+ ${If} $3 > $1
+ StrCpy $3 $1
+ ${EndIf}
+ ${NX_SetWindowSize} $expressMode.page.standardText $2 $3
+ IntOp $R0 $R0 + $3
+ ${Else}
+ IntOp $R0 $R0 - $3
+ ${EndIf}
+
+ ${NX_ConvertVertDLU} $expressMode.page.dialog 12 $0
+ IntOp $R0 $R0 + $0
+ ${EndIf}
+
+ ; Custom Installation Radio Button
+ ${NSD_CreateRadioButton} 0u $R0 100% 10u "$(IDS_EXPRESS_MODE_CUSTOM_INSTALL_RADIO)"
+ Pop $expressMode.page.customRadiobutton
+ ${If} $expressMode.page.customRadiobutton <> 0
+ ${NSD_OnClick} $expressMode.page.customRadiobutton \
+ ExpressMode_OnCustomRadiobuttonClick
+
+ ${If} $expressMode.page.radiobuttonFont <> 0
+ SendMessage $expressMode.page.customRadiobutton \
+ ${WM_SETFONT} \
+ $expressMode.page.radiobuttonFont 0
+ ${EndIf}
+
+ ${NX_GetWindowSize} $expressMode.page.customRadiobutton $0 $1
+ IntOp $0 $0 - $R2
+ ${NSD_GetText} $expressMode.page.customRadiobutton $4
+ ${NX_CalculateTextRect} $expressMode.page.customRadiobutton \
+ $4 ${DT_WORDBREAK} \
+ $0 $2 $3
+ ${If} $3 < $1
+ StrCpy $3 $1
+ ${EndIf}
+ IntOp $2 $2 + $R2
+ ${NX_SetWindowSize} $expressMode.page.customRadiobutton $2 $3
+ IntOp $R0 $R0 + $3
+
+ ${If} $expressMode.page.standardText <> 0
+ ${NX_SetWindowOrder} $expressMode.page.standardText \
+ $expressMode.page.customRadiobutton
+ ${EndIf}
+
+ ; Custom Installation Text
+ ${NX_ConvertVertDLU} $expressMode.page.dialog 3 $3
+ IntOp $R0 $R0 + $3
+
+ ${NSD_CreateLabel} 11u $R0 289u 30u "$(IDS_EXPRESS_MODE_CUSTOM_INSTALL_TEXT)"
+ Pop $expressMode.page.customText
+ ${If} $expressMode.page.customText <> 0
+ ${NX_GetWindowSize} $expressMode.page.customText $0 $1
+ ${NX_GetLabelIdealSize} $expressMode.page.customText $0 $2 $3
+ ${If} $3 > $1
+ StrCpy $3 $1
+ ${EndIf}
+ ${NX_SetWindowSize} $expressMode.page.customText $2 $3
+ IntOp $R0 $R0 + $3
+ ${Else}
+ IntOp $R0 $R0 - $3
+ ${EndIf}
+ ${EndIf}
+
+ ${NX_GetWindowSize} $expressMode.page.dialog $1 $0
+ IntOp $0 $0 - $R1
+ IntOp $1 $R0 - $R1
+ ${If} $0 > $1
+ IntOp $0 $0 - $1
+ IntOp $0 $0 / 3
+ ${If} $expressMode.page.standardRadiobutton <> 0
+ ${NX_OffsetWindowPos} $expressMode.page.standardRadiobutton 0 $0
+ ${EndIf}
+ ${If} $expressMode.page.standardText <> 0
+ ${NX_OffsetWindowPos} $expressMode.page.standardText 0 $0
+ ${EndIf}
+ ${If} $expressMode.page.customRadiobutton <> 0
+ ${NX_OffsetWindowPos} $expressMode.page.customRadiobutton 0 $0
+ ${EndIf}
+ ${If} $expressMode.page.customText <> 0
+ ${NX_OffsetWindowPos} $expressMode.page.customText 0 $0
+ ${EndIf}
+ ${EndIf}
+
+ Pop $R1
+ Pop $R0
+
+ Call ExpressMode_UpdatePage
+
+ ; Show Dialog
+ nsDialogs::Show ; not return until the user clicks Next, Back or Cancel.
+ ${EndIf}
+ Return
+FunctionEnd
+
+Function ExpressMode_UpdatePage
+ Push $0
+ ${ExpressMode_IsEnabled} $0
+ ${If} $0 == "yes"
+ ${NSD_Check} $expressMode.page.standardRadiobutton
+ ${NSD_Uncheck} $expressMode.page.customRadiobutton
+ ${NextButton_SetNextPageMode} $0
+ ${Else}
+ ${NSD_Uncheck} $expressMode.page.standardRadiobutton
+ ${NSD_Check} $expressMode.page.customRadiobutton
+ ${NextButton_SetLastPageMode} "no"
+ ${EndIf}
+ Pop $0
+FunctionEnd
+
+!define ExpressMode_UpdatePage 'call ExpressMode_UpdatePage'
+
+Function ExpressMode_OnStandardRadiobuttonClick
+ Exch $0
+ ${NSD_GetState} $expressMode.page.standardRadiobutton $0
+ ${If} $0 = ${BST_CHECKED}
+ ${ExpressMode_IsEnabled} $0
+ ${If} $0 != "yes"
+ ${ExpressMode_Enable}
+ ${ExpressMode_UpdatePage}
+ ${EndIf}
+ ${Else}
+ ${ExpressMode_IsEnabled} $0
+ ${If} $0 == "yes"
+ ${ExpressMode_Disable}
+ ${ExpressMode_UpdatePage}
+ ${EndIf}
+ ${EndIf}
+ Pop $0
+FunctionEnd
+
+Function ExpressMode_OnCustomRadiobuttonClick
+ Exch $0
+ ${NSD_GetState} $expressMode.page.customRadiobutton $0
+ ${If} $0 = ${BST_CHECKED}
+ ${ExpressMode_IsEnabled} $0
+ ${If} $0 == "yes"
+ ${ExpressMode_Disable}
+ ${ExpressMode_UpdatePage}
+ ${EndIf}
+ ${Else}
+ ${ExpressMode_IsEnabled} $0
+ ${If} $0 != "yes"
+ ${ExpressMode_Enable}
+ ${ExpressMode_UpdatePage}
+ ${EndIf}
+ ${EndIf}
+ Pop $0
+FunctionEnd
+
+Function ExpressMode_OnPageLeave
+ ${If} $expressMode.page.radiobuttonFont <> 0
+ System::Call "${fnDeleteObject}($expressMode.page.radiobuttonFont)"
+ StrCpy $expressMode.page.radiobuttonFont 0
+ ${EndIf}
+
+ StrCpy $expressMode.page.dialog 0
+ StrCpy $expressMode.page.descriptionText 0
+ StrCpy $expressMode.page.standardRadiobutton 0
+ StrCpy $expressMode.page.standardText 0
+ StrCpy $expressMode.page.customRadiobutton 0
+ StrCpy $expressMode.page.customText 0
+FunctionEnd
+!else ; defined(EXPRESS_MODE)
+!define ExpressMode_InitializePage ""
+!define ExpressMode_InsertPage ""
+!endif ; defined(EXPRESS_MODE)
+!endif ; defined(NULLSOFT_WINAMP_INSTALLER_EXPRESS_MODE_PAGE_HEADER) \ No newline at end of file
diff --git a/Src/installer/winamp/pages/groupCheckList.nsh b/Src/installer/winamp/pages/groupCheckList.nsh
new file mode 100644
index 00000000..98665483
--- /dev/null
+++ b/Src/installer/winamp/pages/groupCheckList.nsh
@@ -0,0 +1,349 @@
+!ifndef NULLSOFT_WINAMP_PAGE_SECTIONGROUPLIST_HEADER
+!define NULLSOFT_WINAMP_PAGE_SECTIONGROUPLIST_HEADER
+
+!include "util.nsh"
+!include "nsDialogs.nsh"
+!include "logicLib.nsh"
+!include ".\utils\sectionDescription.nsh"
+
+!define CLS_VCENTER 0x00000001
+!define CLS_BOLDNAME 0x00000002
+!define CLS_RADIOBUTTON 0x00000004
+!define CLS_COMPACT 0x00000008
+!define CLS_READONLY 0x00000010
+
+!define CLIS_DISABLED 0x00000001
+!define CLIS_CHECKED 0x00000002
+
+!ifndef SWP_NOSIZE
+ !define SWP_NOSIZE 0x0001
+!endif
+
+!ifndef SWP_NOZORDER
+ !define SWP_NOZORDER 0x0004
+!endif
+
+!ifndef SWP_NOMOVE
+ !define SWP_NOMOVE 0x0002
+!endif
+
+!ifndef SWP_NOACTIVATE
+ !define SWP_NOACTIVATE 0x0010
+!endif
+
+!macro GroupCheckList_InsertSectionHelper __index
+ SectionGetFlags ${__index} ${GCL_FLAGS}
+ ${IfNot} ${Errors}
+ IntOp ${GCL_TEMP} ${GCL_FLAGS} & ${SF_SECGRPEND}
+ ${If} 0 != ${GCL_TEMP}
+ SetErrors
+ ${Else}
+ StrCpy ${GCL_STYLE} 0
+ IntOp ${GCL_TEMP} ${GCL_FLAGS} & ${SF_RO}
+ ${If} 0 != ${GCL_TEMP}
+ IntOp ${GCL_STYLE} ${GCL_STYLE} | ${CLIS_DISABLED}
+ ${EndIf}
+
+ IntOp ${GCL_TEMP} ${GCL_FLAGS} & ${SF_SELECTED}
+ ${If} 0 != ${GCL_TEMP}
+ IntOp ${GCL_STYLE} ${GCL_STYLE} | ${CLIS_CHECKED}
+ ${EndIf}
+
+ SectionGetText ${__index} ${CGL_HEADER}
+ ${IfNot} ${Errors}
+ ${AndIf} "${CGL_HEADER}" != ""
+ StrCpy ${GCL_LISTTOP} ""
+ ${If} ${GCL_DESCFUNC} != ""
+ Push ${__index}
+ Call "${GCL_DESCFUNC}"
+ Pop ${GCL_LISTTOP}
+ ${EndIf}
+
+ StrCpy ${GCL_TEMP} ""
+ ${If} ${GCL_NOTEFUNC} != ""
+ Push ${__index}
+ Call "${GCL_NOTEFUNC}"
+ Pop ${GCL_TEMP}
+ ${EndIf}
+
+ nsis_chklist::InsertItem /NOUNLOAD ${GCL_CTLHWND} 200000 ${CGL_HEADER} "${GCL_TEMP}" "${GCL_LISTTOP}" ${GCL_STYLE} ${__index}
+ Pop ${GCL_TEMP}
+ ClearErrors
+ ${EndIf}
+ ${EndIf}
+ ${EndIf}
+!macroend
+
+!macro GroupCheckList_CreatePageInternal
+ !ifndef __UNINSTALL__
+ !define GCL_SUFFIX inst
+ !else
+ !define GCL_SUFFIX uninst
+ !endif
+
+ !define GCL_DIALOG $0
+ !define GCL_INDEX $1
+ !define CGL_HEADER $2
+ !define CGL_FOOTER $3
+ !define GCL_STYLE $4
+ !define GCL_CTLHWND $5
+ !define GCL_TEMP $6
+ !define GCL_FLAGS $7
+ !define GCL_DESCFUNC $8
+ !define GCL_NOTEFUNC $9
+
+ nsDialogs::Create /NOUNLOAD 1018
+ Exch ${GCL_DIALOG}
+
+ ${If} ${GCL_DIALOG} == error
+ Pop ${GCL_DIALOG}
+ Abort
+ ${EndIf}
+
+ Exch 1
+ Exch ${GCL_INDEX}
+ Exch 2
+ Exch ${CGL_HEADER}
+ Exch 3
+ Exch ${CGL_FOOTER}
+ Exch 4
+ Exch ${GCL_STYLE}
+ Exch 5
+ Exch ${GCL_DESCFUNC}
+ Exch 6
+ Exch ${GCL_NOTEFUNC}
+
+ Push ${GCL_CTLHWND}
+ Push ${GCL_TEMP}
+
+ ${If} ${CGL_HEADER} == "[groupName]"
+ ClearErrors
+ SectionGetText ${GCL_INDEX} ${CGL_HEADER}
+ ${If} ${Errors}
+ StrCpy ${CGL_HEADER} ""
+ ${EndIf}
+ ${EndIf}
+
+ ${If} ${CGL_FOOTER} == "[groupName]"
+ ClearErrors
+ SectionGetText ${GCL_INDEX} ${CGL_FOOTER}
+ ${If} ${Errors}
+ StrCpy ${CGL_FOOTER} ""
+ ${EndIf}
+ ${EndIf}
+
+ ${If} "${GCL_DESCFUNC}" == "default"
+ GetLabelAddress ${GCL_DESCFUNC} ".GroupCheckList_DefaultDescriptionProvider${GCL_SUFFIX}"
+ ${EndIf}
+
+ ${If} "${GCL_NOTEFUNC}" == "default"
+ GetLabelAddress ${GCL_NOTEFUNC} ".GroupCheckList_DefaultNoteProvider${GCL_SUFFIX}"
+ ${EndIf}
+
+ !define GCL_LISTTOP $R0
+ !define GCL_LISTHEIGHT $R1
+ Push ${GCL_LISTTOP}
+ Push ${GCL_LISTHEIGHT}
+ StrCpy ${GCL_LISTTOP} 0
+ StrCpy ${GCL_LISTHEIGHT} "100%"
+
+ ${If} ${CGL_HEADER} != ""
+ ${NSD_CreateLabel} 0 0 100% 8u ${CGL_HEADER}
+ Pop ${GCL_CTLHWND}
+ ${If} ${GCL_CTLHWND} != error
+ nsis_chklist::AdjustStaticHeight ${GCL_CTLHWND} 1 3
+ Pop ${GCL_TEMP}
+ IntOp ${GCL_LISTTOP} ${GCL_TEMP} + 13
+ ${EndIf}
+ ${EndIf}
+
+ ${If} ${CGL_FOOTER} != ""
+ ${NSD_CreateLabel} 0 0 100% 8u ${CGL_FOOTER}
+ Pop ${GCL_CTLHWND}
+ ${If} ${GCL_CTLHWND} != error
+ nsis_chklist::AdjustStaticHeight ${GCL_CTLHWND} 1 3
+ Pop ${GCL_TEMP}
+
+ Push $R2
+ Push $R3
+ Push $R4
+ Push $R5
+ Push $R6
+ System::Call "*${stRECT} .R3"
+ System::Call "User32::GetClientRect(i, i) i (${GCL_DIALOG}, R3) .R2"
+ System::Call "*$R3${stRECT} (.R5, .R2, .R6, .R4)"
+ System::Free $R3
+ IntOp $R2 $R4 - $R2
+ Pop $R6
+ Pop $R5
+ Pop $R4
+ Pop $R3
+
+ IntOp $R2 $R2 - ${GCL_TEMP}
+ System::Call "User32::SetWindowPos(i, i, i, i, i, i, i) b (${GCL_CTLHWND}, 0, 0, $R2, 0, 0, ${SWP_NOACTIVATE}|${SWP_NOZORDER}|${SWP_NOSIZE})"
+ IntOp $R2 $R2 - 4
+ IntOp ${GCL_LISTHEIGHT} $R2 - ${GCL_LISTTOP}
+ Pop $R2
+ ${EndIf}
+ ${EndIf}
+
+ ${If} ${GCL_STYLE} == ""
+ IntOp ${GCL_STYLE} ${CLS_BOLDNAME} | ${CLS_VCENTER}
+ ${EndIf}
+
+ nsis_chklist::CreateControl /NOUNLOAD ${GCL_DIALOG} ${GCL_STYLE} 0u ${GCL_LISTTOP} 100% ${GCL_LISTHEIGHT}
+ Pop ${GCL_CTLHWND}
+
+ ${If} ${GCL_CTLHWND} != "error"
+ GetLabelAddress ${GCL_TEMP} ".GroupCheckList_OnCheckChanged${GCL_SUFFIX}"
+ nsis_chklist::RegisterCallback /NOUNLOAD ${GCL_CTLHWND} ${GCL_TEMP}
+
+ SendMessage ${GCL_CTLHWND} ${WM_SETREDRAW} 0 0
+
+ CreateFont ${GCL_TEMP} "Tahoma" "8" "400"
+ SendMessage ${GCL_CTLHWND} ${WM_SETFONT} ${GCL_TEMP} 0
+
+ Push ${GCL_FLAGS}
+ SectionGetFlags ${GCL_INDEX} ${GCL_FLAGS}
+ IntOp ${GCL_TEMP} ${GCL_FLAGS} & 6;${SF_SECGRP}|${SF_SECGRPEND}
+ ${If} ${SF_SECGRP} == ${GCL_TEMP}
+ ${Do}
+ IntOp ${GCL_INDEX} ${GCL_INDEX} + 1
+ ClearErrors
+ !insertmacro 'GroupCheckList_InsertSectionHelper' ${GCL_INDEX}
+ ${If} ${Errors}
+ ${Break}
+ ${EndIf}
+ ${Loop}
+ ${Else}
+ !insertmacro 'GroupCheckList_InsertSectionHelper' ${GCL_INDEX}
+ ${EndIf}
+ Pop ${GCL_FLAGS}
+ !undef GCL_FLAGS
+
+ SendMessage ${GCL_CTLHWND} ${WM_SETREDRAW} 1 0
+ ${EndIf}
+
+ Pop ${GCL_LISTTOP}
+ !undef GCL_LISTTOP
+ !undef GCL_LISTHEIGHT
+
+ nsDialogs::Show ; not return until the user clicks Next, Back or Cancel.
+
+ ${If} ${GCL_CTLHWND} != ""
+ SendMessage ${GCL_CTLHWND} ${WM_GETFONT} 0 0 ${GCL_TEMP}
+ System::Call 'gdi32::DeleteObject(i ${GCL_TEMP}) i.s'
+ Pop ${GCL_TEMP}
+ ${EndIf}
+
+ Pop ${GCL_TEMP}
+ Pop ${GCL_CTLHWND}
+
+ Pop ${GCL_NOTEFUNC}
+ Pop ${GCL_DIALOG}
+ Pop ${GCL_INDEX}
+ Pop ${CGL_HEADER}
+ Pop ${CGL_FOOTER}
+ Pop ${GCL_STYLE}
+ Pop ${GCL_DESCFUNC}
+
+ !undef GCL_DIALOG
+ !undef GCL_INDEX
+ !undef CGL_HEADER
+ !undef CGL_FOOTER
+ !undef GCL_STYLE
+ !undef GCL_DESCFUNC
+ !undef GCL_NOTEFUNC
+ !undef GCL_CTLHWND
+ !undef GCL_TEMP
+ Return
+
+ !ifndef GROUPCHECKLIST_ONCHECKCHNAGED_${GCL_SUFFIX}_DEFINED
+ !define GROUPCHECKLIST_ONCHECKCHNAGED_${GCL_SUFFIX}_DEFINED
+ .GroupCheckList_OnCheckChanged${GCL_SUFFIX}:
+ !insertmacro 'GroupCheckList_OnCheckChanged'
+ Return
+ !endif
+
+ !ifndef GROUPCHECKLIST_DEFAULTDESCRIPTIONPROVIDER_${GCL_SUFFIX}_DEFINED
+ !define GROUPCHECKLIST_DEFAULTDESCRIPTIONPROVIDER_${GCL_SUFFIX}_DEFINED
+ .GroupCheckList_DefaultDescriptionProvider${GCL_SUFFIX}:
+ !insertmacro 'GroupCheckList_DefaultDescriptionProvider'
+ Return
+ !endif
+
+ !ifndef GROUPCHECKLIST_DEFAULTNOTEPROVIDER_${GCL_SUFFIX}_DEFINED
+ !define GROUPCHECKLIST_DEFAULTNOTEPROVIDER_${GCL_SUFFIX}_DEFINED
+ .GroupCheckList_DefaultNoteProvider${GCL_SUFFIX}:
+ !insertmacro 'GroupCheckList_DefaultNoteProvider'
+ Return
+ !endif
+ !undef GCL_SUFFIX
+!macroend
+
+!macro GroupCheckList_OnCheckChanged
+ Exch $0 ; hwnd
+ Exch 1
+ Exch $1 ; item index
+ Exch 2
+ Exch $2 ; checked
+ Exch 3
+ Exch $3 ; item param
+ Push $4
+
+ SectionGetFlags $3 $4
+ ${If} $2 != 1
+ IntOp $2 ${SF_SELECTED} ~
+ IntOp $4 $4 & $2
+ StrCpy $2 0
+ ${Else}
+ IntOp $4 $4 | ${SF_SELECTED}
+ ${EndIf}
+ SectionSetFlags $3 $4
+
+ Pop $4
+ Pop $3
+ Pop $0
+ Pop $1
+ Pop $2
+!macroend
+
+!macro GroupCheckList_DefaultDescriptionProvider
+ !ifndef __UNINSTALL__
+ Call GetSectionDescription
+ !else
+ Call un.GetSectionDescription
+ !endif
+!macroend
+
+!macro GroupCheckList_DefaultNoteProvider
+ Exch $0
+ Push $1
+ ClearErrors
+ SectionGetSize $0 $1
+ ${If} ${Errors}
+ StrCpy $1 ""
+ ${Else}
+ StrCpy $1 "($1)"
+ ${EndIf}
+ Exch $1
+ Exch 1
+ Pop $0
+!macroend
+
+; if header or footer == [groupName] then it will be replaced with group name.
+; if style == "" default style used
+; if provider == "default" - default provider used
+!macro GroupCheckList_CreatePage __groupIndex __header __footer __style __descriptionProvider __noteProvider
+ Push "${__noteProvider}"
+ Push "${__descriptionProvider}"
+ Push "${__style}"
+ Push "${__footer}"
+ Push "${__header}"
+ Push "${__groupIndex}"
+ ${CallArtificialFunction} GroupCheckList_CreatePageInternal
+!macroend
+
+!define GroupCheckList_CreatePage `!insertmacro GroupCheckList_CreatePage`
+
+!endif ;NULLSOFT_WINAMP_PAGE_SECTIONGROUPLIST_HEADER \ No newline at end of file
diff --git a/Src/installer/winamp/pages/waui_startmenu.nsh b/Src/installer/winamp/pages/waui_startmenu.nsh
new file mode 100644
index 00000000..2a54f5b8
--- /dev/null
+++ b/Src/installer/winamp/pages/waui_startmenu.nsh
@@ -0,0 +1,178 @@
+!ifndef WAUI_STARTMENU_HEADER
+!define WAUI_STARTMENU_HEADER
+
+!include ".\wordFunc.nsh"
+!include ".\utils\wafuncs.nsh"
+!include ".\express_mode.nsh"
+
+var waui.startmenu.text.start
+var waui.startmenu.chk.start
+var waui.startmenu.chk.quicklaunch
+var waui.startmenu.chk.desktop
+
+Function nsPageWAStartMenu_Create
+
+!ifdef STARTMENUPAGE_CHECK_NEXT_BUTTON
+ Push $0
+ ${ExpressMode_IsEnabled} $0
+ ${If} $0 == "yes"
+ Pop $0
+ Abort
+ ${EndIf}
+ Pop $0
+!endif
+
+ SetPluginUnload alwaysoff
+ !insertmacro MUI_HEADER_TEXT $(IDS_PAGE_STARTMENU_TITLE) $(IDS_PAGE_STARTMENU_SUBTITLE)
+
+ nsDialogs::Create 1018
+ Pop $waui.dialog
+
+ ${NSD_CreateLabel} 0 0 100% 30u $(IDS_PAGE_STARTMENU_CAPTION)
+
+ ReadIniStr $0 "$INSTINI" "Startmenu" "Name"
+ ${If} $0 == ""
+ StrCpy $0 $(^NameDA)
+ WriteIniStr $INSTINI "StartMenu" "Name" $0
+ ${EndIf}
+
+ ${NSD_CreateText} 0 30u 100% 12u $0
+ Pop $waui.startmenu.text.start
+ GetFunctionAddress $0 nsPageWAStartMenu__OnTextChange
+ nsDialogs::OnChange $waui.startmenu.text.start $0
+
+ ${NSD_CreateCheckBox} 0 44u 100% 12u $(IDS_PAGE_STARTMENU_CHK_START)
+ Pop $waui.startmenu.chk.start
+ GetFunctionAddress $0 nsPageWAStartMenu__OnStartClick
+ nsDialogs::OnClick $waui.startmenu.chk.start $0
+
+ ${NSD_CreateCheckBox} 0 56u 100% 12u $(IDS_PAGE_STARTMENU_CHK_QUICKLAUNCH)
+ Pop $waui.startmenu.chk.quicklaunch
+ GetFunctionAddress $0 nsPageWAStartMenu__OnQuickLaunchClick
+ nsDialogs::OnClick $waui.startmenu.chk.quicklaunch $0
+
+ ${NSD_CreateCheckBox} 0 68u 100% 12u $(IDS_PAGE_STARTMENU_CHK_DESKTOP)
+ Pop $waui.startmenu.chk.desktop
+ GetFunctionAddress $0 nsPageWAStartMenu__OnDesktopClick
+ nsDialogs::OnClick $waui.startmenu.chk.desktop $0
+
+ ReadIniStr $0 "$INSTINI" "Startmenu" "NoMenu"
+ IntOp $0 $0 !
+ SendMessage $waui.startmenu.chk.start ${BM_SETCHECK} $0 0
+
+ ReadIniStr $0 "$INSTINI" "Startmenu" "NoQuickLaunch"
+ IntOp $0 $0 !
+ SendMessage $waui.startmenu.chk.quicklaunch ${BM_SETCHECK} $0 0
+
+ ReadIniStr $0 "$INSTINI" "Startmenu" "NoDesktop"
+ IntOp $0 $0 !
+ SendMessage $waui.startmenu.chk.desktop ${BM_SETCHECK} $0 0
+
+ Call nsPageWAStartMenu__OnStartClick
+
+ nsDialogs::Show
+ SetPluginUnload manual
+FunctionEnd
+
+Function nsPageWAStartMenu__OnTextChange
+ System::Call "user32::GetWindowText(i$waui.startmenu.text.start, w.r0, i${NSIS_MAX_STRLEN})"
+ WriteIniStr $INSTINI "StartMenu" "Name" $0
+FunctionEnd
+
+Function nsPageWAStartMenu__OnStartClick
+ SendMessage $waui.startmenu.chk.start ${BM_GETCHECK} 0 0 $0
+ EnableWindow $waui.startmenu.text.start $0
+ ${If} $0 = 0
+ WriteIniStr $INSTINI "StartMenu" "NoMenu" "1"
+ ${Else}
+ DeleteINIStr $INSTINI "StartMenu" "NoMenu"
+ ${EndIf}
+FunctionEnd
+
+Function nsPageWAStartMenu__OnQuickLaunchClick
+ SendMessage $waui.startmenu.chk.quicklaunch ${BM_GETCHECK} 0 0 $0
+ ${If} $0 = 0
+ WriteIniStr $INSTINI "StartMenu" "NoQuickLaunch" "1"
+ ${Else}
+ DeleteINIStr $INSTINI "StartMenu" "NoQuickLaunch"
+ ${EndIf}
+FunctionEnd
+
+Function nsPageWAStartMenu__OnDesktopClick
+ SendMessage $waui.startmenu.chk.desktop ${BM_GETCHECK} 0 0 $0
+ ${If} $0 = 0
+ WriteIniStr $INSTINI "StartMenu" "NoDesktop" "1"
+ ${Else}
+ DeleteINIStr $INSTINI "StartMenu" "NoDesktop"
+ ${EndIf}
+FunctionEnd
+
+Function StartMenu_WriteData
+ Push $0
+ Push $1
+ Push $2
+
+ StrCpy $2 "$OUTDIR"
+ SetOutPath "$INSTDIR"
+ SetShellVarContext all
+
+ ReadIniStr $1 "$INSTINI" "Startmenu" "Name"
+ ${If} $1 != ""
+ ReadIniStr $0 "$INSTINI" "Startmenu" "NoMenu"
+ ${If} $0 == ""
+ CreateDirectory "$SMPROGRAMS\$1"
+ CreateShortcut "$SMPROGRAMS\$1\${WINAMPLINK}" "$INSTDIR\${WINAMPEXE}"
+ CreateShortcut "$SMPROGRAMS\$1\$(safeMode).lnk" "$INSTDIR\${WINAMPEXE}" "/SAFE=1"
+ CreateShortcut "$SMPROGRAMS\$1\$(uninstallWinamp).lnk" "$INSTDIR\uninstwa.exe"
+ ${EndIf}
+ ${EndIf}
+
+ ReadIniStr $0 "$INSTINI" "Startmenu" "NoQuickLaunch"
+ ${If} $0 == ""
+ CreateShortcut "$QUICKLAUNCH\${WINAMPLINK}" "$INSTDIR\${WINAMPEXE}"
+ ${EndIf}
+ ReadIniStr $0 "$INSTINI" "Startmenu" "NoDesktop"
+ ${If} $0 == ""
+ CreateShortcut "$DESKTOP\${WINAMPLINK}" "$INSTDIR\${WINAMPEXE}"
+ ${EndIf}
+
+ SetShellVarContext current
+ SetOutPath "$2"
+
+ Pop $2
+ Pop $1
+ Pop $0
+FunctionEnd
+
+Function un.StartMenu_CleanData
+ Push $0
+ Push $1
+ Push $2
+
+ SetShellVarContext all
+
+ StrCpy $0 $INSTINI
+ ${If} ${FileExists} "$0"
+ ReadIniStr $1 "$0" "Startmenu" "Name"
+ ${If} $1 != ""
+ ReadIniStr $2 "$0" "Startmenu" "NoMenu"
+ ${If} $2 != "1"
+ Delete "$SMPROGRAMS\$1\*.lnk"
+ RMDir /r "$SMPROGRAMS\$1"
+ ${EndIf}
+ ${EndIf}
+ ReadIniStr $2 "$0" "Startmenu" "NoQuickLaunch"
+ ${If} $2 != "1"
+ Delete "$QUICKLAUNCH\${WINAMPLINK}"
+ ${EndIf}
+ ReadIniStr $2 "$0" "Startmenu" "NoDesktop"
+ ${If} $2 != "1"
+ Delete "$DESKTOP\${WINAMPLINK}"
+ ${EndIf}
+ ${EndIf}
+
+ Pop $2
+ Pop $1
+ Pop $0
+FunctionEnd
+!endif ;WAUI_STARTMENU_HEADER \ No newline at end of file