mirror of
https://github.com/libretro/RetroArch
synced 2025-02-14 06:40:48 +00:00
Merge pull request #50 from lifning/master
Updates to Pandora build scripts, config files, and launchers, plus exorcised SNESisms out of retroarch-zip script.
This commit is contained in:
commit
b78482d3c5
@ -11,10 +11,10 @@ all: $(BINDIR)/retroarch
|
||||
|
||||
pnd: retroarch.pnd
|
||||
|
||||
install: all $(BINDIR)/retroarch-joyconfig $(PNDDIR)/readme.html
|
||||
install: all $(BINDIR)/retroarch-joyconfig $(BINDIR)/retroarch-zip $(PNDDIR)/readme.html
|
||||
|
||||
retroarch:
|
||||
./configure --prefix=$PND_BASEDIR/$PRJ --disable-ffmpeg --disable-cg --disable-xml --disable-python --disable-libpng --disable-pulse --disable-opengl
|
||||
./configure --prefix=$PND_BASEDIR/$PRJ --disable-ffmpeg --disable-cg --disable-python --disable-libpng --disable-pulse --disable-jack --enable-gles --enable-xml
|
||||
make -f Makefile
|
||||
|
||||
$(BINDIR)/retroarch: retroarch
|
||||
@ -25,6 +25,10 @@ $(BINDIR)/retroarch-joyconfig: tools/retroarch-joyconfig
|
||||
mkdir -p $(BINDIR)
|
||||
cp tools/retroarch-joyconfig $(BINDIR)/retroarch-joyconfig
|
||||
|
||||
$(BINDIR)/retroarch-zip: retroarch-zip
|
||||
mkdir -p $(BINDIR)
|
||||
cp retroarch-zip $(BINDIR)/retroarch-zip
|
||||
|
||||
$(PNDDIR)/readme.html: README.md
|
||||
markdown README.md > $(PNDDIR)/readme.html
|
||||
|
||||
|
@ -2,14 +2,47 @@
|
||||
<PXML xmlns="http://openpandora.org/namespaces/PXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PXML_schema.xsd">
|
||||
<!-- please see http://pandorawiki.org/PXML_specification for more information before editing, and remember the order does matter -->
|
||||
|
||||
<application id="retroarch-retroarch-3237" appdata="retroarch">
|
||||
<exec command="scripts/retroarch.sh"/>
|
||||
<title lang="en_US">RetroArch</title>
|
||||
|
||||
|
||||
<package id="retroarch.lifning.001">
|
||||
|
||||
<author name="lifning" website="http://libretro.org/"/>
|
||||
<version major="0" minor="9" release="6" build="4"/> <!--This programs version-->
|
||||
<osversion major="1" minor="0" release="0" build="0"/> <!--The minimum OS version required-->
|
||||
|
||||
<version major="0" minor="9" release="7" build="2" type="beta"/>
|
||||
|
||||
<titles>
|
||||
<title lang="en_US">RetroArch</title>
|
||||
</titles>
|
||||
|
||||
<descriptions>
|
||||
<description lang="en_US">RetroArch is a modular multi-system emulator system that is designed to be fast, lightweight, and portable.</description>
|
||||
</descriptions>
|
||||
|
||||
<icon src="icon.png"/>
|
||||
|
||||
</package>
|
||||
|
||||
|
||||
|
||||
<application id="retroarch.lifning.001" appdata="retroarch">
|
||||
|
||||
<exec command="scripts/retroarch.sh"/>
|
||||
|
||||
<author name="Themaister" website="http://themaister.net/retroarch.html"/>
|
||||
|
||||
<version major="0" minor="9" release="7" build="1"/>
|
||||
<osversion major="1" minor="0" release="0" build="0"/>
|
||||
|
||||
<titles>
|
||||
<title lang="en_US">RetroArch</title>
|
||||
</titles>
|
||||
<!-- pre HF6 compatibility: -->
|
||||
<title lang="en_US">RetroArch</title>
|
||||
|
||||
<descriptions>
|
||||
<description lang="en_US">Frontend to libretro</description>
|
||||
</descriptions>
|
||||
<!-- pre HF6 compatibility: -->
|
||||
<description lang="en_US">Frontend to libretro</description>
|
||||
|
||||
<icon src="icon.png"/>
|
||||
@ -20,6 +53,43 @@
|
||||
|
||||
<info name="RetroArch documentation" type="text/html" src="/mnt/utmp/retroarch/readme.html"/>
|
||||
|
||||
<categories>
|
||||
<!-- http://standards.freedesktop.org/menu-spec/latest/apa.html -->
|
||||
<category name="Game">
|
||||
<subcategory name="Emulator"/>
|
||||
</category>
|
||||
</categories>
|
||||
</application>
|
||||
|
||||
|
||||
|
||||
<application id="retroarch.lifning.002" appdata="retroarch">
|
||||
|
||||
<exec command="scripts/retroarch-phoenix.sh"/>
|
||||
|
||||
<author name="Themaister" website="http://themaister.net/retroarch.html"/>
|
||||
|
||||
<version major="0" minor="9" release="7" build="1"/>
|
||||
<osversion major="1" minor="0" release="0" build="0"/>
|
||||
|
||||
<titles>
|
||||
<title lang="en_US">RetroArch-Phoenix</title>
|
||||
</titles>
|
||||
<!-- pre HF6 compatibility: -->
|
||||
<title lang="en_US">RetroArch-Phoenix</title>
|
||||
|
||||
<descriptions>
|
||||
<description lang="en_US">Frontend to frontend to libretro</description>
|
||||
</descriptions>
|
||||
<!-- pre HF6 compatibility: -->
|
||||
<description lang="en_US">Frontend to frontend to libretro</description>
|
||||
|
||||
<icon src="icon.png"/>
|
||||
|
||||
<previewpics>
|
||||
<pic src="previews/retroarch-phoenix.png"/>
|
||||
</previewpics>
|
||||
|
||||
<categories>
|
||||
<!-- http://standards.freedesktop.org/menu-spec/latest/apa.html -->
|
||||
<category name="Game">
|
||||
@ -29,4 +99,6 @@
|
||||
|
||||
</application>
|
||||
|
||||
|
||||
|
||||
</PXML>
|
||||
|
BIN
pandora/previews/retroarch-phoenix.png
Normal file
BIN
pandora/previews/retroarch-phoenix.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
Binary file not shown.
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 28 KiB |
2
pandora/retroarch/phoenix.cfg
Normal file
2
pandora/retroarch/phoenix.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
config_path = "/mnt/utmp/retroarch/retroarch/retroarch.cfg"
|
||||
retroarch_path = "/mnt/utmp/retroarch/bin/retroarch"
|
@ -19,7 +19,7 @@ savestate_directory = /mnt/utmp/retroarch/retroarch
|
||||
# Load libretro from a dynamic location for dynamically built RetroArch.
|
||||
# This option is mandatory.
|
||||
# On Pandora, it's usually overridden by the launcher script.
|
||||
libretro_path = "/mnt/utmp/retroarch/lib/libretro-fceumm.so"
|
||||
libretro_path = "/mnt/utmp/retroarch/lib/libretro-fceu.so"
|
||||
|
||||
# Environment variables internally in RetroArch.
|
||||
# Implementations can tap into this user-specificed information to enable functionality
|
||||
@ -37,8 +37,7 @@ system_directory = /mnt/utmp/retroarch/
|
||||
#### Video
|
||||
|
||||
# Video driver to use. "gl", "xvideo", "sdl" or "ext" (external API driver)
|
||||
# On Pandora, "xvideo" and "sdl" are available, and "sdl" is preferred
|
||||
# if using notaz's SDL omapdss.
|
||||
# On Pandora, "sdl" is preferred if using notaz's SDL omapdss.
|
||||
video_driver = "sdl"
|
||||
|
||||
# Path to external video driver using the RetroArch driver API.
|
||||
@ -61,9 +60,6 @@ video_fullscreen = false
|
||||
# Force 16-bit colors. Apparently some video cards in use today have troubles with 32-bit ...
|
||||
#video_force_16bit = true
|
||||
|
||||
# Forcibly disable composition. Only works in Windows Vista/7 for now.
|
||||
# video_disable_composition = false
|
||||
|
||||
# Video vsync.
|
||||
#video_vsync = false
|
||||
|
||||
@ -86,14 +82,10 @@ video_aspect_ratio_auto = true
|
||||
# Forces cropping of overscanned frames. Crops away top 7 scanlines and 8 bottom scanlines. (15/15 for interlaced frames).
|
||||
# video_crop_overscan = false
|
||||
|
||||
# Path to Cg shader.
|
||||
# video_cg_shader = "/path/to/cg/shader.cg"
|
||||
|
||||
# Path to bSNES XML shader (GLSL only). If both Cg shader path and XML shader path are defined,
|
||||
# Cg shader will take priority unless overridden in video_shader_type.
|
||||
# Path to bSNES XML shader (GLSL only).
|
||||
# video_bsnes_shader = "/path/to/bsnes/xml/shader.shader"
|
||||
|
||||
# Which shader type to use. Valid values are "cg", "bsnes", "none" and "auto"
|
||||
# Which shader type to use. Valid values are "bsnes", "none" and "auto"
|
||||
# video_shader_type = auto
|
||||
|
||||
# Defines a directory where XML shaders are kept.
|
||||
@ -209,23 +201,23 @@ input_player1_left = left
|
||||
input_player1_right = right
|
||||
input_player1_up = up
|
||||
input_player1_down = down
|
||||
# input_player1_l2 =
|
||||
# input_player1_r2 =
|
||||
# input_player1_l3 =
|
||||
# input_player1_r3 =
|
||||
input_player1_l2 = num1
|
||||
input_player1_r2 = backspace
|
||||
input_player1_l3 = e
|
||||
input_player1_r3 = i
|
||||
|
||||
# Two analog sticks (DualShock-esque).
|
||||
# Bound as usual, however, if a real analog axis is bound,
|
||||
# it can be read as a true analog.
|
||||
# Positive X axis is right, Positive Y axis is down.
|
||||
# input_player1_l_x_plus =
|
||||
# input_player1_l_x_minus =
|
||||
# input_player1_l_y_plus =
|
||||
# input_player1_l_y_minus =
|
||||
# input_player1_r_x_plus =
|
||||
# input_player1_r_x_minus =
|
||||
# input_player1_r_y_plus =
|
||||
# input_player1_r_y_minus =
|
||||
input_player1_l_x_plus_axis = +0
|
||||
input_player1_l_x_minus_axis = -0
|
||||
input_player1_l_y_plus_axis = +1
|
||||
input_player1_l_y_minus_axis = -1
|
||||
input_player1_r_x_plus_axis = +2
|
||||
input_player1_r_x_minus_axis = -2
|
||||
input_player1_r_y_plus_axis = +3
|
||||
input_player1_r_y_minus_axis = -3
|
||||
|
||||
# If desired, it is possible to override which joypads are being used for player 1 through 5. First joypad available is 0.
|
||||
# input_player1_joypad_index = 0
|
||||
|
22
pandora/scripts/env-vars.sh
Executable file
22
pandora/scripts/env-vars.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
export HOME="$(readlink -f $(dirname $0)/..)"
|
||||
export XDG_CONFIG_HOME="${HOME}"
|
||||
export PATH="${HOME}/bin:${PATH:-"/usr/bin:/bin:/usr/local/bin"}"
|
||||
export LD_LIBRARY_PATH="${HOME}/lib:${LD_LIBRARY_PATH:-"/usr/lib:/lib"}"
|
||||
|
||||
if [ -d /mnt/utmp/retroarch/share ] ; then
|
||||
export XDG_DATA_DIRS=${HOME}/share:$XDG_DATA_DIRS:/usr/share
|
||||
fi
|
||||
|
||||
# use notaz's optimized driver
|
||||
export SDL_VIDEODRIVER="omapdss"
|
||||
export SDL_AUDIODRIVER="alsa"
|
||||
|
||||
# integral scaling
|
||||
export SDL_OMAP_LAYER_SIZE="pixelperfect"
|
||||
|
||||
# load the libstdc++ from gcc-4.7 because phoenix and some cores don't build in anything less
|
||||
# preload latest notaz SDL that knows what "pixelperfect" is
|
||||
export LD_PRELOAD=${HOME}/lib/libstdc++.so.6:$HOME/lib/libSDL-1.2.so.0.11.3
|
||||
|
6
pandora/scripts/retroarch-phoenix.sh
Executable file
6
pandora/scripts/retroarch-phoenix.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
source "$(dirname $0)/env-vars.sh"
|
||||
|
||||
exec retroarch-phoenix "${@}"
|
||||
|
@ -1,46 +1,50 @@
|
||||
#!/bin/sh
|
||||
export PATH="/mnt/utmp/retroarch/bin:${PATH:-"/usr/bin:/bin:/usr/local/bin"}"
|
||||
export LD_LIBRARY_PATH="/mnt/utmp/retroarch/lib:${LD_LIBRARY_PATH:-"/usr/lib:/lib"}"
|
||||
export HOME="/mnt/utmp/retroarch" XDG_CONFIG_HOME="/mnt/utmp/retroarch"
|
||||
#!/bin/bash
|
||||
|
||||
if [ -d /mnt/utmp/retroarch/share ] ; then
|
||||
export XDG_DATA_DIRS=/mnt/utmp/retroarch/share:$XDG_DATA_DIRS:/usr/share
|
||||
fi
|
||||
source "$(dirname $0)/env-vars.sh"
|
||||
|
||||
# choose a libretro core.
|
||||
cd /mnt/utmp/retroarch/lib
|
||||
cd ${HOME}/lib
|
||||
BACKEND=$(ls -1 libretro*.so | zenity --list --column=Backend)
|
||||
cd $HOME
|
||||
cd ${HOME}
|
||||
|
||||
# if user didn't select a libretro, bail out.
|
||||
[ -z "$BACKEND" ] && exit 0
|
||||
[ -z "${BACKEND}" ] && exit 0
|
||||
|
||||
# narrow down the available file formats for the file chooser.
|
||||
FILTER='All files (*)|*'
|
||||
case "$BACKEND" in
|
||||
libretro-fceu*.so)
|
||||
case "${BACKEND}" in
|
||||
libretro-fceu*.so | libretro-bnes.so)
|
||||
FILTER='NES (*.nes)|*.nes'
|
||||
;;
|
||||
libretro-pocketsnes.so | libretro-snes9x*.so)
|
||||
FILTER='SNES (*.sfc)|*.sfc'
|
||||
libretro-pocketsnes.so | libretro-snes9x*.so | libretro-bsnes*.so)
|
||||
FILTER='SNES (*.sfc; *.smc)|*.sfc *.smc'
|
||||
;;
|
||||
libretro-gambatte.so)
|
||||
FILTER='GBC (*.gb; *.gbc)|*.gb *.gbc'
|
||||
FILTER='GBC (*.gb; *.gbc; *.sgb)|*.gb *.gbc *.sgb'
|
||||
;;
|
||||
libretro-meteor.so | libretro-vba.so )
|
||||
libretro-meteor.so | libretro-vba.so | libretro-gpsp.so)
|
||||
FILTER='GBA (*.gba)|*.gba'
|
||||
;;
|
||||
libretro-imame4all.so) # does libretro-fba.so belong here?
|
||||
libretro-imame4all.so | libretro-fba.so)
|
||||
FILTER='Arcade (*.zip)|*.zip'
|
||||
;;
|
||||
libretro-genplus.so)
|
||||
FILTER='Genesis/MegaDrive (*.md; *.gen)|*.md *.gen'
|
||||
FILTER='Genesis/MegaDrive/SegaCD (*.md; *.gen; *.bin; *.iso)|*.md *.gen *.bin *.iso'
|
||||
;;
|
||||
libretro-pcsx-rearmed.so | libretro-yabause.so)
|
||||
FILTER='Disc image (*.iso; *.bin; *.img; *.cue)|*.iso *.bin *.img *.cue'
|
||||
;;
|
||||
libretro-prboom.so)
|
||||
FILTER='Doom (*.wad)|*.wad'
|
||||
;;
|
||||
esac
|
||||
|
||||
# bit hackish, silently adds supported archive formats to file listings.
|
||||
# worth noting that the pandora itself doesn't have 7z in firmware by default.
|
||||
if [[ ! "${FILTER}" =~ ^Arcade ]] ; then
|
||||
FILTER="${FILTER} *.zip *.rar *.7z"
|
||||
fi
|
||||
|
||||
# try to point the file chooser at the last used path, if there is one.
|
||||
LASTROM=
|
||||
if [ -r "${BACKEND}-lastrom.txt" ] ; then
|
||||
@ -50,17 +54,13 @@ fi
|
||||
ROM=$(zenity --file-selection --file-filter="${FILTER}" "${LASTROM}")
|
||||
|
||||
# if user didn't select a ROM, bail out.
|
||||
[ -z "$ROM" ] && exit 0
|
||||
[ -z "${ROM}" ] && exit 0
|
||||
|
||||
echo "$ROM" > "${BACKEND}-lastrom.txt"
|
||||
echo "${ROM}" > "${BACKEND}-lastrom.txt"
|
||||
|
||||
# use notaz's optimized driver
|
||||
export SDL_VIDEODRIVER="omapdss"
|
||||
export SDL_AUDIODRIVER="alsa"
|
||||
|
||||
# integral scaling
|
||||
export SDL_OMAP_LAYER_SIZE="pixelperfect"
|
||||
|
||||
# preload my modified SDL that knows what "pixelperfect" is
|
||||
exec env LD_PRELOAD=/mnt/utmp/retroarch/lib/libSDL-1.2.so.0.11.3 retroarch "${ROM}" -L "/mnt/utmp/retroarch/lib/${BACKEND}" "${@}"
|
||||
if [[ "${ROM}" =~ \.(zip|rar|7z)$ ]] && [[ ! "${FILTER}" =~ ^Arcade ]] ; then
|
||||
source retroarch-zip "${ROM}" -L "${HOME}/lib/${BACKEND}" "${@}"
|
||||
else
|
||||
exec retroarch "${ROM}" -L "${HOME}/lib/${BACKEND}" "${@}"
|
||||
fi
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
die()
|
||||
{
|
||||
echo "Error: $1"
|
||||
rm "$TMPROM"
|
||||
rm -r "$TMPDIR"
|
||||
rm "${TMPROM}"
|
||||
rm -r "${TMPDIR}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -25,53 +25,32 @@ shift
|
||||
extract_zip()
|
||||
{
|
||||
which unzip >/dev/null 2>&1 || die "Cannot find unzip"
|
||||
which zipinfo >/dev/null 2>&1 || die "Cannot find zipinfo"
|
||||
FILENAME="`zipinfo -1 \"$1\" | grep '\.s[mf]c$' | head -n1`"
|
||||
if [ -z "$FILENAME" ]; then
|
||||
die "Cannot find .smc nor .sfc file in archive"
|
||||
fi
|
||||
|
||||
# The people who made the [!] naming convention obviously have never used regex ... <_<
|
||||
FILENAME_FIXED="`echo $FILENAME | sed -e 's|\[|\\\\[|g' -e 's|!|\\\\!|g' -e 's|\]|\\\\]|g'`"
|
||||
|
||||
unzip -p "$1" "$FILENAME_FIXED" > "$TMPROM"
|
||||
unzip "$1" -d "${TMPDIR}" >/dev/null 2>&1 || die "Couldn't extract from archive"
|
||||
}
|
||||
|
||||
extract_7z()
|
||||
{
|
||||
which 7z >/dev/null 2>&1 || die "Cannot find 7z"
|
||||
7z x "$1" -o"$TMPDIR" >/dev/null 2>&1 || die "Couldn't extract from archive"
|
||||
FILENAME="`ls \"$TMPDIR\" | grep '\.s[mf]c$' | head -n1`"
|
||||
if [ -z "$FILENAME" ]; then
|
||||
die "Cannot find .smc nor .sfc file in archive"
|
||||
fi
|
||||
|
||||
mv "${TMPDIR}/${FILENAME}" "$TMPROM"
|
||||
7z x "$1" -o"${TMPDIR}" >/dev/null 2>&1 || die "Couldn't extract from archive"
|
||||
}
|
||||
|
||||
extract_rar()
|
||||
{
|
||||
which unrar >/dev/null 2>&1 || die "Cannot find unrar"
|
||||
unrar x "$1" "$TMPDIR" >/dev/null 2>&1 || die "Couldn't extract from archive"
|
||||
FILENAME="`ls \"$TMPDIR\" | grep '\.s[mf]c$' | head -n1`"
|
||||
if [ -z "$FILENAME" ]; then
|
||||
die "Cannot find .smc nor .sfc file in archive"
|
||||
fi
|
||||
|
||||
mv "${TMPDIR}/${FILENAME}" "$TMPROM"
|
||||
unrar x "$1" "${TMPDIR}" >/dev/null 2>&1 || die "Couldn't extract from archive"
|
||||
}
|
||||
|
||||
case "$COMP_FILE" in
|
||||
case "${COMP_FILE}" in
|
||||
*.zip )
|
||||
extract_zip "$COMP_FILE"
|
||||
extract_zip "${COMP_FILE}"
|
||||
EXTENSION=".zip"
|
||||
;;
|
||||
*.7z )
|
||||
extract_7z "$COMP_FILE"
|
||||
extract_7z "${COMP_FILE}"
|
||||
EXTENSION=".7z"
|
||||
;;
|
||||
*.rar )
|
||||
extract_rar "$COMP_FILE"
|
||||
extract_rar "${COMP_FILE}"
|
||||
EXTENSION=".rar"
|
||||
;;
|
||||
* )
|
||||
@ -79,17 +58,25 @@ case "$COMP_FILE" in
|
||||
;;
|
||||
esac
|
||||
|
||||
SAVENAME="`basename \"$COMP_FILE\" $EXTENSION`"
|
||||
DIRNAME="`dirname \"$COMP_FILE\"`"
|
||||
# pick the largest non-directory in the root of the unpacked archive
|
||||
FILENAME="`ls -Sp \"${TMPDIR}\" | grep -v /$ | head -n1`"
|
||||
if [ -z "${FILENAME}" ]; then
|
||||
die "Cannot find any files in root of archive"
|
||||
fi
|
||||
mv "${TMPDIR}/${FILENAME}" "${TMPROM}"
|
||||
|
||||
SAVENAME="`basename \"${COMP_FILE}\" ${EXTENSION}`"
|
||||
DIRNAME="`dirname \"${COMP_FILE}\"`"
|
||||
SAVENAME="${SAVENAME}.srm"
|
||||
|
||||
RetroArch_PATH="`which retroarch`"
|
||||
if [ -z "$RetroArch_PATH" ]; then
|
||||
EXE="`which retroarch`"
|
||||
if [ -z "${EXE}" ]; then
|
||||
die "Cannot find RetroArch in path."
|
||||
fi
|
||||
|
||||
echo "Temp ROM: $TMPROM"
|
||||
echo "Temp ROM: ${TMPROM}"
|
||||
echo "Savename: ${DIRNAME}/${SAVENAME}"
|
||||
"$RetroArch_PATH" "$TMPROM" -s "${DIRNAME}/${SAVENAME}" "$@"
|
||||
rm "$TMPROM"
|
||||
rm -r "$TMPDIR"
|
||||
"${EXE}" "${TMPROM}" -s "${DIRNAME}/${SAVENAME}" "$@"
|
||||
rm "${TMPROM}"
|
||||
rm -r "${TMPDIR}"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user