add description on how to build installer from self-compiled FC

This commit is contained in:
Uwe
2022-05-27 20:37:26 +02:00
parent 2303fd808a
commit e9298bc8f3
2 changed files with 117 additions and 17 deletions

View File

@@ -0,0 +1,84 @@
del bin\Coin4d.dll
del bin\freetyped.dll
del bin\libcrypto-3d.dll
del bin\libEGLd.dll
del bin\libGLESv2d.dll
del bin\Qt53DAnimationd.dll
del bin\Qt53DCored.dll
del bin\Qt53DExtrasd.dll
del bin\Qt53DInputd.dll
del bin\Qt53DLogicd.dll
del bin\Qt53DQuickAnimationd.dll
del bin\Qt53DQuickd.dll
del bin\Qt53DQuickExtrasd.dll
del bin\Qt53DQuickInputd.dll
del bin\Qt53DQuickRenderd.dll
del bin\Qt53DQuickScene2Dd.dll
del bin\Qt53DRenderd.dll
del bin\Qt5Bluetoothd.dll
del bin\Qt5Bodymovind.dll
del bin\Qt5Chartsd.dll
del bin\Qt5Concurrentd.dll
del bin\Qt5Cored.dll
del bin\Qt5DataVisualizationd.dll
del bin\Qt5DBusd.dll
del bin\Qt5DesignerComponentsd.dll
del bin\Qt5Designerd.dll
del bin\Qt5Gamepadd.dll
del bin\Qt5Guid.dll
del bin\Qt5Helpd.dll
del bin\Qt5Locationd.dll
del bin\Qt5Multimediad.dll
del bin\Qt5MultimediaQuickd.dll
del bin\Qt5MultimediaWidgetsd.dll
del bin\Qt5NetworkAuthd.dll
del bin\Qt5Networkd.dll
del bin\Qt5Nfcd.dll
del bin\Qt5OpenGLd.dll
del bin\Qt5Pdfd.dll
del bin\Qt5PdfWidgetsd.dll
del bin\Qt5Positioningd.dll
del bin\Qt5PositioningQuickd.dll
del bin\Qt5PrintSupportd.dll
del bin\Qt5Purchasingd.dll
del bin\Qt5Qmld.dll
del bin\Qt5QmlModelsd.dll
del bin\Qt5QmlWorkerScriptd.dll
del bin\Qt5Quick3DAssetImportd.dll
del bin\Qt5Quick3Dd.dll
del bin\Qt5Quick3DRenderd.dll
del bin\Qt5Quick3DRuntimeRenderd.dll
del bin\Qt5Quick3DUtilsd.dll
del bin\Qt5QuickControls2d.dll
del bin\Qt5Quickd.dll
del bin\Qt5QuickParticlesd.dll
del bin\Qt5QuickShapesd.dll
del bin\Qt5QuickTemplates2d.dll
del bin\Qt5QuickTestd.dll
del bin\Qt5QuickWidgetsd.dll
del bin\Qt5RemoteObjectsd.dll
del bin\Qt5Scriptd.dll
del bin\Qt5ScriptToolsd.dll
del bin\Qt5Scxmld.dll
del bin\Qt5Sensorsd.dll
del bin\Qt5SerialBusd.dll
del bin\Qt5SerialPortd.dll
del bin\Qt5Sqld.dll
del bin\Qt5Svgd.dll
del bin\Qt5Testd.dll
del bin\Qt5TextToSpeechd.dll
del bin\Qt5VirtualKeyboardd.dll
del bin\Qt5WebChanneld.dll
del bin\Qt5WebEngineCored.dll
del bin\Qt5WebEngined.dll
del bin\Qt5WebEngineWidgetsd.dll
del bin\Qt5WebSocketsd.dll
del bin\Qt5WebViewd.dll
del bin\Qt5Widgetsd.dll
del bin\Qt5WinExtrasd.dll
del bin\Qt5Xmld.dll
del bin\Qt5XmlPatternsd.dll
del bin\QtWebEngineProcessd.exe
del bin\Quarter1d.dll
del bin\xerces-c_3_2D.dll
del bin\zlibd.dll

View File

