RE: [PHP-GTK] Re: [slightly OT] Re: [PHP-GTK] how to make installable of PHP_GTK apps
| From: | Andrew Braund | Date: | Wed, 27 Mar 2002 06:46:33 +0000 |
| Subject: | RE: [PHP-GTK] Re: [slightly OT] Re: [PHP-GTK] how to make installable of PHP_GTK apps | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1660@lists.php.net to get a copy of this message | ||
> From: J Wynia [mailto:letterj@phpgeek.com]
> I would recommend using NSIS (http://www.nullsoft.com/free/nsis/). I use it
> for PHPTriad and it works remarkably well. Each installation is configured
> through a text file.
Further to my last email I have now made an installer based on NSIS.
I have put a setup.exe generated by the install script at
http://203.2.75.30/~abraund/php-gtk050.exe
if you want to try it out.
The source is at the bottom of this message.
(I extracted php-gtk-0.5.0-win32.zip to c:\php4gtk and that is where
the installer expects to find the files).
Any feedback welcome.
Regards
Andrew Braund
======================8<=============================8<=====================
; There is no copyright on this. PHP-GTK people can replace this with
; whatever they like. Andrew Braund 27 Mar 2002
Name "php-gtk-050"
OutFile "php-gtk050.exe"
; Some default compiler settings (uncomment and change at will):
; SetCompress auto ; (can be off or force)
; SetDatablockOptimize on ; (can be off)
; CRCCheck on ; (can be off)
; AutoCloseWindow false ; (can be true for the window go away automatically at
end)
; ShowInstDetails hide ; (can be show to have them shown, or nevershow to
disable)
; SetDateSave off ; (can be on to have files restored to their orginal date)
LicenseText "You must agree to this license before installing."
LicenseData "licence.txt"
InstallDir "$PROGRAMFILES\php-gtk"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\php-gtk" ""
DirShow show ; (make this hide to not let the user change it)
DirText "Select the directory to install php-gtk in:"
Section "" ; (default section)
SetOutPath $INSTDIR
File "c:\php4gtk\php4\*"
File "c:\php4gtk\winnt\php.ini"
File "c:\php4gtk\winnt\system32\*"
CreateDirectory "$SMPROGRAMS\php-gtk"
CreateShortCut "$SMPROGRAMS\php-gtk\Uninstall.lnk" "$INSTDIR\uninstall.exe"
""
"$INSTDIR\uninstall.exe" 1
; samples
CreateDirectory "$SMPROGRAMS\php-gtk\samples"
CreateShortCut "$SMPROGRAMS\php-gtk\samples\hello.lnk"
$INSTDIR\php.exe
"-q
samples\hello.php" "$INSTDIR\php_win.exe" 0
CreateShortCut "$SMPROGRAMS\php-gtk\samples\scribble.lnk" $INSTDIR\php.exe
"-q
samples\scribble.php" "$INSTDIR\php_win.exe" 0
CreateShortCut "$SMPROGRAMS\php-gtk\samples\list.lnk" $INSTDIR\php.exe
"-q
samples\list.php" "$INSTDIR\php_win.exe" 0
CreateShortCut "$SMPROGRAMS\php-gtk\samples\fileselection.lnk"
$INSTDIR\php.exe
"-q samples\fileselection.php" "$INSTDIR\php_win.exe" 0
CreateShortCut "$SMPROGRAMS\php-gtk\samples\gtk.lnk" $INSTDIR\php.exe
"-q
samples\gtk.php" "$INSTDIR\php_win.exe" 0
CreateShortCut "$SMPROGRAMS\php-gtk\samples\radio.lnk" $INSTDIR\php.exe
"-q
samples\radio.php" "$INSTDIR\php_win.exe" 0
CreateShortCut "$SMPROGRAMS\php-gtk\samples\button.lnk" $INSTDIR\php.exe
"-q
samples\button.php" "$INSTDIR\php_win.exe" 0
CreateShortCut "$SMPROGRAMS\php-gtk\samples\mysql.lnk" $INSTDIR\php.exe
"-q
samples\mysql.php" "$INSTDIR\php_win.exe" 0
; create shortcuts above before changing outPath as it is used to set the working
directory for the shortcut
SetOutPath "$INSTDIR\samples"
File "c:\php4gtk\test\*"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\php-gtk" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE
"Software\Microsoft\Windows\CurrentVersion\Uninstall\php-gtk" "DisplayName"
"php-gtk (remove only)"
WriteRegStr HKEY_LOCAL_MACHINE
"Software\Microsoft\Windows\CurrentVersion\Uninstall\php-gtk" "UninstallString"
'"$INSTDIR\uninst.exe"'
; write out uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
SectionEnd ; end of default section
; begin uninstall settings/section
UninstallText "This will uninstall php-gtk from your system"
Section Uninstall
; add delete commands to delete whatever files/registry keys/etc you installed
here.
Delete "$INSTDIR\uninst.exe"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\php-gtk"
DeleteRegKey HKEY_LOCAL_MACHINE
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\php-gtk"
; remove files
Delete "$INSTDIR\*"
Delete "$INSTDIR\samples\*"
; remove shortcuts, if any.
Delete "$SMPROGRAMS\php-gtk\samples\*.*"
Delete "$SMPROGRAMS\php-gtk\*.*"
; remove directories used.
RMDir "$SMPROGRAMS\php-gtk\samples"
RMDir "$SMPROGRAMS\php-gtk"
RMDir "$INSTDIR\samples"
RMDir "$INSTDIR"
SectionEnd ; end of uninstall section
; eof
======================8<=============================8<=====================