Skip to content

Commit

Permalink
added barrierc and barriers to macdeployqt targets
Browse files Browse the repository at this point in the history
macdeployqt needs "-executable=filename" to propery
change linking on other variables

also renamed the cmake target from "Barrier_dmg" to
"Barrier_MacOS" to properly reflect earlier changes
  • Loading branch information
simons-public committed May 4, 2020
1 parent e0051d1 commit 0deaaad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
configure_files (${BARRIER_BUNDLE_SOURCE_DIR} ${BARRIER_BUNDLE_DIR})
add_custom_target(Barrier_dmg ALL
add_custom_target(Barrier_MacOS ALL
bash build_dist.sh
DEPENDS barrier barriers barrierc
WORKING_DIRECTORY ${BARRIER_BUNDLE_DIR})
Expand Down
10 changes: 8 additions & 2 deletions dist/macos/bundle/build_dist.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ B_MACOS="Barrier.app/Contents/MacOS"
B_VERSION="@BARRIER_VERSION@"
B_BINDIR="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
B_BUILDTYPE="@CMAKE_BUILD_TYPE@"
B_BARRIERC="Barrier.app/Contents/MacOS/barrierc"
B_BARRIERS="Barrier.app/Contents/MacOS/barriers"

# Colorized output
function info() { tput bold; echo "$@" ; tput sgr0 ;}
Expand Down Expand Up @@ -56,12 +58,16 @@ fi
# Use macdeployqt to include libraries and create dmg
if [ "$B_BUILDTYPE" == "Release" ]; then
info "Building Release disk image (dmg)"
"$DEPLOYQT" Barrier.app -dmg || exit 1
"$DEPLOYQT" Barrier.app -dmg \
-executable="$B_BARRIERC" \
-executable="$B_BARRIERS" || exit 1
mv "Barrier.dmg" "Barrier-$B_VERSION.dmg" || exit 1
success "Created Barrier-$B_VERSION.dmg"
else
warn "Disk image (dmg) only created for Release builds"
info "Building debug bundle"
"$DEPLOYQT" Barrier.app -use-debug-libs -no-strip || exit 1
"$DEPLOYQT" Barrier.app -no-strip \
-executable="$B_BARRIERC" \
-executable="$B_BARRIERS" || exit 1
success "Bundle created successfully"
fi

0 comments on commit 0deaaad

Please sign in to comment.