Permalink
Browse files

Fix application bundle creation on macOS to produce usable application

  • Loading branch information...
nohal committed Jan 10, 2018
1 parent b08d2c6 commit 014cb097f12adb4ec7989574761656b7c66cd438
Showing with 14 additions and 1 deletion.
  1. +14 −1 install/macosx/makedist.sh
View
@@ -33,7 +33,8 @@ FILES="-x $PROJECT_ROOT/output/wxFormBuilder.app/Contents/MacOS/wxformbuilder \
-x $PLUG_IN_PATH/libadditional.dylib \
-x $PLUG_IN_PATH/libcommon.dylib \
-x $PLUG_IN_PATH/libcontainers.dylib \
-x $PLUG_IN_PATH/liblayout.dylib"
-x $PLUG_IN_PATH/liblayout.dylib \
-x $PLUG_IN_PATH/libforms.dylib"
# these are 'old' contributions that were merged into the main
# wxWidgets repo after 2.9
@@ -51,3 +52,15 @@ if [ -f "$PLUG_IN_PATH/libwxadditions-mini.dylib" ]; then
fi
dylibbundler -od -b -d $PROJECT_ROOT/output/wxFormBuilder.app/Contents/libs/ $FILES
#Work around the likely bug in dylibbundler leading in copying two exemplars of the same dylib with different names instead of creating symlinks or changing the dependency name in the depending binaries
pushd $PROJECT_ROOT/output/wxFormBuilder.app/Contents/libs/
wx_version="$(wx-config --version|cut -c1-3)"
for lib in $(ls libwx_*.dylib); do
lib_basename="${lib%%\-*}"
if [[ "${lib}" != "${lib_basename}-${wx_version}.dylib" ]] && [ -f "${lib_basename}-${wx_version}.dylib" ]; then
rm -f "${lib_basename}-${wx_version}.dylib"
ln -sf "${lib}" "${lib_basename}-${wx_version}.dylib"
fi
done
popd > /dev/null

0 comments on commit 014cb09

Please sign in to comment.