Browse Source

Attempt to fix macOS build issues

Add `umount` command behavior
Modify to retry 12 times over the course of 240 seconds total
Change `scripts\build\macOS\DMGSetup.scpt` to close DMG when finished.
Improve system detection for setting project name.

Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
pull/545/head
Emily Mabrey 10 months ago
parent
commit
7450432f9a
No known key found for this signature in database GPG Key ID: 6F4EF47256A1B7DC
  1. 6
      CMakeLists.txt
  2. 1
      scripts/build/macOS/DMGSetup.scpt
  3. 12
      scripts/ci/macos/repeat_hdiutil.sh
  4. 10
      src/CMakeLists.txt

6
CMakeLists.txt

@ -40,10 +40,10 @@ cmake_policy( SET CMP0075 NEW )
set( AUDACITY_BUILD_LEVEL 0 )
# Define Tenacity's build output name
if( CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows" )
set( AUDACITY_NAME "Tenacity" )
if( APPLE OR WIN32 )
set( AUDACITY_NAME "Tenacity")
else()
set( AUDACITY_NAME "tenacity" )
set( AUDACITY_NAME "tenacity")
endif()
if(NOT GIT_FOUND)

1
scripts/build/macOS/DMGSetup.scpt

@ -17,6 +17,7 @@ on run argv
close
open
update without registering applications
close
end tell
end tell
end run

12
scripts/ci/macos/repeat_hdiutil.sh

@ -4,11 +4,11 @@
set -uo pipefail
max_retry=10
max_retry=12
counter=0
num_secs_await_retry=5
num_secs_await_retry=20
echo "Trying: " /usr/bin/hdiutil "$@"
echo "Trying: /usr/bin/hdiutil $@"
until /usr/bin/hdiutil "$@"; do
sleep $num_secs_await_retry
@ -16,7 +16,11 @@ until /usr/bin/hdiutil "$@"; do
echo "CPack failed despite retry attempts!"
exit 1
else
echo "Trying CPack hdiutil call again. Retry attempt #$counter"
echo "Attempting to umount before retry..."
modified_args=("$@")
modified_args[0]="umount"
/usr/bin/hdiutil "${modified_args[@]}"
echo "Trying hdiutil call again. Retry attempt #$counter"
((counter++))
fi
done

10
src/CMakeLists.txt

@ -1113,7 +1113,7 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
add_custom_command(
TARGET ${TARGET}
COMMAND ${CMAKE_COMMAND}
-D SRC="${_EXEDIR}/Tenacity.exe"
-D SRC="${_EXEDIR}/${AUDACITY_NAME}.exe"
-D DST="${_EXEDIR}"
-D WXWIN="${_SHARED_PROXY_BASE_PATH}/$<CONFIG>/"
-P "${AUDACITY_MODULE_PATH}/CopyLibs.cmake"
@ -1191,7 +1191,7 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
add_custom_command(
TARGET ${TARGET}
COMMAND ${CMAKE_COMMAND}
-D SRC="${_EXEDIR}/Tenacity"
-D SRC="${_EXEDIR}/${AUDACITY_NAME}Z"
-D DST="${_PKGLIB}"
-D WXWIN="${_SHARED_PROXY_BASE_PATH}/$<CONFIG>"
-P "${AUDACITY_MODULE_PATH}/CopyLibs.cmake"
@ -1273,7 +1273,7 @@ else()
add_custom_command(
TARGET ${TARGET}
COMMAND ${CMAKE_COMMAND}
-D SRC="${_EXEDIR}/tenacity"
-D SRC="${_EXEDIR}/${AUDACITY_NAME}"
-D DST="${_DEST}/${_PKGLIB}"
-D WXWIN="${_SHARED_PROXY_BASE_PATH}/$<CONFIG>"
-P "${AUDACITY_MODULE_PATH}/CopyLibs.cmake"
@ -1297,8 +1297,8 @@ source_group(
TREE "${_INTDIR}"
PREFIX "CMake"
FILES
${_INTDIR}/CMakeFiles/Tenacity.dir/cmake_pch.cxx
${_INTDIR}/CMakeFiles/Tenacity.dir/cmake_pch.hxx
${_INTDIR}/CMakeFiles/${CMAKE_PROJECT_NAME}.dir/cmake_pch.cxx
${_INTDIR}/CMakeFiles/${CMAKE_PROJECT_NAME}.dir/cmake_pch.hxx
)
# Define TENACITY_DLL_API

Loading…
Cancel
Save