From 573c7f6561c064479bf0bb24050d2f6ed95dc882 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Mon, 7 Nov 2016 17:33:34 +0100 Subject: [PATCH 1/2] (WIIU) add a packaging script. --- dist-scripts/wiiu-cores.sh | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 dist-scripts/wiiu-cores.sh diff --git a/dist-scripts/wiiu-cores.sh b/dist-scripts/wiiu-cores.sh new file mode 100755 index 0000000000..630820339f --- /dev/null +++ b/dist-scripts/wiiu-cores.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +RARCH_VERSION=1.3.6 + +platform=wiiu +EXT=a + +mkdir -p ../pkg/wiiu/wiiu/apps/ + +make -C ../ -f Makefile.${platform} clean || exit 1 + +gen_meta_xml() +{ + info="$1"_libretro.info + if [ -e $info ] ; then + display_name=`cat $info | grep "display_name = " | sed "s/display_name = \"//" | sed s/\"//` + corename=`cat $info | grep "corename = " | sed "s/corename = \"//" | sed s/\"//` + authors=`cat $info | grep "authors = " | sed "s/authors = \"//" | sed s/\"// | sed s/\|/\ -\ /g` + echo '' > "$libretro"_meta.xml + echo '' >> "$libretro"_meta.xml + echo ' '$corename'' >> "$libretro"_meta.xml + echo ' '$authors'' >> "$libretro"_meta.xml + echo ' 1.36' >> "$libretro"_meta.xml + echo ' '`date +%Y%m%d%H%M%S`'' >> "$libretro"_meta.xml + echo ' RetroArch' >> "$libretro"_meta.xml + echo ' '$display_name'' >> "$libretro"_meta.xml + echo '' >> "$libretro"_meta.xml + fi +} + +for f in `ls -v *_${platform}.${EXT}`; do + name=`echo "$f" | sed "s/\(_libretro_${platform}\|\).${EXT}$//"` + whole_archive= + + if [ $name = "nxengine" ] ; then + echo "Applying whole archive linking..." + whole_archive="WHOLE_ARCHIVE_LINK=1" + fi + + echo "-- Building core: $name --" + cp -f "$f" ../libretro_${platform}.${EXT} + echo NAME: $name + + # Compile core + make -C ../ -f Makefile.${platform} LIBRETRO=$name $whole_archive -j3 || exit 1 + mkdir -p ../pkg/wiiu/wiiu/apps/${name}_libretro + mv -f ../retroarch_wiiu.elf ../pkg/wiiu/wiiu/apps/${name}_libretro/${name}_libretro.elf + + gen_meta_xml $name + if [ -e $info ] ; then + mv -f "$libretro"_meta.xml ../pkg/wiiu/wiiu/apps/${name}_libretro/meta.xml + else + cp -f ../pkg/wiiu/meta.xml ../pkg/wiiu/wiiu/apps/${name}_libretro/meta.xml + fi + if [ -e $name.png ] ; then + cp -f $name.png ../pkg/wiiu/wiiu/apps/${name}_libretro/icon.png + else + cp -f ../pkg/wiiu/icon.png ../pkg/wiiu/wiiu/apps/${name}_libretro/icon.png + fi +done + +# Additional build step From 83d79fadab4ca0456d994a6d791c7ccfa8aaa874 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Mon, 7 Nov 2016 19:39:26 +0100 Subject: [PATCH 2/2] (WiiU) dist-script: add usage instructions. --- dist-scripts/wiiu-cores.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dist-scripts/wiiu-cores.sh b/dist-scripts/wiiu-cores.sh index 630820339f..e205873c53 100755 --- a/dist-scripts/wiiu-cores.sh +++ b/dist-scripts/wiiu-cores.sh @@ -1,5 +1,10 @@ #!/bin/sh +# usage: +# copy core libs (*_libretro_wiiu.a), info files (https://github.com/libretro/libretro-super/tree/master/dist/info) +# and icons (https://github.com/libretro/retroarch-assets/tree/master/pkg/wiiu) to this directory then run +# the script. the output will be in retroarch/pkg/wiiu + RARCH_VERSION=1.3.6 platform=wiiu @@ -20,7 +25,7 @@ gen_meta_xml() echo '' >> "$libretro"_meta.xml echo ' '$corename'' >> "$libretro"_meta.xml echo ' '$authors'' >> "$libretro"_meta.xml - echo ' 1.36' >> "$libretro"_meta.xml + echo ' '$RARCH_VERSION'' >> "$libretro"_meta.xml echo ' '`date +%Y%m%d%H%M%S`'' >> "$libretro"_meta.xml echo ' RetroArch' >> "$libretro"_meta.xml echo ' '$display_name'' >> "$libretro"_meta.xml