Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-07-20 11:00:21

inukaze
Member
Registered: 2014-07-31
Posts: 46

Xfce 4.12 -- Mupen64plus scripts & desktop file

Hi there some time ago i publish similar dunno here in this post -> https://forum.xfce.org/viewtopic.php?id … Nx3ymyfjrY

Well now i solved, in this precise moment. the desktop file still have options for see variable contents

The first for me was create the desktop file "/home/inukaze/.local/share/applications/mupen64plus_test.desktop" with the follow content

[Desktop Entry]
Version=1.0
Type=Application
Name=Mupen64Plus TEST
GenericName=N64 Emulator
Comment=Nintendo 64 emulator and plugins for Linux, Mac OSX, FreeBSD, and Windows
Exec=xfce4-terminal --hold --execute /usr/bin/bash -c 'export ARCHIVO1='"%f"' ; echo "ARCHIVO1=$ARCHIVO1" ; "/media/Compartido/Lignux/Videojuegos/Emulador/Nintendo/64/mupen64plus/portable/mupen64plus_test.geb" "$ARCHIVO1" '
Icon=/media/Compartido/Lignux/Videojuegos/Emulador/Nintendo/64/mupen64plus/portable/.mupen64plus.svg
MimeType=application/x-n64-rom;
Categories=Game;Emulator;
Keywords=Emulator;Nintendo64;Mupen64plus;
;NoDisplay=true

i must use "export" for store variable content for child script, in the exec line, is specify the parent script.

Second i create the child script "mupen64plus_test.geb" (don't care about .geb is just for me to know is a bash script on spanish the words be "Guion En Bash") with the follow content

#!/usr/bin/env bash

#Determine in which directory i am located :
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
cd "$SCRIPTPATH"

#Get File Extension :
EXTENSION=$(echo "$1" | awk -F '.' '{print $NF}')

ARCH=$(uname -m)
case "$ARCH" in
	x86)    ARCH="x32"						;;
	i?86)   ARCH="x32"						;;
	amd64)  ARCH="x64"						;;
	x86_64) ARCH="x64"						;;
	* ) echo    "Your Architecture '$ARCH' -> Is not supported."	;;
esac

						
if [ "$ARCH" == "x64" ]
then
		export LD_LIBRARY_PATH="./.libs/64Bits":$LD_LIBRARY_PATH
		EJECUTABLE=".mupen64plus.x64"
fi

if [ "$ARCH" == "x32" ]
then
		export LD_LIBRARY_PATH="./.libs/32Bits":$LD_LIBRARY_PATH
		EJECUTABLE=".mupen64plus.x32"
fi

if [ -z "$@" ]
then
		echo ""
		echo -e "First Argument is Empty Variable\n"
		echo ""
else
		echo ""
		echo -e "First Argument is a File ; Check md5sum"
		MD5=$(md5sum "$@" | tr a-z A-Z | awk '{print $1}')
		echo ""
		echo 'Inside "if [ -z "$@"] else '
		echo "Reveal variable content : "
		echo '"$@"' = "$@"
		echo '"$*"' = "'"$*"'"
		echo '"$1"' = "'"$1"'"
		echo '"$2"' = "'"$2"'"
		echo ""
		FILE="$@"
		echo export FILE	;	echo "FILE=$FILE"
		#echo "Now First Try to run mupen64plus : without another script"
		#./.mupen64plus.x64 --corelib "./.libs/64Bits/libmupen64plus.so.2.0.0" --datadir "." --configdir "." "$@"
		#echo "This work"
		echo "Now Second Try to run mupen64plus : via another script"
		#bash -c "'"/media/Compartido/Lignux/Videojuegos/Emulador/Nintendo/64/mupen64plus/portable/mupen64plus.geb"'" "$FILE"
		source "/media/Compartido/Lignux/Videojuegos/Emulador/Nintendo/64/mupen64plus/portable/mupen64plus.geb" "$@"
fi

exit 0

Well the parent script "mupen64plus.geb" the content is too much i prefer just put on service like pastebin alternative, like controlc, you can visit with the follow link -> https://controlc.com/418cf60f

Well i try to publish my parent script code here

#!/usr/bin/env bash

echo '
Autor ----------------> Inukaze ( Venezuela )
Sitio ----------------> https://goo.gl/ij6WqW
Correo-E -------------> bloginukaze@gmail.com
Licencia -------------> GPL 2

******* Inicio : Acerca de este Guión ********

  Yo intento escribir guiones compatibles con
   Sistemas operativos Unix & POSIX , y otros
   Sistemas operativos que soporten bash

  Este archivo es un guion sencillo para
  Iniciar "mupen64plus"
  [Emulador de Nintendo 64]

******** Fin : Acerca de este Guión **********'
sleep 3

#Determinar en que directorio estoy :
GUION=$(readlink -f "$0")
RUTA=$(dirname "$GUION")
cd "$RUTA"

#Obtener la ruta absoluta del archivo
ARCHIVO="$@" ; echo export ARCHIVO	;	echo "ARCHIVO=$ARCHIVO"

#Obtener la extension del archivo :
EXTENSION=$(echo "$1" | awk -F '.' '{print $NF}')

#function ReSolucion(){
# Solucion de Resolucion
echo `xrandr --current | grep current | awk '{print $8}'` >> /tmp/ancho
echo `xrandr --current | grep current | awk '{print $10}'` >> /tmp/alto
cat /tmp/alto | sed -i 's/,//g' /tmp/alto
ANCHO=$(cat /tmp/ancho)
ALTO=$(cat /tmp/alto)
rm /tmp/ancho /tmp/alto
echo "$ANCHO"'x'"$ALTO" >> /tmp/Resolucion
Resolucion=$(cat /tmp/Resolucion)
rm /tmp/Resolucion
# Solucion de Resolucion
#} : NOTA : Como funcion no funciona para extraer el valor resultante de la variable para usarla fuera de la funcion.

#Detectar Resolucion y configurar mupen64plus para esa resolucion :
#Resolucion=$(ReSolucion)
if [ "$Resolucion" = "1024x768" ]; then
sed -i "s|ScreenWidth =.*\"|ScreenWidth = \"852\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Ajusta la Anchura de la Ventana
sed -i "s|ScreenHeight =.*\"|ScreenHeight = \"658\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Ajusta la Altura de la Ventana
sed -i "s|resolution =.*\"|resolution = \"852x658\"|g" "$PWD/Datos/config/mupen64plus-qt.conf" #Ajusta la resolucion de la ventana [No de la de la interfaz]
sed -i "s|resolution =.*\"|resolution = \"852x658\"|g" "$PWD/Datos/config/mupen64plus-ui.conf" #Ajusta la resolucion de la ventana [No de la de la interfaz]
fi

