Skip to content

Commit

Permalink
Update script to force x64 dep for canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
younglim authored Aug 22, 2024
1 parent df2adc6 commit 785d671
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/install_purple_dependencies.command
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ echo "Installing Node dependencies to $PWD"
npm install --force --omit=dev

# Add additional canvas dependency in x64 mode
if [ "$(uname -m)" = "arm64" ]; then
# Prepend node-mac-x64 to the PATH
export PATH="$PWD/nodejs-mac-x64/bin:$PATH"
arch -x86_64 npm install --force --omit=dev
if [ "$(uname -m)" = "arm64" ] && /usr/bin/pgrep oahd >/dev/null 2>&1; then
if [ -f package.json ]; then
export PATH="$(dirname "$PWD")/nodejs-mac-x64/bin:$PATH"
else
export PATH="$PWD/nodejs-mac-x64/bin:$PATH"
fi
arch -x86_64 npm install @napi-rs/[email protected] --force --omit=dev
fi

echo "Build TypeScript"
Expand Down

0 comments on commit 785d671

Please sign in to comment.