Skip to content

Commit

Permalink
Merge pull request #822 from Concordium/kb/fix-mac-build
Browse files Browse the repository at this point in the history
Fix mac build script
  • Loading branch information
abizjak authored Apr 17, 2023
2 parents 537c5d6 + dbd7d9c commit 43522a6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/distribution/macOS-package/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ readonly collectorDir="$macPackageDir/../../../collector"
readonly consensusDir="$macPackageDir/../../../concordium-consensus"

readonly toolsDir="$macPackageDir/tools"
readonly macdylibbundlerDir="$toolsDir/macdylibbundler-1.0.0"
readonly macdylibbundlerDir="$toolsDir/macdylibbundler-1.0.5"

readonly buildDir="$macPackageDir/build"
readonly payloadDir="$buildDir/payload"
Expand Down Expand Up @@ -226,7 +226,7 @@ function getDylibbundler() {
logInfo " -- Downloading..."
mkdir "$toolsDir"
cd "$macPackageDir"
curl -sSL "https://github.com/auriamg/macdylibbundler/archive/refs/tags/1.0.0.zip" > "$toolsDir/dylibbundler.zip" \
curl -sSL "https://github.com/auriamg/macdylibbundler/archive/refs/tags/1.0.5.zip" > "$toolsDir/dylibbundler.zip" \
&& logInfo " -- Unzipping..." \
&& cd "$toolsDir" \
&& unzip "dylibbundler.zip" \
Expand All @@ -248,7 +248,11 @@ function collectDylibs() {
local fileToFix=${1:?"Missing file to fix with dylibbundler"};
cd "$payloadDir/Library/Concordium Node"
# Paths to search for dylibs are added with the '-s' flag.
"$macdylibbundlerDir/dylibbundler" --fix-file "$fileToFix" --bundle-deps --dest-dir "./libs" --install-path "@executable_path/libs/" --overwrite-dir \
# We use `--create-dir` to ensure that the `./libs` folder exists.
# But we should not use `--overwrite-dir` even though it implies `--create-dir`
# because it will delete the libs folder if it already exists, which would delete
# the results of previous calls to `collectDylibsFor`.
"$macdylibbundlerDir/dylibbundler" --fix-file "$fileToFix" --bundle-deps --dest-dir "./libs" --install-path "@executable_path/libs/" --create-dir \
-s "$concordiumDylibDir" \
-s "$stackSnapshotDir" \
$stackLibDirs # Unquoted on purpose to use as arguments correctly
Expand Down

0 comments on commit 43522a6

Please sign in to comment.