Py3 Mac app for testing

Having trouble installing or compiling FreeCAD? Get help here.
peterl94
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: Py3 Mac app for testing

Postby peterl94 » Thu Jan 03, 2019 1:43 pm

looo wrote:
Thu Jan 03, 2019 9:57 am
1. when you create the environment use an additional constraint: blas=*=openblas
Good to know, thanks.
looo wrote:
Thu Jan 03, 2019 9:57 am
2. conda ships static libs and shared libs together.
I didn't copy the whole environment. I adapted the "MakeMacBundleRelocatable.py" script, which uses otool to only copy referenced libraries.

looo wrote:
Thu Jan 03, 2019 9:57 am
3. Maybe it's also possible to ship calculix within the bundle.
Yes, and its been requested that Graphviz be included too.

looo wrote:
Thu Jan 03, 2019 9:57 am
Did building FreeCAD without this patch worked for you?
No. I patched it differently. Looking at it again, I see that Qt did it the same way. Maybe we can just include qprinter.h if it is not a private header.

Code: Select all

diff --git a/src/Mod/Drawing/Gui/DrawingView.cpp b/src/Mod/Drawing/Gui/DrawingView.cpp
index bbfb05465..5d06c061b 100644
--- a/src/Mod/Drawing/Gui/DrawingView.cpp
+++ b/src/Mod/Drawing/Gui/DrawingView.cpp
@@ -65,6 +65,11 @@
 
 using namespace DrawingGui;
 
+#ifdef B0
+// termios.h on macOS defines B0 which conflicts with QPrinter::B0
+#undef B0
+#endif
+
 SvgView::SvgView(QWidget *parent)
     : QGraphicsView(parent)
     , m_renderer(Native)
https://github.com/qt/qtbase/blob/5.11/ ... nter.h#L54
User avatar
looo
Posts: 3432
Joined: Mon Nov 11, 2013 5:29 pm

Re: Py3 Mac app for testing

Postby looo » Fri Jan 04, 2019 8:09 am

peterl94 wrote:
Thu Jan 03, 2019 1:43 pm
I didn't copy the whole environment. I adapted the "MakeMacBundleRelocatable.py" script, which uses otool to only copy referenced libraries.
Nice. Something Like this would be nice to have for linux and windows too.
peterl94 wrote:
Thu Jan 03, 2019 1:43 pm
Yes, and its been requested that Graphviz be included too.
Graphviz, calculix, gmsh should be available from conda. But as far as I know @sgrogan uses other builds for the windows bundle... So I guess it's up to whatever works best. But it would be also nice to get some feedback of the conda-packages.
peterl94 wrote:
Thu Jan 03, 2019 1:43 pm
No. I patched it differently. Looking at it again, I see that Qt did it the same way. Maybe we can just include qprinter.h if it is not a private header.
Yes, your patch looksuch more advanced ;) . I added it to the conda-forge recipe. Hopefully this is ok for you.
User avatar
sgrogan
Posts: 5989
Joined: Wed Oct 22, 2014 5:02 pm

Re: Py3 Mac app for testing

Postby sgrogan » Fri Jan 04, 2019 11:56 pm

looo wrote:
Fri Jan 04, 2019 8:09 am
Nice. Something Like this would be nice to have for linux and windows too.
I copy manually from the env, but I should be able to come up with a script. I will try in Python.
I believe @triplus copies the env and deletes stuff for the AppImage?
looo wrote:
Fri Jan 04, 2019 8:09 am
Graphviz, calculix, gmsh should be available from conda. But as far as I know @sgrogan uses other builds for the windows bundle... So I guess it's up to whatever works best. But it would be also nice to get some feedback of the conda-packages.
Now I don't bundle Graphviz. I use other calculix, gmsh and ifcopenshell because they are statically linked and I can use the same version for the VS2013 builds.

Travis supports Windows now, so it would be great if we could provide weekly portable builds (.dmg, .7z, AppImage) packaged from @looo's conda builds. This would be the closest we've ever had to a unified version. If we could make this work, I would suggest we use this for the official 0.18 release. Note, QT5 might be older than what otherwise might be available.

I think in the short term we should still use more "native" package managers (HomeBrew, LibPack, Ubuntu packages) for the CI (pull-request builds).
We get a lot of coverage this way. Oldest to newest almost. In the future maybe we can run the self tests on the Conda based builds, at first I would deploy in spite of any errors.

Thanks @looo, we are only to this point because of your effort and skill :!: :D
User avatar
looo
Posts: 3432
Joined: Mon Nov 11, 2013 5:29 pm

