FreeCAD 0.19: macOS Big Sur

Having trouble installing or compiling FreeCAD? Get help here.
chrisb
Veteran
Posts: 43570
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD 0.19: macOS Big Sur

Post by chrisb »

sliptonic wrote: Wed Mar 24, 2021 12:54 pm There is a new setting in preferences specifically for ocl based ops. Is that enabled too?
:oops:
Checked in preferences - restarted FreeCAD - works!
Thanks!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
hyarion
Posts: 139
Joined: Fri Jun 26, 2020 6:08 pm

Re: FreeCAD 0.19: macOS Big Sur

Post by hyarion »

looo wrote: Wed Mar 24, 2021 1:28 pm Btw. If someone knows how to distinguish different osx version with bash we can add some conditions for the QT_MAC_WANTS_LAYER env variable.

I tried with this but it didn't worked for a bigsur m1 macbook.
https://github.com/FreeCAD/FreeCAD-AppI ... caff562e7a
You need to pad the numbers with zeros. The following command uses awk to split on '.' and then print each column with two digits each:

Code: Select all

sw_vers -productVersion | awk -F. '{printf "%02d%02d%02d", $1, $2, $3}'
gerryk
Posts: 2
Joined: Tue Mar 23, 2021 10:48 pm

Re: FreeCAD 0.19: macOS Big Sur

Post by gerryk »

chrisb wrote: Wed Mar 24, 2021 2:10 pm
sliptonic wrote: Wed Mar 24, 2021 12:54 pm There is a new setting in preferences specifically for ocl based ops. Is that enabled too?
:oops:
Checked in preferences - restarted FreeCAD - works!
Thanks!
Yep... works here too. Thanks!
User avatar
looo
Veteran
Posts: 3826
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD 0.19: macOS Big Sur

Post by looo »

hyarion wrote: Wed Mar 24, 2021 4:20 pm
looo wrote: Wed Mar 24, 2021 1:28 pm Btw. If someone knows how to distinguish different osx version with bash we can add some conditions for the QT_MAC_WANTS_LAYER env variable.

I tried with this but it didn't worked for a bigsur m1 macbook.
https://github.com/FreeCAD/FreeCAD-AppI ... caff562e7a
You need to pad the numbers with zeros. The following command uses awk to split on '.' and then print each column with two digits each:

Code: Select all

sw_vers -productVersion | awk -F. '{printf "%02d%02d%02d", $1, $2, $3}'


Thanks for your help, I added the command to the weekly builds. If it work I will copy it over to the 0.19.1 release.
chrisb
Veteran
Posts: 43570
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD 0.19: macOS Big Sur

Post by chrisb »

Can sw_vers -productVersion be used in the FreeCAD infos as well? Currently it shows 10.16 instead of 11.x.x.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
ipatch
Posts: 104
Joined: Wed Apr 08, 2020 3:40 pm
Location: dfw
Contact:

Re: FreeCAD 0.19: macOS Big Sur

Post by ipatch »

looo wrote: Wed Mar 24, 2021 1:28 pm Btw. If someone knows how to distinguish different osx version with bash we can add some conditions for the QT_MAC_WANTS_LAYER env variable.

I tried with this but it didn't worked for a bigsur m1 macbook.
https://github.com/FreeCAD/FreeCAD-AppI ... caff562e7a
your bash line seems to work for me, as i'm running 10.14.6 ie. mojave

Code: Select all

sw_vers -productVersion | sed -e 's/\.//g'
which results in

Code: Select all

10146
on my system, i think it was mentioned that the start workbench is having issues with m1, and in your github commit it looks like your looking for 101500, which i believe is 10.15.0 ie. catalina, and big sur is either 10.16 or 11.0 depending on who you ask. so maybe that could be the issue with why your check isn't working. or i could be completely wrong. either way i hope your figure it out.

... looking at it some more, my macos version is 10.14.6 but the sed cmd will give a version 10146 and you're checking for a version greater than 101500, so basically is padding zero in there so maybe if your running say catalina 10.15.7 it will evaluate to 10157

which 10157 will always be less than 101500

please call me out if i'm missing something here.
User avatar
looo
Veteran
Posts: 3826
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD 0.19: macOS Big Sur

Post by looo »

ipatch wrote: Sun Mar 28, 2021 6:03 am
looo wrote: Wed Mar 24, 2021 1:28 pm Btw. If someone knows how to distinguish different osx version with bash we can add some conditions for the QT_MAC_WANTS_LAYER env variable.

