Skip to content

Commit

Permalink
Only build universal binary if universal2 Python is available
Browse files Browse the repository at this point in the history
Closes #576
  • Loading branch information
machawk1 committed Oct 4, 2024
1 parent 9eda87c commit 5dae023
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bundledApps/MAKEFILE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,16 @@ createBinary ()
{
echo "Creating binary"
which pyinstaller
pyinstaller -p bundledApps ./bundledApps/WAIL.py --onefile --windowed --clean --target-arch universal2 --icon="./build/icons/wail_blue.icns"

# Only specify the universal2 flag if an appropriate Python is installed, otherwise use default
if file `which python3` | grep 'universal'; then
echo "🌌 Building universal binary"
archflag=(--target-arch universal2)
else
echo "🍎 Building native single-architecture binary"
fi

pyinstaller -p bundledApps ./bundledApps/WAIL.py --onefile --windowed --clean "${archflag[@]}" --icon="./build/icons/wail_blue.icns"
# Replace default version and icon information from pyinstaller
cp ./build/Info.plist ./dist/WAIL.app/Contents/Info.plist
# Copy the bundledApps and support directories to inside WAIL.app/
Expand Down

0 comments on commit 5dae023

Please sign in to comment.