diff --git a/package/WindowsInstaller/.gitignore b/package/WindowsInstaller/.gitignore new file mode 100644 index 0000000000..370b73f83d --- /dev/null +++ b/package/WindowsInstaller/.gitignore @@ -0,0 +1,5 @@ +*.exe +*-SHA256.txt +MSVCRedist +FreeCAD +version.nsh diff --git a/package/WindowsInstaller/Delete.bat b/package/WindowsInstaller/Delete.bat new file mode 100644 index 0000000000..c8c95cc8f7 --- /dev/null +++ b/package/WindowsInstaller/Delete.bat @@ -0,0 +1,47 @@ +del /S *_d.* +del /S *_debug.* +del /S *.pyc +del /S *.pdb +del /S boost*-gd-*.dll +cd bin +del assistant.exe +del Coin4d.dll +del designer.exe +del freetyped.dll +del libcrypto-3d.dll +del libEGLd.dll +del libGLESv2d.dll +del libssl-3d.dll +del linguist.exe +del qdoc.exe +del Qt6Concurrentd.dll +del Qt6Cored.dll +del Qt6DBusd.dll +del Qt6DesignerComponentsd.dll +del Qt6Designerd.dll +del Qt6Guid.dll +del Qt6Helpd.dll +del Qt6LabsAnimationd.dll +del Qt6LabsFolderListModeld.dll +del Qt6LabsPlatformd.dll +del Qt6LabsSettingsd.dll +del Qt6LabsSharedImaged.dll +del Qt6LabsWavefrontMeshd.dll +del Qt6MultimediaWidgetsd.dll +del Qt6Multimediad.dll +del Qt6Networkd.dll +del Qt6OpenGLWidgetsd.dll +del Qt6OpenGLd.dll +del Qt6PrintSupportd.dll +del Qt6SpatialAudiod.dll +del Qt6Sqld.dll +del Qt6SvgWidgetsd.dll +del Qt6Svgd.dll +del Qt6Testd.dll +del Qt6UiToolsd.dll +del Qt6Widgetsd.dll +del Qt6Xmld.dll +del QtWebEngineProcessd.exe +del Quarter1d.dll +del xerces-c_3_2D.dll +del zlibd.dll diff --git a/tools/build/WindowsInstaller/FCweborg.pfx b/package/WindowsInstaller/FCweborg.pfx similarity index 100% rename from tools/build/WindowsInstaller/FCweborg.pfx rename to package/WindowsInstaller/FCweborg.pfx diff --git a/tools/build/WindowsInstaller/FreeCAD-installer.nsi b/package/WindowsInstaller/FreeCAD-installer.nsi similarity index 100% rename from tools/build/WindowsInstaller/FreeCAD-installer.nsi rename to package/WindowsInstaller/FreeCAD-installer.nsi diff --git a/tools/build/WindowsInstaller/LICENSE b/package/WindowsInstaller/LICENSE similarity index 100% rename from tools/build/WindowsInstaller/LICENSE rename to package/WindowsInstaller/LICENSE diff --git a/tools/build/WindowsInstaller/License.rtf b/package/WindowsInstaller/License.rtf similarity index 100% rename from tools/build/WindowsInstaller/License.rtf rename to package/WindowsInstaller/License.rtf diff --git a/tools/build/WindowsInstaller/README.md b/package/WindowsInstaller/README.md similarity index 56% rename from tools/build/WindowsInstaller/README.md rename to package/WindowsInstaller/README.md index 981f11137a..2e898d98b1 100644 --- a/tools/build/WindowsInstaller/README.md +++ b/package/WindowsInstaller/README.md @@ -1,7 +1,7 @@ # Creating a Windows installer for FreeCAD 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 *src/WindowsInstaller*. +and presume that you have cloned a copy of FreeCAD's source code, and therefore have the directory *package/WindowsInstaller*. ## Install NSIS To set up your system for building an NSIS installer: @@ -15,16 +15,13 @@ To set up your system for building an NSIS installer: 4. Download and install the nsProcess plugin from https://nsis.sourceforge.io/NsProcess_plugin -- you will need the version that supports Unicode, so make sure to follow the appropriate instructions on their site to install that one (as of this writing it involves manually copying and renaming the plugin DLL file). ## Build the installer -Next, update the installer settings for the current version of FreeCAD. Starting from the *src/WindowsInstaller* folder in the FreeCAD source tree: -1. Set the appropriate version strings for the release you are creating. These are used to construct the filename of the installer, among other things. If you have to upload a new version of the installer for the exact same release of FreeCAD, increment `APP_VERSION BUILD` as needed. -``` -!define APP_VERSION_MAJOR 0 -!define APP_VERSION_MINOR 21 -!define APP_VERSION_REVISION 0 +Next, update the installer settings for the current version of FreeCAD. Starting from the *package/WindowsInstaller* folder in the FreeCAD source tree: +1. Set the appropriate version strings for the release you are creating. These are used to construct the filename of the installer, among other things. If you have to upload a new version of the installer for the exact same release of FreeCAD, increment `APP_VERSION BUILD` as needed. The main version numbers are dynamically obtained by calling `freecadcmd.exe`. +```nsis !define APP_VERSION_EMERGENCY "RC1" !define APP_VERSION_BUILD 1 ``` -2. Within the folder *src/WindowsInstaller*, create a new folder called MSVCRedist and copy the following files from your MSVC installation into it: +2. If the installer will be made from a LibPack build create a new folder called MSVCRedist within the folder *package/WindowsInstaller* and copy the following files from your MSVC installation into it: ``` vcruntime140.dll concrt140.dll @@ -33,28 +30,38 @@ vcamp140.dll vccorlib140.dll vcomp140.dll ``` -3. Open the file *Settings.nsh* with a text editor (both jEdit and Visual Studio Code are good editors for NSIS files). Edit the following paths to correspond to your system: `FILES_FREECAD` corresponds to your installation directory (e.g. `CMAKE_INSTALL_PREFIX` if you self-compiled) and `FILES_DEPS` is the folder you created with the MSVC redistributable files in it. -``` -!define FILES_FREECAD "C:\FreeCAD\Installer\FreeCAD" -!define FILES_DEPS "C:\FreeCAD\Installer\MSVCRedist" +3. If required open the file *Settings.nsh* with a text editor (both jEdit and Visual Studio Code are good editors for NSIS files). Edit the following paths to correspond to your system: `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*. +```nsis +!ifndef FILES_FREECAD + !define FILES_FREECAD "${__FILEDIR__}\FreeCAD" +!endif +!ifndef FILES_THUMBS + !define FILES_THUMBS "${__FILEDIR__}\thumbnail" +!endif + +#!define FILES_DEPS "${__FILEDIR__}\MSVC_Redist" ``` 4. Ensure the FreeCAD files are in place. Here you have two options: * If you are working from an already-compiled version of FreeCAD provided to you by an outside source: in this case, simply ensure that `FILES_FREECAD` is set to the directory containing those files. * If you compiled FreeCAD on your own as described [here](https://wiki.freecad.org/Compile_on_Windows) (and using the Install option outlined there). Then: - * Open the file *Settings.nsh* as described in step 3. above and set there
- `!define FILES_FREECAD` to the folder you specified as `CMAKE_INSTALL_PREFIX` - * Copy into that folder the file *Delete.bat* that is part of the installer + * Copy into the installation folder the file *Delete.bat* that is part of the installer * open a command line in Windows and change to the folder - * run the comamand
+ * run the command
`Delete.bat` * (These steps assure that the installer only contains files users need. Moreover it assures that the overall files size is below 2 GB and we can use the most compact compression for the installer.) 5. Right-click on the file *FreeCAD-installer.nsi* and choose **Compile NSIS script** - to compile the installer. + to compile the installer. You can also run from command line to specify some settings +```cmd +%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 the compression. This speeds up +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 uncommenting the line
+is turned off by commenting the line
`SetCompressor /SOLID lzma`
-in the file *Settings.nsh*. +in the file *Settings.nsh* or by defining `FC_TEST_BUILD` in command line +```cmd +%your_nsis_path%\makensis.exe [OPTIONS] /DFC_TEST_BUILD FreeCAD-installer.nsi +``` diff --git a/package/WindowsInstaller/Settings.nsh b/package/WindowsInstaller/Settings.nsh new file mode 100644 index 0000000000..259bf23ea1 --- /dev/null +++ b/package/WindowsInstaller/Settings.nsh @@ -0,0 +1,62 @@ +/* + +Settings for FreeCAD installer + +These typically need to be modified for each FreeCAD release + +*/ + +# Make the installer as small as possible +# Using /SOLID is usually better for file size but it can't be used if the original size is +# more than 2GB, if building with /SOLID fails try disabling it +# comment this or use /DFC_TEST_BUILD command line option for testing builds since it will reduce +# the time to create an installer a lot at the cost of a much greater file size. +# So assure it is active for release builds! +!ifndef FC_TEST_BUILD + SetCompressor /SOLID lzma +!endif + +#-------------------------------- +# File locations +# !!! you may need to adjust them to the folders in your Windows system !!! +# can be specified with /D command line argument to makensis.exe +!ifndef FILES_FREECAD + !define FILES_FREECAD "${__FILEDIR__}\FreeCAD" +!endif +!ifndef FILES_THUMBS + !define FILES_THUMBS "${__FILEDIR__}\thumbnail" +!endif + +# msvc redistributables location is required for LibPack builds but not conda +# when using a LibPack build set the redistributables directory location here +# or with /D command line argument to makensis.exe +#!define FILES_DEPS "${__FILEDIR__}\MSVCRedist" + +#-------------------------------- +# get version info from freecadcmd +!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"import datetime; print(f'!define COPYRIGHT_YEAR {datetime.date.today().year}')$\">${__FILEDIR__}\version.nsh" = 0 +!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_MAJOR \$\"{App.Version()[0]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0 +!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_MINOR \$\"{App.Version()[1]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0 +!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_PATCH \$\"{App.Version()[2]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0 +!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_REVISION \$\"{App.Version()[3].split()[0]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0 +!include "${__FILEDIR__}\version.nsh" +!delfile "${__FILEDIR__}\version.nsh" + +!define APP_VERSION_EMERGENCY "" # use "1" for an emergency release of FreeCAD otherwise "" + # alternatively you can use APP_VERSION_EMERGENCY for a custom suffix of the version number +!define APP_EMERGENCY_DOT "" # use "." for an emergency release of FreeCAD otherwise "" +!define APP_VERSION_BUILD 1 # Start with 1 for the installer releases of each version + +!define APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}" # Version to display + +#-------------------------------- +# Installer file name +# Typical names for the release are "FreeCAD-020-Installer-1.exe" etc. + +!ifndef ExeFile + !define ExeFile "${APP_NAME}_${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}${APP_VERSION_EMERGENCY}-Windows-x86_64-installer-${APP_VERSION_BUILD}.exe" +!endif + +#-------------------------------- +# installer bit type - FreeCAD is only provided as 64bit build +!define MULTIUSER_USE_PROGRAMFILES64 diff --git a/tools/build/WindowsInstaller/Signing.bat b/package/WindowsInstaller/Signing.bat similarity index 71% rename from tools/build/WindowsInstaller/Signing.bat rename to package/WindowsInstaller/Signing.bat index 80dc3bddf3..6212d1f481 100644 --- a/tools/build/WindowsInstaller/Signing.bat +++ b/package/WindowsInstaller/Signing.bat @@ -1 +1,2 @@ signtool.exe sign /f FCweborg.pfx /p FreeCADIsCool /fd sha512 /tr http://timestamp.digicert.com /td sha512 /v %1 +certutil -hashfile %1 SHA256 > %1-SHA256.txt diff --git a/package/WindowsInstaller/graphics/banner.bmp b/package/WindowsInstaller/graphics/banner.bmp new file mode 100644 index 0000000000..8d21af1a58 Binary files /dev/null and b/package/WindowsInstaller/graphics/banner.bmp differ diff --git a/tools/build/WindowsInstaller/graphics/orange.svg b/package/WindowsInstaller/graphics/banner.svg similarity index 100% rename from tools/build/WindowsInstaller/graphics/orange.svg rename to package/WindowsInstaller/graphics/banner.svg diff --git a/package/WindowsInstaller/graphics/header.bmp b/package/WindowsInstaller/graphics/header.bmp new file mode 100644 index 0000000000..d543ea399a Binary files /dev/null and b/package/WindowsInstaller/graphics/header.bmp differ diff --git a/tools/build/WindowsInstaller/icons/FreeCAD-clean.ico b/package/WindowsInstaller/icons/FreeCAD-clean.ico similarity index 100% rename from tools/build/WindowsInstaller/icons/FreeCAD-clean.ico rename to package/WindowsInstaller/icons/FreeCAD-clean.ico diff --git a/tools/build/WindowsInstaller/icons/FreeCAD-icon-57px-height.bmp b/package/WindowsInstaller/icons/FreeCAD-icon-57px-height.bmp similarity index 100% rename from tools/build/WindowsInstaller/icons/FreeCAD-icon-57px-height.bmp rename to package/WindowsInstaller/icons/FreeCAD-icon-57px-height.bmp diff --git a/tools/build/WindowsInstaller/icons/FreeCAD-icon.bmp b/package/WindowsInstaller/icons/FreeCAD-icon.bmp similarity index 100% rename from tools/build/WindowsInstaller/icons/FreeCAD-icon.bmp rename to package/WindowsInstaller/icons/FreeCAD-icon.bmp diff --git a/tools/build/WindowsInstaller/icons/FreeCAD-icon.xcf b/package/WindowsInstaller/icons/FreeCAD-icon.xcf similarity index 100% rename from tools/build/WindowsInstaller/icons/FreeCAD-icon.xcf rename to package/WindowsInstaller/icons/FreeCAD-icon.xcf diff --git a/tools/build/WindowsInstaller/icons/FreeCAD.ico b/package/WindowsInstaller/icons/FreeCAD.ico similarity index 100% rename from tools/build/WindowsInstaller/icons/FreeCAD.ico rename to package/WindowsInstaller/icons/FreeCAD.ico diff --git a/tools/build/WindowsInstaller/include/declarations.nsh b/package/WindowsInstaller/include/declarations.nsh similarity index 92% rename from tools/build/WindowsInstaller/include/declarations.nsh rename to package/WindowsInstaller/include/declarations.nsh index 9a2d01382b..9832096f0e 100644 --- a/tools/build/WindowsInstaller/include/declarations.nsh +++ b/package/WindowsInstaller/include/declarations.nsh @@ -13,13 +13,13 @@ Configuration and variables of FreeCAD installer # Names and version !define APP_NAME "FreeCAD" -!define APP_VERSION_NUMBER "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}.${APP_VERSION_BUILD}" +!define APP_VERSION_NUMBER "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}.${APP_VERSION_BUILD}" # For the proposed install folder we use the scheme "FreeCAD 0.18" # however for the Registry, we need the scheme "FreeCAD 0.18.x" in order # to check if it is exactly this version (to support side-by-side installations) !define APP_SERIES_NAME "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}" -!define APP_SERIES_KEY "${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}${APP_VERSION_EMERGENCY}" -!define APP_SERIES_KEY2 "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}" +!define APP_SERIES_KEY "${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_PATCH}${APP_VERSION_EMERGENCY}" +!define APP_SERIES_KEY2 "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}" !define APP_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${APP_NAME}.exe" !define APP_DIR "${APP_NAME} ${APP_SERIES_NAME}" # Fixme: FC should use different preferences folder for every release @@ -60,7 +60,7 @@ Configuration and variables of FreeCAD installer !define SETUP_ICON "icons\FreeCAD.ico" !define SETUP_HEADERIMAGE "graphics\header.bmp" -!define SETUP_WIZARDIMAGE "graphics\orange.bmp" +!define SETUP_WIZARDIMAGE "graphics\banner.bmp" !define SETUP_UNINSTALLER "Uninstall-${APP_NAME}.exe" !define SETUP_UNINSTALLER_KEY "${APP_NAME}${APP_SERIES_KEY}" diff --git a/tools/build/WindowsInstaller/include/gui.nsh b/package/WindowsInstaller/include/gui.nsh similarity index 99% rename from tools/build/WindowsInstaller/include/gui.nsh rename to package/WindowsInstaller/include/gui.nsh index db91075b6a..7d15546a42 100644 --- a/tools/build/WindowsInstaller/include/gui.nsh +++ b/package/WindowsInstaller/include/gui.nsh @@ -92,7 +92,7 @@ BrandingText " " VIProductVersion "${APP_VERSION_NUMBER}" VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APP_NAME}" -VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${APP_DIR}.${APP_VERSION_REVISION}" +VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${APP_DIR}.${APP_VERSION_PATCH}" VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${APP_INFO}" VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${APP_VERSION}" VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "${APP_COPYRIGHT}" diff --git a/tools/build/WindowsInstaller/include/init.nsh b/package/WindowsInstaller/include/init.nsh similarity index 97% rename from tools/build/WindowsInstaller/include/init.nsh rename to package/WindowsInstaller/include/init.nsh index 034a1a9e49..083775026d 100644 --- a/tools/build/WindowsInstaller/include/init.nsh +++ b/package/WindowsInstaller/include/init.nsh @@ -50,7 +50,7 @@ Function PostMultiUserPageInit # check if there is an existing FreeCAD installation of the same FreeCAD series # we usually don't release more than 10 versions so with 20 we are safe to check if a newer version is installed - IntOp $4 ${APP_VERSION_REVISION} + 20 + IntOp $4 ${APP_VERSION_PATCH} + 20 ${for} $5 0 $4 ReadRegStr $0 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion" # also check for an emergency release @@ -110,7 +110,8 @@ Function .onInit ${orif} $R0 == "5.1" # XP ${orif} $R0 == "5.2" # 2003 ${orif} $R0 == "6.0" # Vista - MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows 7 or newer." /SD IDOK + ${orif} $R0 == "6.1" # 7 + MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows 8 or newer." /SD IDOK Quit ${endif} @@ -130,7 +131,7 @@ Function .onInit # plugin must be unloaded ${nsProcess::Unload} - # initialize the multi-uder installer UI + # initialize the multi-user installer UI !insertmacro MULTIUSER_INIT # this can be reset to "true" in section SecDesktop diff --git a/tools/build/WindowsInstaller/include/utils.nsh b/package/WindowsInstaller/include/utils.nsh similarity index 98% rename from tools/build/WindowsInstaller/include/utils.nsh rename to package/WindowsInstaller/include/utils.nsh index a454d95bb6..3e8cd5c0e6 100644 --- a/tools/build/WindowsInstaller/include/utils.nsh +++ b/package/WindowsInstaller/include/utils.nsh @@ -18,8 +18,8 @@ # and returns the number of the character in the FindStr where the SearchStr was found (Pointer) # if nothing was found or the search is impossible the Pointer is set to -1 - StrLen $R2 ${SearchStr} - StrLen $R4 ${FindStr} + StrLen $R2 "${SearchStr}" + StrLen $R4 "${FindStr}" StrCpy $R5 0 ${if} $R2 == 0 ${orif} $R4 == 0 @@ -27,8 +27,8 @@ ${endif} IntCmp $R4 $R2 loopA NotFound loopA: - StrCpy $R3 ${FindStr} $R2 $R5 - StrCmp $R3 ${SearchStr} Found + StrCpy $R3 "${FindStr}" $R2 $R5 + StrCmp $R3 "${SearchStr}" Found IntOp $R5 $R5 + 1 IntCmp $R4 $R5 loopA NotFound Goto loopA diff --git a/tools/build/WindowsInstaller/information/Creation of SHA256 checksum file.txt b/package/WindowsInstaller/information/Creation of SHA256 checksum file.txt similarity index 100% rename from tools/build/WindowsInstaller/information/Creation of SHA256 checksum file.txt rename to package/WindowsInstaller/information/Creation of SHA256 checksum file.txt diff --git a/tools/build/WindowsInstaller/information/FreeCAD-filename-SHA256.txt b/package/WindowsInstaller/information/FreeCAD-filename-SHA256.txt similarity index 100% rename from tools/build/WindowsInstaller/information/FreeCAD-filename-SHA256.txt rename to package/WindowsInstaller/information/FreeCAD-filename-SHA256.txt diff --git a/tools/build/WindowsInstaller/information/ISO_3166.html b/package/WindowsInstaller/information/ISO_3166.html similarity index 100% rename from tools/build/WindowsInstaller/information/ISO_3166.html rename to package/WindowsInstaller/information/ISO_3166.html diff --git a/tools/build/WindowsInstaller/information/InstallerStructure.odg b/package/WindowsInstaller/information/InstallerStructure.odg similarity index 100% rename from tools/build/WindowsInstaller/information/InstallerStructure.odg rename to package/WindowsInstaller/information/InstallerStructure.odg diff --git a/tools/build/WindowsInstaller/information/InstallerStructure.pdf b/package/WindowsInstaller/information/InstallerStructure.pdf similarity index 100% rename from tools/build/WindowsInstaller/information/InstallerStructure.pdf rename to package/WindowsInstaller/information/InstallerStructure.pdf diff --git a/tools/build/WindowsInstaller/information/WinLangCode.htm b/package/WindowsInstaller/information/WinLangCode.htm similarity index 100% rename from tools/build/WindowsInstaller/information/WinLangCode.htm rename to package/WindowsInstaller/information/WinLangCode.htm diff --git a/tools/build/WindowsInstaller/information/iso639.htm b/package/WindowsInstaller/information/iso639.htm similarity index 100% rename from tools/build/WindowsInstaller/information/iso639.htm rename to package/WindowsInstaller/information/iso639.htm diff --git a/tools/build/WindowsInstaller/lang/TranslatedLanguages.nsh b/package/WindowsInstaller/lang/TranslatedLanguages.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/TranslatedLanguages.nsh rename to package/WindowsInstaller/lang/TranslatedLanguages.nsh diff --git a/tools/build/WindowsInstaller/lang/arabic.nsh b/package/WindowsInstaller/lang/arabic.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/arabic.nsh rename to package/WindowsInstaller/lang/arabic.nsh diff --git a/tools/build/WindowsInstaller/lang/basque.nsh b/package/WindowsInstaller/lang/basque.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/basque.nsh rename to package/WindowsInstaller/lang/basque.nsh diff --git a/tools/build/WindowsInstaller/lang/catalan.nsh b/package/WindowsInstaller/lang/catalan.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/catalan.nsh rename to package/WindowsInstaller/lang/catalan.nsh diff --git a/tools/build/WindowsInstaller/lang/czech.nsh b/package/WindowsInstaller/lang/czech.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/czech.nsh rename to package/WindowsInstaller/lang/czech.nsh diff --git a/tools/build/WindowsInstaller/lang/danish.nsh b/package/WindowsInstaller/lang/danish.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/danish.nsh rename to package/WindowsInstaller/lang/danish.nsh diff --git a/tools/build/WindowsInstaller/lang/dutch.nsh b/package/WindowsInstaller/lang/dutch.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/dutch.nsh rename to package/WindowsInstaller/lang/dutch.nsh diff --git a/tools/build/WindowsInstaller/lang/english.nsh b/package/WindowsInstaller/lang/english.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/english.nsh rename to package/WindowsInstaller/lang/english.nsh diff --git a/tools/build/WindowsInstaller/lang/french.nsh b/package/WindowsInstaller/lang/french.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/french.nsh rename to package/WindowsInstaller/lang/french.nsh diff --git a/tools/build/WindowsInstaller/lang/galician.nsh b/package/WindowsInstaller/lang/galician.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/galician.nsh rename to package/WindowsInstaller/lang/galician.nsh diff --git a/tools/build/WindowsInstaller/lang/german.nsh b/package/WindowsInstaller/lang/german.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/german.nsh rename to package/WindowsInstaller/lang/german.nsh diff --git a/tools/build/WindowsInstaller/lang/hungarian.nsh b/package/WindowsInstaller/lang/hungarian.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/hungarian.nsh rename to package/WindowsInstaller/lang/hungarian.nsh diff --git a/tools/build/WindowsInstaller/lang/indonesian.nsh b/package/WindowsInstaller/lang/indonesian.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/indonesian.nsh rename to package/WindowsInstaller/lang/indonesian.nsh diff --git a/tools/build/WindowsInstaller/lang/italian.nsh b/package/WindowsInstaller/lang/italian.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/italian.nsh rename to package/WindowsInstaller/lang/italian.nsh diff --git a/tools/build/WindowsInstaller/lang/japanese.nsh b/package/WindowsInstaller/lang/japanese.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/japanese.nsh rename to package/WindowsInstaller/lang/japanese.nsh diff --git a/tools/build/WindowsInstaller/lang/norwegian.nsh b/package/WindowsInstaller/lang/norwegian.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/norwegian.nsh rename to package/WindowsInstaller/lang/norwegian.nsh diff --git a/tools/build/WindowsInstaller/lang/polish.nsh b/package/WindowsInstaller/lang/polish.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/polish.nsh rename to package/WindowsInstaller/lang/polish.nsh diff --git a/tools/build/WindowsInstaller/lang/portuguese.nsh b/package/WindowsInstaller/lang/portuguese.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/portuguese.nsh rename to package/WindowsInstaller/lang/portuguese.nsh diff --git a/tools/build/WindowsInstaller/lang/portugueseBR.nsh b/package/WindowsInstaller/lang/portugueseBR.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/portugueseBR.nsh rename to package/WindowsInstaller/lang/portugueseBR.nsh diff --git a/tools/build/WindowsInstaller/lang/romanian.nsh b/package/WindowsInstaller/lang/romanian.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/romanian.nsh rename to package/WindowsInstaller/lang/romanian.nsh diff --git a/tools/build/WindowsInstaller/lang/russian.nsh b/package/WindowsInstaller/lang/russian.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/russian.nsh rename to package/WindowsInstaller/lang/russian.nsh diff --git a/tools/build/WindowsInstaller/lang/slovak.nsh b/package/WindowsInstaller/lang/slovak.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/slovak.nsh rename to package/WindowsInstaller/lang/slovak.nsh diff --git a/tools/build/WindowsInstaller/lang/spanish.nsh b/package/WindowsInstaller/lang/spanish.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/spanish.nsh rename to package/WindowsInstaller/lang/spanish.nsh diff --git a/tools/build/WindowsInstaller/lang/swedish.nsh b/package/WindowsInstaller/lang/swedish.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/swedish.nsh rename to package/WindowsInstaller/lang/swedish.nsh diff --git a/tools/build/WindowsInstaller/lang/turkish.nsh b/package/WindowsInstaller/lang/turkish.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/turkish.nsh rename to package/WindowsInstaller/lang/turkish.nsh diff --git a/tools/build/WindowsInstaller/lang/ukrainian.nsh b/package/WindowsInstaller/lang/ukrainian.nsh similarity index 100% rename from tools/build/WindowsInstaller/lang/ukrainian.nsh rename to package/WindowsInstaller/lang/ukrainian.nsh diff --git a/tools/build/WindowsInstaller/setup/configure.nsh b/package/WindowsInstaller/setup/configure.nsh similarity index 100% rename from tools/build/WindowsInstaller/setup/configure.nsh rename to package/WindowsInstaller/setup/configure.nsh diff --git a/tools/build/WindowsInstaller/setup/install.nsh b/package/WindowsInstaller/setup/install.nsh similarity index 85% rename from tools/build/WindowsInstaller/setup/install.nsh rename to package/WindowsInstaller/setup/install.nsh index aa173c7083..45f72ff6c5 100644 --- a/tools/build/WindowsInstaller/setup/install.nsh +++ b/package/WindowsInstaller/setup/install.nsh @@ -8,14 +8,15 @@ Installation of program files, dictionaries and external components #-------------------------------- # Program files +!include LogicLib.nsh 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} + StrCpy $String "$INSTDIR" + StrCpy $Search "${APP_NAME}" Call StrPoint # function from Utils.nsh ${if} $Pointer == "-1" StrCpy $INSTDIR "$INSTDIR\${APP_DIR}" @@ -38,8 +39,11 @@ Section -ProgramFiles SecProgramFiles File /r "${FILES_FREECAD}\bin\*.*" # MSVC redistributable DLLs - SetOutPath "$INSTDIR\bin" - File "${FILES_DEPS}\*.*" + !ifdef FILES_DEPS + !echo "Including MSVC Redist files from ${FILES_DEPS}" + SetOutPath "$INSTDIR\bin" + File "${FILES_DEPS}\*.*" + !endif # Others SetOutPath "$INSTDIR\data" @@ -52,10 +56,6 @@ Section -ProgramFiles SecProgramFiles File /r "${FILES_FREECAD}\lib\*.*" SetOutPath "$INSTDIR\Mod" File /r "${FILES_FREECAD}\Mod\*.*" - SetOutPath "$INSTDIR\resources" - File /r "${FILES_FREECAD}\resources\*.*" - SetOutPath "$INSTDIR\translations" - File /r "${FILES_FREECAD}\translations\*.*" SetOutPath "$INSTDIR" File /r "${FILES_THUMBS}" diff --git a/tools/build/WindowsInstaller/setup/uninstall.nsh b/package/WindowsInstaller/setup/uninstall.nsh similarity index 100% rename from tools/build/WindowsInstaller/setup/uninstall.nsh rename to package/WindowsInstaller/setup/uninstall.nsh diff --git a/tools/build/WindowsInstaller/thumbnail/FCStdThumbnail.dll b/package/WindowsInstaller/thumbnail/FCStdThumbnail.dll similarity index 100% rename from tools/build/WindowsInstaller/thumbnail/FCStdThumbnail.dll rename to package/WindowsInstaller/thumbnail/FCStdThumbnail.dll diff --git a/tools/build/WindowsInstaller/Bitmaps/BackgroundBitmap.bmp b/tools/build/WindowsInstaller/Bitmaps/BackgroundBitmap.bmp deleted file mode 100644 index 29785fdcb1..0000000000 Binary files a/tools/build/WindowsInstaller/Bitmaps/BackgroundBitmap.bmp and /dev/null differ diff --git a/tools/build/WindowsInstaller/Bitmaps/BanerBitmap.bmp b/tools/build/WindowsInstaller/Bitmaps/BanerBitmap.bmp deleted file mode 100644 index a516a0f837..0000000000 Binary files a/tools/build/WindowsInstaller/Bitmaps/BanerBitmap.bmp and /dev/null differ diff --git a/tools/build/WindowsInstaller/Delete.bat b/tools/build/WindowsInstaller/Delete.bat deleted file mode 100644 index 78fe714e39..0000000000 --- a/tools/build/WindowsInstaller/Delete.bat +++ /dev/null @@ -1,88 +0,0 @@ -del /S *_d.* -del /S *_debug.* -del /S *.pyc -del /S *.pdb -del /S boost*-gd-*.dll -cd bin -del assistant.exe -del Coin4d.dll -del designer.exe -del freetyped.dll -del libcrypto-3d.dll -del libEGLd.dll -del libGLESv2d.dll -del libssl-3d.dll -del linguist.exe -del qdoc.exe -del Qt53DAnimationd.dll -del Qt53DCored.dll -del Qt53DExtrasd.dll -del Qt53DInputd.dll -del Qt53DLogicd.dll -del Qt53DQuickAnimationd.dll -del Qt53DQuickd.dll -del Qt53DQuickExtrasd.dll -del Qt53DQuickInputd.dll -del Qt53DQuickRenderd.dll -del Qt53DQuickScene2Dd.dll -del Qt53DRenderd.dll -del Qt5Bluetoothd.dll -del Qt5Bodymovind.dll -del Qt5Chartsd.dll -del Qt5Concurrentd.dll -del Qt5Cored.dll -del Qt5DataVisualizationd.dll -del Qt5DBusd.dll -del Qt5DesignerComponentsd.dll -del Qt5Designerd.dll -del Qt5Gamepadd.dll -del Qt5Guid.dll -del Qt5Helpd.dll -del Qt5Locationd.dll -del Qt5Multimediad.dll -del Qt5MultimediaQuickd.dll -del Qt5MultimediaWidgetsd.dll -del Qt5NetworkAuthd.dll -del Qt5Networkd.dll -del Qt5Nfcd.dll -del Qt5OpenGLd.dll -del Qt5Pdfd.dll -del Qt5PdfWidgetsd.dll -del Qt5Positioningd.dll -del Qt5PositioningQuickd.dll -del Qt5PrintSupportd.dll -del Qt5Purchasingd.dll -del Qt5Qmld.dll -del Qt5QmlModelsd.dll -del Qt5QmlWorkerScriptd.dll -del Qt5Quick3DAssetImportd.dll -del Qt5Quick3Dd.dll -del Qt5Quick3DRenderd.dll -del Qt5Quick3DRuntimeRenderd.dll -del Qt5Quick3DUtilsd.dll -del Qt5QuickControls2d.dll -del Qt5Quickd.dll -del Qt5QuickParticlesd.dll -del Qt5QuickShapesd.dll -del Qt5QuickTemplates2d.dll -del Qt5QuickTestd.dll -del Qt5QuickWidgetsd.dll -del Qt5RemoteObjectsd.dll -del Qt5Scriptd.dll -del Qt5ScriptToolsd.dll -del Qt5Scxmld.dll -del Qt5Sensorsd.dll -del Qt5SerialBusd.dll -del Qt5SerialPortd.dll -del Qt5Sqld.dll -del Qt5Svgd.dll -del Qt5Testd.dll -del Qt5TextToSpeechd.dll -del Qt5VirtualKeyboardd.dll -del Qt5Widgetsd.dll -del Qt5WinExtrasd.dll -del Qt5Xmld.dll -del Qt5XmlPatternsd.dll -del Quarter1d.dll -del xerces-c_3_2D.dll -del zlibd.dll diff --git a/tools/build/WindowsInstaller/Settings.nsh b/tools/build/WindowsInstaller/Settings.nsh deleted file mode 100644 index 77c4815c0a..0000000000 --- a/tools/build/WindowsInstaller/Settings.nsh +++ /dev/null @@ -1,46 +0,0 @@ -/* - -Settings for FreeCAD installer - -These typically need to be modified for each FreeCAD release - -*/ - -# Make the installer as small as possible -# comment this for testing builds since it will reduce the time to create an installer -# a lot - for the cost of a much greater file size. -# So assure it is active for release builds! -SetCompressor /SOLID lzma - -#-------------------------------- -# Version number - -!define APP_VERSION_MAJOR 0 -!define APP_VERSION_MINOR 22 -!define APP_VERSION_REVISION 0 -!define APP_VERSION_EMERGENCY "beta" # use "1" for an emergency release of FreeCAD otherwise "" - # alternatively you can use APP_VERSION_EMERGENCY for a custom suffix of the version number -!define APP_EMERGENCY_DOT "" # use "." for an emergency release of FreeCAD otherwise "" -!define APP_VERSION_BUILD 1 # Start with 1 for the installer releases of each version - -!define APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}" # Version to display - -!define COPYRIGHT_YEAR 2023 - -#-------------------------------- -# Installer file name -# Typical names for the release are "FreeCAD-020-Installer-1.exe" etc. - -!define ExeFile "${APP_NAME}-${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}${APP_VERSION_EMERGENCY}-WIN-x64-installer-${APP_VERSION_BUILD}.exe" - -#-------------------------------- -# installer bit type - FreeCAD is only provided as 64bit build -!define MULTIUSER_USE_PROGRAMFILES64 - -#-------------------------------- -# File locations -# !!! you need to adjust them to the folders in your Windows system !!! - -!define FILES_FREECAD "G:\FreeCADInst\Installer\FreeCAD" -!define FILES_DEPS "G:\FreeCADInst\Installer\MSVCRedist" -!define FILES_THUMBS "G:\FreeCADInst\Installer\thumbnail" diff --git a/tools/build/WindowsInstaller/graphics/header.bmp b/tools/build/WindowsInstaller/graphics/header.bmp deleted file mode 100644 index e66c600887..0000000000 Binary files a/tools/build/WindowsInstaller/graphics/header.bmp and /dev/null differ diff --git a/tools/build/WindowsInstaller/graphics/orange.bmp b/tools/build/WindowsInstaller/graphics/orange.bmp deleted file mode 100644 index 26f5f30be1..0000000000 Binary files a/tools/build/WindowsInstaller/graphics/orange.bmp and /dev/null differ