if [ "$Resolucion" = "1152x864" ]; then
sed -i "s|ScreenWidth =.*\"|ScreenWidth = \"1070\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Ajusta la Anchura de la Ventana
sed -i "s|ScreenHeight =.*\"|ScreenHeight = \"887\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Ajusta la Altura de la Ventana
sed -i "s|resolution =.*\"|resolution = \"1070x887\"|g" "$PWD/Datos/config/mupen64plus-qt.conf" #Ajusta la resolucion de la ventana [No de la de la interfaz]
sed -i "s|resolution =.*\"|resolution = \"1070x887\"|g" "$PWD/Datos/config/mupen64plus-ui.conf" #Ajusta la resolucion de la ventana [No de la de la interfaz]
fi

if [ "$Resolucion" = "1280x1024" ]; then
sed -i "s|ScreenWidth =.*\"|ScreenWidth = \"1058\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Ajusta la Anchura de la Ventana
sed -i "s|ScreenHeight =.*\"|ScreenHeight = \"885\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Ajusta la Altura de la Ventana
sed -i "s|resolution =.*\"|resolution = \"1076x890\"|g" "$PWD/Datos/config/mupen64plus-qt.conf" #Ajusta la resolucion de la ventana [No de la de la interfaz]
sed -i "s|resolution =.*\"|resolution = \"1076x890\"|g" "$PWD/Datos/config/mupen64plus-ui.conf" #Ajusta la resolucion de la ventana [No de la de la interfaz]
fi

if [ "$Resolucion" = "1360x768" ]; then
sed -i "s|ScreenWidth =.*\"|ScreenWidth = \"1358\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Ajusta la Anchura de la Ventana
sed -i "s|ScreenHeight =.*\"|ScreenHeight = \"713\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Ajusta la Altura de la Ventana
sed -i "s|resolution =.*\"|resolution = \"1358x713\"|g" "$PWD/Datos/config/mupen64plus-qt.conf" #Ajusta la resolucion de la ventana [No de la de la interfaz]
sed -i "s|resolution =.*\"|resolution = \"1358x713\"|g" "$PWD/Datos/config/mupen64plus-ui.conf" #Ajusta la resolucion de la ventana [No de la de la interfaz]
fi

if [ "$Resolucion" = "1440x900" ]; then
sed -i "s|ScreenWidth =.*\"|ScreenWidth = \"1438\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Ajusta la Anchura de la Ventana
sed -i "s|ScreenHeight =.*\"|ScreenHeight = \"848\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Ajusta la Altura de la Ventana
sed -i "s|resolution =.*\"|resolution = \"1438x848\"|g" "$PWD/Datos/config/mupen64plus-qt.conf" #Ajusta la resolucion de la ventana [No de la de la interfaz]
sed -i "s|resolution =.*\"|resolution = \"1438x848\"|g" "$PWD/Datos/config/mupen64plus-ui.conf" #Ajusta la resolucion de la ventana [No de la de la interfaz]
fi

#ScreenWidth = "1070		#852 (1024x768 | Conky), #1070	(1152x864 | Conky)"
#ScreenHeight = "887			#658 (1024x768 | Conky), #887		(1152x864 | Conky)"

# Obtener la Arquitectura
Arquitectura=$(uname -m)
case "$Arquitectura" in
	x86)    Arquitectura="x32"						;;
	i?86)   Arquitectura="x32"						;;
	amd64)  Arquitectura="x64"						;;
	x86_64) Arquitectura="x64"						;;
	* ) echo    "Tu Arquitectura '$Arquitectura' -> NO ESTA SOPORTADA."	;;
esac

#Crear Directorio Temporal :
mkdir -p "/tmp/mupen64plus/lib"
mkdir -p "/tmp/mupen64plus/.libs/64Bits"

#Enlazar Directorios & Archivos en caso de ser necesario :
rm -rf "font.ttf"
rm -rf "Glide64.ini"
rm -rf "Glide64mk2.ini"
rm -rf "InputAutoCfg.ini"
rm -rf "input-profiles.ini"
rm -rf "input-settings.ini"
rm -rf "mupen64plus.6"
rm -rf "mupen64plus.cfg"
rm -rf "mupen64plus.cht"
rm -rf "mupen64plus.ini"
rm -rf "mupen64plus-qt.conf"
rm -rf "mupen64plus-ui.conf"
rm -rf "mupencheat.txt"
rm -rf "RiceVideoLinux.ini"
rm -rf "mupen64plus-video-GLideN64.so"
ln -s "$PWD/Datos/config/font.ttf"							"font.ttf"
ln -s "$PWD/Datos/config/Glide64.ini"						"Glide64.ini"
ln -s "$PWD/Datos/config/Glide64mk2.ini"				"Glide64mk2.ini"
ln -s "$PWD/Datos/config/InputAutoCfg.ini"				"InputAutoCfg.ini"
ln -s "$PWD/Datos/config/input-profiles.ini"				"input-profiles.ini"
ln -s "$PWD/Datos/config/input-settings.ini"			"input-settings.ini"
ln -s "$PWD/Datos/config/mupen64plus.6"				"mupen64plus.6"
ln -s "$PWD/Datos/config/mupen64plus.cfg"			"mupen64plus.cfg"
ln -s "$PWD/Datos/config/mupen64plus.cht"			"mupen64plus.cht"
ln -s "$PWD/Datos/config/mupen64plus.ini"				"mupen64plus.ini"
ln -s "$PWD/Datos/config/mupen64plus-qt.conf"		"mupen64plus-qt.conf"
ln -s "$PWD/Datos/config/mupen64plus-ui.conf"		"mupen64plus-ui.conf"
ln -s "$PWD/Datos/config/mupencheat.txt"				"mupencheat.txt"
ln -s "$PWD/Datos/config/RiceVideoLinux.ini"			"RiceVideoLinux.ini"

	if [ -L "$HOME/.local/share/mupen64plus" ]
	then
			if [ -L "$HOME/.local/share/mupen64plus.original" ]
			then
					rm -rf "$HOME/.local/share/mupen64plus.original"
			fi
			
			if [ -d "$HOME/.local/share/mupen64plus.original" ]
			then
					rm -rf "$HOME/.local/share/mupen64plus"
					mv "$HOME/.local/share/mupen64plus.original" "$HOME/.local/share/mupen64plus"
			fi
	fi
	
	if [ -d "$HOME/.local/share/mupen64plus" ]
	then
			mv "$HOME/.local/share/mupen64plus" "$HOME/.local/share/mupen64plus.original"
			rm -rf "$HOME/.local/share/mupen64plus"		
	fi

	if [ ! -d "$HOME/.local/share/mupen64plus" ]
	then
			ln -s "$PWD/Datos/local" "$HOME/.local/share/mupen64plus"
	fi
			
	if [ ! -e "$HOME/.local/share/mupen64plus" ]
	then
			rm -rf "$HOME/.local/share/mupen64plus"
			ln -s "$PWD/Datos/local" "$HOME/.local/share/mupen64plus"
	fi

