As part of my GSoC project I've been building on Windows regularly. sgrogan has been helping me greatly and he came across a post in this topic: https://forum.freecadweb.org/viewtopic. ... 10#p299010. wmayer described a method of using a batch file in order to add the Libpack directory as a path.
However, I ran into some issues when doing so. When referencing the Libpack bin directory from the batch file, FreeCAD searches for a 'python36.zip' archive. This is not present in the Libpack. A minimal archive, if added to the Libpack, will allow this batch file to run normally. That is, if two other files are added to the bin directory of FreeCAD.
These two files are:
Code: Select all
QtWebEngine.exe
qt.conf
An alternative to the minimal archive that would not require an addition to the Libpack would be to have a CMake process create one using the contents of the
Code: Select all
Libpack/bin/Lib
The advantage of the minimal archive is its size (7 MB vs. 140 MB) and loading speed (about 2 seconds faster loading FreeCAD on my machine).
As mentioned by wmayer in the linked topic, this change would reduce redundant copies of the Libpack during development as well.
I propose that we add the minimal python archive to Libpack 12.1.2 and modify the FREECAD_COPY_LIBPACK_BIN_TO_BUILD CMake flag to FREECAD_COPY_LIBPACK_DEPENDS_TO_BUILD. The process of copying would be modified to only copy the two Qt files mentioned and to generate an appropriate batch file.