Skip to content

Commit

Permalink
QT prefix to use homebrew
Browse files Browse the repository at this point in the history
build script updates
  • Loading branch information
Snider committed Feb 10, 2023
1 parent 15e0394 commit fc3a837
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ clean:
rm -rf build

macos-gui:
bash ./utils/build_script_mac_osx.sh
bash ./utils/build/testnet_mac_osx_gui.sh

tags:
ctags -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ src contrib tests/gtest
Expand Down
2 changes: 2 additions & 0 deletions utils/build/extras/macos/fix_boost_libs_path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ function fix_boost_libs_in_binary() # $1 - path to boost libs, $2 - binary to fi

function fix_boost_libs_in_libs() # $1 - path to boost libs, $2 - path to libs folder
{
cp $2/libboost_thread-mt.dylib $2/libboost_thread.dylib
cp $2/libboost_locale-mt.dylib $2/libboost_locale.dylib
install_name_tool -change libboost_system.dylib $1/libboost_system.dylib $2/libboost_filesystem.dylib
install_name_tool -change libboost_system.dylib $1/libboost_system.dylib $2/libboost_thread.dylib
install_name_tool -change libboost_system.dylib $1/libboost_system.dylib $2/libboost_chrono.dylib
Expand Down
9 changes: 0 additions & 9 deletions utils/build/testnet_mac_osx_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ read version_str <<< $(./src/letheand --version | awk '/^Lethean/ { print $2 }')
version_str=${version_str}
echo $version_str


echo "############### Prepearing archive... ################"
mkdir package_folder
if [ $? -ne 0 ]; then
echo "Failed to zip app"
exit 1
fi


package_filename=${ARCHIVE_NAME_PREFIX}${version_str}.tar.bz2

rm -f ./$package_filename
Expand Down
10 changes: 6 additions & 4 deletions utils/build/testnet_mac_osx_gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ARCHIVE_NAME_PREFIX=${ARCHIVE_NAME_PREFIX}testnet-

rm -rf build; mkdir -p build/release; cd build/release;

cmake $testnet_def -D OPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -D CMAKE_OSX_SYSROOT=$CMAKE_OSX_SYSROOT -D BUILD_GUI=TRUE -D CMAKE_PREFIX_PATH="$ZANO_QT_PATH/clang_64" -D CMAKE_BUILD_TYPE=Release -D BOOST_ROOT="$ZANO_BOOST_ROOT" -D BOOST_LIBRARYDIR="$ZANO_BOOST_LIBS_PATH" ../..
cmake $testnet_def -D OPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -D CMAKE_OSX_SYSROOT=$CMAKE_OSX_SYSROOT -D BUILD_GUI=TRUE -D CMAKE_PREFIX_PATH="$ZANO_QT_PATH" -D CMAKE_BUILD_TYPE=Release -D BOOST_ROOT="$ZANO_BOOST_ROOT" -D BOOST_LIBRARYDIR="$ZANO_BOOST_LIBS_PATH" ../..
if [ $? -ne 0 ]; then
echo "Failed to cmake"
exit 1
Expand Down Expand Up @@ -72,15 +72,17 @@ if [ $? -ne 0 ]; then
fi

# fix boost libs paths in main executable and libs to workaround El Capitan's SIP restrictions
source ../../../utils/macosx_fix_boost_libs_path.sh

source $(pwd)/../../../utils/build/extras/macos/fix_boost_libs_path.sh

fix_boost_libs_in_binary @executable_path/../Frameworks/boost_libs Lethean.app/Contents/MacOS/Lethean
fix_boost_libs_in_binary @executable_path/../Frameworks/boost_libs Lethean.app/Contents/MacOS/simplewallet
fix_boost_libs_in_binary @executable_path/../Frameworks/boost_libs Lethean.app/Contents/MacOS/letheand
fix_boost_libs_in_libs @executable_path/../Frameworks/boost_libs Lethean.app/Contents/Frameworks/boost_libs



"$ZANO_QT_PATH/clang_64/bin/macdeployqt" Lethean.app
"$ZANO_QT_PATH/bin/macdeployqt" Lethean.app
if [ $? -ne 0 ]; then
echo "Failed to macdeployqt Lethean.app"
exit 1
Expand All @@ -100,7 +102,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

codesign -s "Developer ID Application: Lethean Limited" --timestamp --options runtime -f --entitlements ../../../utils/macos_entitlements.plist --deep ./Lethean.app
codesign -s "Developer ID Application: Lethean LTD (W2DNA5L5DY)" --timestamp --options runtime -f --entitlements ../../../utils/build/extras/macos/entitlements.plist --deep ./Lethean.app
if [ $? -ne 0 ]; then
echo "Failed to sign Lethean.app"
exit 1
Expand Down

0 comments on commit fc3a837

Please sign in to comment.