#Cache :
#DESACTIVADO#if [ -L "$HOME/.cache/mupen64plus/shaders" ]
#DESACTIVADO#then
#DESACTIVADO#			rm -rf "$HOME/.cache/mupen64plus/shaders"
#DESACTIVADO#fi

#DESACTIVADO#if [ -L "$HOME/.cache/mupen64plus/shaders.original" ]
#DESACTIVADO#then
#DESACTIVADO#			rm -rf "$HOME/.cache/mupen64plus/shaders.original"
#DESACTIVADO#fi

#DESACTIVADO#if [ -d "$HOME/.cache/mupen64plus/shaders.original" ]
#DESACTIVADO#then
#DESACTIVADO#		mv "$HOME/.cache/mupen64plus/shaders.original" "$HOME/.cache/mupen64plus/shaders"
#DESACTIVADO#fi

if [ ! -d "$HOME/.cache/mupen64plus" ]
then
		ln -s "$PWD/Datos/cache" "$HOME/.cache/mupen64plus"
fi

#DESACTIVADO#if [ -d "$HOME/.cache/mupen64plus/shaders" ]
#DESACTIVADO#then
#DESACTIVADO#		mv "$HOME/.cache/mupen64plus/shaders" "$HOME/.cache/mupen64plus/shaders.original"
#DESACTIVADO#		ln -sf "$PWD/Datos/cache/shaders" "$HOME/.cache/mupen64plus/shaders"
#DESACTIVADO#fi

#DESACTIVADO#if [ -L "$HOME/.cache/mupen64plus/glidehq" ]
#DESACTIVADO#then
#DESACTIVADO#			rm -rf "$HOME/.cache/mupen64plus/glidehq"
#DESACTIVADO#fi

#DESACTIVADO#if [ -L "$HOME/.cache/mupen64plus/glidehq.original" ]
#DESACTIVADO#then
#DESACTIVADO#			rm -rf "$HOME/.cache/mupen64plus/glidehq.original"
#DESACTIVADO#fi

#DESACTIVADO#if [ -d "$HOME/.cache/mupen64plus/glidehq.original" ]
#DESACTIVADO#then
#DESACTIVADO#		mv "$HOME/.cache/mupen64plus/glidehq.original" "$HOME/.cache/mupen64plus/glidehq"
#DESACTIVADO#fi

#DESACTIVADO#if [ -d "$HOME/.cache/mupen64plus/glidehq" ]
#DESACTIVADO#then
#DESACTIVADO#		mv "$HOME/.cache/mupen64plus/shaders" "$HOME/.cache/mupen64plus/glidehq.original"
#DESACTIVADO#		ln -sf "$PWD/Datos/cache/glidehq" "$HOME/.cache/mupen64plus/glidehq"
#DESACTIVADO#fi


# Comun para Interfaces :
if [ -L "$HOME/.config/mupen64plus.original" ]
then
			rm -rf "$HOME/.config/mupen64plus.original"
fi

if [ -L "$HOME/.config/mupen64plus" ]
then
			rm -rf "$HOME/.config/mupen64plus"
fi

#Seccion Rebusque 001
#NOTA : Debes dejar esta parte intacta, ya que que algunas versiones de "bash" para comprobrar 
#			  que (si o no) "existe" un directorio [ -d ], no hace ninguna distincion si el directorio es un
#			  Enlace Simbolico.

if [ ! -d "$HOME/.config/mupen64plus" ]
then
			ln -s "$PWD/Datos/config" "$HOME/.config/mupen64plus"
else
			mv "$HOME/.config/mupen64plus" "$HOME/.config/mupen64plus.original"
			ln -s "$PWD/Datos/config" "$HOME/.config/mupen64plus"
fi

if [ -L "$HOME/.local/share/mupen64plus.original" ]
then
			rm -rf "$HOME/.local/share/mupen64plus.original"
fi
# Fin de la Seccion Rebusque 001

# Interfaz "mupen64plus-qt #
#	Caratulas en -> "$HOME/.local/share/mupen64plus-qt/cache_v2/<MD5 del titulo>"

if [ -L "$HOME/.local/share/mupen64plus-qt" ]
then
		rm -rf "$HOME/.local/share/mupen64plus-qt"		
fi

if [ -d "$HOME/.local/share/mupen64plus-qt" ]
then
		mv "$HOME/.local/share/mupen64plus-qt"	"$HOME/.local/share/mupen64plus-qt.original"
		rm -rf "$HOME/.local/share/mupen64plus-qt"		
fi

if [ ! -d "$HOME/.local/share/mupen64plus-qt" ]
then
		ln -s "$PWD/Datos/mupen64plus-qt"	"$HOME/.local/share/mupen64plus-qt"
fi
# Interfaz "mupen64plus-qt #

# Interfaz "mupen64plus-ui #
if [ -L "$HOME/.local/share/mupen64plus-ui" ]
then
		rm -rf "$HOME/.local/share/mupen64plus-ui"		
fi

if [ -d "$HOME/.local/share/mupen64plus-ui" ]
then
		mv "$HOME/.local/share/mupen64plus-ui"	"$HOME/.local/share/mupen64plus-ui.original"
		rm -rf "$HOME/.local/share/mupen64plus-ui"		
fi

if [ ! -d "$HOME/.local/share/mupen64plus-ui" ]
then
		ln -s "$PWD/Datos/mupen64plus-ui"	"$HOME/.local/share/mupen64plus-ui"
fi
# Interfaz "mupen64plus-ui #


#Arreglos para juegos especificos basados en la suma de integridad MD5 :
if [ -z "$@" ]
then
		echo -e "\n"
else
		MD5=$(md5sum "$@"| tr a-z A-Z | awk '{print $1}')
fi



if [ "$MD5" == "d14a499bc4e324974eae3e42dec58625" ]; then
	echo -e "\nPokémon Stadium\n"

	# Establecer Cartuchos & Partidas en los TransferPak :
		sed -i "s|GB-rom-1 =.*\"|GB-rom-1 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Amarilla (S) [C][!].gbc\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak1 #Juego
		sed -i "s|GB-ram-1 =.*\"|GB-ram-1 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Amarilla (S) [C][!].sav\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak1 #Partida
		sed -i "s|GB-rom-2 =.*\"|GB-rom-2 = \"\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak2 #Juego
		sed -i "s|GB-ram-2 =.*\"|GB-ram-2 = \"\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak2 #Partida

	#ReConfigurar los controles :

	#ReConfigurar los Complementos :

	#Despues de terminar de usar este ROM reestablecer la configuracion anterior.
