2003-02-09 21:59:35 +00:00
;
2003-02-10 11:07:14 +00:00
; $Id$
2003-02-09 21:59:35 +00:00
;
; Blender Self-Installer for Windows (NSIS - http://nsis.sourceforge.net)
;
; 09.02.2003 aphex (mediocre@mixmojo.com)
;
2003-02-10 11:30:12 +00:00
Name " Blender "
Caption " Blender VERSION Installer "
2003-02-10 11:07:14 +00:00
OutFile " DISTDIR\..\VERSION\blender-VERSION-windows.exe "
2003-02-09 21:59:35 +00:00
Icon " 00.installer.ico "
EnabledBitmap " 00.checked.bmp "
DisabledBitmap " 00.unchecked.bmp "
2003-02-10 11:07:14 +00:00
InstallDir " $PROGRAMFILES \Blender Foundation\Blender-VERSION "
2003-02-09 21:59:35 +00:00
LicenseText " Please read and agree to the license below: "
2003-02-10 11:07:14 +00:00
LicenseData " DISTDIR\Copyright.txt "
2003-02-09 21:59:35 +00:00
Function .onInstSuccess
2003-02-10 17:43:41 +00:00
MessageBox MB_YESNO " Blender was successfully setup on your computer. $\rDo you wish to start Blender now ? " IDNO NoThanks
ExecShell " open " '"$INSTDIR\blender.exe"'
2003-02-09 21:59:35 +00:00
NoThanks :
FunctionEnd
BrandingText " http://www.blender.org/bf "
2003-02-10 11:07:14 +00:00
ComponentText " This will install Blender VERSION on your computer. "
2003-02-09 21:59:35 +00:00
DirText " Use the field below to specify the folder where you want Blender to be copied to. To specify a different folder, type a new name or use the Browse button to select an existing folder. "
2003-02-10 11:07:14 +00:00
Section " Blender-VERSION (required) "
2003-02-09 21:59:35 +00:00
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
2003-02-10 11:07:14 +00:00
File DISTDIR\ blender.exe
File DISTDIR\ python22.dll
File DISTDIR\ Copyright.txt
File DISTDIR\ Readme.txt
2003-02-10 17:43:41 +00:00
File DISTDIR\ GPL- license.txt
2003-02-10 11:07:14 +00:00
File DISTDIR\ Help.url
2003-02-09 21:59:35 +00:00
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\ BlenderFoundation " Install_Dir " " $INSTDIR "
; Write the uninstall keys for Windows
2003-02-10 11:07:14 +00:00
WriteRegStr HKLM " Software\Microsoft\Windows\CurrentVersion\Uninstall\BlenderSHORTVERS " " DisplayName " " Blender VERSION (remove only) "
WriteRegStr HKLM " Software\Microsoft\Windows\CurrentVersion\Uninstall\BlenderSHORTVERS " " UninstallString " '"$INSTDIR\uninstall.exe"'
2003-02-09 21:59:35 +00:00
WriteUninstaller " uninstall.exe "
SectionEnd
SectionDivider
2003-02-10 17:43:41 +00:00
Section " Add Start Menu shortcuts "
2003-02-10 11:07:14 +00:00
CreateDirectory " $SMPROGRAMS \Blender Foundation\Blender-VERSION\ "
CreateShortCut " $SMPROGRAMS \Blender Foundation\Blender-VERSION\Uninstall.lnk " " $INSTDIR \uninstall.exe " " " " $INSTDIR \uninstall.exe " 0
CreateShortCut " $SMPROGRAMS \Blender Foundation\Blender-VERSION\Blender.lnk " " $INSTDIR \Blender.exe " " " " $INSTDIR \blender.exe " 0
CreateShortCut " $SMPROGRAMS \Blender Foundation\Blender-VERSION\Readme.lnk " " $INSTDIR \Readme.txt " " " " " 0
CreateShortCut " $SMPROGRAMS \Blender Foundation\Blender-VERSION\Copyright.lnk " " $INSTDIR \Copyright.txt " " " " $INSTDIR \copyright.txt " 0
2003-02-10 17:43:41 +00:00
CreateShortCut " $SMPROGRAMS \Blender Foundation\Blender-VERSION\GPL-license.lnk " " $INSTDIR \GPL-license.txt " " " " $INSTDIR \GPL-license.txt " 0
2003-02-10 11:07:14 +00:00
CreateShortCut " $SMPROGRAMS \Blender Foundation\Blender-VERSION\Help.lnk " " $INSTDIR \Help.url "
2003-02-10 17:43:41 +00:00
; MessageBox MB_YESNO "Do you wish to create a shortcut on your desktop?" IDNO NoDeskShortcut
; CreateShortCut "$DESKTOP\Blender-VERSION.lnk" "$INSTDIR\blender.exe" "" "$INSTDIR\blender.exe" 0
; NoDeskShortcut:
SectionEnd
Section " Add Desktop Blender-VERSION shortcut "
CreateShortCut " $DESKTOP \Blender-VERSION.lnk " " $INSTDIR \blender.exe " " " " $INSTDIR \blender.exe " 0
SectionEnd
Section " Open .blend files with Blender-VERSION "
ExecShell " open " '"$INSTDIR\blender.exe"' " -R -b "
2003-02-09 21:59:35 +00:00
SectionEnd
2003-02-10 11:07:14 +00:00
UninstallText " This will uninstall Blender VERSION. Hit next to continue. "
2003-02-09 21:59:35 +00:00
Section " Uninstall "
; remove registry keys
2003-02-10 11:07:14 +00:00
DeleteRegKey HKLM " Software\Microsoft\Windows\CurrentVersion\Uninstall\BlenderSHORTVERS "
2003-02-09 21:59:35 +00:00
DeleteRegKey HKLM SOFTWARE\ BlenderFoundation
; remove files
2003-02-10 11:07:14 +00:00
Delete $INSTDIR \ blender.exe
2003-02-09 21:59:35 +00:00
Delete $INSTDIR \ python22.dll
2003-02-10 11:07:14 +00:00
Delete $INSTDIR \ Copyright.txt
Delete $INSTDIR \ Readme.txt
2003-02-10 17:43:41 +00:00
Delete $INSTDIR \ GPL- license.txt
2003-02-10 11:07:14 +00:00
Delete $INSTDIR \ Help.url
2003-02-09 21:59:35 +00:00
Delete $INSTDIR \ uninstall.exe
; remove shortcuts, if any.
2003-02-10 11:07:14 +00:00
Delete " $SMPROGRAMS \Blender Foundation\Blender-VERSION\*.* "
Delete " $DESKTOP \Blender-VERSION.lnk "
2003-02-09 21:59:35 +00:00
; remove directories used.
2003-02-10 11:07:14 +00:00
RMDir " $SMPROGRAMS \Blender Foundation\Blender-VERSION "
2003-02-09 21:59:35 +00:00
RMDir " $SMPROGRAMS \Blender Foundation "
RMDir " $INSTDIR "
2003-02-10 11:50:07 +00:00
RMDir " $INSTDIR \.. "
2003-02-10 11:07:14 +00:00
SectionEnd