diff options
Diffstat (limited to 'release/windows/installer/00.sconsblender.nsi')
-rw-r--r-- | release/windows/installer/00.sconsblender.nsi | 60 |
1 files changed, 43 insertions, 17 deletions
diff --git a/release/windows/installer/00.sconsblender.nsi b/release/windows/installer/00.sconsblender.nsi index 89255ced981..e5ebf8b2f64 100644 --- a/release/windows/installer/00.sconsblender.nsi +++ b/release/windows/installer/00.sconsblender.nsi @@ -11,6 +11,9 @@ !include "FileFunc.nsh"
!include "WordFunc.nsh"
!include "nsDialogs.nsh"
+!include "x64.nsh"
+
+RequestExecutionLevel user
SetCompressor /SOLID lzma
@@ -67,7 +70,10 @@ UninstallIcon "[RELDIR]\00.installer.ico" Caption "Blender [VERSION] Installer"
OutFile "[DISTDIR]\..\blender-[VERSION]-windows[BITNESS].exe"
-InstallDir "$PROGRAMFILES[BITNESS]\Blender Foundation\Blender"
+;InstallDir "$PROGRAMFILES[BITNESS]\Blender Foundation\Blender"
+; Install to user profile dir. While it is non-standard, it allows
+; users to install without having to have the installer run in elevated mode.
+InstallDir "$PROFILE\Blender Foundation\Blender"
BrandingText "Blender Foundation | http://www.blender.org"
ComponentText "This will install Blender [VERSION] on your computer."
@@ -100,7 +106,7 @@ Function DataLocation ${EndIf}
${NSD_CreateLabel} 0 0 100% 12u "Please specify where you wish to install Blender's user data files."
- ${NSD_CreateRadioButton} 0 20 100% 12u "Use the Application Data directory (Requires Windows 2000 or better)"
+ ${NSD_CreateRadioButton} 0 20 100% 12u "Use the Application Data directory"
Pop $HWND_APPDATA
${NSD_CreateRadioButton} 0 50 100% 12u "Use the installation directory (ie. location chosen to install blender.exe)."
Pop $HWND_INSTDIR
@@ -148,6 +154,9 @@ Section "Blender-[VERSION] (required)" SecCopyUI [DODATAFILES]
SetOutPath $INSTDIR
+ ${If} ${RunningX64}
+ SetRegView 64
+ ${EndIf}
; Write the installation path into the registry
WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "Install_Dir" "$INSTDIR"
WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "ConfigData_Dir" "$BLENDERHOME"
@@ -157,10 +166,6 @@ Section "Blender-[VERSION] (required)" SecCopyUI WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteUninstaller "uninstall.exe"
- ; Let's now run silent vcredist installer
- SetOutPath $TEMP
- [VCREDIST]
-
SectionEnd
Section "Add Start Menu shortcuts" Section2
@@ -179,6 +184,9 @@ SectionEnd Section "Open .blend files with Blender-[VERSION]" Section4
+ ${If} ${RunningX64}
+ SetRegView 64
+ ${EndIf}
WriteRegStr HKCR ".blend" "" "blendfile"
WriteRegStr HKCR "blendfile" "" "Blender .blend File"
WriteRegStr HKCR "blendfile\shell" "" "open"
@@ -188,32 +196,50 @@ Section "Open .blend files with Blender-[VERSION]" Section4 SectionEnd
-UninstallText "This will uninstall Blender [VERSION], and all datafiles from the installation dir. Hit next to continue."
+UninstallText "This will uninstall Blender [VERSION], and all installed files. Before continuing make sure you have created backup of all the files you may want to keep: startup.blend, bookmarks.txt, recent-files.txt. Hit next to continue."
Section "Uninstall"
; remove registry keys
+ ${If} ${RunningX64}
+ SetRegView 64
+ ${EndIf}
ReadRegStr $BLENDERHOME HKLM "SOFTWARE\BlenderFoundation" "ConfigData_Dir"
ReadRegStr $SHORTVERSION HKLM "SOFTWARE\BlenderFoundation" "ShortVersion"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender"
DeleteRegKey HKLM "SOFTWARE\BlenderFoundation"
SetShellVarContext all
-
- StrCpy $0 "$SMPROGRAMS\Blender Foundation\"
- MessageBox MB_OK $0
+
; remove files
[DELROOTDIRCONTS]
+ ; remove bundled python
+ RmDir /r $INSTDIR\$SHORTVERSION\python
+
Delete "$INSTDIR\uninstall.exe"
- MessageBox MB_YESNO "Erase $BLENDERHOME? This includes all installed scripts and configuration files and any file you may have created there." IDNO Next
- RMDir /r "$BLENDERHOME"
-Next:
- ; remove shortcuts, if any.
+ MessageBox MB_YESNO "Recursively erase contents of $BLENDERHOME\$SHORTVERSION\scripts? NOTE: This includes all installed scripts and *any* file and directory you have manually created, installed later or copied. This also including .blend files." IDNO NextNoScriptRemove
+ RMDir /r "$BLENDERHOME\$SHORTVERSION\scripts"
+NextNoScriptRemove:
+ MessageBox MB_YESNO "Recursively erase contents from $BLENDERHOME\$SHORTVERSION\config? NOTE: This includes your startup.blend, bookmarks and any other file and directory you may have created in that directory" IDNO NextNoConfigRemove
+ RMDir /r "$BLENDERHOME\$SHORTVERSION\config"
+NextNoConfigRemove:
+ MessageBox MB_YESNO "Recursively erase contents from $BLENDERHOME\$SHORTVERSION\plugins? NOTE: This includes files and subdirectories in this directory" IDNO NextNoPluginRemove
+ RMDir /r "$BLENDERHOME\$SHORTVERSION\plugins"
+NextNoPluginRemove:
+ ; try to remove dirs, but leave them if they contain anything
+ RMDir "$BLENDERHOME\$SHORTVERSION\plugins"
+ RMDir "$BLENDERHOME\$SHORTVERSION\config"
+ RMDir "$BLENDERHOME\$SHORTVERSION\scripts"
+ RMDir "$BLENDERHOME\$SHORTVERSION"
+ RMDir "$BLENDERHOME"
+ ; remove shortcuts
+ Delete "$SMPROGRAMS\Blender Foundation\Blender\*.*"
Delete "$DESKTOP\Blender.lnk"
; remove all link related directories and files
- RMDir /r "$SMPROGRAMS\Blender Foundation\"
- ; remove entire installation directory, including any file created by the user
- RMDir /r "$INSTDIR"
+ RMDir "$SMPROGRAMS\Blender Foundation\Blender"
+ RMDir "$SMPROGRAMS\Blender Foundation"
+ ; Clear out installation dir
+ RMDir "$INSTDIR"
SectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|