fi

#PS2#if [ "$MD5" == "b26aafd452c9816e1b7aa0954e75825f" ]; then
#PS2#	echo -e "\nPokémon Stadium 2\n"
#PS2#	
#PS2#	# Establecer Cartuchos & Partidas en los TransferPak :
#PS2##TP1#		sed -i "s|GB-rom-1 =.*\"|GB-rom-1 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Amarilla (S) [C][!].gbc\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak1 #Juego
#PS2##TP1#		sed -i "s|GB-ram-1 =.*\"|GB-ram-1 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Amarilla (S) [C][!].sav\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak1 #Partida
#PS2##TP2#		sed -i "s|GB-rom-2 =.*\"|GB-rom-2 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Cristal (S) [C][!].gbc\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak2 #Juego
#PS2##TP2#		sed -i "s|GB-ram-2 =.*\"|GB-ram-2 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Cristal (S) [C][!].sav\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak2 #Partida
#PS2##------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#PS2##		sed -i "s|GB-rom-1 =.*\"|GB-rom-1 = \"$PWD/Datos/TransferPak/Pokemon - Yellow Version (UE) [C][!].gbc\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak1 #Juego
#PS2##		sed -i "s|GB-ram-1 =.*\"|GB-ram-1 = \"$PWD/Datos/TransferPak/Pokemon - Yellow Version (UE) [C][!].sav\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak1 #Partida
#PS2##		sed -i "s|GB-rom-2 =.*\"|GB-rom-2 = \"$PWD/Datos/TransferPak/Pokemon - Crystal Version (UE) (V1.1) [C][!].gbc\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak2 #Juego
#PS2##		sed -i "s|GB-ram-2 =.*\"|GB-ram-2 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Cristal (S) [C][!].sav\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak2 #Partida
#PS2#
#PS2#	#ReConfigurar los controles :
#PS2#
#PS2#	#ReConfigurar los Complementos :
#PS2#
#PS2#	#Despues de terminar de usar este ROM reestablecer la configuracion anterior.
#PS2#fi

if [ "$MD5" == "1561C75D11CEDF356A8DDB1A4A5F9D5D" ]; then
	echo -e "\nPokémon Stadium 2 (USA)\n"
	
	# Establecer Cartuchos & Partidas en los TransferPak :
		sed -i "s|GB-rom-1 =.*\"|GB-rom-1 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Amarilla (S) [C][!].gbc\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak1 #Juego
		sed -i "s|GB-ram-1 =.*\"|GB-ram-1 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Amarilla (S) [C][!].sav\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak1 #Partida
		sed -i "s|GB-rom-2 =.*\"|GB-rom-2 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Cristal (S) [C][!].gbc\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak2 #Juego
		sed -i "s|GB-ram-2 =.*\"|GB-ram-2 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Cristal (S) [C][!].sav\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak2 #Partida
#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#		sed -i "s|GB-rom-1 =.*\"|GB-rom-1 = \"$PWD/Datos/TransferPak/Pokemon - Yellow Version (UE) [C][!].gbc\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak1 #Juego
#		sed -i "s|GB-ram-1 =.*\"|GB-ram-1 = \"$PWD/Datos/TransferPak/Pokemon - Yellow Version (UE) [C][!].sav\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak1 #Partida
#		sed -i "s|GB-rom-2 =.*\"|GB-rom-2 = \"$PWD/Datos/TransferPak/Pokemon - Crystal Version (UE) (V1.1) [C][!].gbc\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak2 #Juego
#		sed -i "s|GB-ram-2 =.*\"|GB-ram-2 = \"$PWD/Datos/TransferPak/Pokemon - Edicion Cristal (S) [C][!].sav\"|g" "$PWD/Datos/config/mupen64plus.cfg" #TransferPak2 #Partida

	#ReConfigurar los controles :

	#ReConfigurar los Complementos :

	#Despues de terminar de usar este ROM reestablecer la configuracion anterior.
fi

#GT64#if [ "$MD5" == "628AA3CD492559B705488F634797E045" ]; then
#GT64#	echo -e "\nGT 64 - Championship Edition (E) (M3) [!]\n"
#GT64#	
#GT64#	# Establecer MemPaK para poder guardar las partidas :
#GT64#	#NOTA : como 'plugin =' se repite varias veces no encuentro forma correcta de editar unicamente los de los controles para modificar unicamente el complemento del control
#GT64#fi

if [ "$MD5" == "7C567A5BB1AD4CBE414FB6BBFF66E336" ]; then
	echo -e 'World Driver Championship (U) [!]'

	#	Establecer el Complemento de video GlideN64 : Es el unico con el que funciona correctamente
		sed -i "s/VideoPlugin =.*/VideoPlugin = mupen64plus-video-GlideN64_Rev-1111a763.so/g" "$PWD/Datos/config/mupen64plus.cfg" #Complemento de Video GLideN64
fi

if [ "$MD5" == "431DE8F6611A8131B536F0EDE1F330D9" ]; then
	echo -e 'World Driver Championship (E) (M5) [!]'

	#	Establecer el Complemento de video GlideN64 : Es el unico con el que funciona correctamente
		sed -i "s/VideoPlugin =.*/VideoPlugin = mupen64plus-video-GlideN64_Rev-1111a763.so/g" "$PWD/Datos/config/mupen64plus.cfg" #Complemento de Video GLideN64
fi

#NOTA Titulos que necesitan usar el modo LLE :
#
#	Indiana Jones and the Infernal Machine
#	Last Legion UX
#	Shin Nihon Pro Wrestling - Toukon Road - Brave Spirits 
#	Shin Nihon Pro Wrestling - Toukon Road 2 - The Next Generation
#	Star Wars Episode I - Battle for Naboo
#	Star Wars - Rogue Squadron
#
# NOTA Titulos que puede ser mejor usar el modo LLE
# Debes usar el rsp z64, y desactivarle la opcion
#
#	DisplayListToGraphicsPlugin = False
# 
# En algunos titulos especificos es mejor activar esta otra :
#
#	AudioListToAudioPlugin = True
#
# Para realmente activar el modo de procesador LLE
# Necesitas mucha potencia bruta para emularlo fluidamente.
#
#	Pokemon Stadium
#	Pokemon Stadium 2
#
# Titulos que parecian usar el modo LLE pero realmente no
#
# Biohazard 2
# 

