mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 14:16:40 +00:00
mame: complete rework to match with our new upcoming addon system
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
86c62c2fb2
commit
2ebf059f6f
@ -7,6 +7,11 @@ $SCRIPTS/build SDL
|
|||||||
$SCRIPTS/build expat
|
$SCRIPTS/build expat
|
||||||
$SCRIPTS/build zlib
|
$SCRIPTS/build zlib
|
||||||
|
|
||||||
|
ADDON_NAME="plugin.emulators.$1"
|
||||||
|
ADDON_VERSION="1"
|
||||||
|
|
||||||
|
PKG_DIR=`find $ROOT/$PACKAGES -type d -name $1`
|
||||||
|
|
||||||
cd $PKG_BUILD
|
cd $PKG_BUILD
|
||||||
|
|
||||||
# some hacks to build hosttools
|
# some hacks to build hosttools
|
||||||
@ -50,7 +55,7 @@ cd $PKG_BUILD
|
|||||||
AR="$TARGET_AR" \
|
AR="$TARGET_AR" \
|
||||||
LD="$TARGET_CXX" \
|
LD="$TARGET_CXX" \
|
||||||
ARCHOPTS="$TARGET_CFLAGS" \
|
ARCHOPTS="$TARGET_CFLAGS" \
|
||||||
OPT_FLAGS='-DINI_PATH="\"/etc/mame/\""' \
|
OPT_FLAGS='-DINI_PATH="\".\""' \
|
||||||
NO_DEBUGGER=1 \
|
NO_DEBUGGER=1 \
|
||||||
NOWERROR=1 \
|
NOWERROR=1 \
|
||||||
BUILD_EXPAT=0 \
|
BUILD_EXPAT=0 \
|
||||||
@ -58,3 +63,14 @@ cd $PKG_BUILD
|
|||||||
SUFFIX64="" \
|
SUFFIX64="" \
|
||||||
$ARCH_OPTS \
|
$ARCH_OPTS \
|
||||||
$DEBUG_OPTS
|
$DEBUG_OPTS
|
||||||
|
|
||||||
|
mkdir -p .addons/$ADDON_NAME
|
||||||
|
cp -R $PKG_DIR/scripts/* .addons/$ADDON_NAME
|
||||||
|
$SED "s|@ADDON_VERSION@|$OS_VERSION.$ADDON_VERSION|g" -i .addons/$ADDON_NAME/addon.xml
|
||||||
|
cp $PKG_DIR/config/mame.ini .addons/$ADDON_NAME
|
||||||
|
|
||||||
|
mkdir -p .addons/$ADDON_NAME/bin
|
||||||
|
cp mame .addons/$ADDON_NAME/bin
|
||||||
|
|
||||||
|
cd .addons
|
||||||
|
zip -rq $ADDON_NAME-$OS_VERSION.$ADDON_VERSION.zip $ADDON_NAME
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
. config/options
|
. config/options
|
||||||
|
|
||||||
$SCRIPTS/install SDL
|
ADDON_NAME="plugin.emulators.$1"
|
||||||
$SCRIPTS/install expat
|
ADDON_VERSION="1"
|
||||||
$SCRIPTS/install zlib
|
|
||||||
|
|
||||||
PKG_DIR=`find $PACKAGES -type d -name $1`
|
PKG_DIR=`find $PACKAGES -type d -name $1`
|
||||||
|
|
||||||
mkdir -p $INSTALL/usr/bin
|
if [ "$2" = addons ]; then
|
||||||
cp $PKG_BUILD/mame $INSTALL/usr/bin/mame
|
mkdir -p $TARGET_ADDONS/$ADDON_NAME
|
||||||
|
cp $PKG_BUILD/.addons/$ADDON_NAME-$OS_VERSION.$ADDON_VERSION.zip $TARGET_ADDONS/$ADDON_NAME
|
||||||
mkdir -p $INSTALL/etc/mame
|
cp $PKG_DIR/scripts/changelog.txt $TARGET_ADDONS/$ADDON_NAME/changelog-$OS_VERSION.$ADDON_VERSION.txt
|
||||||
cp $PKG_DIR/config/mame.ini $INSTALL/etc/mame
|
cp $PKG_DIR/scripts/icon.png $TARGET_ADDONS/$ADDON_NAME/icon.png
|
||||||
|
fi
|
21
packages/addons/emulators/mame/scripts/addon.xml
Normal file
21
packages/addons/emulators/mame/scripts/addon.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<addon id="plugin.emulators.mame"
|
||||||
|
name="(Emulator) Multiple Arcade Machine Emulator"
|
||||||
|
version="@ADDON_VERSION@"
|
||||||
|
provider-name="openelec.tv">
|
||||||
|
<requires>
|
||||||
|
<import addon="os.openelec.tv" version="0.90"/>
|
||||||
|
<import addon="xbmc.python" version="1.0"/>
|
||||||
|
</requires>
|
||||||
|
<extension point="xbmc.python.pluginsource"
|
||||||
|
library="default.py">
|
||||||
|
<provides>executable</provides>
|
||||||
|
</extension>
|
||||||
|
<extension point="xbmc.addon.metadata">
|
||||||
|
<summary>MAME - Multiple Arcade Machine Emulator</summary>
|
||||||
|
<description>
|
||||||
|
MAME stands for Multiple Arcade Machine Emulator. When used in conjunction with images of the original arcade game's ROM and disk data, MAME attempts to reproduce that game as faithfully as possible on a more modern general-purpose computer. MAME can currently emulate several thousand different classic arcade video games from the late 1970s through the modern era.
|
||||||
|
</description>
|
||||||
|
<platform>all</platform>
|
||||||
|
</extension>
|
||||||
|
</addon>
|
2
packages/addons/emulators/mame/scripts/changelog.txt
Normal file
2
packages/addons/emulators/mame/scripts/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
0.90.1
|
||||||
|
- initial version MAME 0.138s
|
20
packages/addons/emulators/mame/init.d/27_mamedirs → packages/addons/emulators/mame/scripts/default.py
Executable file → Normal file
20
packages/addons/emulators/mame/init.d/27_mamedirs → packages/addons/emulators/mame/scripts/default.py
Executable file → Normal file
@ -1,5 +1,3 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Copyright (C) 2009-2010 OpenELEC.tv
|
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||||
# http://www.openelec.tv
|
# http://www.openelec.tv
|
||||||
@ -20,17 +18,9 @@
|
|||||||
# http://www.gnu.org/copyleft/gpl.html
|
# http://www.gnu.org/copyleft/gpl.html
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
#
|
import sys
|
||||||
# make directory structure for mame
|
import xbmcaddon
|
||||||
#
|
import os
|
||||||
# runlevels: openelec, textmode
|
|
||||||
|
|
||||||
. /etc/profile
|
if ( __name__ == "__main__" ):
|
||||||
|
os.system("sh start.sh")
|
||||||
progress "make diretorys for MAME"
|
|
||||||
|
|
||||||
(
|
|
||||||
for dir in roms samples artwork ctrlr ini fonts cheat crosshair; do
|
|
||||||
mkdir -p $HOME/emulators/mame/$dir
|
|
||||||
done
|
|
||||||
)&
|
|
BIN
packages/addons/emulators/mame/scripts/icon.png
Normal file
BIN
packages/addons/emulators/mame/scripts/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
33
packages/addons/emulators/mame/scripts/start.sh
Executable file
33
packages/addons/emulators/mame/scripts/start.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||||
|
# http://www.openelec.tv
|
||||||
|
#
|
||||||
|
# This Program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This Program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||||
|
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# make directory structure for mame
|
||||||
|
mkdir -p $HOME/emulators/mame/roms
|
||||||
|
mkdir -p $HOME/emulators/mame/samples
|
||||||
|
mkdir -p $HOME/emulators/mame/artwork
|
||||||
|
mkdir -p $HOME/emulators/mame/ctrlr
|
||||||
|
mkdir -p $HOME/emulators/mame/ini
|
||||||
|
mkdir -p $HOME/emulators/mame/fonts
|
||||||
|
mkdir -p $HOME/emulators/mame/cheat
|
||||||
|
mkdir -p $HOME/emulators/mame/crosshair
|
||||||
|
|
||||||
|
./bin/mame $@
|
Loading…
x
Reference in New Issue
Block a user