Skip to content

Commit

Permalink
fix issues in rebuild again
Browse files Browse the repository at this point in the history
  • Loading branch information
AMIR ABBAS committed Apr 9, 2023
1 parent 43a91c1 commit ddc8f95
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions nekoray_macos_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,35 @@ export LDFLAGS="-L/usr/local/opt/qt@5/lib"
export CPPFLAGS="-I/usr/local/opt/qt@5/include"
export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig"

bash build_deps_all.sh

# Build nekoray
nPath="$(pwd)/nekoray"
mkdir -p "$nPath/build"
nApp=$nPath/build/nekoray.app

# Create or clean build directory
if [ ! -d "$nPath/build" ]; then
mkdir -p "$nPath/build"
else

read -p "Do you want to clean 'build' and 'libs/deps' directories ? [y/n] " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi

rm -rf "$nPath/libs/deps"
rm -rf "$nPath/build"
mkdir -p "$nPath/build"
fi

# Get and Build dependencies
bash build_deps_all.sh

cd "$nPath/build"
rm -rf $nApp
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DNKR_PACKAGE_MACOS=1 ..
ninja

cd $nPath

nApp=$nPath/build/nekoray.app

# Deploy frameworks using macdeployqt
for arch in "amd64" "arm64"; do
macdeployqt "$nApp" -verbose=2
Expand Down Expand Up @@ -97,5 +112,6 @@ for arch in "amd64" "arm64"; do
zip -r "$nPath/build/nekoray_$arch.zip" "$nPath/build/nekoray_$arch.app"
done

echo "Build finished"
open .
echo "Build finished and output files are in $nPath/build"
cd "$nPath"
open "$nPath/build"

0 comments on commit ddc8f95

Please sign in to comment.