if [ "$Arquitectura" == "x64" ]
then
		export LD_LIBRARY_PATH="./.libs/64Bits":$LD_LIBRARY_PATH
		#Enlazar Complementos Iniciando :
		rm -rf "./mupen64plus-audio-sdl.so"											; ln -s "./.libs/64Bits/plugin/mupen64plus-audio-sdl.so"										"./mupen64plus-audio-sdl.so"
		rm -rf "./mupen64plus-input-sdl.so"											; ln -s "./.libs/64Bits/plugin/mupen64plus-input-sdl.so"										"./mupen64plus-input-sdl.so"
		rm -rf "./mupen64plus-rsp-cxd4-sse2.so"									; ln -s "./.libs/64Bits/plugin/mupen64plus-rsp-cxd4-sse2.so"								"./mupen64plus-rsp-cxd4-sse2.so"
		rm -rf "./mupen64plus-rsp-hle.so"												; ln -s "./.libs/64Bits/plugin/mupen64plus-rsp-hle.so"										"./mupen64plus-rsp-hle.so"
		rm -rf "./mupen64plus-rsp-z64-hlevideo.so"								; ln -s "./.libs/64Bits/plugin/mupen64plus-rsp-z64-hlevideo.so"							"./mupen64plus-rsp-z64-hlevideo.so"
		rm -rf "./mupen64plus-video-arachnoid.so"								; ln -s "./.libs/64Bits/plugin/mupen64plus-video-arachnoid.so"							"./mupen64plus-video-arachnoid.so"
		rm -rf "./mupen64plus-video-glide64.so"									; ln -s "./.libs/64Bits/plugin/mupen64plus-video-glide64.so"								"./mupen64plus-video-glide64.so"
		rm -rf "./mupen64plus-video-glide64mk2.so"							; ln -s "./.libs/64Bits/plugin/mupen64plus-video-glide64mk2.so"						"./mupen64plus-video-glide64mk2.so"
		rm -rf "./mupen64plus-video-GlideN64_Rev-1111a763.so"		; ln -s "./.libs/64Bits/plugin/mupen64plus-video-GlideN64_Rev-1111a763.so"	"./mupen64plus-video-GlideN64_Rev-1111a763.so"
		rm -rf "./mupen64plus-video-rice.so"										; ln -s "./.libs/64Bits/plugin/mupen64plus-video-rice.so"									"./mupen64plus-video-rice.so"
		rm -rf "./mupen64plus-video-z64.so"										; ln -s "./.libs/64Bits/plugin/mupen64plus-video-z64.so"									"./mupen64plus-video-z64.so"
		rm -rf "/tmp/mupen64plus/lib/libmupen64plus.so.2"					; ln -sf "$PWD/.libs/64Bits/libmupen64plus.so.2.0.0"										"/tmp/mupen64plus/lib/libmupen64plus.so.2"
		rm -rf "/tmp/mupen64plus/lib/libmupen64plus.so.2"					; ln -sf "$PWD/.libs/64Bits/libmupen64plus.so.2.0.0"										"/tmp/mupen64plus/.libs/64Bits/libmupen64plus.so.2"
		#Enlazar Complementos Finalizado.
		EJECUTABLE=".mupen64plus.x64"
		#Eliminar todo lo que haya despues del = en los archivos " mupen64plus-{qt,ui}.conf "
		sed -i "s/[.].*//" "./Datos/config/mupen64plus-qt.conf"
		sed -i "s/[.].*//" "./Datos/config/mupen64plus-ui.conf"
		sed -i "s/[:/].*//" "./Datos/config/mupen64plus-qt.conf"
		sed -i "s/[:/].*//" "./Datos/config/mupen64plus-ui.conf"
		#Reemplazando Valores :
		#Mupen64Plus-QT
		sed -i 's^mupen64plus='${VIEJO}'^mupen64plus='${PWD}'/'${EJECUTABLE}'^g' ./Datos/config/mupen64plus-qt.conf	#Especifica el binario ejecutable que se utilizara
		sed -i 's^config='${VIEJO}'^config='${PWD}'/'Datos/config'^g' ./Datos/config/mupen64plus-qt.conf	#Especifica la ruta de los archivos de configuracion
		sed -i 's^data='${VIEJO}'^data='${PWD}'/'Datos/config'^g' ./Datos/config/mupen64plus-qt.conf	#Especifica la ruta de los archivos de configuracion
		sed -i 's^plugins='${VIEJO}'^plugins='${PWD}'/'.libs/64Bits/plugin'^g' ./Datos/config/mupen64plus-qt.conf	#Especifica la ruta de los archivos complementos
		sed -i 's^roms='${VIEJO}'^roms='${PWD}'/'roms'^g' ./Datos/config/mupen64plus-qt.conf	#Especifica la ruta de las roms (juegos)
		#Mupen64Plus-UI
		sed -i 's^mupen64plus='${VIEJO}'^mupen64plus='${PWD}'/'${EJECUTABLE}'^g' ./Datos/config/mupen64plus-ui.conf	#Especifica el binario ejecutable que se utilizara
		sed -i 's^config='${VIEJO}'^config='${PWD}'/'Datos/config'^g' ./Datos/config/mupen64plus-ui.conf	#Especifica la ruta de los archivos de configuracion
		sed -i 's^data='${VIEJO}'^data='${PWD}'/'Datos/config'^g' ./Datos/config/mupen64plus-ui.conf	#Especifica la ruta de los archivos de configuracion
		sed -i 's^plugins='${VIEJO}'^plugins='${PWD}'/'.libs/64Bits/plugin'^g' ./Datos/config/mupen64plus-ui.conf	#Especifica la ruta de los archivos complementos
		sed -i 's^roms='${VIEJO}'^roms='${PWD}'/'roms'^g' ./Datos/config/mupen64plus-ui.conf	#Especifica la ruta de las roms (juegos)
		# Mupen64Plus.cfg
		#sed "s/PluginDir = .*/PluginDir = "'"'$PWD\/.libs\/64Bits\/plugin'/"'"/g" "$PWD/Datos/config/mupen64plus.cfg" #Ruta de los archivos de Complementos
		sed -i "s/PluginDir =.*/PluginDir = "'".\/.libs\/64Bits\/plugin"'"/g" "$PWD/Datos/config/mupen64plus.cfg"	#Especifica la ruta de los archivos complementos

		echo 'Antes del -z "$@" de 64 Bits'
		echo '"$@"' = "$@"
		echo '"$*"' = "'"$*"'"
		echo '"$1"' = "'"$1"'"
		echo '"$2"' = "'"$2"'"

		if [ -z "$@" ]; then
						#Iniciar el Emulador : En caso de no especificar ninguna rom, abrir la rom de ejemplo de mupen64plus
						sed -i "s|IPL-ROM =.*\"|IPL-ROM = \"\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Desactivar la BIOS de la N64DD
						sed -i "s|Disk =.*\"|Disk = \"\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Desactivar cualquier Disco de la N64DD
						#Cambiar el complemento de video por el de Glide64mk2.
						sed -i "s/VideoPlugin =.*/VideoPlugin = "'"mupen64plus-video-glide64mk2"'"/g" "$PWD/Datos/config/mupen64plus.cfg" #Complemento de Video Glide64mk2
						#Cambiar el complemento del Procesador [ Ya que Glide64, Glide64mk2, son incompatibles con el rsp-z64 que es LLE ]
						sed -i "s/RspPlugin =.*/RspPlugin = "'"mupen64plus-rsp-hle"'"/g" "$PWD/Datos/config/mupen64plus.cfg" #Complemento de Video Glide64mk2
						SDL_AUDIODRIVER=alsa LD_PRELOAD="\
						./.libs/64Bits/libminizip.so.1:\
						./.libs/64Bits/libpng16.so.16:\
						./.libs/64Bits/libz.so.1"
			
						./.mupen64plus.x64 --corelib "./.libs/64Bits/libmupen64plus.so.2.0.0" --datadir "." --configdir "."
						PID=$(pidof "$Ejecutable") ; export PID="$PID"
						wait "$PID" 2>/dev/null
				else
						#Esto inicia la ROM especificada por el usuario
						sed -i "s|IPL-ROM =.*\"|IPL-ROM = \"\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Desactivar la BIOS de la N64DD :
						#Iniciar el Emulador :
						SDL_AUDIODRIVER=alsa LD_PRELOAD="\
						./.libs/64Bits/libminizip.so.1:\
						./.libs/64Bits/libpng16.so.16:\
						./.libs/64Bits/libz.so.1" 
						
						echo 'Despues del -z "$@" de 64 Bits'
						echo '"$@"' = "$@"
						echo '"$*"' = "'"$*"'"
						echo '"$1"' = "'"$1"'"
						echo '"$2"' = "'"$2"'"
						
						./.mupen64plus.x64 --corelib "./.libs/64Bits/libmupen64plus.so.2.0.0" --datadir "." --configdir "." "$@"
						PID=$(pidof "$Ejecutable") ; export PID="$PID"
						wait "$PID" 2>/dev/null
		fi

					#Detectar si se especifica un juego de N64DD
					if	[ "$EXTENSION" = "ndd" ]; then
								sed -i "s|IPL-ROM =.*\"|IPL-ROM = \"$PWD/Datos/64dd_ipl.bin\"|g" "$PWD/Datos/config/mupen64plus.cfg" #BIOS N64 DD #Solo se debe usar cuando se usa un rom de N64DD
								#Iniciar el Emulador :
								SDL_AUDIODRIVER=alsa LD_PRELOAD="\
								./.libs/64Bits/libminizip.so.1:\
								./.libs/64Bits/libpng16.so.16:\
								./.libs/64Bits/libz.so.1" 
								./.mupen64plus.x64 --corelib "./.libs/64Bits/libmupen64plus.so.2.0.0" --datadir "./Datos/config" --configdir "./Datos/config" --dd-disk "$@" &
								PID=$(pidof "$Ejecutable") ; export PID="$PID"
								wait "$PID" 2>/dev/null

								#N64DD - Super Mario 64 Disk :
								if [ "$MD5" == "D9EA905727B44F2774926CB03C2300A7" ]; then
									#Cambiar el complemento de video por el de Rice ya que con los otros suele dar muchos errrores graficos como pantalla negra.
									sed -i "s/VideoPlugin =.*/VideoPlugin = mupen64plus-video-rice.so/g" "$PWD/Datos/config/mupen64plus.cfg" #Complemento de Video Rice

									#Iniciar el Emulador :
									SDL_AUDIODRIVER=alsa LD_PRELOAD="\
									./.libs/64Bits/libminizip.so.1:\
									./.libs/64Bits/libpng16.so.16:\
									./.libs/64Bits/libz.so.1" 
									./.mupen64plus.x64 --corelib "./.libs/64Bits/libmupen64plus.so.2.0.0" --datadir "./Datos/config" --configdir "./Datos/config" --dd-disk "$@" "./roms/sm64.n64" &
									PID=$(pidof "$Ejecutable") ; export PID="$PID"
									wait "$PID" 2>/dev/null
								fi						
					fi
