It does not. However, checking the FREECAD_COPY_LIBPACK_BIN_TO_BUILD option in CMake causes FreeCAD run normally.
Building Libs for Windows Debug Version with VS2017/Qt5.12
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Building Libs for Windows Debug Version with VS2017/Qt5.12
GSoC FreeCAD Blog: zachgummow.github.io
Re: Building Libs for Windows Debug Version with VS2017/Qt5.12
This is not included in the 12.1.2 lib pack of apeltauer.
Should it be?
For me starting FreeCAD with a similar .bat I see this in the log
Code: Select all
Log: PATH = C:\Users\Chris\Miniconda3\Library\bin;C:\Users\Chris\Downloads\FreeCADLibs_12.1.2_x64_VC15\bin;
Code: Select all
Log: PythonSearchPath = C:\Users\Chris\Downloads\FreeCADLibs_12.1.2_x64_VC15\bin\python36.zip;C:\Users\Chris\Miniconda3\Lib;C:\Users\Chris\Miniconda3\DLLs;C:\Users\Chris\GitHub\FreeCAD-zach\bin
I don't see any ENV variables that would have my Miniconda3 python to be prepended to the PATH created in the .bat file?
Any hints appreciated.
"fight the good fight"
Re: Building Libs for Windows Debug Version with VS2017/Qt5.12
I don't know how others do it but for me FreeCAD crashes immediately as soon as it tries to initialize Python because it cannot find modules like os.py. I don't know why it fails to load the file from Python's Lib directory. Maybe the others copy this directory to FreeCAD's bin directory.This is not included in the 12.1.2 lib pack of apeltauer.
Should it be?
What works for me is creating the files python36.zip and python36_d.zip whose content is everything underneath Python's Lib directory but without the site-packages stuff because Python cannot load extension modules from a zip file anyway (at least in the past) and put them into the LibPack's bin directory.
Check sys.path. If it doesn't include the site-package then it won't load PySide2.For me FreeCAD starts, but I get a bunch of Pyside2 errors, I guess because the site-packages directory is not in the PythonSearchPath.
My PythonSearchPath doesn't contain site-packages either and I don't know if at this point it's the same as sys.path or if sys.path gets extended afterwards.
Re: Building Libs for Windows Debug Version with VS2017/Qt5.12
Thanks for the very useful information!
As part of this I need to copy QtWebEngineProcess.exe and qt.conf to the build/bin dir. If everyone sees this I think zack should make a pull request to add these files to FREECAD_COPY_BUILD_DIRS_TO_BUILD as part of his GSoC project.
I found on the Python site that there is an "embeddable" download that includes the python36.zip https://www.python.org/downloads/release/python-368/ An interesting thing for this package is that the python source files(.py) are removed and the compiled (.pyc) files are present. I guess this should speed up loading time? I haven't tested this yet, I've added a python36.zip made from the 12.1.2 libpack as you suggested.
I think we should;
1. add python36(_d).zip to the libpack
2. copy QtWebEngineProcess.exe and qt.conf to the build/bin dir as part of FREECAD_COPY_BUILD_DIRS_TO_BUILD
3. create the .bat file as part of FREECAD_COPY_BUILD_DIRS_TO_BUILD
I guess 3 is open for debate?
apeltauer wrote:ping
"fight the good fight"
Re: Building Libs for Windows Debug Version with VS2017/Qt5.12
I can create the the python zip files like werner mentioned. Is this ok?wmayer wrote: ↑Wed Jul 17, 2019 11:37 am What works for me is creating the files python36.zip and python36_d.zip whose content is everything underneath Python's Lib directory but without the site-packages stuff because Python cannot load extension modules from a zip file anyway (at least in the past) and put them into the LibPack's bin directory.
Re: Building Libs for Windows Debug Version with VS2017/Qt5.12
I think we should use the one from the official embeddable version. With only the .pyc files the archive is a bit smaller.
I will post the archive here tonight my time.
"fight the good fight"
Re: Building Libs for Windows Debug Version with VS2017/Qt5.12
If the official works then we can go with it. But keep in mind, i have compiled python on my machine. But i should have used the default configuration for building python...
Re: Building Libs for Windows Debug Version with VS2017/Qt5.12
Yes, it also annoys me to always copy these files manually when making a complete fresh build. I have this on my to-do list.sgrogan wrote: ↑Wed Jul 17, 2019 9:52 pmThanks for the very useful information!
As part of this I need to copy QtWebEngineProcess.exe and qt.conf to the build/bin dir. If everyone sees this I think zack should make a pull request to add these files to FREECAD_COPY_BUILD_DIRS_TO_BUILD as part of his GSoC project.
Very likely. When you import a Python module then you will see that the interpreter creates a .pyc file.sgrogan wrote: ↑Wed Jul 17, 2019 9:52 pm I found on the Python site that there is an "embeddable" download that includes the python36.zip https://www.python.org/downloads/release/python-368/ An interesting thing for this package is that the python source files(.py) are removed and the compiled (.pyc) files are present. I guess this should speed up loading time? I haven't tested this yet, I've added a python36.zip made from the 12.1.2 libpack as you suggested.
I will have a look at this soon.sgrogan wrote: ↑Wed Jul 17, 2019 9:52 pm I think we should;
1. add python36(_d).zip to the libpack
2. copy QtWebEngineProcess.exe and qt.conf to the build/bin dir as part of FREECAD_COPY_BUILD_DIRS_TO_BUILD
3. create the .bat file as part of FREECAD_COPY_BUILD_DIRS_TO_BUILD
I guess 3 is open for debate?
Re: Building Libs for Windows Debug Version with VS2017/Qt5.12
The official one works and is much smaller, because it only contains the .pyc files. For me it was 2+MB vs 190+MB
The debug version is just a re-named version of the release version.
I also uploaded ocl.pyd, I don't have a debug version yet.
https://github.com/sgrogan/FreeCAD/rele ... bpack-0.19
"fight the good fight"
Re: Building Libs for Windows Debug Version with VS2017/Qt5.12
zach is working on this. see here: https://forum.freecadweb.org/viewtopic.php?f=4&t=37807
"fight the good fight"