mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Improvements to wiibuild.sh. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6431 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
82eedfb6fe
commit
81031df924
1 changed files with 35 additions and 3 deletions
|
@ -5,15 +5,38 @@ get_abs_path()
|
||||||
echo "$(cd "$1" && pwd)"
|
echo "$(cd "$1" && pwd)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_num_logical_cpus()
|
||||||
|
{
|
||||||
|
getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1
|
||||||
|
}
|
||||||
|
|
||||||
targets=( eduke32 mapster32 )
|
targets=( eduke32 mapster32 )
|
||||||
extensions=( ".dol" )
|
extensions=( ".dol" )
|
||||||
|
|
||||||
|
|
||||||
|
# Change directory to the eduke32 root:
|
||||||
|
|
||||||
sourcedir="$(dirname "${BASH_SOURCE[0]}")"
|
sourcedir="$(dirname "${BASH_SOURCE[0]}")"
|
||||||
sourcedir="$(get_abs_path "$sourcedir/..")"
|
sourcedir="$(get_abs_path "$sourcedir/..")"
|
||||||
|
|
||||||
pushd "${sourcedir}" >/dev/null
|
pushd "${sourcedir}" >/dev/null
|
||||||
|
|
||||||
|
|
||||||
|
# Set up PATH
|
||||||
|
|
||||||
|
p=${DEVKITPPC}/bin:${PATH}
|
||||||
|
|
||||||
|
pathstoremove=( "/mingw64/bin" )
|
||||||
|
|
||||||
|
for i in "${pathstoremove[@]}"; do
|
||||||
|
p=${p/:${i}/}
|
||||||
|
done
|
||||||
|
|
||||||
|
export PATH=${p}
|
||||||
|
|
||||||
|
|
||||||
# Detect versioning systems and pull the revision number:
|
# Detect versioning systems and pull the revision number:
|
||||||
|
|
||||||
export VC_REV=$(svn info 2> /dev/null | grep Revision | awk '{ print $2 }')
|
export VC_REV=$(svn info 2> /dev/null | grep Revision | awk '{ print $2 }')
|
||||||
vc=svn
|
vc=svn
|
||||||
if [ -z "$VC_REV" ]; then
|
if [ -z "$VC_REV" ]; then
|
||||||
|
@ -27,7 +50,10 @@ fi
|
||||||
|
|
||||||
date=$(date +%Y%m%d)
|
date=$(date +%Y%m%d)
|
||||||
|
|
||||||
make=( make PLATFORM=WII $* STRIP="" SDLCONFIG="" )
|
|
||||||
|
# Build:
|
||||||
|
|
||||||
|
make=( make PLATFORM=WII $* STRIP="" )
|
||||||
|
|
||||||
echo "${make[@]}"
|
echo "${make[@]}"
|
||||||
"${make[@]}"
|
"${make[@]}"
|
||||||
|
@ -40,7 +66,9 @@ for i in "${targets[@]}"; do
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# Package data:
|
# Package data:
|
||||||
|
|
||||||
mkdir -p apps
|
mkdir -p apps
|
||||||
|
|
||||||
for i in "${targets[@]}"; do
|
for i in "${targets[@]}"; do
|
||||||
|
@ -67,9 +95,13 @@ fi
|
||||||
|
|
||||||
ls -l -R apps
|
ls -l -R apps
|
||||||
|
|
||||||
|
cpus=$(get_num_logical_cpus)
|
||||||
|
|
||||||
rm -f "eduke32-wii-r${VC_REV}-debug-elf.7z"
|
rm -f "eduke32-wii-r${VC_REV}-debug-elf.7z"
|
||||||
rm -f "eduke32-wii-r${VC_REV}.7z"
|
rm -f "eduke32-wii-r${VC_REV}.7z"
|
||||||
7zr a -mx9 -ms=on -t7z "eduke32-wii-r${VC_REV}-debug-elf.7z" *.elf -xr!*.svn*
|
7zr a -mx9 -ms=on -t7z -m0=lzma2 -mmt${cpus} "eduke32-wii-r${VC_REV}-debug-elf.7z" *.elf -xr!*.svn*
|
||||||
7zr a -mx9 -ms=on -t7z "eduke32-wii-r${VC_REV}.7z" apps -xr!*.svn*
|
7zr a -mx9 -ms=on -t7z -m0=lzma2 -mmt${cpus} "eduke32-wii-r${VC_REV}.7z" apps -xr!*.svn*
|
||||||
|
|
||||||
|
# Clean up:
|
||||||
|
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
Loading…
Reference in a new issue