Python36.zip in Windows Libpack 12.1.2

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
zach
Posts: 28
Joined: Thu Apr 04, 2019 4:56 pm
Location: Texas

Python36.zip in Windows Libpack 12.1.2

Postby zach » Thu Jul 18, 2019 12:31 am

Howdy all!

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
Both of which are found in the Libpack bin directory.

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
directory.

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.
GSoC FreeCAD Blog: zachgummow.github.io
User avatar
sgrogan
Posts: 5201
Joined: Wed Oct 22, 2014 5:02 pm

Re: Python36.zip in Windows Libpack 12.1.2

Postby sgrogan » Thu Jul 18, 2019 8:47 pm

zach wrote:
Thu Jul 18, 2019 12:31 am
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.
Go for it! We can finalize the CMake flag name when you are ready for a pull request. You can explain what is does in the tip that's displayed when you hover over the flag in CMake-gui
User avatar
zach
Posts: 28
Joined: Thu Apr 04, 2019 4:56 pm
Location: Texas

Re: Python36.zip in Windows Libpack 12.1.2

Postby zach » Fri Jul 19, 2019 12:07 am

sgrogan wrote:
Thu Jul 18, 2019 8:47 pm
zach wrote:
Thu Jul 18, 2019 12:31 am
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.
Go for it! We can finalize the CMake flag name when you are ready for a pull request. You can explain what is does in the tip that's displayed when you hover over the flag in CMake-gui
Ok, I will begin making the modifications.
GSoC FreeCAD Blog: zachgummow.github.io
User avatar
zach
Posts: 28
Joined: Thu Apr 04, 2019 4:56 pm
Location: Texas

Re: Python36.zip in Windows Libpack 12.1.2

Postby zach » Sun Jul 21, 2019 3:57 pm

I have finished making the changes. I was able to configure/generate/build on my Windows 10 machine with VS17. I will have kkremitzki and sgrogan review my work.
GSoC FreeCAD Blog: zachgummow.github.io