OPENDINGUX: Rework build_odbeta.sh to avoid environment variables

This commit is contained in:
Le Philousophe 2021-11-11 11:33:44 +01:00
parent 2814a42605
commit 724dcd36e9
2 changed files with 20 additions and 11 deletions

View File

@ -6,12 +6,12 @@ Running Linux on an x86/amd64 machine:
2. git clone the ScummVM repository
3. Run 'target=x backends/platform/sdl/opendingux/build_odbeta.sh'
3. Run 'backends/platform/sdl/opendingux/build_odbeta.sh x'
where x=gcw0|lepus|rg99
Or if you want a dual opk with one launcher capable of starting games directly
for e.g. simplemenu integration :
'target=x dualopk=yes backends/platform/sdl/opendingux/build_odbeta.s'
'backends/platform/sdl/opendingux/build_odbeta.sh x dualopk'
4. Copy the resulting file scummvm_$(target).opk or scummvm_$(target)_dual.opk to your device

View File

@ -1,37 +1,46 @@
#!/bin/bash
CONFIG="./configure --host=opendingux-$target --enable-release --disable-detection-full"
set -e
target=$1
if [ "$2" = "dualopk" ]; then
dualopk="dualopk=yes"
else
dualopk=
fi
case $target in
gcw0)
target2=$target
libc=uclibc
;;
lepus)
target2=$target
libc=musl
;;
rg99)
target2=rs90
libc=musl
;;
*)
echo "please provide a valid target for the build: gcw0, lepus or rg99"
exit 0
exit 1
;;
esac
TOOLCHAIN=/opt/$target2-toolchain
if [ $target == "gcw0" ]; then
SYSROOT=$TOOLCHAIN/mipsel-$target2-linux-uclibc
else
SYSROOT=$TOOLCHAIN/mipsel-$target2-linux-musl
fi
SYSROOT=$TOOLCHAIN/mipsel-$target2-linux-$libc
export PATH=$TOOLCHAIN/usr/bin:$SYSROOT/usr/include:$TOOLCHAIN/bin:$PATH
export CXX=mipsel-linux-g++
export CXXFLAGS="-funsigned-char" # workaround for a scummvm tolower() bug when adding games
$CONFIG && make -j12 od-make-opk && ls -lh scummvm_$target*.opk
./configure --host=opendingux-$target --enable-release --disable-detection-full
make -j12 od-make-opk $dualopk
ls -lh scummvm_$target*.opk