-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- universal binary included with build support
- Loading branch information
Showing
6 changed files
with
82 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/bin/bash | ||
|
||
# functions | ||
trash() { osascript -e "tell application \"Finder\" to delete POSIX file \"$(realpath "$1")\"" > /dev/null; } | ||
|
||
BUILD_DIR=./build/universal | ||
mkdir -p $BUILD_DIR | ||
BUILD_DIR=$(realpath $BUILD_DIR) | ||
BUILD_TMP_DIR=/tmp/autoarchive-build-universal-$(date +%s) | ||
PYTHON=/usr/bin/python3 | ||
export PATH=/usr/bin:$PATH | ||
|
||
# Hello | ||
echo "AutoArchive Universal Build Utility" | ||
|
||
if [ "$(arch)" == "arm64" ]; then | ||
echo "Running on arm64, switching to x86_64" | ||
arch -x86_64 $0 | ||
exit | ||
fi | ||
echo "Running on $(arch)" | ||
echo "Build Directory: $BUILD_DIR" | ||
|
||
echo "Copy to temporary directory: $BUILD_TMP_DIR" | ||
if [ -d "./build" ]; then | ||
trash ./build | ||
fi | ||
mkdir $BUILD_TMP_DIR | ||
cp -R ./ $BUILD_TMP_DIR | ||
echo "Move files to $BUILD_DIR" | ||
mkdir -p $BUILD_DIR | ||
mv $BUILD_TMP_DIR/* $BUILD_DIR/ | ||
cd $BUILD_DIR | ||
echo "Current Directory: $(pwd)" | ||
echo "Deleting obsolete files..." | ||
# if exist ./dist, ./test ./venv, delete them | ||
if [ -d "./dist" ]; then | ||
trash ./dist | ||
fi | ||
if [ -d "./test" ]; then | ||
trash ./test | ||
fi | ||
if [ -d "./venv" ]; then | ||
trash ./venv | ||
fi | ||
|
||
mkdir ./dist | ||
mkdir ./test | ||
|
||
echo "Creating virtual environment..." | ||
$PYTHON -m venv ./venv | ||
echo "Installing dependencies..." | ||
source ./venv/bin/activate | ||
pip install -r requirements.txt | ||
deactivate | ||
|
||
echo "Running Build Utility..." | ||
./build.sh | ||
|
||
echo "Build Utility complete." | ||
echo "Run 'cd ./build/universal' for next steps." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
py2app~=0.28.7 | ||
setuptools<70.0.0 | ||
wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters