diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 55547696c0a..0c75b8f9f27 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -45,12 +45,16 @@ jobs: echo "install lib" cd dosbox-x.app/Contents/MacOS echo "get list of libraries required" - INSTALL_LIBS=($(otool -L dosbox-x | grep '\w*@executable.*' - | sed -n -r 's#.+/(lib.*dylib).*#\1#p')) + INSTALL_LIBS=($(otool -L dosbox-x | grep '¥w*@executable.*' - | sed -n -r 's#.+/(lib.*dylib).*#¥1#p')) for i in ${INSTALL_LIBS[@]} do - j=($(echo $i | sed -E 's|([^¥.^¥-]+).*dylib|\1|p')) + j=($(echo $i | sed -E 's|([^¥.^¥-]+).*dylib|¥1|p')) #echo $j FILE=($(find -H /usr/** -name $j*.*.dylib 2>/dev/null)) + if [ -z "$FILE" ] + then + FILE=($(find -H /System/** -name $j*.*.dylib 2>/dev/null)) + fi echo ${FILE} cp ${FILE} arm64/$i #cp ${FILE} x86_64/$i #currently searches arm64 directory regardless of platform @@ -68,9 +72,9 @@ jobs: strip $top/src/dosbox-x make dosbox-x.app cd dosbox-x.app/Contents/MacOS - INSTALL_LIBS=($(otool -L dosbox-x | grep '\w*@executable.*' - | sed -n -r 's#.+/(lib.*dylib).*#\1#p')) for i in ${INSTALL_LIBS[@]} + INSTALL_LIBS=($(otool -L dosbox-x | grep '¥w*@executable.*' - | sed -n -r 's#.+/(lib.*dylib).*#¥1#p')) for i in ${INSTALL_LIBS[@]} do - j=($(echo $i | sed -E 's|([^¥.^¥-]+).*dylib|\1|p')) + j=($(echo $i | sed -E 's|([^¥.^¥-]+).*dylib|¥1|p')) #echo $j FILE=($(find -H /usr/** -name $j*.*.dylib 2>/dev/null)) echo ${FILE}