Page 24 of 27

Re: FreeCAD 0.19: macOS Big Sur

Posted: Wed Mar 24, 2021 2:10 pm
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!

Re: FreeCAD 0.19: macOS Big Sur

Posted: Wed Mar 24, 2021 4:20 pm
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}'

Re: FreeCAD 0.19: macOS Big Sur

Posted: Wed Mar 24, 2021 6:03 pm
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!

Re: FreeCAD 0.19: macOS Big Sur

Posted: Thu Mar 25, 2021 1:51 pm
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.

Re: FreeCAD 0.19: macOS Big Sur

Posted: Thu Mar 25, 2021 5:07 pm
by chrisb
Can sw_vers -productVersion be used in the FreeCAD infos as well? Currently it shows 10.16 instead of 11.x.x.

Re: FreeCAD 0.19: macOS Big Sur

Posted: Sun Mar 28, 2021 6:03 am
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.

Re: FreeCAD 0.19: macOS Big Sur

Posted: Sun Mar 28, 2021 12:22 pm
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

Re: FreeCAD 0.19: macOS Big Sur

Posted: Sun Mar 28, 2021 3:41 pm
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" $@

Re: FreeCAD 0.19: macOS Big Sur

Posted: Tue Mar 30, 2021 8:38 pm
by chrisb
Moved to Install/Compile.

Re: FreeCAD 0.19: macOS Big Sur

Posted: Tue Mar 30, 2021 9:22 pm
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