MUI2.nsh 2.1 KB

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