MUI2.nsh 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. NSIS Modern User Interface - Version 2.1
  3. Copyright 2002-2021 Joost Verburg
  4. Contributors: Amir Szekely, Anders Kjersem
  5. */
  6. !ifndef MUI_INCLUDED
  7. !verbose push 3
  8. !define MUI_INCLUDED
  9. !define MUI_SYSVERSION "2.1"
  10. !verbose pop
  11. !echo "NSIS Modern User Interface version ${MUI_SYSVERSION} - Copyright 2002-2021 Joost Verburg"
  12. ;--------------------------------
  13. !verbose push 3
  14. !define /IfNDef MUI_VERBOSE 3
  15. !verbose ${MUI_VERBOSE}
  16. !addincludedir "${NSISDIR}\Contrib\Modern UI 2"
  17. ;--------------------------------
  18. ;Header files required by MUI
  19. !include WinMessages.nsh
  20. !include LogicLib.nsh
  21. !include nsDialogs.nsh
  22. !include LangFile.nsh
  23. ;--------------------------------
  24. ;Macros for compile-time defines
  25. !macro MUI_DEFAULT SYMBOL CONTENT
  26. ;Define symbol if not yet defined
  27. ;For setting default values
  28. !ifndef "${SYMBOL}"
  29. !define "${SYMBOL}" "${CONTENT}"
  30. !endif
  31. !macroend
  32. !macro MUI_SET SYMBOL CONTENT
  33. ;Define symbol and undefine if neccesary
  34. !insertmacro MUI_UNSET "${SYMBOL}"
  35. !define "${SYMBOL}" "${CONTENT}"
  36. !macroend
  37. !macro MUI_UNSET SYMBOL
  38. ;Undefine symbol if defined
  39. !ifdef "${SYMBOL}"
  40. !undef "${SYMBOL}"
  41. !endif
  42. !macroend
  43. ;--------------------------------
  44. ;MUI interface
  45. !include "Deprecated.nsh"
  46. !include "Interface.nsh"
  47. !include "Localization.nsh"
  48. !include "Pages.nsh"
  49. ;--------------------------------
  50. ;Pages
  51. !include "Pages\Components.nsh"
  52. !include "Pages\Directory.nsh"
  53. !include "Pages\Finish.nsh"
  54. !include "Pages\InstallFiles.nsh"
  55. !include "Pages\License.nsh"
  56. !include "Pages\StartMenu.nsh"
  57. !include "Pages\UninstallConfirm.nsh"
  58. !include "Pages\Welcome.nsh"
  59. ;--------------------------------
  60. ;Insert MUI code in script
  61. !macro MUI_INSERT
  62. !ifndef MUI_INSERT
  63. !define MUI_INSERT
  64. ;This macro is included when the first language file is included,
  65. ;after the pages.
  66. ;Interface settings
  67. !insertmacro MUI_INTERFACE
  68. ;Interface functions - Installer
  69. !insertmacro MUI_FUNCTION_GUIINIT
  70. !insertmacro MUI_FUNCTION_ABORTWARNING
  71. ;Interface functions - Uninstaller
  72. !ifdef MUI_UNINSTALLER
  73. !insertmacro MUI_UNFUNCTION_GUIINIT
  74. !insertmacro MUI_FUNCTION_UNABORTWARNING
  75. !endif
  76. !endif
  77. !macroend
  78. !verbose pop
  79. !endif ;~ MUI_INCLUDED