summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-x[-rw-r--r--]build.sh29
1 files changed, 24 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index c9dd60f6..895094ba 100644..100755
--- a/build.sh
+++ b/build.sh
@@ -12,11 +12,30 @@ python3 -m venv env
# 3. Install the required packages
pip install -r continuedev/requirements.txt
-
pip install pyinstaller
-# 4. Call PyInstaller from within the virtual environment
-env/bin/pyinstaller run.spec
+# 4. Detect M1 architecture or allow manual override
+if [ "$1" = "m1" ]; then
+ echo "Building for M1 architecture"
+ SPEC_FILE="run.m1.spec"
+elif [ "$1" = "regular" ]; then
+ echo "Building for regular architecture"
+ SPEC_FILE="run.spec"
+else
+ ARCH=$(uname -m)
+ if [ "$ARCH" = "arm64" ]; then
+ echo "$ARCH architecture detected, using M1 spec file"
+ SPEC_FILE="run.m1.spec"
+ else
+ echo "$ARCH architecture detected, using regular spec file"
+ SPEC_FILE="run.spec"
+ fi
+fi
+
+echo "Using $SPEC_FILE"
+
+# 5. Call PyInstaller from within the virtual environment
+env/bin/pyinstaller $SPEC_FILE
-# 5. Deactivate the virtual environment
-deactivate \ No newline at end of file
+# 6. Deactivate the virtual environment
+deactivate