Skip to content

Commit

Permalink
Merge pull request #39 from ales-erjavec/macos-arm64
Browse files Browse the repository at this point in the history
Bring changes connected to renaming arm orange and changing running to master
  • Loading branch information
ales-erjavec authored Nov 14, 2023
2 parents 383b666 + f097198 commit 6d9ab3b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ macos_arm64_dmg_task:
env:
REPO: https://github.com/biolab/orange3.git
BUILD_BRANCH: master
BUILD_COMMIT: 3.36.0
APP: "/Applications/Orange3.app"
BUILD_COMMIT: 3.36.1
APP: "/Applications/Orange.app"

PYTHON_VERSION: 3.9.12
PIP_PREFER_BINARY: "1"
Expand Down Expand Up @@ -45,7 +45,7 @@ macos_arm64_dmg_task:
test_script:
- mkdir -p ~/Applications
- mv -f $APP ~/Applications/
- APP=( ~/Applications/Orange3.app )
- APP=( ~/Applications/$(basename $APP) )
- $APP/Contents/MacOS/python --version
- $APP/Contents/MacOS/pip --version
- $APP/Contents/MacOS/pip freeze
Expand Down
14 changes: 8 additions & 6 deletions scripts/macos/arm64.patch
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
# Patch Orange startup script to force arm46 execution
--- a/Contents/MacOS/Orange
+++ b/Contents/MacOS/Orange
@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/arch -arm64 /bin/bash
@@ -1,2 +1,4 @@
#!/bin/bash
+
+export ARCHPREFERENCE=arm64

# Patch pip startup script to force arm46 execution
--- a/Contents/MacOS/pip
+++ b/Contents/MacOS/pip
@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/arch -arm64 /bin/bash
@@ -1,2 +1,4 @@
#!/bin/bash
+
+export ARCHPREFERENCE=arm64
9 changes: 6 additions & 3 deletions scripts/macos/create-dmg-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ echo "============================================="

mkdir -p "${TMP_TEMPLATE}"/

BASENAME=$(basename $APP)
echo "Copying the app ${BASENAME}"

# Copy the .app directory in place
cp -a "${APP}" "${TMP_TEMPLATE}"/Orange3.app
cp -a "${APP}" "${TMP_TEMPLATE}"/"${BASENAME}"

mkdir -p "$(dirname "${DMG}")"

Expand All @@ -79,8 +82,8 @@ create-dmg \
--window-size 400 244 \
--icon-size 75 \
--text-size 12 \
--hide-extension "Orange3.app" \
--icon "Orange3.app" 95 125 \
--hide-extension "${BASENAME}" \
--icon "${BASENAME}" 95 125 \
--app-drop-link 305 125 \
${EXTRA_DS_STORE[*]} \
"${DMG}" \
Expand Down
Binary file modified scripts/macos/dmg-resources/DS_Store
Binary file not shown.

0 comments on commit 6d9ab3b

Please sign in to comment.