enano-bundle.nsi
changeset 10 014d58335b6d
parent 8 af10a4dbafb4
child 11 b62383876fdb
equal deleted inserted replaced
8:af10a4dbafb4 10:014d58335b6d
   141 !include "inst-resources\core-files.nsh"
   141 !include "inst-resources\core-files.nsh"
   142 ; End file lists
   142 ; End file lists
   143 
   143 
   144 Section "-pre"
   144 Section "-pre"
   145   StrCpy $INSTDIR "$stack_instdir"
   145   StrCpy $INSTDIR "$stack_instdir"
   146   StrCpy $skip_install 0
       
   147   
       
   148   StrCmp $db_needroot 0 0 SkipManualCheck
       
   149     ; If we were given our own DB credentials and there's already a config, the installation needs to be skipped
       
   150     IfFileExists "$INSTDIR\apps\${PRODUCT_SHORTNAME}\htdocs\config.php" 0 SkipManualCheck
       
   151       StrCpy $skip_install 1
       
   152       Return
       
   153       
       
   154   SkipManualCheck:
       
   155   
       
   156   IfFileExists "$INSTDIR\apps\${PRODUCT_SHORTNAME}\htdocs\config.php" 0 +2
       
   157     Delete "$INSTDIR\apps\${PRODUCT_SHORTNAME}\htdocs\config.php"
       
   158 SectionEnd
   146 SectionEnd
   159 
   147 
   160 Section "-DatabaseSetup"
   148 Section "-DatabaseSetup"
   161   StrCmp $db_needroot 1 +2
   149   StrCmp $db_needroot 1 +2
   162     Return
   150     Return
   194   WriteINIStr "$stack_instdir\php\php.ini" "GMP" "extension" "php_gmp.dll"
   182   WriteINIStr "$stack_instdir\php\php.ini" "GMP" "extension" "php_gmp.dll"
   195   IfErrors 0 +2
   183   IfErrors 0 +2
   196     MessageBox MB_OK|MB_ICONEXCLAMATION "GMP was not automatically enabled in PHP. Logins will be several seconds slower."
   184     MessageBox MB_OK|MB_ICONEXCLAMATION "GMP was not automatically enabled in PHP. Logins will be several seconds slower."
   197 SectionEnd
   185 SectionEnd
   198 
   186 
   199 /*  Plugins components commented out, we don't plan on enabling this until at least 1.2.0 RC1
   187 /*  Plugins components commented out, we do not plan on enabling this until at least 1.2.0 RC1
   200 Section "YubiKey auth plugin" SEC02
   188 Section "YubiKey auth plugin" SEC02
   201 SectionEnd
   189 SectionEnd
   202 
   190 
   203 Section "AjIM2" SEC03
   191 Section "AjIM2" SEC03
   204 SectionEnd
   192 SectionEnd
   226   DetailPrint "Restarting Apache"
   214   DetailPrint "Restarting Apache"
   227   nsExec::Exec '"$SYSDIR\net.exe" stop "$stack_typestackApache"'
   215   nsExec::Exec '"$SYSDIR\net.exe" stop "$stack_typestackApache"'
   228   nsExec::Exec '"$SYSDIR\net.exe" start "$stack_typestackApache"'
   216   nsExec::Exec '"$SYSDIR\net.exe" start "$stack_typestackApache"'
   229   StrCmp $skip_install 1 0 +2
   217   StrCmp $skip_install 1 0 +2
   230     Return
   218     Return
       
   219     
       
   220   SetOutPath "$INSTDIR\apps\${PRODUCT_SHORTNAME}\scripts"
       
   221   File "inst-resources\selfdestruct.php"
       
   222     
       
   223   IfFileExists "$INSTDIR\apps\${PRODUCT_SHORTNAME}\htdocs\config.php" "" SkipDestruct
       
   224     IntCmp $db_needroot 1 JustDeleteTheConfig
       
   225 	  nsExec::ExecToLog '"$INSTDIR\php\php.exe" "$INSTDIR\apps\${PRODUCT_SHORTNAME}\scripts\selfdestruct.php" --skip-revoke'
       
   226     JustDeleteTheConfig:
       
   227     Delete "$INSTDIR\apps\${PRODUCT_SHORTNAME}\htdocs\config.php"
       
   228   SkipDestruct:
   231   
   229   
   232   Call enano_write_kickstart_script
   230   Call enano_write_kickstart_script
   233   Call enano_run_kickstart_script
   231   Call enano_run_kickstart_script
   234   
       
   235   SetOutPath "$INSTDIR\apps\${PRODUCT_SHORTNAME}\scripts"
       
   236   File "inst-resources\selfdestruct.php"
       
   237 SectionEnd
   232 SectionEnd
   238 
   233 
   239 Section -InsertApplistEntry
   234 Section -InsertApplistEntry
   240   ; Skip if this is WAPPStack, it doesn't have an applications.html. (!)
   235   ; Skip if this is WAPPStack, it doesn't have an applications.html. (!)
   241   StrCmp $stack_type "WAPP" 0 +2
   236   StrCmp $stack_type "WAPP" 0 +2