@@ -5,13 +5,13 @@ To build the installer you can do the following:
1. Get the latest zip-file of the whole installer source code "FC-standard-installer.zip" from</br>
https://github.com/donovaly/FreeCADInstProj/releases
2. Extract it to e.g. the path "C:\FreeCAD\Installer"
3. Open the file Settings.nsh with a text editor</br>
3. Open the file *Settings.nsh* with a text editor</br>
(the editor jEdit (jedit.org) can be recommended to edit NSIS files)</br>
and adapt there the following paths to the ones on your PC, e.g.:</br>
!define FILES_FREECAD "C:\FreeCAD\Installer\FreeCAD"</br>
!define FILES_DEPS "C:\FreeCAD\Installer\MSVCRedist"
`!define FILES_FREECAD "C:\FreeCAD\Installer\FreeCAD"`</br>
`!define FILES_DEPS "C:\FreeCAD\Installer\MSVCRedist"`
4. Specify in Settings.nsh if it should be an installer for 32bit by commenting the line</br>
!define MULTIUSER_USE_PROGRAMFILES64
`!define MULTIUSER_USE_PROGRAMFILES64`
5. Install the latest version 3.x of NSIS (https://nsis.sourceforge.io/Download)
6. Download these special release files of NSIS that support large strings:</br>
https://nsis.sourceforge.io/Special_Builds#Large_strings</br>
@@ -19,24 +19,40 @@ To build the installer you can do the following:
7. Download these special release files of NSIS that support logging:</br>
https://nsis.sourceforge.io/Special_Builds#Advanced_logging</br>
and copy the containing files into the corresponding NSIS installations folders
8. Copy the file ~\nsprocess\Include\nsProcess.nsh to the folder</br>
\Include of NSIS's installation folder.</br>
Copy the file ~\nsprocess\Plugins\x86-unicode\nsProcess.dll to the folder</br>
\Plugins\x86-unicode of NSIS's installation folder.</br>
8. Copy the file *~\nsprocess\Include\nsProcess.nsh* to the folder</br>
*\Include* of NSIS's installation folder.</br>
Copy the file *~\nsprocess\Plugins\x86-unicode\nsProcess.dll* to the folder</br>
*\Plugins\x86-unicode* of NSIS's installation folder.</br>
(You can alternatively get nsProcess from https://nsis.sourceforge.io/NsProcess_plugin)
9. Copy all FreeCAD files to the folder "~\FreeCAD"
e.g. "C:\FreeCAD\Installer\FreeCAD"
Now you have 2 options:
* Either you got an already compiled FreeCAD, then copy all FreeCAD files to the folder</br>
*~\FreeCAD" e.g. "C:\FreeCAD\Installer\FreeCAD*
* Or you compiled FreeCAD on your own as described [here](https://wiki.freecadweb.org/Compile_on_Windows). Then:
* Open the file *Settings.nsh* as described in step 3. above and set there</br>
`!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
* change to that folder and search it for **\*_debug.\***
* delete all found files
* repeat this for the searches with **\*_d.\***, **\*.pyc** and **\*.pdb**
* open a command line in Windows and change in this to the folder
* run the comamand</br>
`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.)
10. If you use a version of FreeCAD that was compiled using another MSVC version than MSVC 2019,
copy its distributable DLLs to the folder FILES_DEPS (see step 3).
11. Right-click on the file FreeCAD-installer.nsi and choose "Compile NSIS script"
11. Right-click on the file *FreeCAD-installer.nsi* and choose **Compile NSIS script**
to compile the installer.
12. The folder ~\MSVCRedist contains already all MSVC 2019 x64 redistributable DLLs necessary
for FreeCAD 0.20dev. If another MSVC version was used to compile FreeCAD, replace the DLLs by
12. The folder *~\MSVCRedist* contains already all MSVC 2019 x64 redistributable DLLs necessary
for FreeCAD 0.20. If another MSVC version was used to compile FreeCAD, replace the DLLs by
the ones of the used MSVC. (They are usually available in the folder
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC)
*C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC*)
For test builds of the installer you can turn off the 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
SetCompressor /SOLID lzma
in the file Settings.nsh.
is turned off by uncommenting the line</br>
`SetCompressor /SOLID lzma`</br>
in the file *Settings.nsh*.