4 ; Blender Self-Installer for Windows (NSIS - http://nsis.sourceforge.net)
6 ; 09.02.2003 aphex (mediocre@mixmojo.com)
10 Caption "Blender VERSION Installer"
11 OutFile "DISTDIR\..\VERSION\blender-VERSION-windows.exe"
12 Icon "00.installer.ico"
14 EnabledBitmap "00.checked.bmp"
15 DisabledBitmap "00.unchecked.bmp"
17 InstallDir "$PROGRAMFILES\Blender Foundation\Blender-VERSION"
19 LicenseText "Please read and agree to the license below:"
20 LicenseData "DISTDIR\Copyright.txt"
22 Function .onInstSuccess
23 MessageBox MB_YESNO "Blender was successfully setup on your computer. $\rDo you wish to start Blender now ?" IDNO NoThanks
24 ExecShell "open" '"$INSTDIR\blender.exe"'
28 BrandingText "http://www.blender.org/bf"
29 ComponentText "This will install Blender VERSION on your computer."
31 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."
33 Section "Blender-VERSION (required)"
34 ; Set output path to the installation directory.
37 File DISTDIR\blender.exe
38 File DISTDIR\python22.dll
39 File DISTDIR\Copyright.txt
40 File DISTDIR\Readme.txt
41 File DISTDIR\GPL-license.txt
43 ; Write the installation path into the registry
44 WriteRegStr HKLM SOFTWARE\BlenderFoundation "Install_Dir" "$INSTDIR"
45 ; Write the uninstall keys for Windows
46 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BlenderSHORTVERS" "DisplayName" "Blender VERSION (remove only)"
47 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BlenderSHORTVERS" "UninstallString" '"$INSTDIR\uninstall.exe"'
48 WriteUninstaller "uninstall.exe"
53 Section "Add Start Menu shortcuts"
54 CreateDirectory "$SMPROGRAMS\Blender Foundation\Blender-VERSION\"
55 CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender-VERSION\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
56 CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender-VERSION\Blender.lnk" "$INSTDIR\Blender.exe" "" "$INSTDIR\blender.exe" 0
57 CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender-VERSION\Readme.lnk" "$INSTDIR\Readme.txt" "" "" 0
58 CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender-VERSION\Copyright.lnk" "$INSTDIR\Copyright.txt" "" "$INSTDIR\copyright.txt" 0
59 CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender-VERSION\GPL-license.lnk" "$INSTDIR\GPL-license.txt" "" "$INSTDIR\GPL-license.txt" 0
60 CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender-VERSION\Help.lnk" "$INSTDIR\Help.url"
61 ; MessageBox MB_YESNO "Do you wish to create a shortcut on your desktop?" IDNO NoDeskShortcut
62 ; CreateShortCut "$DESKTOP\Blender-VERSION.lnk" "$INSTDIR\blender.exe" "" "$INSTDIR\blender.exe" 0
66 Section "Add Desktop Blender-VERSION shortcut"
67 CreateShortCut "$DESKTOP\Blender-VERSION.lnk" "$INSTDIR\blender.exe" "" "$INSTDIR\blender.exe" 0
70 Section "Open .blend files with Blender-VERSION"
71 ExecShell "open" '"$INSTDIR\blender.exe"' "-R -b"
74 UninstallText "This will uninstall Blender VERSION. Hit next to continue."
77 ; remove registry keys
78 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BlenderSHORTVERS"
79 DeleteRegKey HKLM SOFTWARE\BlenderFoundation
81 Delete $INSTDIR\blender.exe
82 Delete $INSTDIR\python22.dll
83 Delete $INSTDIR\Copyright.txt
84 Delete $INSTDIR\Readme.txt
85 Delete $INSTDIR\GPL-license.txt
86 Delete $INSTDIR\Help.url
87 Delete $INSTDIR\uninstall.exe
88 ; remove shortcuts, if any.
89 Delete "$SMPROGRAMS\Blender Foundation\Blender-VERSION\*.*"
90 Delete "$DESKTOP\Blender-VERSION.lnk"
91 ; remove directories used.
92 RMDir "$SMPROGRAMS\Blender Foundation\Blender-VERSION"
93 RMDir "$SMPROGRAMS\Blender Foundation"