enano-bundle.nsi
changeset 5 85800cb04cc5
parent 3 0cce88c7cf7c
child 6 6016fd9e848f
equal deleted inserted replaced
4:ea7b100e5de6 5:85800cb04cc5
    14 !define ENANO_ROOT "Q:\enano-1.1\repo"
    14 !define ENANO_ROOT "Q:\enano-1.1\repo"
    15 !endif
    15 !endif
    16 
    16 
    17 SetCompressor /FINAL /SOLID lzma
    17 SetCompressor /FINAL /SOLID lzma
    18 CRCCheck force
    18 CRCCheck force
       
    19 
       
    20 !include "WinMessages.nsh"
       
    21 
       
    22 ; ExperienceUI 1.3.1 compatible
       
    23 !ifndef XPUI_SYSDIR
       
    24   !define XPUI_SYSDIR "P:\exui\Contrib\ExperienceUI"
       
    25 !endif
       
    26 !include "${XPUI_SYSDIR}\XPUI.nsh"
       
    27 
       
    28 ; ExperienceUI GUI parameters
       
    29 !define XPUI_BGIMAGE
       
    30 !define XPUI_BGIMAGE_BMP "gfx\enano-bg.bmp"
       
    31 !define XPUI_TEXT_COLOR "F2F2F2"
       
    32 !define XPUI_TEXT_BGCOLOR "202020" ; irrelevant but still
       
    33 !define XPUI_TEXT_LIGHTCOLOR "B4C3EA"
       
    34 !define XPUI_ABORTWARNING
       
    35 !define XPUI_BRANDINGTEXT "NSIS Installer ${NSIS_VERSION}"
       
    36 !define XPUI_BRANDINGTEXT_COLOR_FG "b6d9ff"
       
    37 !define XPUI_BRANDINGTEXT_COLOR_BG "4c5b6b"
       
    38 !define XPUI_FASTERSKINNING
       
    39 !define XPUI_UNINSTALLER
    19 
    40 
    20 Var wampstack_installed
    41 Var wampstack_installed
    21 Var wappstack_installed
    42 Var wappstack_installed
    22 Var stack_type
    43 Var stack_type
    23 Var stack_instdir
    44 Var stack_instdir
    48 !include "inst-resources\str_replace.nsh"
    69 !include "inst-resources\str_replace.nsh"
    49 !include "inst-resources\kickstart.nsh"
    70 !include "inst-resources\kickstart.nsh"
    50 !include "inst-resources\apacheconfig.nsh"
    71 !include "inst-resources\apacheconfig.nsh"
    51 !include "inst-resources\applist.nsh"
    72 !include "inst-resources\applist.nsh"
    52 
    73 
    53 Function .onInit
       
    54   !ifdef UNINSTALL_DEBUG
       
    55     WriteUninstaller "$EXEDIR\uninstall.exe"
       
    56     MessageBox MB_OKCANCEL "Uninstaller written. OK to run installer, Cancel to quit" IDOK +2
       
    57       Abort
       
    58   !endif
       
    59   Call BNSetWAMPInstalledFlag
       
    60   Call BNSetWAPPInstalledFlag
       
    61   
       
    62   ; If neither WAMP nor WAPP is installed, die
       
    63   StrCmp $wampstack_installed 0 "" FoundStack
       
    64   StrCmp $wampstack_installed 0 "" FoundStack
       
    65 
       
    66     MessageBox MB_OK|MB_ICONEXCLAMATION "Setup could not find any BitNami stacks on your server.$\r$\n\
       
    67                                          $\r$\n\
       
    68                                          Please install a BitNami stack and re-run setup. You can download a BitNami stack for free from http://www.bitnami.org."
       
    69     Abort
       
    70 
       
    71   FoundStack:
       
    72 FunctionEnd
       
    73 
       
    74 ; ExperienceUI GUI parameters
       
    75 !define XPUI_BGIMAGE
       
    76 !define XPUI_BGIMAGE_BMP "gfx\enano-bg.bmp"
       
    77 !define XPUI_TEXT_COLOR "F2F2F2"
       
    78 !define XPUI_TEXT_BGCOLOR "202020" ; irrelevant but still
       
    79 !define XPUI_TEXT_LIGHTCOLOR "B4C3EA"
       
    80 !define XPUI_ABORTWARNING
       
    81 !define XPUI_BRANDINGTEXT "NSIS Installer ${NSIS_VERSION}"
       
    82 !define XPUI_BRANDINGTEXT_COLOR_FG "b6d9ff"
       
    83 !define XPUI_BRANDINGTEXT_COLOR_BG "4c5b6b"
       
    84 !define XPUI_FASTERSKINNING
       
    85 !define XPUI_UNINSTALLER
       
    86 
       
    87 ; MUI 1.67 compatible / XPUI 1.11 (2.0pre) compatible ------
       
    88 !ifndef XPUI_SYSDIR
       
    89   !define XPUI_SYSDIR "C:\ExperienceUI\Contrib\ExperienceUI"
       
    90 !endif
       
    91 !include "${XPUI_SYSDIR}\..\..\Include\XPUI.nsh"
       
    92 
       
    93 ; MUI Settings
       
    94 !define MUI_ABORTWARNING
       
    95 !define MUI_ICON "inst-resources\generic-install.ico"
       
    96 !define MUI_UNICON "inst-resources\generic-uninstall.ico"
       
    97 !include "WinMessages.nsh"
       
    98 
       
    99 ;
    74 ;
   100 ; INSTALL PAGES
    75 ; INSTALL PAGES
   101 ;
    76 ;
   102 
    77 
   103 ; Welcome page
    78 ; Welcome page
   104 !insertmacro XPUI_PAGE_WELCOME2
    79 ${Page} Welcome2
       
    80 
   105 ; License page
    81 ; License page
   106 !insertmacro XPUI_PAGE_LICENSE "licenses\GPL.txt"
    82 ${LicensePage} "licenses\GPL.txt"
       
    83 
   107 ; Stack selection - automatic unless both stacks are installed
    84 ; Stack selection - automatic unless both stacks are installed
   108 !include "pages\StackSelect.nsi"
    85 !include "pages\StackSelect.nsi"
       
    86 
   109 ; Database credentials entry
    87 ; Database credentials entry
   110 !include "pages\DatabaseConfig.nsi"
    88 !include "pages\DatabaseConfig.nsi"
       
    89 
   111 ; Site config page
    90 ; Site config page
   112 !include "pages\SiteConfig.nsi"
    91 !include "pages\SiteConfig.nsi"
       
    92 
   113 ; User credentials page
    93 ; User credentials page
   114 !include "pages\Login.nsi"
    94 !include "pages\Login.nsi"
       
    95 
   115 ; Components page
    96 ; Components page
   116 !insertmacro XPUI_PAGE_COMPONENTS
    97 ${Page} Components
       
    98 
   117 ; Instfiles page
    99 ; Instfiles page
   118 !insertmacro XPUI_PAGE_INSTFILES
   100 ${Page} InstFiles
       
   101 
   119 ; Finish page
   102 ; Finish page
   120 !define XPUI_FINISHPAGE_RUN
   103 !define XPUI_FINISHPAGE_RUN
   121 !define XPUI_FINISHPAGE_CHECKBOX_RUN "Go to my new $(^Name) website now"
   104 !define XPUI_FINISHPAGE_CHECKBOX_RUN "Go to my new $(^Name) website now"
   122 !define XPUI_FINISHPAGE_RUN_FUNCTION OpenBitnamiWebsite
   105 !define XPUI_FINISHPAGE_RUN_FUNCTION OpenBitnamiWebsite
   123 Function OpenBitnamiWebsite
   106 Function OpenBitnamiWebsite
   124   ExecShell open "http://localhost$stack_portbit/${PRODUCT_SHORTNAME}/"
   107   ExecShell open "http://localhost$stack_portbit/${PRODUCT_SHORTNAME}/"
   125 FunctionEnd
   108 FunctionEnd
   126 !insertmacro MUI_PAGE_FINISH
   109 ${Page} Finish
   127 
   110 ${Page} Abort
   128 !insertmacro XPUI_PAGE_ABORT
       
   129 
   111 
   130 ;
   112 ;
   131 ; UNINSTALL PAGES
   113 ; UNINSTALL PAGES
   132 ;
   114 ;
   133 
   115 
   134 !insertmacro XPUI_PAGEMODE_UNINST
   116 ${UnPage} Welcome2
   135 !insertmacro XPUI_PAGE_WELCOME2
   117 ${UnPage} InstFiles
   136 !insertmacro XPUI_PAGE_INSTFILES
   118 ${UnPage} Finish
   137 !insertmacro XPUI_PAGE_FINISH
       
   138 
       
   139 ; Language files
       
   140 !insertmacro MUI_LANGUAGE "English"
       
   141 
   119 
   142 ; Reserve files
   120 ; Reserve files
   143 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
   121 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
   144 
   122 
       
   123 ; Language files
       
   124 ${Language} "English"
       
   125 
   145 ; MUI end ------
   126 ; MUI end ------
   146 
       
   147 ; File lists
       
   148 !include "inst-resources\core-files.nsh"
       
   149 ; End file lists
       
   150 
   127 
   151 Name "${PRODUCT_NAME}"
   128 Name "${PRODUCT_NAME}"
   152 Caption "${PRODUCT_NAME} ${PRODUCT_VERSION} Bitnami installer"
   129 Caption "${PRODUCT_NAME} ${PRODUCT_VERSION} Bitnami installer"
   153 OutFile "enano-1.1.6-bitnami-setup.exe"
   130 OutFile "enano-1.1.6-bitnami-setup.exe"
   154 InstallDir "$PROGRAMFILES\Enano CMS"
   131 InstallDir "$PROGRAMFILES\Enano CMS"
   155 ShowInstDetails show
   132 ShowInstDetails show
   156 ShowUnInstDetails show
   133 ShowUnInstDetails show
       
   134 
       
   135 ; File lists
       
   136 !include "inst-resources\core-files.nsh"
       
   137 ; End file lists
   157 
   138 
   158 Section "-pre"
   139 Section "-pre"
   159   StrCpy $INSTDIR "$stack_instdir"
   140   StrCpy $INSTDIR "$stack_instdir"
   160   StrCpy $skip_install 0
   141   StrCpy $skip_install 0
   161   
   142   
   280   !insertmacro MUI_DESCRIPTION_TEXT ${SEC11} "Parser extension that adds syntax highlighting support using the GeSHi highlighting engine."
   261   !insertmacro MUI_DESCRIPTION_TEXT ${SEC11} "Parser extension that adds syntax highlighting support using the GeSHi highlighting engine."
   281   !insertmacro MUI_DESCRIPTION_TEXT ${SEC12} "Adds several parser extensions that provide MediaWiki-like behavior, including references (footnotes) and Table of Contents support."
   262   !insertmacro MUI_DESCRIPTION_TEXT ${SEC12} "Adds several parser extensions that provide MediaWiki-like behavior, including references (footnotes) and Table of Contents support."
   282   !insertmacro MUI_DESCRIPTION_TEXT ${SecGMP} "Enables PHP's GMP extension, which speeds up cryptographic operations."
   263   !insertmacro MUI_DESCRIPTION_TEXT ${SecGMP} "Enables PHP's GMP extension, which speeds up cryptographic operations."
   283 !insertmacro MUI_FUNCTION_DESCRIPTION_END
   264 !insertmacro MUI_FUNCTION_DESCRIPTION_END
   284 
   265 
       
   266 Function .onInit
       
   267   !ifdef UNINSTALL_DEBUG
       
   268     WriteUninstaller "$EXEDIR\uninstall.exe"
       
   269     MessageBox MB_OKCANCEL "Uninstaller written. OK to run installer, Cancel to quit" IDOK +2
       
   270       Abort
       
   271   !endif
       
   272   Call BNSetWAMPInstalledFlag
       
   273   Call BNSetWAPPInstalledFlag
       
   274   
       
   275   ; If neither WAMP nor WAPP is installed, die
       
   276   StrCmp $wampstack_installed 0 "" FoundStack
       
   277   StrCmp $wampstack_installed 0 "" FoundStack
       
   278 
       
   279     MessageBox MB_OK|MB_ICONEXCLAMATION "Setup could not find any BitNami stacks on your server.$\r$\n\
       
   280                                          $\r$\n\
       
   281                                          Please install a BitNami stack and re-run setup. You can download a BitNami stack for free from http://www.bitnami.org."
       
   282     Abort
       
   283 
       
   284   FoundStack:
       
   285 FunctionEnd
   285 
   286 
   286 Function un.onInit
   287 Function un.onInit
   287   
   288   
   288   StrCpy $stack_instdir "$INSTDIR\..\.."
   289   StrCpy $stack_instdir "$INSTDIR\..\.."
   289   ; this is probably a bad way to determine the stack type
   290   ; this is probably a bad way to determine the stack type