fi

if [ "$Arquitectura" == "x32" ]
then
		export LD_LIBRARY_PATH="./.libs/32Bits":$LD_LIBRARY_PATH
		#Enlazar Complementos Iniciando :
		rm -rf "./mupen64plus-audio-sdl.so"											; ln -s "./.libs/32Bits/plugin/mupen64plus-audio-sdl.so"										"./mupen64plus-audio-sdl.so"
		rm -rf "./mupen64plus-input-sdl.so"											; ln -s "./.libs/32Bits/plugin/mupen64plus-input-sdl.so"										"./mupen64plus-input-sdl.so"
		rm -rf "./mupen64plus-rsp-cxd4-sse2.so"									; ln -s "./.libs/32Bits/plugin/mupen64plus-rsp-cxd4-sse2.so"								"./mupen64plus-rsp-cxd4-sse2.so"
		rm -rf "./mupen64plus-rsp-hle.so"												; ln -s "./.libs/32Bits/plugin/mupen64plus-rsp-hle.so"										"./mupen64plus-rsp-hle.so"
		rm -rf "./mupen64plus-rsp-z64-hlevideo.so"								; ln -s "./.libs/32Bits/plugin/mupen64plus-rsp-z64-hlevideo.so"							"./mupen64plus-rsp-z64-hlevideo.so"
		rm -rf "./mupen64plus-video-arachnoid.so"								; ln -s "./.libs/32Bits/plugin/mupen64plus-video-arachnoid.so"							"./mupen64plus-video-arachnoid.so"
		rm -rf "./mupen64plus-video-glide64.so"									; ln -s "./.libs/32Bits/plugin/mupen64plus-video-glide64.so"								"./mupen64plus-video-glide64.so"
		rm -rf "./mupen64plus-video-glide64mk2.so"							; ln -s "./.libs/32Bits/plugin/mupen64plus-video-glide64mk2.so"						"./mupen64plus-video-glide64mk2.so"
		rm -rf "./mupen64plus-video-GlideN64_Rev-1111a763"			; ln -s "./.libs/32Bits/plugin/mupen64plus-video-GlideN64_Rev-1111a763"		"./mupen64plus-video-GlideN64_Rev-1111a763"
		rm -rf "./mupen64plus-video-rice.so"										; ln -s "./.libs/32Bits/plugin/mupen64plus-video-rice.so"									"./mupen64plus-video-rice.so"
		rm -rf "./mupen64plus-video-z64.so"										; ln -s "./.libs/32Bits/plugin/mupen64plus-video-z64.so"									"./mupen64plus-video-z64.so"
		rm -rf "/tmp/mupen64plus/lib/libmupen64plus.so.2"					; ln -s "./.libs/32Bits/libmupen64plus.so.2.0.0"													"/tmp/mupen64plus/lib/libmupen64plus.so.2"
		rm -rf "/tmp/mupen64plus/.libs/32Bits/libmupen64plus.so.2"	; ln -s "./.libs/32Bits/libmupen64plus.so.2.0.0"													"/tmp/mupen64plus/.libs/32Bits/libmupen64plus.so.2"
		EJECUTABLE=".mupen64plus.x32"
		sed -i "s|mupen64plus=.*\"|mupen64plus=\"$PWD/$EJECUTABLE\"|g" "$PWD/Datos/config/mupen64plus-qt.conf" #Especifica el binario ejecutable que se utilizara
		sed -i "s|mupen64plus=.*\"|mupen64plus=\"$PWD/$EJECUTABLE\"|g" "$PWD/Datos/config/mupen64plus-ui.conf" #Especifica el binario ejecutable que se utilizara
		sed -i "s|config=.*\"|config=\"$PWD/Datos/config\"|g" "$PWD/Datos/config/mupen64plus-qt.conf" #Especifica la ruta de los archivos de configuracion
		sed -i "s|config=.*\"|config=\"$PWD/Datos/config\"|g" "$PWD/Datos/config/mupen64plus-ui.conf" #Especifica la ruta de los archivos de configuracion
		sed -i "s|data=.*\"|config=\"$PWD/Datos/config\"|g" "$PWD/Datos/config/mupen64plus-qt.conf" #Especifica la ruta de los archivos de configuracion
		sed -i "s|data=.*\"|config=\"$PWD/Datos/config\"|g" "$PWD/Datos/config/mupen64plus-ui.conf" #Especifica la ruta de los archivos de configuracion
		sed -i "s|plugins=.*\"|plugins=\"$PWD/.libs/32Bits/plugin\"|g" "$PWD/Datos/config/mupen64plus-qt.conf" #Especifica la ruta de los archivos complementos
		sed -i "s|plugins=.*\"|plugins=\"$PWD/.libs/32Bits/plugin\"|g" "$PWD/Datos/config/mupen64plus-ui.conf" #Especifica la ruta de los archivos complementos
		
		if [ -z "$@" ]; then
						#Iniciar el Emulador : En caso de no especificar ninguna rom, abrir la rom de ejemplo de mupen64plus
						sed -i "s|IPL-ROM =.*\"|IPL-ROM = \"\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Desactivar la BIOS de la N64DD
						sed -i "s|Disk =.*\"|Disk = \"\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Desactivar cualquier Disco de la N64DD
						#Cambiar el complemento de video por el de Glide64mk2.
						sed -i "s/VideoPlugin =.*/VideoPlugin = "'"mupen64plus-video-glide64mk2"'"/g" "$PWD/Datos/config/mupen64plus.cfg" #Complemento de Video Glide64mk2
						#Cambiar el complemento del Procesador [ Ya que Glide64, Glide64mk2, son incompatibles con el rsp-z64 que es LLE ]
						sed -i "s/RspPlugin =.*/RspPlugin = "'"mupen64plus-rsp-cxd4-sse2"'"/g" "$PWD/Datos/config/mupen64plus.cfg" #Complemento de Video Glide64mk2

						SDL_AUDIODRIVER=alsa LD_PRELOAD="\
						./.libs/32Bits/libminizip.so.1:\
						./.libs/32Bits/libpng16.so.16:\
						./.libs/32Bits/libz.so.1" 
						./.mupen64plus.x32 --corelib "./.libs/32Bits/libmupen64plus.so.2.0.0" --datadir "." --configdir "." "./roms/Mupen64Plus.v64"
						PID=$(pidof "$Ejecutable") ; export PID="$PID"
						wait "$PID" 2>/dev/null
				else
						#Esto inicia la ROM especificada por el usuario
						sed -i "s|IPL-ROM =.*\"|IPL-ROM = \"\"|g" "$PWD/Datos/config/mupen64plus.cfg" #Desactivar la BIOS de la N64DD :
						#Iniciar el Emulador :
						SDL_AUDIODRIVER=alsa LD_PRELOAD="\
						./.libs/32Bits/libminizip.so.1:\
						./.libs/32Bits/libpng16.so.16:\
						./.libs/32Bits/libz.so.1" 
						./.mupen64plus.x32 --corelib "./.libs/32Bits/libmupen64plus.so.2.0.0" --datadir "." --configdir "." "$@" 
						PID=$(pidof "$Ejecutable") ; export PID="$PID"
						wait "$PID" 2>/dev/null
		fi

					#Detectar si se especifica un juego de N64DD
					if	[ "$EXTENSION" = "ndd" ]; then
								sed -i "s|IPL-ROM =.*\"|IPL-ROM = \"$PWD/Datos/64dd_ipl.bin\"|g" "$PWD/Datos/config/mupen64plus.cfg" #BIOS N64 DD #Solo se debe usar cuando se usa un rom de N64DD
								#Iniciar el Emulador :
								SDL_AUDIODRIVER=alsa LD_PRELOAD="\
								./.libs/64Bits/libminizip.so.1:\
								./.libs/64Bits/libpng16.so.16:\
								./.libs/64Bits/libz.so.1" 
								./.mupen64plus.x32 --corelib "./.libs/32Bits/libmupen64plus.so.2.0.0" --datadir "." --configdir "." --dd-disk "$@"
								PID=$(pidof "$Ejecutable") ; export PID="$PID"
								wait "$PID" 2>/dev/null

								#N64DD - Super Mario 64 Disk :
								if [ "$MD5" == "D9EA905727B44F2774926CB03C2300A7" ]; then
									#Cambiar el complemento de video por el de Rice ya que con los otros suele dar muchos errrores graficos como pantalla negra.
									sed -i "s/VideoPlugin =.*/VideoPlugin = mupen64plus-video-rice.so/g" "$PWD/Datos/config/mupen64plus.cfg" #Complemento de Video Rice

									#Iniciar el Emulador :
									SDL_AUDIODRIVER=alsa LD_PRELOAD="\
									./.libs/32Bits/libminizip.so.1:\
									./.libs/32Bits/libpng16.so.16:\
									./.libs/32Bits/libz.so.1" 
									./.mupen64plus.x32 --corelib "./.libs/32Bits/libmupen64plus.so.2.0.0" --datadir "." --configdir "." --dd-disk "$@" "./roms/sm64.n64"
									PID=$(pidof "$Ejecutable") ; export PID="$PID"
									wait "$PID" 2>/dev/null
								fi						
					fi		
		
		#Enlazar Complementos Finalizado.
		#32B#LD_PRELOAD="./.libs/32Bits/libminizip.so.1:./.libs/32Bits/libpng16.so.16:./.libs/32Bits/libz.so.1" \
		#32B#./mupen64plus.x32 --corelib "./.libs/32Bits/libmupen64plus.so.2.0.0" --datadir "." --configdir "." "$@" &
		#32B#PID=$(pidof "$Ejecutable") ; export PID="$PID"
		#32B#wait "$PID" 2>/dev/null
		
