home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 May
/
CMCD0505.ISO
/
Software
/
Freeware
/
Grafica
/
gallerymage
/
GalleryMage-2.4.1.exe
/
GallMage2.nsi
< prev
next >
Wrap
Text File
|
2005-04-03
|
7KB
|
221 lines
;Gallery Mage install script (basedon basic example script by Joost Verburg)
;William Denniss
!define PRODUCT "Gallery Mage" ;Define your own software name here
!define VERSION "2.4.1" ;Define your own software version here
!include "MUI.nsh"
;--------------------------------
;Configuration
;General
Name "Gallery Mage 2.4"
OutFile "GalleryMage.exe"
;Folder selection page
InstallDir "$PROGRAMFILES\${PRODUCT}"
;Remember install folder
InstallDirRegKey HKCU "Software\${PRODUCT}" ""
ShowInstDetails show
ShowUninstDetails show
;Set the installation icon
!define MUI_ICON "data\tsins.ico"
;Set the uninstall icon
!define MUI_UNICON "data\tsunins.ico"
;--------------------------------
;Modern UI Configuration
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "COPYING.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN "$INSTDIR\GallMage2-javaw.bat"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Language Strings
;Description
LangString DESC_SecCopyUI ${LANG_ENGLISH} "Gallery Mage program files"
LangString DESC_SecShortcuts ${LANG_ENGLISH} "Shortcuts to Gallery Mage placed in your start menu."
LangString DESC_SecSource ${LANG_ENGLISH} "The Gallery Mage source code (GPL'd). Required if you want to modify the program itself."
LangString DESC_SecSample ${LANG_ENGLISH} "Sample photo gallery."
LangString DESC_SecShortcutsDesk ${LANG_ENGLISH} "Places a shortcut on your desktop."
;LangString MUI_TEXT_FINISH_RUN ${LANG_ENGLISH} "empty"
;--------------------------------
;Data
LicenseData "COPYING.txt"
;--------------------------------
;Installer Sections
InstType "Normal"
InstType "Full"
InstType "Minimal"
Section "Gallery Mage (required)" SecCopyUI
SectionIn 1 2 3 RO
;ADD YOUR OWN STUFF HERE!
SetOutPath "$INSTDIR"
File "*.bat"
File "README.txt"
File "COPYING.txt"
File "ChangeLog"
File "gallmage.jar"
File /r lib
SetOverwrite off
File /r conf
SetOverwrite on
File /r data
SetOutPath "$INSTDIR\doc\"
File "doc\gallmage.pdf"
SetOutPath "$INSTDIR\doc\gallmage\"
File /r "doc\gallmage\"
SetOutPath "$INSTDIR"
;Store install folder
WriteRegStr HKCU "Software\${PRODUCT}" "" $INSTDIR
;Create uninstaller
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GallMage" "DisplayName" "Gallery Mage"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GallMage" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
; optional section (can be disabled by the user)
Section "Start Menu Shortcuts" SecShortcuts
SectionIn 1 2 3
CreateDirectory "$SMPROGRAMS\Gallery Mage"
CreateShortCut "$SMPROGRAMS\${PRODUCT}\${PRODUCT}.lnk" "$SYSDIR\javaw.exe" '-Xms32m -Xmx512m -jar "$INSTDIR\gallmage.jar"' "$INSTDIR\data\gm.ico" 0
CreateShortCut "$SMPROGRAMS\Gallery Mage\${PRODUCT} (debug).lnk" "$INSTDIR\GallMage2.bat" "" "" 0
WriteINIStr "$SMPROGRAMS\Gallery Mage\Get Java 1.4+ (needed to run).url" "InternetShortcut" "URL" "http://java.com/"
WriteINIStr "$SMPROGRAMS\Gallery Mage\Gallery Mage Web Site.url" "InternetShortcut" "URL" "http://TankSoftware.com/gallmage/"
CreateShortCut "$SMPROGRAMS\${PRODUCT}\Ini Editor.lnk" "$SYSDIR\javaw.exe" '-cp "$INSTDIR\lib\jtank.jar" net.jtank.io.IniEditor' "" 0
CreateShortCut "$SMPROGRAMS\Gallery Mage\Readme.lnk" "$INSTDIR\README.txt" "" "" 0
CreateShortCut "$SMPROGRAMS\Gallery Mage\Manual.lnk" "$INSTDIR\doc\gallmage.pdf" "" "" 0
CreateShortCut "$SMPROGRAMS\Gallery Mage\Manual (html).lnk" "$INSTDIR\doc\gallmage\index.html" "" "" 0
CreateShortCut "$SMPROGRAMS\Gallery Mage\License.lnk" "$INSTDIR\COPYING.txt" "" "" 0
CreateShortCut "$SMPROGRAMS\Gallery Mage\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
SectionEnd
Section "Desktop Shortcut" SecShortcutsDesk
SectionIn 1 2
CreateShortCut "$DESKTOP\${PRODUCT}.lnk" "$SYSDIR\javaw.exe" '-Xms32m -Xmx512m -jar "$INSTDIR\gallmage.jar"' "$INSTDIR\data\gm.ico" 0
SectionEnd
; optional section (can be disabled by the user)
Section "Sample Gallery" SecSample
SectionIn 1 2
SetOutPath "$INSTDIR"
File /r sample
SectionEnd
; optional section (can be disabled by the user)
Section "Source Code" SecSource
SectionIn 2
SetOutPath "$INSTDIR"
File "build.xml"
File "*.nsi"
File /r src
SectionEnd
;Display the Finish header
;Insert this macro after the sections if you are not using a finish page
;!insertmacro MUI_SECTIONS_FINISHHEADER
;--------------------------------
;Descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(DESC_SecShortcuts)
!insertmacro MUI_DESCRIPTION_TEXT ${SecSource} $(DESC_SecSource)
!insertmacro MUI_DESCRIPTION_TEXT ${SecSample} $(DESC_SecSample)
!insertmacro MUI_DESCRIPTION_TEXT ${SecShortcutsDesk} $(DESC_SecShortcutsDesk)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
;Uninstaller Section
Section "Uninstall"
; remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GallMage"
DeleteRegKey HKCU "Software\${PRODUCT}"
; remove shortcuts, if any
Delete "$SMPROGRAMS\Gallery Mage\*.*"
RMDir /r "$SMPROGRAMS\Gallery Mage"
Delete "$INSTDIR\Uninstall.exe"
RMDir /r "$INSTDIR\doc"
RMDir /r "$INSTDIR\sample"
RMDir /r "$INSTDIR\lib"
RMDir /r "$INSTDIR\data"
RMDir /r "$INSTDIR\src"
Delete "$INSTDIR\build.xml"
Delete "$INSTDIR\GallMage.nsi"
Delete "$INSTDIR\gallmage.jar"
Delete "$INSTDIR\GallMage2"
Delete "$INSTDIR\*.bat"
Delete "$INSTDIR\README.txt"
Delete "$INSTDIR\COPYING.txt"
Delete "$INSTDIR\ChangeLog"
RMDir "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\${PRODUCT}"
;Display the Finish header
; !insertmacro MUI_UNFINISHHEADER
SectionEnd