Files
create/src/WindowsInstaller/setup/install.nsh
donovaly e6de800d4d Win inssaller: cleanup and support for thumbnails
- remove unused file
- register DLL file to view thumbnails in Windows explorer (if the user has admin permissions)
- some code simplifications
2019-11-18 12:47:02 +01:00

53 lines
1.3 KiB
NSIS

/*
install.nsh
Installation of program files, dictionaries and external components
*/
#--------------------------------
# Program files
Section -ProgramFiles SecProgramFiles
# if the $INSTDIR does not contain "FreeCAD" we must add a subfolder to avoid that FreeCAD will e.g.
# be installed directly to C:\programs - the uninstaller will then delete the whole
# C:\programs directory
StrCpy $String $INSTDIR
StrCpy $Search ${APP_NAME}
Call StrPoint # function from Utils.nsh
${if} $Pointer == "-1"
StrCpy $INSTDIR "$INSTDIR\${APP_DIR}"
${endif}
# Install and register the core FreeCAD files
# Initializes the plug-ins dir ($PLUGINSDIR) if not already initialized.
# $PLUGINSDIR is automatically deleted when the installer exits.
InitPluginsDir
# Binaries
SetOutPath "$INSTDIR"
# recursively copy all files under bin
File /r "${FILES_FREECAD}\bin"
# MSVC redistributable DLLs
SetOutPath "$INSTDIR\bin"
File "${FILES_DEPS}\*.*"
# Others
SetOutPath "$INSTDIR"
File /r "${FILES_FREECAD}\data"
File /r "${FILES_FREECAD}\doc"
File /r "${FILES_FREECAD}\Ext"
File /r "${FILES_FREECAD}\lib"
File /r "${FILES_FREECAD}\Mod"
File /r "${FILES_FREECAD}\resources"
File /r "${FILES_THUMBS}"
# Create uninstaller
WriteUninstaller "$INSTDIR\${SETUP_UNINSTALLER}"
SectionEnd