fi

if [ -L "$HOME/.local/share/mupen64plus/save" ]
then	
	if [ -d "$HOME/.local/share/mupen64plus/save.original" ]
	then
			rm -rf "$HOME/.local/share/mupen64plus/save"
			mv "$HOME/.local/share/mupen64plus/save.original" "$HOME/.local/share/mupen64plus/save"
	fi
fi

if [ -L "$HOME/.local/share/mupen64plus.original" ]
then
	rm -rf "$HOME/.local/share/mupen64plus.original"
fi

if [ -L "$HOME/.local/share/mupen64plus" ]
then
	if [ -d "$HOME/.local/share/mupen64plus.original" ]
	then
			rm -rf "$HOME/.local/share/mupen64plus"
			mv "$HOME/.local/share/mupen64plus.original" "$HOME/.local/share/mupen64plus"
	fi
fi

if [ -L "$HOME/.config/mupen64plus/mupen64plus.original" ]
then
		rm -rf "$HOME/.config/mupen64plus/mupen64plus.original"		
fi

if [ -d "$HOME/.local/share/mupen64plus.original" ]
then
		mv "$HOME/.local/share/mupen64plus.original" "$HOME/.local/share/mupen64plus"
		rm -rf "$HOME/.local/share/mupen64plus.original"
