Checked in preferences - restarted FreeCAD - works!
Thanks!
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: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
Code: Select all
sw_vers -productVersion | awk -F. '{printf "%02d%02d%02d", $1, $2, $3}'
hyarion wrote: ↑Wed Mar 24, 2021 4:20 pmYou need to pad the numbers with zeros. The following command uses awk to split on '.' and then print each column with two digits each: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 ... caff562e7aCode: Select all
sw_vers -productVersion | awk -F. '{printf "%02d%02d%02d", $1, $2, $3}'
your bash line seems to work for me, as i'm running 10.14.6 ie. mojavelooo 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
Code: Select all
sw_vers -productVersion | sed -e 's/\.//g'
Code: Select all
10146
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.ipatch wrote: ↑Sun Mar 28, 2021 6:03 amyour bash line seems to work for me, as i'm running 10.14.6 ie. mojavelooo 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
which results inCode: Select all
sw_vers -productVersion | sed -e 's/\.//g'
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.Code: Select all
10146
... 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.
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 ... ec6bbe1c25chrisb 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" $@