From 385a756a7e8e5e6a545f9d5e8bdf27d971858e27 Mon Sep 17 00:00:00 2001 From: tsubus Date: Fri, 24 Dec 2021 22:03:44 +0100 Subject: [PATCH] Use mono for MachOConverter in build.sh --- build.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 2b200f002..331c79153 100755 --- a/build.sh +++ b/build.sh @@ -11,7 +11,7 @@ testPackageFolderLinux='./_tests_linux' sourceFolder='./src' slnFile=$sourceFolder/Sonarr.sln updateSubFolder=Sonarr.Update - + sqlitePackageDir="$HOME/.nuget/packages/system.data.sqlite.core.servarr/1.0.115.5-18" nuget='tools/nuget/nuget.exe'; @@ -293,7 +293,11 @@ PackageMacOS() echo "Adding sqlite dylib" CheckExitCode cp "$sqlitePackageDir/runtimes/osx-x64/native/net46"/*.config $outputFolderMacOS/ - CheckExitCode $macho merge $outputFolderMacOS "$sqlitePackageDir/runtimes/osx-x64/native/net46"/*.dylib "$sqlitePackageDir/runtimes/osx-arm64/native/net46"/*.dylib + if [ $runtime = "dotnet" ] ; then + CheckExitCode $macho merge $outputFolderMacOS "$sqlitePackageDir/runtimes/osx-x64/native/net46"/*.dylib "$sqlitePackageDir/runtimes/osx-arm64/native/net46"/*.dylib + else + CheckExitCode mono $macho merge $outputFolderMacOS "$sqlitePackageDir/runtimes/osx-x64/native/net46"/*.dylib "$sqlitePackageDir/runtimes/osx-arm64/native/net46"/*.dylib + fi echo "Adding MediaInfo dylib" CheckExitCode cp $sourceFolder/Libraries/MediaInfo/x64/*.dylib $outputFolderMacOS/ @@ -323,7 +327,12 @@ PackageMacOSApp() CheckExitCode cp -r $outputFolderLinux/* $outputFolderMacOSAppBin echo "Adding sqlite dylib" - CheckExitCode $macho merge $outputFolderMacOSAppBin "$sqlitePackageDir/runtimes/osx-x64/native/net46" "$sqlitePackageDir/runtimes/osx-arm64/native/net46" + if [ $runtime = "dotnet" ] ; then + CheckExitCode $macho merge $outputFolderMacOSAppBin "$sqlitePackageDir/runtimes/osx-x64/native/net46" "$sqlitePackageDir/runtimes/osx-arm64/native/net46" + else + CheckExitCode mono $macho merge $outputFolderMacOSAppBin "$sqlitePackageDir/runtimes/osx-x64/native/net46" "$sqlitePackageDir/runtimes/osx-arm64/native/net46" + fi + echo "Adding MediaInfo dylib" CheckExitCode cp $sourceFolder/Libraries/MediaInfo/x64/*.dylib $outputFolderMacOSAppBin/