Merge pull request #151 from fr500/master

Fixes to PSP script
This commit is contained in:
Twinaphex 2014-12-18 01:16:20 +01:00
commit d1ae50dbc1
5 changed files with 254 additions and 16 deletions

View File

@ -12,6 +12,7 @@ echo "Setting up Environment for $1"
echo ============================================
ORIGPATH=$PATH
WORK=$PWD
echo Original PATH: $PATH
@ -397,7 +398,7 @@ while read line; do
ARGS="${ARGS%"${ARGS##*[![:space:]]}"}"
echo ARGS: $ARGS
echo ARGS: $ARGS
echo
echo
@ -451,18 +452,18 @@ while read line; do
then
BUILD="NO"
else
BUILD="YES"
BUILD="YES"
fi
cd ..
else
echo "cloning repo..."
git clone "$URL" "$DIR"
git clone "$URL" "$DIR" --depth=1
cd $DIR
git checkout $TYPE
cd ..
BUILD="YES"
fi
fi
elif [ "${TYPE}" == "SUBMODULE" ];
then
@ -514,27 +515,252 @@ while read line; do
PREVCORE=$NAME
PREVBUILD=$BUILD
done < $1
echo "Building RetroArch"
echo ============================================
cd $WORK
BUILD=""
if [ "${PLATFORM}" == "psp1" ];
then
cd retroarch
git pull
rm -rfv psp1/pkg/
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR/* .
sh ./psp1-cores.sh
while read line; do
NAME=`echo $line | cut --fields=1 --delimiter=" "`
DIR=`echo $line | cut --fields=2 --delimiter=" "`
URL=`echo $line | cut --fields=3 --delimiter=" "`
TYPE=`echo $line | cut --fields=4 --delimiter=" "`
ENABLED=`echo $line | cut --fields=5 --delimiter=" "`
SUBDIR=`echo $line | cut --fields=8 --delimiter=" "`
if [ "${ENABLED}" == "YES" ];
then
echo "Processing $NAME"
echo ============================================
echo NAME: $NAME
echo DIR: $DIR
echo SUBDIR: $SUBDIR
echo URL: $URL
echo REPO TYPE: $TYPE
echo ENABLED: $ENABLED
ARGS=""
TEMP=`echo $line | cut --fields=9 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut --fields=10 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut --fields=11 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut --fields=12 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut --fields=13 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut --fields=14 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${ARGS} ${TEMP}"
fi
ARGS="${ARGS%"${ARGS##*[![:space:]]}"}"
echo ARGS: $ARGS
if [ -d "${DIR}/.git" ];
then
cd $DIR
echo "pulling from repo... "
OUT=`git pull`
echo $OUT
if [[ $OUT == *"Already up-to-date"* ]]
then
BUILD="NO"
else
BUILD="YES"
fi
cd ..
else
echo "cloning repo..."
git clone "$URL" "$DIR" --depth=1
cd $DIR
BUILD="YES"
cd ..
fi
fi
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ];
then
cd $DIR
rm -rfv psp1/pkg/
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR/* .
sh ./psp1-cores.sh
fi
done < $1.ra
fi
if [ "${PLATFORM}" == "ndk" ];
then
while read line; do
NAME=`echo $line | cut --fields=1 --delimiter=" "`
DIR=`echo $line | cut --fields=2 --delimiter=" "`
URL=`echo $line | cut --fields=3 --delimiter=" "`
TYPE=`echo $line | cut --fields=4 --delimiter=" "`
ENABLED=`echo $line | cut --fields=5 --delimiter=" "`
PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "`
if [ "${ENABLED}" == "YES" ];
then
echo "Processing $NAME"
echo ============================================
echo NAME: $NAME
echo DIR: $DIR
echo PARENT: $PARENTDIR
echo URL: $URL
echo REPO TYPE: $TYPE
echo ENABLED: $ENABLED
ARGS=""
TEMP=`echo $line | cut --fields=9 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut --fields=10 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut --fields=11 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut --fields=12 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut --fields=13 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut --fields=14 --delimiter=" "`
if [ -n ${TEMP} ];
then
ARGS="${ARGS} ${TEMP}"
fi
ARGS="${ARGS%"${ARGS##*[![:space:]]}"}"
echo ARGS: $ARGS
if [ -d "${PARENTDIR}/${DIR}/.git" ];
then
cd $PARENTDIR
cd $DIR
echo "pulling from repo... "
OUT=`git pull`
echo $OUT
if [ "${TYPE}" == "PROJECT" ];
then
RADIR=$DIR
if [[ $OUT == *"Already up-to-date"* ]]
then
BUILD="NO"
else
BUILD="YES"
fi
fi
cd $WORK
else
echo "cloning repo..."
cd $PARENTDIR
git clone "$URL" "$DIR" --depth=1
cd $DIR
if [ "${TYPE}" == "PROJECT" ];
then
BUILD="YES"
fi
cd $WORK
fi
fi
echo
echo
done < $1.ra
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ];
then
echo "Compiling Shaders"
echo ============================================
cd $RADIR
$MAKE -f Makefile.griffin shaders-convert-glsl PYTHON3=$PYTHON
echo "Processing Assets"
echo ============================================
rm -Rv android/phoenix/assets/overlays
cp -Rv media/overlays android/phoenix/assets/
rm -Rv android/phoenix/assets/shaders_glsl
cp -Rv media/shaders_glsl android/phoenix/assets/
rm -Rv android/phoenix/assets/autoconfig
cp -Rv media/autoconfig android/phoenix/assets/
rm -Rv android/phoenix/assets/info
cp -Rv $RARCH_DIR/info android/phoenix/assets/
echo "Building"
echo ============================================
cd android/phoenix
rm bin/*.apk
android.bat update project --path . --target android-21
android.bat update project --path libs/googleplay --target android-21
android.bat update project --path libs/appcompat --target android-21
ant clean
ant debug
fi
fi
PATH=$ORIGPATH

View File

@ -0,0 +1,7 @@
ANDROID_HOME /c/Toolchains/android/
NDK_ROOT /c/Toolchains/android/ndk/
ANDROID_NDK /c/Toolchains/android/ndk/
PATH /c/Toolchains/android/ant/bin:/c/Toolchains/android/ndk:/c/Toolchains/android/tools:/c/Toolchains/jdk/bin:/c/Toolchains/tools/cg/bin
PLATFORM ndk
MAKE make
PYTHON /c/Toolchains/python3/python.exe

View File

@ -0,0 +1,4 @@
retroarch retroarch https://github.com/libretro/Retroarch.git PROJECT YES .
overlays overlays https://github.com/libretro/common-overlays.git ASSETS YES retroarch/media
shaders shaders_cg https://github.com/libretro/common-shaders.git ASSETS YES retroarch/media
autoconfig autoconfig https://github.com/libretro/retroarch-joypad-autoconfig.git ASSETS YES retroarch/media

View File

@ -1,4 +1,4 @@
PATH /c/Toolchains/pspsdk/bin
PATH /c/Toolchains/devkitPro/devkitPSP/bin/
platform psp1
CC psp-gcc
CXX psp-g++

View File

@ -0,0 +1 @@
retroarch retroarch https://github.com/libretro/Retroarch.git PROJECT YES .