[ptx] huigin 0.4 installer
spec
spec at webtech.pl
Fri Oct 29 19:35:56 BST 2004
Hello,
I've just built an installer - compiled from cvs today.
It's at: http://www.castlesofpoland.com/hugin/hugin-0.4_beta_setup.exe
It contains translations to German, Polish (those are full), Frensh,
Italian (those I'm not sure).
The nsis script is attached - maybe we could use it as official script
for now?
Please note the size of installer - it's half the size of zip - this is
due to compression using lzma which is a lot better even than bz2.
Please let me know if you have any questions/comments.
--
Thanks,
Marek
-------------- next part --------------
;--------------------------------
!define HUGIN_VERSION "0.4 beta"
!define DISPLAY_NAME "Hugin ${HUGIN_VERSION}"
!define HAVE_MINGW
!define NEW_INTERFACE
!ifdef NEW_INTERFACE
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
!endif
;--------------------------------
# [Installer Attributes]
Name "${DISPLAY_NAME}"
OutFile "hugin-0.4_beta_setup.exe"
Caption "${DISPLAY_NAME}"
# [Licence Attributes]
LicenseText "Hugin is distributed under the GNU General Public License :"
LicenseData "LICENCE"
# [Directory Selection]
InstallDir "$PROGRAMFILES\hugin"
DirText "Select the directory to install Hugin in:"
# [Additional Installer Settings ]
SetCompress force
SetCompressor lzma
;--------------------------------
;Interface Settings
ShowInstDetails show
AutoCloseWindow false
SilentInstall normal
CRCCheck on
SetCompress auto
SetDatablockOptimize on
;SetOverwrite ifnewer
XPStyle on
ComponentText "Choose components"
# [Background Gradient]
BGGradient off
!define MUI_ABORTWARNING
;--------------------------------
# [Pages]
!insertmacro MUI_PAGE_LICENSE "LICENCE"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN "$INSTDIR\hugin.exe"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
# [Files]
Section "Hugin program files"
SectionIn RO
SetOutPath "$INSTDIR"
File "automatch.exe"
File "autooptimiser.exe"
File "autopano_old.exe"
File "hugin.exe"
File "LICENCE"
File "mingwm10.dll"
File "nona.exe"
File "nona_gui.exe"
File "panosifter.exe"
File "sift_keypoints.exe"
File "zhang_undistort.exe"
SetOutPath "$INSTDIR\locale"
File /r "locale\*"
SetOutPath "$INSTDIR\xrc"
File /r "xrc\*"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\Hugin "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Hugin" "DisplayName" "${DISPLAY_NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Hugin" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Hugin" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Hugin" "NoRepair" 1
WriteUninstaller "$INSTDIR\uninstall.exe"
SectionEnd
# [Shortcuts]
Section "Create shortcuts in Start Menu"
;try to read from registry if last installation installed for All Users/Current User
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Hugin\Backup" \
"Shortcuts"
StrCmp $0 "" cont exists
cont:
SetShellVarContext all
MessageBox MB_YESNO "Do you want to install Hugin for all users on this computer ?" IDYES AllUsers
SetShellVarContext current
AllUsers:
StrCpy $0 $SMPROGRAMS
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Hugin\Backup" \
"Shortcuts" "$0"
exists:
CreateDirectory "$0\Hugin"
SetOutPath $INSTDIR
CreateShortCut "$0\Hugin\Hugin.lnk" "$INSTDIR\hugin.exe"
CreateShortCut "$0\Hugin\Uninstall Hugin.lnk" "$INSTDIR\uninstall.exe"
SectionEnd
Section "Create Quick Launch shortcut"
SetShellVarContext current
CreateShortCut "$QUICKLAUNCH\Hugin.lnk" "$INSTDIR\hugin.exe"
SectionEnd
;--------------------------------
# [UnInstallation]
UninstallText "This program will uninstall Hugin ${HUGIN_VERSION}, continue ?"
ShowUninstDetails show
Section "Uninstall"
Delete "$INSTDIR\automatch.exe"
Delete "$INSTDIR\autooptimiser.exe"
Delete "$INSTDIR\autopano_old.exe"
Delete "$INSTDIR\hugin.exe"
Delete "$INSTDIR\LICENCE"
Delete "$INSTDIR\mingwm10.dll"
Delete "$INSTDIR\nona.exe"
Delete "$INSTDIR\nona_gui.exe"
Delete "$INSTDIR\panosifter.exe"
Delete "$INSTDIR\sift_keypoints.exe"
Delete "$INSTDIR\zhang_undistort.exe"
Delete "$INSTDIR\uninstall.exe"
RMDir /r "$INSTDIR\locale"
RMDir /r "$INSTDIR\xrc"
RMDir "$INSTDIR"
; Remove icons
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Hugin\Backup" \
"Shortcuts"
Delete "$0\Hugin\Hugin.lnk"
Delete "$0\Hugin\Uninstall Hugin.lnk"
RMDir "$0\Hugin"
SetShellVarContext current
Delete "$QUICKLAUNCH\Hugin.lnk"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Hugin"
DeleteRegKey HKLM SOFTWARE\Hugin
SectionEnd
#eof!
More information about the ptX
mailing list