diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/installer/winamp/utils/sectionDescription.nsh | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/installer/winamp/utils/sectionDescription.nsh')
-rw-r--r-- | Src/installer/winamp/utils/sectionDescription.nsh | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/Src/installer/winamp/utils/sectionDescription.nsh b/Src/installer/winamp/utils/sectionDescription.nsh new file mode 100644 index 00000000..f50d7909 --- /dev/null +++ b/Src/installer/winamp/utils/sectionDescription.nsh @@ -0,0 +1,76 @@ +!ifndef NULLSOFT_WINAMP_INSTALLER_SECTION_DESCRIPTION_HEADER +!define NULLSOFT_WINAMP_INSTALLER_SECTION_DESCRIPTION_HEADER + +!macro GetSectionDescription __sectionIndex __outputVar + Push "${__sectionIndex}" + !ifndef __UNINSTALL__ + Call GetSectionDescription + !else + Call un.GetSectionDescription + !endif + Pop ${__outputVar} +!macroend + +!define GetSectionDescription "!insertmacro 'GetSectionDescription'" + +!macro InstallSectionDescriptionBegin + Function GetSectionDescription + Exch $0 +!macroend + +!macro UninstallSectionDescriptionBegin + Function un.GetSectionDescription + Exch $0 +!macroend + +!macro SectionDescription __sectionIndex __sectionDescription + !verbose push + !verbose 4 + StrCmp $0 ${__sectionIndex} 0 +3 + StrCpy $0 "${__sectionDescription}" + !ifndef __UNINSTALL__ + Goto getsectiondescription_end + !else + Goto ungetsectiondescription_end + !endif + !verbose pop +!macroend + +!macro SectionDescriptionEnd + StrCpy $0 "" + !ifndef __UNINSTALL__ + Goto getsectiondescription_end + !else + Goto ungetsectiondescription_end + !endif + !ifndef __UNINSTALL__ + getsectiondescription_end: + !else + ungetsectiondescription_end: + !endif + Exch $0 + FunctionEnd +!macroend + +!macro WALANG_DESCRIPTION LANGID NSIS_LANGID + !ifdef "LANG_USE_${LANGID}" | LANG_USE_ALL + !insertmacro SectionDescription ${IDX_SEC_${LANGID}} "${LANGFILE_${NSIS_LANGID}_NAME}" + !endif +!macroend + +!macro DESCRIPTION __sectionIndex __descriptionText + !ifdef ${__sectionIndex} + !verbose push + !verbose 2 + !insertmacro SectionDescription ${${__sectionIndex}} "${__descriptionText}" + !verbose pop + !endif +!macroend + +!define DESCRIPTION "!insertmacro 'DESCRIPTION'" +!define WALANG_DESCRIPTION "!insertmacro 'WALANG_DESCRIPTION'" +!define INSTALL_DESCRIPTION_TABLE_BEGIN "!insertmacro 'InstallSectionDescriptionBegin'" +!define UNINSTALL_DESCRIPTION_TABLE_BEGIN "!insertmacro 'UninstallSectionDescriptionBegin'" +!define DESCRIPTION_TABLE_END "!insertmacro 'SectionDescriptionEnd'" + +!endif ;NULLSOFT_WINAMP_INSTALLER_SECTION_DESCRIPTION_HEADER
\ No newline at end of file |