I tried with this but it didn't worked for a bigsur m1 macbook.
https://github.com/FreeCAD/FreeCAD-AppI ... caff562e7a
your bash line seems to work for me, as i'm running 10.14.6 ie. mojave

Code: Select all

sw_vers -productVersion | sed -e 's/\.//g'
which results in

Code: Select all

10146
on my system, i think it was mentioned that the start workbench is having issues with m1, and in your github commit it looks like your looking for 101500, which i believe is 10.15.0 ie. catalina, and big sur is either 10.16 or 11.0 depending on who you ask. so maybe that could be the issue with why your check isn't working. or i could be completely wrong. either way i hope your figure it out.

... looking at it some more, my macos version is 10.14.6 but the sed cmd will give a version 10146 and you're checking for a version greater than 101500, so basically is padding zero in there so maybe if your running say catalina 10.15.7 it will evaluate to 10157

which 10157 will always be less than 101500

please call me out if i'm missing something here.
Thanks for your input. If you have some time for testing, please extract the dmg and make changes to Contents/MacOS/FreeCAD [1] I tried several approaches to distinguish between bigsur and older versions but wasn't successful until now. Also, the approach from @hyarion didn't work out on a M1 mac.


[1] https://github.com/FreeCAD/FreeCAD-AppI ... OS/FreeCAD
chrisb
Veteran
Posts: 43570
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD 0.19: macOS Big Sur

Post by chrisb »

This works here on different Mac versions with and without Big Sur. It doesn't need any sed, but depends on Apple not rolling out any version bigger than 10.99 and smaller than 11.xx.

Code: Select all

#!/usr/bin/env bash
HERE=$(dirname "$(dirname "$0")")
cat ${HERE}/packages.txt
export PREFIX=${HERE}/Resources
export LD_LIBRARY_PATH=${PREFIX}/lib
export PYTHONHOME=${PREFIX}
# export QT_QPA_PLATFORM_PLUGIN_PATH=${PREFIX}/plugins
# export QT_XKB_CONFIG_ROOT=${PREFIX}/lib
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
export FONTCONFIG_PATH=/etc/fonts
export LANG="UTF-8"  # https://forum.freecadweb.org/viewtopic.php?f=22&t=42644
export SSL_CERT_FILE=${PREFIX}/ssl/cacert.pem # https://forum.freecadweb.org/viewtopic.php?f=3&t=42825
export GIT_SSL_CAINFO=${PREFIX}/ssl/cacert.pem
if [[ `sw_vers -productVersion` > 10.99 ]] ; then
  export QT_MAC_WANTS_LAYER=1
fi
"${PREFIX}/bin/freecad" $@
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 43570
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD 0.19: macOS Big Sur

Post by chrisb »

Moved to Install/Compile.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
looo
Veteran
Posts: 3826
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD 0.19: macOS Big Sur

Post by looo »

chrisb wrote: Sun Mar 28, 2021 3:41 pm This works here on different Mac versions with and without Big Sur. It doesn't need any sed, but depends on Apple not rolling out any version bigger than 10.99 and smaller than 11.xx.

Code: Select all

#!/usr/bin/env bash
HERE=$(dirname "$(dirname "$0")")
cat ${HERE}/packages.txt
export PREFIX=${HERE}/Resources
export LD_LIBRARY_PATH=${PREFIX}/lib
export PYTHONHOME=${PREFIX}
# export QT_QPA_PLATFORM_PLUGIN_PATH=${PREFIX}/plugins
# export QT_XKB_CONFIG_ROOT=${PREFIX}/lib
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
export FONTCONFIG_PATH=/etc/fonts
export LANG="UTF-8"  # https://forum.freecadweb.org/viewtopic.php?f=22&t=42644
export SSL_CERT_FILE=${PREFIX}/ssl/cacert.pem # https://forum.freecadweb.org/viewtopic.php?f=3&t=42825
export GIT_SSL_CAINFO=${PREFIX}/ssl/cacert.pem
if [[ `sw_vers -productVersion` > 10.99 ]] ; then
  export QT_MAC_WANTS_LAYER=1
fi
"${PREFIX}/bin/freecad" $@
thanks for testing: https://github.com/FreeCAD/FreeCAD-AppI ... ec6bbe1c25
Post Reply