Skip to content

Commit

Permalink
Merge pull request #577 from machawk1/issue-576
Browse files Browse the repository at this point in the history
Only build universal binary if universal2 Python is available
  • Loading branch information
machawk1 authored Oct 4, 2024
2 parents 9eda87c + 5dae023 commit 3953b38
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 3953b38

Please sign in to comment.