fi

if [ -d "$HOME/.config/mupen64plus.original" ]
then
		mv "$HOME/.config/mupen64plus.original" "$HOME/.config/mupen64plus"
		rm -rf "$HOME/.config/mupen64plus.original"
fi

# Interfaz "mupen64plus-qt #
if [ -L "$HOME/.local/share/mupen64plus-qt" ]
then
		if [ -d "$HOME/.local/share/mupen64plus-qt.original" ]
		then
				rm -rf "$HOME/.local/share/mupen64plus-qt"
				mv "$HOME/.local/share/mupen64plus-qt.original" "$HOME/.local/share/mupen64plus-qt"
		fi
fi

if [ -L "$HOME/.config/mupen64plus/mupen64plus-qt.conf" ]
then
		if [ -F "$HOME/.config/mupen64plus/mupen64plus-qt.conf.original" ]
		then
				rm -rf "$HOME/.config/mupen64plus/mupen64plus-qt.conf"
				mv "$HOME/.config/mupen64plus/mupen64plus-qt.conf.original" "$HOME/.config/mupen64plus/mupen64plus-qt.conf"
		fi
fi

# Interfaz "mupen64plus-qt #

# Interfaz "mupen64plus-ui #
if [ -L "$HOME/.local/share/mupen64plus-ui" ]
then
		if [ -d "$HOME/.local/share/mupen64plus-ui.original" ]
		then
				rm -rf "$HOME/.local/share/mupen64plus-ui"
				mv "$HOME/.local/share/mupen64plus-ui.original" "$HOME/.local/share/mupen64plus-ui"
				rm -rf "$HOME/.local/share/mupen64plus-ui.original"
		fi
fi

if [ -L "$HOME/.config/mupen64plus/mupen64plus-ui.conf" ]
then
	rm -rf "$HOME/.config/mupen64plus/mupen64plus-ui.conf"
	mv "$HOME/.config/mupen64plus/mupen64plus-ui.conf.original" "$HOME/.config/mupen64plus/mupen64plus-ui.conf"
fi

if [ -L "$HOME/.config/mupen64plus" ]
then
		if [ -d "$HOME/.local/share/mupen64plus-ui.original" ]
		then
		
					if [ -L "$HOME/.config/mupen64plus/mupen64plus-ui.conf" ]
					then
							 rm -rf "$HOME/.config/mupen64plus/mupen64plus-ui.conf"
					fi
						
					if [ -e "$HOME/.config/mupen64plus/mupen64plus-ui.conf.original" ]
					then
							 mv "$HOME/.config/mupen64plus/mupen64plus-ui.conf.original" "$HOME/.config/mupen64plus/mupen64plus-ui.conf"
					fi

				mv "$HOME/.local/share/mupen64plus-ui.original"	"$HOME/.local/share/mupen64plus-ui"
				rm -rf "$HOME/.local/share/mupen64plus-ui.original"
		fi
fi
# Interfaz "mupen64plus-ui #

#Cache :
#DESACTIVADO#if [ -L "$HOME/.cache/mupen64plus/shaders.original" ]
#DESACTIVADO#then
#DESACTIVADO#			rm -rf "$HOME/.cache/mupen64plus/shaders.original"
#DESACTIVADO#fi

#DESACTIVADO#if [ -L "$HOME/.cache/mupen64plus/shaders" ]
#DESACTIVADO#then
#DESACTIVADO#		if [ -d "$HOME/.cache/mupen64plus/shaders.original" ]
#DESACTIVADO#		then
#DESACTIVADO#				rm -rf "$HOME/.cache/mupen64plus/shaders"
#DESACTIVADO#				mv "$HOME/.cache/mupen64plus/shaders.original" "$HOME/.cache/mupen64plus/shaders"
#DESACTIVADO#				rm -rf "$HOME/.cache/mupen64plus/shaders.original"
#DESACTIVADO#		fi
#DESACTIVADO#fi

#DESACTIVADO#if [ -L "$HOME/.cache/mupen64plus/glidehq.original" ]
#DESACTIVADO#then
#DESACTIVADO#			rm -rf "$HOME/.cache/mupen64plus/glidehq.original"
#DESACTIVADO#fi

#DESACTIVADO#if [ -L "$HOME/.cache/mupen64plus/shaders" ]
#DESACTIVADO#then
#DESACTIVADO#		if [ -d "$HOME/.cache/mupen64plus/glidehq.original" ]
#DESACTIVADO#		then
#DESACTIVADO#				rm -rf "$HOME/.cache/mupen64plus/glidehq"
#DESACTIVADO#				mv "$HOME/.cache/mupen64plus/glidehq.original" "$HOME/.cache/mupen64plus/glidehq"
#DESACTIVADO#				rm -rf "$HOME/.cache/mupen64plus/glidehq.original"
#DESACTIVADO#		fi
#DESACTIVADO#fi

exit 0

After i had that 3 files i can set application on "Open With" for "n64 roms" files based on MIME Types.

Three screen captures
MP64-P-Inu-Desk-001.pngMP64-P-Inu-Desk-002.pngMP64-P-Inu-Desk-003.png

Well i just need write on my parent script each configuration per title becuase mupen64plus from github, does not have something like that.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 726.83 KiB (Peak: 869.61 KiB) ]