Re: Py3 Mac app for testing

Postby looo » Sat Jan 05, 2019 2:15 pm

sgrogan wrote:
Fri Jan 04, 2019 11:56 pm
I copy manually from the env, but I should be able to come up with a script. I will try in Python.
I believe @triplus copies the env and deletes stuff for the AppImage?
I guess the best would be to find a way that works for all platforms. The script from @peterl94 is the most advanced way so maybe we can find alternatives for windows and linux (alternatives to otool)
Travis supports Windows now, so it would be great if we could provide weekly portable builds (.dmg, .7z, AppImage) packaged from @looo's conda builds. This would be the closest we've ever had to a unified version. If we could make this work, I would suggest we use this for the official 0.18 release. Note, QT5 might be older than what otherwise might be available.
This would be indeed nice to have. The old qt5 might be a problem and we should maybe first try to update to qt5.9 if this is of any help. I guess using the qt5.9 from anaconda should work and all we need is to update pyside2, (soqt), pivy. But no idea if this will fix the problems currently occuring on windows (missing images on startpage) and mac (some problems on high-resulution-screens).
I think in the short term we should still use more "native" package managers (HomeBrew, LibPack, Ubuntu packages) for the CI (pull-request builds).
I think so too. It's nice to have a stable base. But updating a stable base is difficult (see the current efforts to update the ppa). I guess having alternative strategies for building freecad is not a bad strategy.
wmayer
Site Admin
Posts: 16308
Joined: Thu Feb 19, 2009 10:32 am

Re: Py3 Mac app for testing

Postby wmayer » Sat Jan 05, 2019 2:53 pm

I guess the best would be to find a way that works for all platforms. The script from @peterl94 is the most advanced way so maybe we can find alternatives for windows and linux (alternatives to otool)
On Windows it's Dependency Walker (depends.exe) which can be used also in console mode. With the option /oc:<path> a file in csv format is created which can easily parsed to find the dlls.

However, you only get a dll if another dll links to it. Plugin dlls (e.g. all the Qt plugins) cannot be fetched this way because they are loaded at runtime.
leonardshelby
Posts: 72
Joined: Sat Feb 24, 2018 6:09 pm

Re: Py3 Mac app for testing

Postby leonardshelby » Mon Jan 07, 2019 9:00 pm

Nice to see you guys working on new builds for mac :)

I'm afraid the freezes on macos 10.14.x are still here when launched from finder. It is not a big issue as there are workarounds, I just wanted to leave the feedback.
User avatar
sgrogan
Posts: 5989
Joined: Wed Oct 22, 2014 5:02 pm

Re: Py3 Mac app for testing

Postby sgrogan » Mon Jan 07, 2019 11:25 pm

looo wrote:
Sat Jan 05, 2019 2:15 pm
I guess the best would be to find a way that works for all platforms. The script from @peterl94 is the most advanced way so maybe we can find alternatives for windows and linux (alternatives to otool)
Maybe? https://cmake.org/cmake/help/v2.8.8/cma ... eUtilities fixup_bundle can maybe handle the plugins?
User avatar
sgrogan
Posts: 5989
Joined: Wed Oct 22, 2014 5:02 pm

Re: Py3 Mac app for testing

Postby sgrogan » Fri Mar 01, 2019 12:26 am

looo wrote:
Thu Jan 03, 2019 9:57 am
1. when you create the environment use an additional constraint: blas=*=openblas
I use this to create a new environment

Code: Select all

conda create --name freecad-dev3 python=3.6 tbb=2018.0.5 occt=7.3 freecad -c freecad/label/dev
What should it be for openblas?
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: Py3 Mac app for testing

Postby triplus » Fri Mar 01, 2019 12:45 am

Just add it like:

Code: Select all

conda create --name freecad-dev3 blas=*=openblas python=3.6 tbb=2018.0.5 occt=7.3 freecad -c freecad/label/dev
User avatar
jmborer
Posts: 42
Joined: Thu Feb 28, 2019 5:39 pm
Location: Switzerland

Re: Py3 Mac app for testing

Postby jmborer » Sat Mar 09, 2019 7:38 pm

To run this version you need to create an environment that retrieves the latest DEV version of freecad:

Code: Select all

conda create --name freecad-dev3 blas=*=openblas python=3.6 tbb=2018.0.5 occt=7.3 freecad -c freecad/label/dev
Then activate this env:

Code: Select all

conda activate freecad-dev3
Finally install FreeCAD:

Code: Select all

conda install freecad
And run it:

Code: Select all

freecad
cron