package/WindowsInstaller/README.md
These are instructions for building an NSIS-based installer for FreeCAD. They were designed for FreeCAD 0.21 and later, and presume that you have cloned a copy of FreeCAD's source code, and therefore have the directory package/WindowsInstaller.
To set up your system for building an NSIS installer:
Next, update the installer settings for the current version of FreeCAD. Starting from the package/WindowsInstaller folder in the FreeCAD source tree:
APP_VERSION BUILD as needed. The main version numbers are dynamically obtained by calling freecadcmd.exe.!define APP_VERSION_EMERGENCY "RC1"
!define APP_VERSION_BUILD 1
vcruntime140.dll
concrt140.dll
msvcp140.dll
vcamp140.dll
vccorlib140.dll
vcomp140.dll
FILES_FREECAD corresponds to your installation directory (e.g. CMAKE_INSTALL_PREFIX if you self-compiled), FILES_THUMBS is the directory where the thumbnailer dll is located and FILES_DEPS is the folder you created with the MSVC redistributable files in it. FILES_DEPS is not needed if the installer is created from a conda bundle so it is not set by default. These can be set via /D argument for makensis.exe or by editing Settings.nsh.!ifndef FILES_FREECAD
!define FILES_FREECAD "${__FILEDIR__}\FreeCAD"
!endif
!ifndef FILES_THUMBS
!define FILES_THUMBS "${__FILEDIR__}\thumbnail"
!endif
#!define FILES_DEPS "${__FILEDIR__}\MSVC_Redist"
FILES_FREECAD is set to the directory containing those files.Delete.bat%your_nsis_path%\makensis.exe /D'FILES_FREECAD="D:\some\path\FreeCAD"' /D'FILES_DEPS="${__FILEDIR__}\MSVC_Redist" /D'ExeFile="my-FreeCAD-installer.exe"' FreeCAD-installer.nsi
NOTE: For test builds of the installer you can turn off compression. This speeds up
the build time for the installer a lot but increases its file size. The compression
is turned off by commenting the line</br>
SetCompressor /SOLID lzma</br>
in the file Settings.nsh or by defining FC_TEST_BUILD in command line
%your_nsis_path%\makensis.exe [OPTIONS] /DFC_TEST_BUILD FreeCAD-installer.nsi