Skip to content

Commit

Permalink
Use proper installer under macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaleblian committed Jan 3, 2023
1 parent 0713c68 commit 3dc4b33
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 11 deletions.
4 changes: 3 additions & 1 deletion activate
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
source /opt/devkitpro/ndsvars.sh
#source /opt/devkitpro/ndsvars.sh
source ./ndsvars.sh

37 changes: 27 additions & 10 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ case $system in
esac

case $arch in
arm64)
arch=arm64
;;
aarch64)
arch=arm64
;;
Expand All @@ -50,21 +53,35 @@ esac

if [ $ext == pkg ] || [ $ext == deb ]
then
pacball=devkitpro-pacman.$arch.$ext
pacball=none
case $ext in
pkg)
pacball=devkitpro-pacman-installer.pkg
;;
deb)
pacball=devkitpro-pacman.$arch.deb
;;
esac

wget https://github.com/devkitPro/pacman/releases/download/v1.0.2/$pacball

if [ $system = Linux ]
then
case $system in
Darwin)
sudo installer -pkg $pacball -target /
;;
Linux)
sudo apt install wget gdebi-core -y
sudo gdebi -n devkitpro-pacman.$arch.deb
fi
;;
esac

sudo $pacman -S --noconfirm "$packages"
sudo $pacman -S --noconfirm $packages

rm $pacball
fi
if [ $mgr == pacman ]
then
echo 'For pacman-based systems, see DevkitPro online doc to add repos.'
sudo $pacman -S --noconfirm $packages
fi

# if [ $mgr == pacman ]
# then
# echo 'For pacman-native systems, see DevkitPro online doc to add repos.'
# sudo $pacman -S --noconfirm $packages
# fi
10 changes: 10 additions & 0 deletions ndsvars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
. /opt/devkitpro/devkitarm.sh

PORTLIBS_PREFIX=${PORTLIBS_ROOT}/nds
PATH=$PORTLIBS_PREFIX/bin:$PATH

export CFLAGS="-march=armv5te -mtune=arm946e-s -O2 -ffunction-sections -fdata-sections"
export CXXFLAGS="${CFLAGS}"
export CPPFLAGS="-D__NDS__ -DARM9 -I${PORTLIBS_PREFIX}/include -I${DEVKITPRO}/libnds/include"
export LDFLAGS="-L${PORTLIBS_PREFIX}/lib -L${DEVKITPRO}/libnds/lib"
export LIBS="-lnds9"

0 comments on commit 3dc4b33

Please sign in to comment.