diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..445510b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,31 @@ +[submodule "submodules/SDL_PSL1GHT"] + path = submodules/SDL_PSL1GHT + url = https://github.com/zeldin/SDL_PSL1GHT/ +[submodule "submodules/SDL2_PSL1GHT"] + branch = sdl2_master + path = submodules/SDL2_PSL1GHT + url = https://github.com/shagkur/SDL_PSL1GHT +[submodule "submodules/SDL_PSL1GHT_Libs"] + path = submodules/SDL_PSL1GHT_Libs + url = https://github.com/zeldin/SDL_PSL1GHT_Libs +[submodule "submodules/NoRSX"] + path = submodules/NoRSX + url = https://github.com/wargio/NoRSX +[submodule "submodules/ps3debugnet"] + path = submodules/ps3debugnet + url = https://github.com/sergiou87/ps3debugnet +[submodule "submodules/ps3soundlib"] + path = submodules/ps3soundlib + url = https://github.com/wargio/ps3soundlib +[submodule "submodules/tiny3d"] + path = submodules/tiny3d + url = https://github.com/wargio/tiny3d +[submodule "submodules/libunrar-ps3"] + path = submodules/libunrar-ps3 + url = https://github.com/bucanero/libunrar-ps3 +[submodule "submodules/libnfs"] + path = submodules/libnfs + url = https://github.com/sahlberg/libnfs +[submodule "submodules/libsmb2"] + path = submodules/libsmb2 + url = https://github.com/sahlberg/libsmb2 diff --git a/download.sh b/download.sh index 95b3d4b..dc39eaf 100755 --- a/download.sh +++ b/download.sh @@ -1,12 +1,26 @@ #!/bin/sh +submodule_options='--init --depth 1 --recursive --single-branch' + cd `dirname $0` + +if expr "$1" : submodules/ >/dev/null; then + test -d "$1"/.git -o -f "$1"/.git || exec git submodule update $submodule_options -- "$1" + exit +fi + cd archives || exit if [ $# -eq 0 ]; then + git submodule update $submodule_options sed -e 's:^.*/::g' < archives.txt | while read file; do ../download.sh "$file" || exit done + for i in ../submodules/*/download.sh; do + if [ -x "$i" ]; then + "$i" + fi + done exit fi diff --git a/scripts/013-sdl_psl1ght.sh b/scripts/013-sdl_psl1ght.sh index 2c0f439..a29dafa 100755 --- a/scripts/013-sdl_psl1ght.sh +++ b/scripts/013-sdl_psl1ght.sh @@ -2,10 +2,10 @@ # sdl_psl1ght.sh by Naomi Peori (naomi@peori.ca) ## Download the source code. -wget --no-check-certificate https://github.com/zeldin/SDL_PSL1GHT/tarball/master -O sdl_psl1ght.tar.gz +../download.sh submodules/SDL_PSL1GHT ## Unpack the source code. -rm -Rf sdl_psl1ght && mkdir sdl_psl1ght && tar --strip-components=1 --directory=sdl_psl1ght -xvzf sdl_psl1ght.tar.gz +rm -Rf sdl_psl1ght && mkdir sdl_psl1ght && git --git-dir=../submodules/SDL_PSL1GHT/.git --work-tree=sdl_psl1ght checkout-index -a ## Create the build directory. cd sdl_psl1ght diff --git a/scripts/014-sdl2_psl1ght.sh b/scripts/014-sdl2_psl1ght.sh index 6a160e0..b7b25de 100755 --- a/scripts/014-sdl2_psl1ght.sh +++ b/scripts/014-sdl2_psl1ght.sh @@ -2,10 +2,10 @@ # sdl_psl1ght.sh by Naomi Peori (naomi@peori.ca) ## Download the source code. -wget --no-check-certificate https://github.com/sergiou87/SDL2_PSL1GHT/tarball/master -O sdl2_psl1ght.tar.gz +../download.sh submodules/SDL2_PSL1GHT ## Unpack the source code. -rm -Rf sdl2_psl1ght && mkdir sdl2_psl1ght && tar --strip-components=1 --directory=sdl2_psl1ght -xvzf sdl2_psl1ght.tar.gz +rm -Rf sdl2_psl1ght && mkdir sdl2_psl1ght && git --git-dir=../submodules/SDL2_PSL1GHT/.git --work-tree=sdl2_psl1ght checkout-index -a ## Create the build directory. cd sdl2_psl1ght diff --git a/scripts/015-sdl_psl1ght_libs.sh b/scripts/015-sdl_psl1ght_libs.sh index e34f6a2..77c0f88 100755 --- a/scripts/015-sdl_psl1ght_libs.sh +++ b/scripts/015-sdl_psl1ght_libs.sh @@ -2,10 +2,18 @@ # sdl_psl1ght_libs.sh by Naomi Peori (naomi@peori.ca) ## Download the source code. -wget --no-check-certificate https://github.com/zeldin/SDL_PSL1GHT_Libs/tarball/master -O sdl_psl1ght_libs.tar.gz +../download.sh submodules/SDL_PSL1GHT_Libs ## Unpack the source code. -rm -Rf sdl_psl1ght_libs && mkdir sdl_psl1ght_libs && tar --strip-components=1 --directory=sdl_psl1ght_libs -xvzf sdl_psl1ght_libs.tar.gz +rm -Rf sdl_psl1ght_libs && mkdir sdl_psl1ght_libs && git --git-dir=../submodules/SDL_PSL1GHT_Libs/.git --work-tree=sdl_psl1ght_libs checkout-index -a + +## Use any already downloaded archives from submodules dir +for i in ../submodules/SDL_PSL1GHT_Libs/archives/*; do + case "$i" in + */archives.txt) ;; + *) [ -f "$i" ] && ln "$i" sdl_psl1ght_libs/archives/ ;; + esac +done ## Create the build directory. cd sdl_psl1ght_libs diff --git a/scripts/023-NoRSX.sh b/scripts/023-NoRSX.sh index ea0505d..46cffcd 100755 --- a/scripts/023-NoRSX.sh +++ b/scripts/023-NoRSX.sh @@ -2,10 +2,10 @@ # libNoRSX.sh by wargio (wargio@libero.it) ## Download the source code. -wget --no-check-certificate https://github.com/wargio/NoRSX/tarball/master -O NoRSX.tar.gz +../download.sh submodules/NoRSX ## Unpack the source code. -rm -Rf NoRSX && mkdir NoRSX && tar --strip-components=1 --directory=NoRSX -xvzf NoRSX.tar.gz && cd NoRSX +rm -Rf NoRSX && mkdir NoRSX && git --git-dir=../submodules/NoRSX/.git --work-tree=NoRSX checkout-index -a && cd NoRSX ## Compile and install. ${MAKE:-make} diff --git a/scripts/025-debugnet.sh b/scripts/025-debugnet.sh index 5ac56ef..71696c5 100755 --- a/scripts/025-debugnet.sh +++ b/scripts/025-debugnet.sh @@ -2,10 +2,10 @@ # debugnet.sh by Sergio Padrino (@sergiou87) ## Download the source code. -wget --no-check-certificate https://github.com/sergiou87/ps3debugnet/tarball/master -O ps3debugnet.tar.gz +../download.sh submodules/ps3debugnet ## Unpack the source code. -rm -Rf ps3debugnet && mkdir ps3debugnet && tar --strip-components=1 --directory=ps3debugnet -xvzf ps3debugnet.tar.gz +rm -Rf ps3debugnet && mkdir ps3debugnet && git --git-dir=../submodules/ps3debugnet/.git --work-tree=ps3debugnet checkout-index -a cd ps3debugnet/libdebugnet diff --git a/scripts/026-ps3soundlib.sh b/scripts/026-ps3soundlib.sh index 58882c4..b7f8c32 100755 --- a/scripts/026-ps3soundlib.sh +++ b/scripts/026-ps3soundlib.sh @@ -3,10 +3,10 @@ # PS3 SOUNDLIB Credits: Hermes, HACKERCHANNEL, Xiph.Org, mpg123 project and Wargio/deroad ## Download the source code. -wget --no-check-certificate https://github.com/wargio/ps3soundlib/tarball/master -O ps3soundlib.tar.gz +../download.sh submodules/ps3soundlib ## Unpack the source code. -rm -Rf ps3soundlib && mkdir ps3soundlib && tar --strip-components=1 --directory=ps3soundlib -xvzf ps3soundlib.tar.gz && cd ps3soundlib +rm -Rf ps3soundlib && mkdir ps3soundlib && git --git-dir=../submodules/ps3soundlib/.git --work-tree=ps3soundlib checkout-index -a && cd ps3soundlib ## Compile and install. ${MAKE:-make} diff --git a/scripts/027-tiny3d_libfont.sh b/scripts/027-tiny3d_libfont.sh index 610ac49..194d7ca 100755 --- a/scripts/027-tiny3d_libfont.sh +++ b/scripts/027-tiny3d_libfont.sh @@ -10,10 +10,10 @@ # Bucanero, CrystalCT, Miigotu, Shagkur, Wargio and Zeldin to update Tiny3D for GCC 7.2.0 ## Download the source code. -wget --no-check-certificate https://github.com/wargio/tiny3d/tarball/master -O tiny3d.tar.gz +../download.sh submodules/tiny3d ## Unpack the source code. -rm -Rf tiny3d && mkdir tiny3d && tar --strip-components=1 --directory=tiny3d -xvzf tiny3d.tar.gz && cd tiny3d +rm -Rf tiny3d && mkdir tiny3d && git --git-dir=../submodules/tiny3d/.git --work-tree=tiny3d checkout-index -a && cd tiny3d ## Compile and install. ${MAKE:-make} install -C lib --no-print-directory diff --git a/scripts/029-libunrar.sh b/scripts/029-libunrar.sh index e281539..6fc05e3 100755 --- a/scripts/029-libunrar.sh +++ b/scripts/029-libunrar.sh @@ -3,10 +3,10 @@ # unRAR library ported to PS3 by Bucanero ## Download the source code. -wget --no-check-certificate https://github.com/bucanero/libunrar-ps3/tarball/master -O libunrar.tar.gz +../download.sh submodules/libunrar-ps3 ## Unpack the source code. -rm -Rf libunrar && mkdir libunrar && tar --strip-components=1 --directory=libunrar -xvzf libunrar.tar.gz && cd libunrar +rm -Rf libunrar && mkdir libunrar && git --git-dir=../submodules/libunrar-ps3/.git --work-tree=libunrar checkout-index -a && cd libunrar ## Compile and install. ${MAKE:-make} install diff --git a/scripts/030-libnfs.sh b/scripts/030-libnfs.sh index fd18d9f..93a0939 100755 --- a/scripts/030-libnfs.sh +++ b/scripts/030-libnfs.sh @@ -4,10 +4,10 @@ # ported to PS3 by Bucanero ## Download the source code. -wget --no-check-certificate https://github.com/sahlberg/libnfs/tarball/master -O libnfs.tar.gz +../download.sh submodules/libnfs ## Unpack the source code. -rm -Rf libnfs && mkdir libnfs && tar --strip-components=1 --directory=libnfs -xvzf libnfs.tar.gz && cd libnfs +rm -Rf libnfs && mkdir libnfs && git --git-dir=../submodules/libnfs/.git --work-tree=libnfs checkout-index -a && cd libnfs ## Compile and install. ${MAKE:-make} -f ps3_ppu/Makefile.PS3_PPU install diff --git a/scripts/031-libsmb2.sh b/scripts/031-libsmb2.sh index e951f74..ed1c305 100755 --- a/scripts/031-libsmb2.sh +++ b/scripts/031-libsmb2.sh @@ -4,10 +4,10 @@ # ported to PS3 by Bucanero ## Download the source code. -wget --no-check-certificate https://github.com/sahlberg/libsmb2/tarball/master -O libsmb2.tar.gz +../download.sh submodules/libsmb2 ## Unpack the source code. -rm -Rf libsmb2 && mkdir libsmb2 && tar --strip-components=1 --directory=libsmb2 -xvzf libsmb2.tar.gz && cd libsmb2/lib +rm -Rf libsmb2 && mkdir libsmb2 && git --git-dir=../submodules/libsmb2/.git --work-tree=libsmb2 checkout-index -a && cd libsmb2/lib ## Compile and install. ${MAKE:-make} -f Makefile.PS3_PPU install diff --git a/submodules/NoRSX b/submodules/NoRSX new file mode 160000 index 0000000..95d79a6 --- /dev/null +++ b/submodules/NoRSX @@ -0,0 +1 @@ +Subproject commit 95d79a6ae8a800ad36040b836e896ff57fdd7052 diff --git a/submodules/SDL2_PSL1GHT b/submodules/SDL2_PSL1GHT new file mode 160000 index 0000000..b81fbad --- /dev/null +++ b/submodules/SDL2_PSL1GHT @@ -0,0 +1 @@ +Subproject commit b81fbad4489918f5ed9c9c052238d7a25da9bab9 diff --git a/submodules/SDL_PSL1GHT b/submodules/SDL_PSL1GHT new file mode 160000 index 0000000..641a8ca --- /dev/null +++ b/submodules/SDL_PSL1GHT @@ -0,0 +1 @@ +Subproject commit 641a8ca2efa3f775d489daa37878ada1d92c24ab diff --git a/submodules/SDL_PSL1GHT_Libs b/submodules/SDL_PSL1GHT_Libs new file mode 160000 index 0000000..5732608 --- /dev/null +++ b/submodules/SDL_PSL1GHT_Libs @@ -0,0 +1 @@ +Subproject commit 5732608d69e0e7f6fc9ac2b6af906c38ab1d9475 diff --git a/submodules/libnfs b/submodules/libnfs new file mode 160000 index 0000000..9a10e17 --- /dev/null +++ b/submodules/libnfs @@ -0,0 +1 @@ +Subproject commit 9a10e17800e37d709d906e71edbfd28fce763c5d diff --git a/submodules/libsmb2 b/submodules/libsmb2 new file mode 160000 index 0000000..ab91ef2 --- /dev/null +++ b/submodules/libsmb2 @@ -0,0 +1 @@ +Subproject commit ab91ef24632150b4fd12678b88c9523a1b695ca6 diff --git a/submodules/libunrar-ps3 b/submodules/libunrar-ps3 new file mode 160000 index 0000000..87b5d3f --- /dev/null +++ b/submodules/libunrar-ps3 @@ -0,0 +1 @@ +Subproject commit 87b5d3f81658d5280ae3fae64f69a4214bd6864e diff --git a/submodules/ps3debugnet b/submodules/ps3debugnet new file mode 160000 index 0000000..47c3644 --- /dev/null +++ b/submodules/ps3debugnet @@ -0,0 +1 @@ +Subproject commit 47c3644af08836109d6845afb2d3eeebdb8807de diff --git a/submodules/ps3soundlib b/submodules/ps3soundlib new file mode 160000 index 0000000..262ea20 --- /dev/null +++ b/submodules/ps3soundlib @@ -0,0 +1 @@ +Subproject commit 262ea20d4e4e3fb5d0aca8a60d09d631c0e17fb8 diff --git a/submodules/tiny3d b/submodules/tiny3d new file mode 160000 index 0000000..fe74e77 --- /dev/null +++ b/submodules/tiny3d @@ -0,0 +1 @@ +Subproject commit fe74e77643f6f968057d0e0c33185a372f14f4e9