!define VERSION "v1.0.0" !define NAME "Installer" AllowRootDirInstall true ; The name of the installer Name "${NAME}" Caption "${NAME} ${VERSION}" ; The file to write OutFile "Install.exe" ; set Look and feel for the installer SetDateSave on SetDatablockOptimize on CRCCheck on SilentInstall normal BGGradient 000066 000066 FFFFFF InstallColors /windows XPStyle on ShowInstDetails show AutoCloseWindow true ; logset on # it doesn't work well, maybe version 3.0.0b ; Dirs to create Section "createdir" StrCpy $R0 "C:" FileOpen $0 "$DESKTOP\install.log" w CreateDirectory "$R0\temp" CreateDirectory "$R0\play" CreateDirectory "$R0\php" FileWrite $0 "$\n$\n" FileWrite $0 " Logging File for Installation ! " FileWrite $0 "-------------------------------------------------------------- " FileWrite $0 " " FileWrite $0 "1) Success Temp Dir Created !" FileWrite $0 "2) Success Play Dir Created !" FileWrite $0 "3) Success php Dir Created !" SectionEnd ; The stuff to install Section "php_adodb" # PHP application CopyFiles /silent "d:\php\*.*" "c:\php" 12200 $1 IfErrors error noerror error: FileWrite $0 "ERROR: Copying PHP Files !" call errorbox noerror: FileWrite $0 "4) Success PHP Files Copied !" Sleep 2000 SectionEnd Section "play" # Actual Camprr Codes CopyFiles /silent "d:\play\*.*" "c:\play" 2100 $1 IfErrors error noerror error: FileWrite $0 "ERROR: Copying play Files!" call errorbox noerror: FileWrite $0 "5) Success play FILES copied !" Sleep 2000 SectionEnd Section "mysql" # Install Mysql to C: from CD Exec '"D:\mysql\setup.exe" $1' IfErrors error noerror error: FileWrite $0 "ERROR: Installing MySql Application !" call errorbox noerror: FileWrite $0 "6) Success MySql Installed !" Sleep 50000 SectionEnd Section "mysql2" # Bloody Thing won't work due to Software (Definately not my codes) # fixed it with 'Sleep 10 thousand' Exec '"C:\mysql\bin\winmysqladmin.exe" $1' IfErrors error noerror error: FileWrite $0 "ERROR: Running Winmysqladmin Application !" call errorbox noerror: CreateDirectory "C:\mysql\logs" CopyFiles /silent "d:\config\*.sql" "c:\mysql\bin" 140 $1 CopyFiles /silent "d:\config\*.bat" "c:\mysql\bin" 3 $1 FileWrite $0 "7) Success Initializing Winmysqladmin !" Sleep 12000 SectionEnd Section "mysql3" # Creating camprr Db by executing the mysqladmin exe StrCpy $R1 "C:\mysql\bin\mysqladmin create camprr" Exec "$R1" Sleep 2000 StrCpy $R3 "C:\mysql\bin\dbfile.sql" ExecWait "c:\windows\system32\notepad $R3" Sleep 90000 SectionEnd Section "loadmysql" # Not my codes again, it just will not budge, Weird!! # this is surely work if i take it out of this code # right now this part will get skipped inside this installer # Will not run, Scheisse !! StrCpy $INSTDIR "C:" Exec '"$INSTDIR\mysql\bin\run3.bat"' Sleep 7000 Exec '"$INSTDIR\mysql\bin\run.bat"' Sleep 7000 Exec '"$INSTDIR\mysql\bin\run2.bat"' Sleep 10000 SectionEnd Section "apache" # Install Apache to C: from CD BringToFront Exec '"D:\apache\apache_1.3.27-win32-x86-no_src.exe" $1' IfErrors error noerror error: FileWrite $0 "ERROR: Installing Apache Application !" call errorbox noerror: FileWrite $0 "8) Success Installed Apache !" Sleep 60000 SectionEnd Section "apache2" # Seperate install apache and apache files CopyFiles /silent "d:\config\*.conf" "c:\program files\apache group\apache\conf" 37 $1 IfErrors error noerror error: FileWrite $0 "ERROR: Copying Config Files !" call errorbox noerror: FileWrite $0 "9) Success Copied Apache Files !" Sleep 5000 SectionEnd Section "winzip" # Install winzip to c: from CD BringToFront Exec '"D:\winzip\setup.exe" $1' IfErrors error noerror error: FileWrite $0 "ERROR: Installing Winzip Application !" call errorbox noerror: FileWrite $0 "10) Success Installed WinZip !" Sleep 35000 SectionEnd Section "zope" # Install Zope to c: from CD BringToFront Exec '"D:\zope\Zope-2.5.0-win32-x86.exe" $1' IfErrors error noerror error: FileWrite $0 "ERROR: Installing Zope Application !" call errorbox noerror: FileWrite $0 "11) Success Installed Zope !" Sleep 200000 SectionEnd Section "wait" MessageBox MB_OK|MB_ICONEXCLAMATION|MB_DEFBUTTON1 "Need to Wait 20 seconds for HD to Breath !!" SectionEnd Section "stopzope" # Stop Zope from working strcpy $R2 "net stop zope-2.5.0-win32-x86" nsexec::exec "$R2" Sleep 10000 SectionEnd Section "wait2" MessageBox MB_OK|MB_ICONEXCLAMATION|MB_DEFBUTTON1 "Need to Wait 10 seconds for HD to Breath !!" SectionEnd Section "copyzope" Copyfiles /silent "D:\zopefiles\newproducts\*.*" "C:\zope-2.5.0-win32-x86\lib\python\products" 2100 $1 IfErrors error noerror error: FileWrite $0 "ERROR: Copying ZOPE Files 1 !" call errorbox noerror: Copyfiles /silent "D:\zopefiles\import\*.*" "C:\zope-2.5.0-win32-x86\import" 2 $1 IfErrors error2 noerror2 error2: FileWrite $0 "ERROR: Copying ZOPE Files 2 !" call errorbox noerror2: Copyfiles /silent "D:\zopefiles\var\*.*" "C:\zope-2.5.0-win32-x86\var" 102000 $1 IfErrors error3 noerror3 error3: FileWrite $0 "ERROR: Copying ZOPE Files 3 !" call errorbox noerror3: FileWrite $0 "12) Success Copying Zope Files !" FileWrite $0 " Finished !!!" FileWrite $0 "-----------------------------------------------" FileClose $0 call success SectionEnd ;----------------------------------------------------------------------------------------------------- Function "errorbox" MessageBox MB_OK|MB_ICONEXCLAMATION|MB_DEFBUTTON1 "Warning!! UnIntended Error:Code $1" FileClose $0 call exit FunctionEnd Function "exit" MessageBox MB_OK|MB_ICONEXCLAMATION|MB_DEFBUTTON1 "Closing Installion Process, Please check Log file install.log on Desktop !" quit FunctionEnd Function "reboot_abort" MessageBox MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON1 "Need to Restart Windows !! Restart ?" IDNO noboot Reboot noboot: Quit FunctionEnd Function "success" MessageBox MB_OK "Please Check Success file 'Install.log' Located on DESKTOP !!!" FunctionEnd Function .onInstSuccess MessageBox MB_OK "Congratuations, Installation Successful !!!" call reboot_abort FunctionEnd #EOF