From d8449501cfb987ee618b4a372446ea2b185b6203 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Tue, 28 Oct 2014 19:01:43 +0100 Subject: [PATCH 01/21] fix for ps3 device index bug --- scriptmodules/gamepads.shinc | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/scriptmodules/gamepads.shinc b/scriptmodules/gamepads.shinc index e95b3e2..c2394af 100644 --- a/scriptmodules/gamepads.shinc +++ b/scriptmodules/gamepads.shinc @@ -389,21 +389,25 @@ function ps3_set_ctrl_assignments() if [ -n "$device_id" ]; then echo "found controller on device 0" PS3_MAC_BLU=$(echo $device_id | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') + device_index_PS3=0 else device_id=`joydetect /dev/input/js1 2>/dev/null` if [ -n "$device_id" ]; then echo "found controller on device 1" PS3_MAC_BLU=$(echo $device_id | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') + device_index_PS3=1 else device_id=`joydetect /dev/input/js2 2>/dev/null` if [ -n "$device_id" ]; then echo "found controller on device 2" PS3_MAC_BLU=$(echo $device_id | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') + device_index_PS3=2 else device_id=`joydetect /dev/input/js3 2>/dev/null` if [ -n "$device_id" ]; then echo "found controller on device 3" PS3_MAC_BLU=$(echo $device_id | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') + device_index_PS3=3 else echo "No device found. Please try again under RetroRig Settings/Change Gamepad Type" fi @@ -411,7 +415,6 @@ function ps3_set_ctrl_assignments() fi fi echo -e "\nController ID/MAC Address applied to XBMC controls was:\n$PS3_MAC_BLU \n" - sleep 2s # copy over default keyboard file: cp "$scriptdir/gamepad-cfgs/ps3_blu_controller/keyboard.xml" "$xbmc_home/userdata/keymaps/" @@ -419,7 +422,7 @@ function ps3_set_ctrl_assignments() # Copy our keymap to the regular .xbmc dotfile directory if keyboard.xml exists: if [[ -f "$home/.xbmc/userdata/keymaps/keyboard.xml" ]]; then # back up current file - cp -v "$home/.xbmc/userdata/keymaps/keyboard.xml" "$home/.xbmc/userdata/keymaps/keyboard.xml.old" + cp "$home/.xbmc/userdata/keymaps/keyboard.xml" "$home/.xbmc/userdata/keymaps/keyboard.xml.old" # copy in keymap cp "$scriptdir/gamepad-cfgs/ps3_blu_controller/keyboard.xml" "$home/.xbmc/userdata/keymaps/" fi @@ -457,26 +460,34 @@ function ps3_set_emulator_ids() # Be necessary if [ $n == "1" ]; then + i=$((device_index_PS3+0)) + # Dolphin - dolphin_MAC_BLU=$(joydetect /dev/input/js0 | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') + dolphin_MAC_BLU=$(joydetect /dev/input/js$i | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') # Stella (supports only 2 players ) - Stella_MAC_BLU=$(joydetect /dev/input/js0 | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') + Stella_MAC_BLU=$(joydetect /dev/input/js$i | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') sed -i "s|p1_stella_MAC_temp|$Stella_MAC_BLU|g" "$config_home/.stella/stellarc" elif [ $n == "2" ]; then + i=$((device_index_PS3+1)) + # Dolphin - dolphin_MAC_BLU=$(joydetect /dev/input/js1 | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') + dolphin_MAC_BLU=$(joydetect /dev/input/js$i | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') # Stella (supports only 2 players ) - Stella_MAC_BLU=$(joydetect /dev/input/js1 | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') + Stella_MAC_BLU=$(joydetect /dev/input/js$i | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') sed -i "s|p2_stella_MAC_temp|$Stella_MAC_BLU|g" "$config_home/.stella/stellarc" elif [ $n == "3" ]; then + i=$((device_index_PS3+2)) + # Dolphin - dolphin_MAC_BLU=$(joydetect /dev/input/js2 | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') + dolphin_MAC_BLU=$(joydetect /dev/input/js$i | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') elif [ $n == "4" ]; then + i=$((device_index_PS3+3)) + # Dolphin - dolphin_MAC_BLU=$(joydetect /dev/input/js3 | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') + dolphin_MAC_BLU=$(joydetect /dev/input/js$i | awk -F'[^:[a-zA-Z0-9]*' '{print $6}') else echo "Error settings MAC/ID for emulator" @@ -489,6 +500,8 @@ function ps3_set_emulator_ids() # Assign controller ID sed -i "s|MAC_TEMP_$n|$dolphin_MAC_BLU|g" "$config_home/.dolphin-emu/Config/GCPadNew.ini" sed -i "s|MAC_TEMP_$n|$dolphin_MAC_BLU|g" "$config_home/.dolphin-emu/Config/WiimoteNew.ini" + + sleep 2 } From 70007e204e15e568d455e62a32408f2c141551b7 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Tue, 28 Oct 2014 20:30:38 +0100 Subject: [PATCH 02/21] retrorig-setup build script: fix for ps3 device index bug --- supplemental/build-retrorig-setup-ppa.sh | 4 ++-- supplemental/retrorig-setup/changelog | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/supplemental/build-retrorig-setup-ppa.sh b/supplemental/build-retrorig-setup-ppa.sh index 4fc2e78..b7a9c79 100755 --- a/supplemental/build-retrorig-setup-ppa.sh +++ b/supplemental/build-retrorig-setup-ppa.sh @@ -19,7 +19,7 @@ BASE=0.9.5 # In this case, this level will be used to denote incremental changes # instead of a specific branch for now (beta/master only exist at the # momement). -PL=4.2 +PL=4.3 #choose user #user="pk" @@ -70,7 +70,7 @@ if [ "$user" == "jc" ]; then LAUNCHPAD_PPA="ppa:beauman/retrorig-testing" #define uploader, date and time zone for changelog - uploader_date="Jens-Christian Lache Sun, 26 Oct 2014 09:30:00 +0100" + uploader_date="Jens-Christian Lache Tue, 28 Oct 2014 19:00:00 +0100" #define package maintainer for dsc and control file pkgmaintainer="RetroRig Development Team " diff --git a/supplemental/retrorig-setup/changelog b/supplemental/retrorig-setup/changelog index b99c24e..9246ba5 100644 --- a/supplemental/retrorig-setup/changelog +++ b/supplemental/retrorig-setup/changelog @@ -3,8 +3,14 @@ retrorig-setup (version_placeholder) trusty; urgency=medium * -- uploader_date + +retrorig-setup (0:0.9.5.4.3) trusty; urgency=medium + + * fix for ps3 device index bug + + -- Jens-Christian Lache Tue, 28 Oct 2014 19:00:00 +0100 - retrorig-setup (0:0.9.5.4.2) trusty; urgency=medium +retrorig-setup (0:0.9.5.4.2) trusty; urgency=medium * beta branch from beaumanvienna xbmc: Recreate main window after game exit for Gnome Desktop @@ -14,7 +20,7 @@ retrorig-setup (version_placeholder) trusty; urgency=medium -- Jens-Christian Lache Sun, 26 Oct 2014 09:30:00 +0100 - retrorig-setup (0:0.9.5.4.1) trusty; urgency=medium +retrorig-setup (0:0.9.5.4.1) trusty; urgency=medium * beta branch from beaumanvienna xbmc pl12, SDL2 version of ppsspp, Wii motion controller query From 82de0f0f51eba57fca121773386e91b6dcf02553 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Tue, 28 Oct 2014 21:05:50 +0100 Subject: [PATCH 03/21] auto start function --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index 8701d6c..bb4f4ec 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -14,7 +14,22 @@ do oldControllerAvailable=$controllerAvailable controllerAvailable=`cat /proc/bus/input/devices | grep PLAYSTATION` if [ "$controllerAvailable" != "$oldControllerAvailable" ]; then + + echo "sending gamepad reconfiguration request" killall xbmc.bin -SIGUSR1 + + #auto start xbmc for first controller to be switched on + if [ -z "$oldControllerAvailable" ]; then + #a controller was switched on + if [ -z "$(pidof xbmc.bin 2>/dev/null)" ]; then + # xbmc not running yet + /usr/share/applications/startXBMC.sh + + #make sure it knows of the controller just beeing switched on + sleep 5 + killall xbmc.bin -SIGUSR1 + fi + fi fi sleep 1 done From 34b4ccd8237c11891ea0df69ea1d8e688b8ef10d Mon Sep 17 00:00:00 2001 From: Jens-Christian Date: Tue, 28 Oct 2014 21:14:48 +0100 Subject: [PATCH 04/21] typo --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index bb4f4ec..678f55e 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -3,7 +3,7 @@ # Project RetroRig: https://github.com/ProfessorKaos64/RetroRig # This script detects a change on available PS controller. If detected, it notifies XBMC. # Author: Jens-Christiansen, aka beaumanvienna/JC -# Revision: 2014/06/21, initial version +# Revision: 2014/10/28, initial version controllerAvailable=`cat /proc/bus/input/devices | grep PLAYSTATION` @@ -25,7 +25,7 @@ do # xbmc not running yet /usr/share/applications/startXBMC.sh - #make sure it knows of the controller just beeing switched on + #make sure it knows of the controller just being switched on sleep 5 killall xbmc.bin -SIGUSR1 fi From 37bfb916c8dcedd1d92c2eb0e94cc1bdb552936f Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Tue, 28 Oct 2014 21:33:55 +0100 Subject: [PATCH 05/21] restore gp_autodetect_xbmc.sh --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index bb4f4ec..93600c7 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -15,21 +15,21 @@ do controllerAvailable=`cat /proc/bus/input/devices | grep PLAYSTATION` if [ "$controllerAvailable" != "$oldControllerAvailable" ]; then - echo "sending gamepad reconfiguration request" + #echo "sending gamepad reconfiguration request" killall xbmc.bin -SIGUSR1 #auto start xbmc for first controller to be switched on - if [ -z "$oldControllerAvailable" ]; then - #a controller was switched on - if [ -z "$(pidof xbmc.bin 2>/dev/null)" ]; then - # xbmc not running yet - /usr/share/applications/startXBMC.sh + #if [ -z "$oldControllerAvailable" ]; then + # #first controller was switched on + # if [ -z "$(pidof xbmc.bin 2>/dev/null)" ]; then + # # xbmc not running yet + # /usr/share/applications/startXBMC.sh - #make sure it knows of the controller just beeing switched on - sleep 5 - killall xbmc.bin -SIGUSR1 - fi - fi + # #make sure it knows of the controller just beeing switched on + # sleep 5 + # killall xbmc.bin -SIGUSR1 + # fi + #fi fi sleep 1 done From fdf1ff1c86e47f6dbac7c7f05a9334af209a127b Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Tue, 28 Oct 2014 22:37:53 +0100 Subject: [PATCH 06/21] auto start function --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 45 +++++++++++++++++++-------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index f42fa53..4006920 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -5,9 +5,7 @@ # Author: Jens-Christiansen, aka beaumanvienna/JC # Revision: 2014/10/28, initial version - controllerAvailable=`cat /proc/bus/input/devices | grep PLAYSTATION` -echo $controllerAvailable while [ 0 ] do @@ -15,21 +13,42 @@ do controllerAvailable=`cat /proc/bus/input/devices | grep PLAYSTATION` if [ "$controllerAvailable" != "$oldControllerAvailable" ]; then - #echo "sending gamepad reconfiguration request" + echo "sending gamepad reconfiguration request" killall xbmc.bin -SIGUSR1 #auto start xbmc for first controller to be switched on - #if [ -z "$oldControllerAvailable" ]; then - # #first controller was switched on - # if [ -z "$(pidof xbmc.bin 2>/dev/null)" ]; then - # # xbmc not running yet - # /usr/share/applications/startXBMC.sh + autostarted=false + if [ -z "$oldControllerAvailable" ]; then + #first controller was switched on + echo "first controller was switched on" + + if [ -z "$(ps ax|grep xbmc.bin|grep -v grep)" ]; then + # xbmc not running yet + echo "xbmc not running yet" + + # get user name + user=`ps aux |grep "/bin/dbus-daemon --config-file"|grep -v grep|cut -f 1 -d " "` + + export export DISPLAY=:0.0 + echo "auto starting RetroRig for user $user" + sudo -u $user /usr/share/applications/startXBMC.sh & + autostarted=true - # #make sure it knows of the controller just being switched on - # sleep 5 - # killall xbmc.bin -SIGUSR1 - # fi - #fi + fi + fi + + #diagnostic message + sleep 2 + if [ "$autostarted" == "true" ]; then + if [ -n "$(ps ax|grep xbmc.bin|grep -v grep)" ]; then + echo "RetroRig sucessfully started" + else + echo "attempt to start RetroRig failed" + fi + else + echo "RetroRig *not* started automatically (either first controller not switched on or xbmc already running)" + fi + fi sleep 1 done From 4ae3f74670f641080b311df8f86d85e87742a99b Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Wed, 29 Oct 2014 19:44:06 +0100 Subject: [PATCH 07/21] fixed broken shutdown option when autostarting xbmc --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index 4006920..8e3b538 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -31,7 +31,7 @@ do export export DISPLAY=:0.0 echo "auto starting RetroRig for user $user" - sudo -u $user /usr/share/applications/startXBMC.sh & + sudo -u $user -g $user -s /usr/share/applications/startXBMC.sh & autostarted=true fi From a627d71b53f4df6e04787cbf231331d1442cd1ca Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Wed, 29 Oct 2014 20:37:26 +0100 Subject: [PATCH 08/21] fixed merge problem --- scriptmodules/emulators.shinc.orig | 197 ---- scriptmodules/setup.shinc | 3 + scriptmodules/setup.shinc.orig | 1258 ------------------------- scriptmodules/syscalls-deb.shinc.orig | 91 -- scripts/scripts | 1 - 5 files changed, 3 insertions(+), 1547 deletions(-) delete mode 100644 scriptmodules/emulators.shinc.orig delete mode 100644 scriptmodules/setup.shinc.orig delete mode 100644 scriptmodules/syscalls-deb.shinc.orig delete mode 120000 scripts/scripts diff --git a/scriptmodules/emulators.shinc.orig b/scriptmodules/emulators.shinc.orig deleted file mode 100644 index d7acb06..0000000 --- a/scriptmodules/emulators.shinc.orig +++ /dev/null @@ -1,197 +0,0 @@ -#!/bin/bash -# -# RetroRig emulator modules -# This is a small script to copy over configuration files for emulators -# append a "-x" on the end above for debugging if need be -# Please report any errors via a pull request -# You can also reach me on twitter: @N3RD42 -# - -function em_add_repos() -{ - - #dummy instruction - sleep 1 - -} - -function em_install_yabause() -{ - # This may be source compiled in the future - echo "Installing Sega Saturn emulator Yabause" - $cmd_install_pkg yabause - -} - -function em_install_pcsx2() -{ - echo "Installing Playstation 2 emulator PCSX2" - $cmd_install_pkg pcsx2 - # Unstable version still needs testing: - # pkg_install pcsx2-unstable - - # Link BIOS path from home/RetroRig (source) to .retrorig/ - ln -sf "$rootdir/BIOS/PCSX2" "$config_home/.config/pcsx2/bios" - - #User might have the idea to manually state a bios file in the terminal. - #To save them exporting HOME as /home/user/.retrorig, - #a symbolic link is created. - - date=`date` - mv "$HOME/.config/pcsx2" "$HOME/.config/pcsx2.backup_retrorig.$date" - ln -vs "$config_home/.config/pcsx2/" "$HOME/.config" - -} - -function em_install_dolphin() -{ - - echo "Installing Nintendo Gamecube emulator Dolphin" - $cmd_remove_pkg dolphin-emu dolphin-emu-master - $cmd_install_pkg dolphin-emu - -} - -function em_install_ppsspp_source() -{ - - # !!!! NOT USED AT THE MOMENT !!! # - - # need to gauge speed or compile on different system setups - - # I have to compipile SDL support from source for now, since I need the - # multiple SDL joystick support for my use of xboxdrv - # See: https://github.com/hrydgard/ppsspp/tree/master/SDL - - echo "Installing (PSP Portable) emulator PPSSPP (from source)" - # install prereq packages - $cmd_install_pkg gcc, cmake, zlib1g-dev, libsdl1.2-dev, qtmobility-dev, qt4-qmake, libqt4-opengl, libqt4-dev, dh-make - cd "$rootdir/emulators" - # clone git repo and checkout modules - git clone https://github.com/hrydgard/ppsspp - cd ppsspp - git submodule update --init - # build qt4 - qmake-qt4 Qt/PPSSPPQt.pro - # Install SDL support - cd SDL - ./buildassets.sh - cd .. - ./b.sh - -} - -function em_install_ppsspp() -{ - echo "Installing Playstation Portable emulator ppsspp" - - # release aptitude hold for upgrade/install - $cmd_unhold_pkg ppsspp - - #remove any previously installed version - $cmd_remove_pkg ppsspp - - #install from PPA - $cmd_install_pkg ppsspp - - # hold package after install against upgrades - $cmd_hold_pkg ppsspp - -} - -function em_install_stella() -{ - echo "Installing Atari 2600 emulator Stella" - - # release aptitude hold for upgrade/install - $cmd_unhold_pkg stella - - #remove any previously installed version - $cmd_remove_pkg stella - - #install from PPA - $cmd_install_pkg stella - - # hold package after install against upgrades - $cmd_hold_pkg stella - - ############################################################################################################ - # installation of stella from libregeek.org (deprecated) - # - # # As of 20140802, Stella, at least in testing, would fail to launch when using OpenGL - # # Stella was build from the latest SVN trunk, and works successfully - # # Source: http://stella.sourceforge.net/development.php - # # SVN trunk: 'svn co https://svn.code.sf.net/p/stella/code/trunk stella' - # - # wget --tries=50 -P "/usr/bin/" "www.libregeek.org/RetroRig/Ubuntu-Trusty/emulators/Stella/stella" - # chmod +x "/usr/bin/stella" - ############################################################################################################ - -} - -function em_install_mupen64plus() -{ - echo "Installing mupen64plus emulator" - $cmd_install_pkg mupen64plus -} - - -function em_install_mame() -{ - echo "Installing MAME emulator" - $cmd_install_pkg mame -} - -function em_install_mednafen() -{ - # release aptitude hold for upgrade/install - $cmd_unhold_pkg mednafen - - #remove any previously installed version - $cmd_remove_pkg mednafen - - echo "Installing Mednafen emulator" - $cmd_install_pkg mednafen - #wget --tries=50 -P /tmp "www.libregeek.org/RetroRig/Ubuntu-Trusty/mednafen/mednafen-patched-for-retrorig-patchlevel-1-0trusty.deb" - #$cmd_install_pkg libsdl2-2.0-0 - #dpkg -i "/tmp/mednafen-patched-for-retrorig-patchlevel-1-0trusty.deb" - - # hold package after install against upgrades - $cmd_hold_pkg mednafen - -} - -function em_install_mess() -{ - echo "Installing MESS emulator" - $cmd_install_pkg mess -} - -function em_install_gens() -{ - -<<<<<<< HEAD - # release pkg hold for upgrade/install -======= - # release aptitude hold for upgrade/install ->>>>>>> 423e998258a746a6bf33be60c41035a5ad2dcead - $cmd_unhold_pkg gens - - #remove any previously installed version - $cmd_remove_pkg gens - - echo "Installing Gens Sega CD/32X emulator" - $cmd_pkg_install install gens - - # deprecated: installation from libregeek.org: - #wget --tries=50 -P /tmp "http://www.libregeek.org/RetroRig/Ubuntu-Trusty/emulators/gens//Gens_2.16.7_i386.deb" - #dpkg -i "/tmp/Gens_2.16.7_i386.deb" - # cleanup pkg file - #rm -f "/tmp/Gens_2.16.7_i386.deb" - - # hold package after install against upgrades - $cmd_hold_pkg gens - -} - - diff --git a/scriptmodules/setup.shinc b/scriptmodules/setup.shinc index 8657920..36cdeb5 100644 --- a/scriptmodules/setup.shinc +++ b/scriptmodules/setup.shinc @@ -308,6 +308,9 @@ options=(1 "Xbox 360 Controller (wireless)" esac done + + wii_motion_controller_for_dolphin + } diff --git a/scriptmodules/setup.shinc.orig b/scriptmodules/setup.shinc.orig deleted file mode 100644 index fd1e5c4..0000000 --- a/scriptmodules/setup.shinc.orig +++ /dev/null @@ -1,1258 +0,0 @@ -#!/bin/bash -# -# RetroRig setup modules -# This is a small script to copy over configuration files for emulators -# append a "-x" on the end above for debugging if need be -# Please report any errors via a pull request -# You can also reach me on twitter: @N3RD42 -# - -function rrs_prepareFolders() -{ - echo "Creating folders for ROMs, Artwork, Saves, and dotfiles" - # We pass -p below,so all folders below are created for - # a given path - - pathlist=() - - # create autostart folder for manual desktop entries - pathlist+=("$home/.config/autostart/") - - #emulator base directory - #pathlist+=("$rootdir/emulators") - - #setup skelton folders for XBMC Rom Collection Browser - #ROMs - pathlist+=("$rootdir/ROMs/Atari 2600") - pathlist+=("$rootdir/ROMs/Atari Lynx") - pathlist+=("$rootdir/ROMs/Gamecube") - pathlist+=("$rootdir/ROMs/MAME") - pathlist+=("$rootdir/ROMs/mupen64plus") - pathlist+=("$rootdir/ROMs/NES") - pathlist+=("$rootdir/ROMs/SNES") - pathlist+=("$rootdir/ROMs/Sega Master System") - pathlist+=("$rootdir/ROMs/Sega Game Gear") - pathlist+=("$rootdir/ROMs/Sega Genesis") - pathlist+=("$rootdir/ROMs/Sega CD") - pathlist+=("$rootdir/ROMs/Sega 32X") - pathlist+=("$rootdir/ROMs/GB") - pathlist+=("$rootdir/ROMs/GBC") - pathlist+=("$rootdir/ROMs/GBA") - pathlist+=("$rootdir/ROMs/TurboGraphx 16") - pathlist+=("$rootdir/ROMs/Neo Geo/CDZ") - pathlist+=("$rootdir/ROMs/Neo Geo/AES") - pathlist+=("$rootdir/ROMs/PSP") - pathlist+=("$rootdir/ROMs/PS1") - pathlist+=("$rootdir/ROMs/PS2") - pathlist+=("$rootdir/ROMs/Wii") - - #Artwork - pathlist+=("$rootdir/Artwork/Atari 2600") - pathlist+=("$rootdir/Artwork/Atari Lynx") - pathlist+=("$rootdir/Artwork/Gamecube") - pathlist+=("$rootdir/Artwork/Nintendo 64") - pathlist+=("$rootdir/Artwork/NES") - pathlist+=("$rootdir/Artwork/SNES") - pathlist+=("$rootdir/Artwork/Sega Master System") - pathlist+=("$rootdir/Artwork/Sega Game Gear") - pathlist+=("$rootdir/Artwork/Sega Genesis") - pathlist+=("$rootdir/Artwork/Sega CD") - pathlist+=("$rootdir/Artwork/Sega 32X") - pathlist+=("$rootdir/Artwork/GB") - pathlist+=("$rootdir/Artwork/GBC") - pathlist+=("$rootdir/Artwork/GBA") - pathlist+=("$rootdir/Artwork/TurboGraphx 16") - pathlist+=("$rootdir/Artwork/Neo Geo/CDZ") - pathlist+=("$rootdir/Artwork/Neo Geo/AES") - pathlist+=("$rootdir/Artwork/PSP") - pathlist+=("$rootdir/Artwork/PS1") - pathlist+=("$rootdir/Artwork/PS2") - pathlist+=("$rootdir/Artwork/Wii") - pathlist+=("$rootdir/Artwork/XBMC") - - #Artwork - MAME offline scraper - pathlist+=("$rootdir/Artwork/MAME") - pathlist+=("$rootdir/Artwork/MAME/boxfront") - pathlist+=("$rootdir/Artwork/MAME/RCB") - pathlist+=("$rootdir/Artwork/MAME/cabinet") - pathlist+=("$rootdir/Artwork/MAME/marquee") - pathlist+=("$rootdir/Artwork/MAME/action") - pathlist+=("$rootdir/Artwork/MAME/title") - pathlist+=("$rootdir/Artwork/MAME/gameplay") - - #Saves (if any) - pathlist+=("$rootdir/Saves/Atari 2600") - pathlist+=("$rootdir/Saves/Atari Lynx") - pathlist+=("$rootdir/Saves/MAME") - pathlist+=("$rootdir/Saves/dolphin-emu") - pathlist+=("$rootdir/Saves/mupen64plus") - pathlist+=("$rootdir/Saves/mednafen") - pathlist+=("$rootdir/Saves/GensGS") - pathlist+=("$rootdir/Saves/GB") - pathlist+=("$rootdir/Saves/GBC") - pathlist+=("$rootdir/Saves/GBA") - pathlist+=("$rootdir/Saves/TurboGraphx 16") - pathlist+=("$rootdir/Saves/Neo Geo/CDZ") - pathlist+=("$rootdir/Saves/Neo Geo/AES") - pathlist+=("$rootdir/Saves/ppsspp") - pathlist+=("$rootdir/Saves/pcsx2") - - # create dotfiles - pathlist+=("$home/.retrorig") - pathlist+=("$config_home/.qjoypad3") - pathlist+=("$config_home/.config/antimicro") - pathlist+=("$config_home/.dolphin-emu/Config") - - # XBMC's path is set to our .retrorig directory, on with the rest: - pathlist+=("$config_home/.config/mupen64plus") - pathlist+=("$config_home/.config/ppsspp/PSP/SYSTEM") - pathlist+=("$config_home/.mame/cfg") - pathlist+=("$config_home/.mess") - pathlist+=("$config_home/.gens") - pathlist+=("$config_home/.config/pcsx2/inis") - pathlist+=("$config_home/.config/pcsx2/memcards") - pathlist+=("$config_home/.mess/cfg") - pathlist+=("$config_home/.stella") - pathlist+=("$config_home/.mednafen") - - # xbmc folders - pathlist+=("$xbmc_home/userdata/keymaps") - - #BIOS folder(s) - pathlist+=("$rootdir/BIOS/MESS") - pathlist+=("$rootdir/BIOS/MAME") - pathlist+=("$rootdir/BIOS/Gens") - # Note: PS1 BIOS path is set in mednafen under: - # filesys.path_firmware - pathlist+=("$rootdir/BIOS/Mednafen") - pathlist+=("$rootdir/BIOS/PCSX2") - - #folder for savestates - pathlist+=("$home/.retrorig/.dolphin-emu") - pathlist+=("$home/.retrorig/.gens") - pathlist+=("$home/.retrorig/.mednafen") - pathlist+=("$home/.retrorig/.config/mupen64plus") - pathlist+=("$home/.retrorig/.config/pcsx2") - pathlist+=("$home/.retrorig/.config/ppsspp/ppsspp") - - #Configs (not needed at the moment) - # pathlist+=("$rootdir/Configs") - - # quotes needed on entry to preven globbing on directory creation! - # Expanding arrays involves [@] and {} - for entry in "${pathlist[@]}" - do - if [[ ! -d "$entry" ]]; then - mkdir -p "$entry" - chown "$user" "$entry" - chgrp "$user" "$entry" - fi - done - - # correct permissions - h_correct_perms - - #backup existing state saves, if a backup folder does not exist, and the save state folder a real directory is - if [ ! -d "$home/.retrorig/.dolphin-emu/StateSaves.old" ]; then - if [ ! -L "$home/.retrorig/.dolphin-emu/StateSaves" ]; then - if [ -d "$home/.retrorig/.dolphin-emu/StateSaves" ]; then - mv -f "$home/.retrorig/.dolphin-emu/StateSaves" "$home/.retrorig/.dolphin-emu/StateSaves.old" - dolphin_backup=true - fi - fi - fi - - if [ ! -d "$home/.retrorig/.config/mupen64plus/save.old" ]; then - if [ ! -L "$home/.retrorig/.config/mupen64plus/save" ]; then - if [ -d "$home/.retrorig/.config/mupen64plus/save" ]; then - mv -f "$home/.retrorig/.config/mupen64plus/save" "$home/.retrorig/.config/mupen64plus/save.old" - mupen64plus_backup=true - fi - fi - fi - - if [ ! -d "$home/.retrorig/.mednafen/sav.old" ]; then - if [ ! -L "$home/.retrorig/.mednafen/sav" ]; then - if [ -d "$home/.retrorig/.mednafen/sav" ]; then - mv -f "$home/.retrorig/.mednafen/sav" "$home/.retrorig/.mednafen/sav.old" - mednafen_backup=true - fi - fi - fi - - if [ ! -d "$home/.retrorig/.gens/StateSaves.old" ]; then - if [ ! -L "$home/.retrorig/.gens/StateSaves" ]; then - if [ -d "$home/.retrorig/.gens/StateSaves" ]; then - mv -f "$home/.retrorig/.gens/StateSaves" "$home/.retrorig/.gens/StateSaves.old" - gens_backup=true - fi - fi - fi - - if [ ! -d "$home/.retrorig/.config/ppsspp/PSP/SAVEDATA.old" ]; then - if [ ! -L "$home/.retrorig/.config/ppsspp/PSP/SAVEDATA" ]; then - if [ -d "$home/.retrorig/.config/ppsspp/PSP/SAVEDATA" ]; then - mv -f "$home/.retrorig/.config/ppsspp/PSP/SAVEDATA" "$home/.retrorig/.config/ppsspp/PSP/SAVEDATA.old" - ppsspp_backup=true - fi - fi - fi - - if [ ! -d "$home/.retrorig/.config/pcsx2/sstates.old" ]; then - if [ ! -L "$home/.retrorig/.config/pcsx2/sstates" ]; then - if [ -d "$home/.retrorig/.config/pcsx2/sstates" ]; then - mv -f "$home/.retrorig/.config/pcsx2/sstates" "$home/.retrorig/.config/pcsx2/sstates.old" - pcsx2_backup=true - fi - fi - fi - - #remove old links - rm -f "$home/.retrorig/.dolphin-emu/StateSaves" - rm -f "$home/.retrorig/.config/mupen64plus/save" - rm -f "$home/.retrorig/.mednafen/sav" - rm -f "$home/.retrorig/.gens/StateSaves" - rm -f "$home/.retrorig/.config/ppsspp/PSP/SAVEDATA" - rm -f "$home/.retrorig/.config/pcsx2/sstates" - - #create links - ln -sf "$rootdir/Saves/dolphin-emu" "$home/.retrorig/.dolphin-emu/StateSaves" - ln -sf "$rootdir/Saves/mupen64plus" "$home/.retrorig/.config/mupen64plus/save" - ln -sf "$rootdir/Saves/mednafen" "$home/.retrorig/.mednafen/sav" - ln -sf "$rootdir/Saves/GensGS" "$home/.retrorig/.gens/StateSaves" - ln -sf "$rootdir/Saves/ppsspp" "$home/.retrorig/.config/ppsspp/PSP/SAVEDATA" - ln -sf "$rootdir/Saves/pcsx2" "$home/.retrorig/.config/pcsx2/sstates" - - #restore backup - if [ "$dolphin_backup" == "true" ]; then - cp -rf "$home/.retrorig/.dolphin-emu/StateSaves.old/*" "$home/.retrorig/.dolphin-emu/StateSaves/" - fi - - if [ "$mupen64plus_backup" == "true" ]; then - cp -rf "$home/.retrorig/.config/mupen64plus/StateSaves.old/*" "$home/.retrorig/.config/mupen64plus/StateSaves/" - fi - - if [ "$mednafen_backup" == "true" ]; then - cp -rf "$home/.retrorig/.mednafen/sav.old/*" "$home/.retrorig/.mednafen/sav/" - fi - - if [ "$gens_backup" == "true" ]; then - cp -rf "$home/.retrorig/.gens/StateSaves.old/*" "$home/.retrorig/.gens/StateSaves/" - fi - - if [ "$ppsspp_backup" == "true" ]; then - cp -rf "$home/.retrorig/.config/ppsspp/PSP/SAVEDATA.old/*" "$home/.retrorig/.config/ppsspp/PSP/SAVEDATA/" - fi - - if [ "$pcsx2_backup" == "true" ]; then - cp -rf "$home/.retrorig/.config/pcsx2/sstates.old/*" "$home/.retrorig/.config/pcsx2/sstates/" - fi - - #change permission - chown -R "$user" "$rootdir/Saves/" - chgrp -R "$user" "$rootdir/Saves/" - chown -R "$user" "$home/.retrorig/" - chgrp -R "$user" "$home/.retrorig/" - -} - -function rrs_gamepad () -{ - -# some residual chown/chmod text shows up at times, clear -clear - -cmd=(dialog --backtitle "LibreGeek.org RetroRig Installer" --menu "| Gamepad Select | \ - Request any new Gamepads via github!" 16 62 16) -options=(1 "Xbox 360 Controller (wireless)" - 2 "Xbox 360 Controller (USB)" - 3 "Sony PS3 Sixaxis (Bluetooth)" - 4 "Sony PS3 Sixaxis (USB)" - 5 "Exit gamepad selection") - - #make menu choice - selection=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) - #functions - - for choice in $selection - do - case $choice in - - 1) - gp_common - gp_x360_wireless - h_restore_bios_cfg - ;; - - 2) - gp_common - gp_x360_usb - h_restore_bios_cfg - ;; - - 3) - gp_common - gp_ps3_blu - h_restore_bios_cfg - ;; - - 4) - gp_common - gp_ps3_usb - h_restore_bios_cfg - ;; - - 5) - return - ;; - - esac - done - - wii_motion_controller_for_dolphin - -} - - -function rrs_post_install() -{ - - # Based on the type of type Desktop Environment - # This function targets DE-specific areas for screensavers, - # power functions, shortcuts and more. - - # $XDG_CURRENT_DESKTOP will tell you what DE you are using. - rrDE=$XDG_CURRENT_DESKTOP -<<<<<<< HEAD - - case $rrDE in - Unity) - - # Disable screensaver, XBMC will manage this - # Export display to allow gsettings running in terminal window - export DISPLAY=:0.0 - gsettings set org.gnome.desktop.screensaver lock-enabled false - gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false - gsettings set org.gnome.desktop.session idle-delay 3600 - - # Create Unity launcher icon from existing /usr/share/applications/RetroRig.desktop - # This only applies to Unity desktop users. - gsettings set com.canonical.Unity.Launcher favorites "$(gsettings get com.canonical.Unity.Launcher favorites | sed "s/, *'RetroRig.desktop' *//g" | sed "s/'RetroRig.desktop' *, *//g" | sed -e "s/]$/, 'RetroRig.desktop'")" - ;; - - Gnome) - # Nothing to see here yet - ;; - - Cinnamon) - # Nothing to see here yet - ;; - - *) - ;; - esac - -} - -function rrs_discover_distro() -{ - # OS Distro - OS_ID_STRING=$(lsb_release -a 2>/dev/null|grep "Distributor ID") - OS_TYPE=$(echo $OS_ID_STRING|cut -f 3 -d ' ') - - # Release - OS_RELEASE_STRING=$(lsb_release -a 2>/dev/null|grep "Release") - OS_RELEASE=$(echo $OS_RELEASE_STRING | sed s/' '//g | cut -f 2 -d ':') -} - -function rrs_source_syscalls() -{ - # Source the correct syscalls for platform - # This largely alludes to the default package manager - echo "Setting syscalls based on package manager..." - - case $OS_TYPE in - Ubuntu) - - case $OS_RELEASE in - - 14.04) - source "$scriptdir/scriptmodules/syscalls-deb.shinc" - platform_check="Yes" - pkg_manager="apt/aptitude" - ;; - - 14.10) - source "$scriptdir/scriptmodules/syscalls-deb.shinc" - platform_check="Yes" - pkg_manager="apt/aptitude" - ;; - - *) - - # This does not exit the script at this time, but will once - # All proper support distros that work are identifed. - echo "" - echo "##################### WARNING ######################" - echo "Distro release version not supported at this time!" - echo "Proceed at your own risk." - echo "#####################################################" - echo "" - sleep 5s - #clear - #exit - ;; - esac - ;; - - LinuxMint) - - case $OS_RELEASE in - - 17) - source "$scriptdir/scriptmodules/syscalls-deb.shinc" - platform_check="Yes" - pkg_manager="apt/aptitude" - ;; - - - *) - - # This does not exit the script at this time, but will once - # All proper support distros that work are identifed. - echo "" - echo "##################### WARNING ######################" - echo "Distro release version not supported at this time!" - echo "Proceed at your own risk." - echo "#####################################################" - echo "" - sleep 5s - #clear - #exit - ;; - esac - - ;; - - Deepin) - - case $OS_RELEASE in - - 2014) - source "$scriptdir/scriptmodules/syscalls-deb.shinc" - platform_check="Yes" - pkg_manager="apt/aptitude" - ;; - - - *) - - # This does not exit the script at this time, but will once - # All proper support distros that work are identifed. - echo "" - echo "##################### WARNING ######################" - echo "Distro release version not supported at this time!" - echo "Proceed at your own risk." - echo "#####################################################" - echo "" - sleep 5s - #clear - #exit - ;; - esac - - ;; - - *) - # This does not exit the script at this time, but will once - # All proper support distros that work are identifed. - echo "" - echo "##################### WARNING ######################" - echo "Distribution/Platform not supported at this time!" - echo "Proceed at your own risk." - echo "#####################################################" - echo "" - sleep 5s - #clear - #exit - ;; - - esac - - echo "Supported Platform? $platform_check" - echo "Primary package management system: $pkg_manager" - echo "" - sleep 5s - -} - -======= - - case $rrDE in - Unity) - - # Disable screensaver, XBMC will manage this - # Export display to allow gsettings running in terminal window - export DISPLAY=:0.0 - gsettings set org.gnome.desktop.screensaver lock-enabled false - gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false - gsettings set org.gnome.desktop.session idle-delay 3600 - - # Create Unity launcher icon from existing /usr/share/applications/RetroRig.desktop - # This only applies to Unity desktop users. - gsettings set com.canonical.Unity.Launcher favorites "$(gsettings get com.canonical.Unity.Launcher favorites | sed "s/, *'RetroRig.desktop' *//g" | sed "s/'RetroRig.desktop' *, *//g" | sed -e "s/]$/, 'RetroRig.desktop'")" - ;; - - Gnome) - # Nothing to see here yet - ;; - - Cinnamon) - # Nothing to see here yet - ;; - - *) - ;; - esac - -} - -function rrs_discover_distro() -{ - # OS Distro - OS_ID_STRING=$(lsb_release -a 2>/dev/null|grep "Distributor ID") - OS_TYPE=$(echo $OS_ID_STRING|cut -f 3 -d ' ') - - # Release - OS_RELEASE_STRING=$(lsb_release -a 2>/dev/null|grep "Release") - OS_RELEASE=$(echo $OS_RELEASE_STRING | sed s/' '//g | cut -f 2 -d ':') -} - -function rrs_source_syscalls() -{ - # Source the correct syscalls for platform - # This largely alludes to the default package manager - echo "Setting syscalls based on package manager..." - - case $OS_TYPE in - Ubuntu) - - case $OS_RELEASE in - - 14.04) - source "$scriptdir/scriptmodules/syscalls-deb.shinc" - platform_check="Yes" - pkg_manager="apt/aptitude" - ;; - - 14.10) - source "$scriptdir/scriptmodules/syscalls-deb.shinc" - platform_check="Yes" - pkg_manager="apt/aptitude" - ;; - - *) - - # This does not exit the script at this time, but will once - # All proper support distros that work are identifed. - echo "" - echo "##################### WARNING ######################" - echo "Distro release version not supported at this time!" - echo "Proceed at your own risk." - echo "#####################################################" - echo "" - sleep 5s - #clear - #exit - ;; - esac - ;; - - LinuxMint) - - case $OS_RELEASE in - - 17) - source "$scriptdir/scriptmodules/syscalls-deb.shinc" - platform_check="Yes" - pkg_manager="apt/aptitude" - ;; - - - *) - - # This does not exit the script at this time, but will once - # All proper support distros that work are identifed. - echo "" - echo "##################### WARNING ######################" - echo "Distro release version not supported at this time!" - echo "Proceed at your own risk." - echo "#####################################################" - echo "" - sleep 5s - #clear - #exit - ;; - esac - - ;; - - Deepin) - - case $OS_RELEASE in - - 2014) - source "$scriptdir/scriptmodules/syscalls-deb.shinc" - platform_check="Yes" - pkg_manager="apt/aptitude" - ;; - - - *) - - # This does not exit the script at this time, but will once - # All proper support distros that work are identifed. - echo "" - echo "##################### WARNING ######################" - echo "Distro release version not supported at this time!" - echo "Proceed at your own risk." - echo "#####################################################" - echo "" - sleep 5s - #clear - #exit - ;; - esac - - ;; - - *) - # This does not exit the script at this time, but will once - # All proper support distros that work are identifed. - echo "" - echo "##################### WARNING ######################" - echo "Distribution/Platform not supported at this time!" - echo "Proceed at your own risk." - echo "#####################################################" - echo "" - sleep 5s - #clear - #exit - ;; - - esac - - echo "Supported Platform? $platform_check" - echo "Primary package management system: $pkg_manager" - echo "" - sleep 5s - -} - ->>>>>>> 423e998258a746a6bf33be60c41035a5ad2dcead -function rrs_add_standard_repos() -{ - ######################################################## - # install package repositories and missing libraries - ######################################################## - - case $OS_TYPE in - "Ubuntu") - #find version of operating system - - - ############################################################### - # Add our standport Debian repositories for various pkgs - ############################################################### - # add respository for RetroRig backends (xbmc, mednafen,...) - add-apt-repository -y ppa:beauman/retrorig - # Add repository for additional pkgs (retrorig-setup, joydetect) - add-apt-repository -y ppa:mdeguzis/retrorig - - case $OS_RELEASE in - - 14.04) - - echo "running Ubuntu 14.04 LTS" - ;; - - 14.10) - - echo "running Ubuntu 14.10" - - #add beauman's trusty repository - echo "deb http://ppa.launchpad.net/beauman/retrorig/ubuntu trusty main" >\ - /etc/apt/sources.list.d/beauman-ubuntu-retrorig-trusty.list - - echo "deb http://ppa.launchpad.net/beauman/retrorig-testing/ubuntu trusty main" >\ - /etc/apt/sources.list.d/beauman-ubuntu-retrorig-testing-trusty.list - - echo "copying missing libraries for Ubuntu 14.10" - mkdir -p /usr/lib/RetroRig - cd /usr/lib/RetroRig - wget --tries=50 -P /tmp "http://www.libregeek.org/RetroRig/libs/libs.Ubuntu.14.10.tar.bz" - tar xvfj /tmp/libs.Ubuntu.14.10.tar.bz - - echo "installing librariessystem wide" - cd /etc/ld.so.conf.d/ - echo /usr/lib/RetroRig > RetroRig.conf - ldconfig - -# TODO -# DEINSTALLATION CODE -# -# # remove PPA -# rm -f /etc/apt/sources.list.d/beauman-ubuntu-retrorig-trusty.list* -# rm -f /etc/apt/sources.list.d/beauman-ubuntu-retrorig-testing-trusty.list* -# apt-get update -# -# # remove supplemental libraries -# rm -rf /usr/lib/RetroRig -# rm /etc/ld.so.conf.d/RetroRig.conf -# ldconfig - ;; - - *) - ;; - esac - ;; - - LinuxMint) - - ############################################################### - # Add our standport Debian repositories for various pkgs - ############################################################### - # add respository for RetroRig backends (xbmc, mednafen,...) - add-apt-repository -y ppa:beauman/retrorig - # Add repository for additional pkgs (retrorig-setup, joydetect) - add-apt-repository -y ppa:mdeguzis/retrorig - - case $OS_RELEASE in - "17") - echo "running Linux Mint 17 Qiana" - - # latest X11 drivers - $cmd_add_repo ppa:xorg-edgers/ppa - ;; - - *) - ;; - esac - ;; - Deepin) - - ############################################################### - # Add our standport Debian repositories for various pkgs - ############################################################### - # add respository for RetroRig backends (xbmc, mednafen,...) - add-apt-repository -y ppa:beauman/retrorig - # Add repository for additional pkgs (retrorig-setup, joydetect) - add-apt-repository -y ppa:mdeguzis/retrorig - - case $OS_RELEASE in - "2014") - echo "running Deepin 2014" - ;; - - *) - ;; - esac - ;; - - *) - ;; - esac -} - -function rrs_emulators() -{ - __postMSGs="" - - clear - echo "Binaries-based installation" - - # install emulators - em_install_mupen64plus - em_install_mame - em_install_mess - em_install_stella - em_install_mednafen - em_install_ppsspp - em_install_dolphin - em_install_pcsx2 - em_install_gens - - #fix permissions since we are running as sudo - h_correct_perms - - # Run Debug checks - rrs_debug - - __postMSGs="$__postMSGs This current configuration requires BIOS files be placed under '$rootdir/BIOS/' folder for the respective system you are using or under the '$rootdir/ROMs/' folder for the same system. You may also use the BIOS Loader under the settings menu. Many MAME games under MAME4ALL have self contained BIOS files." - - # inject a space to seperate messages? - __postMSGs="$__postMSGs " - - __postMSGs="$__postMSGs\n\nIf you wish to have artwork for the MAME games, please visit the RCB main page at http://bit.ly/1lHHSIe and follow the 'Get artwork from emumovies' section'. The size is much too large to contain in RetroRig or Github. This may change." - - - if [[ ! -z $__postMSGs ]]; then - dialog --backtitle "LibreGeek.org - RetroRig Setup. Installation folder: $rootdir for user $user" --msgbox "$__postMSGs" 17 70 - fi - - dialog --backtitle "LibreGeek.org - RetroRig Setup. Installation folder: $rootdir for user $user" --msgbox "Finished emulator installs.\n\nYou now have to copy roms to the roms folders. You may also use the 'ROM loader' in settings menu" 17 60 - -} - -function rrs_software() -{ - - # clear post install messages - __postMSGs="" - clear - - echo "Binaries-based installation" - - # add multi-arch support - $cmd_add_32bit_arch - - # add add repos and - rrs_add_standard_repos - - # add extra repostories to the em_add_repos function! - em_add_repos - - # update system pkgs currently installed first - h_upgrade_system - - # install software from repositories - # install binaries - $cmd_install_pkg xboxdrv curl python-software-properties \ - pkg-config software-properties-common dconf-tools jstest-gtk \ - qjoypad sixad libusb-0.1-4 antimicro bluez getpos unclutter \ - joydetect sudo - - #wii motion support - $cmd_install_pkg libcwiid1 lswm wmgui wminput - - # call RetroRig's custom deb install for ps3 hotplugging. - # Thankfully our package still works with the Xbox 360 implementation, - # so it is now part of the standard install set - rrs_xbmc_patched - - # Disable apport, as bug apport-gtk does nothing but interrupt - # User can always enable this again - # XBMC and emulators - sed -i "s|enabled=1|enabled=0|g" "/etc/default/apport" - - #fix permissions since we are running as sudo - h_correct_perms - - # Run Debug checks - rrs_debug - - # Inform user about post-install tasks - # Output postMSGs to screen - - # inject a space to seperate messages? - __postMSGs="$__postMSGs For VirtualBox users, please see the wiki under 'Installation' for notes on running RetroRig under a virtual machine! At the minimum, you will need to add a filter for your controller " - - if [[ ! -z $__postMSGs ]]; then - dialog --backtitle "LibreGeek.org - RetroRig Setup. Installation folder: $rootdir for user $user" --msgbox "$__postMSGs\n\nSoftware install complete. See debug.log for more details. Continuing on to emulator installs..." 18 60 - fi - - chown -R "$user" "$rootdir/logs/install_$now.log.txt" - chgrp -R "$user" "$rootdir/logs/install_$now.log.txt" - -} - -function rrs_debug() -{ - clear - echo "Generating debug log" - - # Check for existance of essential files - echo "Essential files: XBMC:" > "$rootdir/logs/debug.log" - echo "Path(s): '$xbmc_home/userdata'" >> "$rootdir/logs/debug.log" - h_filechecker "$xbmc_home/userdata" "$rootdir/logs/debug.log" - - # RCB - echo "Essential files: ROM Collection Browser:" >> "$rootdir/logs/debug.log" - echo "Path: '$xbmc_home/addons/script.games.rom.collection.browser'" >> "$rootdir/logs/debug.log" - h_filechecker "$xbmc_home/addons/script.games.rom.collection.browser" - echo "Path: '$xbmc_home/userdata/addon_data/script.games.rom.collection.browser'" >> "$rootdir/logs/debug.log" - h_filechecker "$xbmc_home/userdata/addon_data/script.games.rom.collection.browser" "$rootdir/logs/debug.log" - - # applications - h_filechecker "/usr/lib/xbmc/xbmc.bin" - h_filechecker "/usr/bin/xbmc-retrorig" - h_filechecker "/usr/share/applications/RetroRig.desktop" - h_filechecker "/usr/share/applications/startXBMC.sh" - h_filechecker "/usr/share/applications/gp_autodetect_xbmc.sh" - h_filechecker "$xdg_desktop_dir/RetroRig.desktop" - h_filechecker "$xdg_pictures_dir/retro-icon.png" - - # autostart entries - h_filechecker "$home/.config/autostart/RetroRig.desktop" - #h_filechecker "$home/.config/autostart/qjoypad.desktop" - - # init file checks - echo "Available init files:" >> "$rootdir/logs/debug.log" - echo "Has xboxdrv been loaded?" >> "$rootdir/logs/debug.log" - h_filechecker "/etc/init.d/xboxdrv" - h_filechecker "/etc/default/xboxdrv" - - # Check unity settings: - echo "Unity settings (if applicable):" >> "$rootdir/logs/debug.log" - gsettings list-recursively "org.gnome.desktop.screensaver" | grep "lock-enabled" >> "$rootdir/logs/debug.log" - gsettings list-recursively "org.gnome.desktop.screensaver" | grep "ubuntu-lock-on-suspend" >> "$rootdir/logs/debug.log" - gsettings list-recursively "org.gnome.desktop.session" | grep "idle-delay" >> "$rootdir/logs/debug.log" - - # Source built / pre-built - h_filechecker "$rootdir/emulators/PPSSPP/ppsspp-0.9.8-SDL-pk64" - h_filechecker "/ust/bin/PPSSPPSDL" - - # pkg checks - echo -e "\nCheck for needed pkgs installed via apt: " >> "$rootdir/logs/debug.log" - h_pkgcheck "stella" - h_pkgcheck "python-software-properties" - h_pkgcheck "xbmc" - h_pkgcheck "dconf-tools" - h_pkgcheck "xboxdrv" - h_pkgcheck "curl" - h_pkgcheck "xbmc" - h_pkgcheck "mednafen" - h_pkgcheck "mess" - h_pkgcheck "mame" - h_pkgcheck "qjoypad" - h_pkgcheck "jstest-gtk" - - echo -e "\nEnd of log file" >> "$rootdir/logs/debug.log" >> "$rootdir/logs/debug.log" - - dialog --backtitle "LibreGeek.org - RetroRig Setup. Installation folder: $rootdir for user $ user" --msgbox "Debug log was generated in $rootdir/logs/debug.log. Additional logs can be found in the folder $rootdir/logs/." 10 60 - - #corect permissions - h_correct_perms -} - -function rrs_xbmc_patched() -{ - - clear - # release the aptitdue hold to install/upgrade RetroRig's XBMC version - $cmd_unhold_pkg xbmc xbmc-bin - - # create autostart for XBMC and place our modified files - # Custom script for reboots/hotplugging - if [ -f "$scriptdir/XBMC-cfgs/extra/gp_autodetect_xbmc.sh" ]; then - cp -v "$scriptdir/XBMC-cfgs/extra/gp_autodetect_xbmc.sh" "/usr/share/applications/" - fi - - if [ -f "$scriptdir/XBMC-cfgs/extra/RetroRig.desktop" ]; then - cp -v "$scriptdir/XBMC-cfgs/extra/RetroRig.desktop" "/usr/share/applications/" - fi - - if [ -f "$scriptdir/XBMC-cfgs/extra/RetroRig.desktop" ]; then - cp -v "$scriptdir/XBMC-cfgs/extra/RetroRig.desktop" "$xdg_desktop_dir" - fi - - if [ -f "$scriptdir/XBMC-cfgs/extra/retro-icon.png" ]; then - cp -v "$scriptdir/XBMC-cfgs/extra/retro-icon.png" "/usr/share/icons/" - fi - - if [ -f "$scriptdir/XBMC-cfgs/extra/startXBMC.sh" ]; then - cp -v "$scriptdir/XBMC-cfgs/extra/startXBMC.sh" "/usr/share/applications/" - fi - - # insert restarting xboxdrv specifically into /etc/sudoers - cat "$scriptdir/XBMC-cfgs/extra/sudoers.txt" >> "/etc/sudoers" - - # create autostart entry, remove prior if it exists - rm -f "$home.config/autostart/RetroRig.desktop" - cp -v "$scriptdir/XBMC-cfgs/extra/RetroRig.desktop" "$home/.config/autostart" - - # fix their permissions - chmod 755 "/usr/share/applications/gp_autodetect_xbmc.sh" - chmod 755 "$home/.config/autostart/RetroRig.desktop" - chmod 755 "/usr/share/applications/RetroRig.desktop" - chmod 755 "/usr/share/applications/startXBMC.sh" - - # remove old xbmc-bin, install our patched version - $cmd_remove_pkg xbmc xbmc-bin - - # remove old /tmp files if they exist - rm -f "/tmp/xbmc_gotham-patched-for-retrorig-patchlevel-*-0trusty.deb" - rm -f "/tmp/xbmc-bin_gotham-patched-for-retrorig-patchlevel-*-0trusty.deb" - - #xbmc works fine w/o these librarys, but generates error messages in its log file - $cmd_install_pkg libcec2 libcrystalhd3 - - # release aptitude hold for upgrade/install - $cmd_unhold_pkg xbmc - - echo "Installing xbmc" - $cmd_install_pkg xbmc - - # hold package after install against upgrades - $cmd_hold_pkg xbmc - - # get SHA1 tag from patched XBMC version - sha1=$(file /usr/lib/xbmc/xbmc.bin | cut -f 19 -d ' '| cut -f 2 -d '='|cut -f 1 -d ',') - - # insert SHA1 tag to rescan by replacing the placeholder - if [ -f "$scriptdir/XBMC-cfgs/extra/rescan" ]; then - cp -v "$scriptdir/XBMC-cfgs/extra/rescan" "/etc/init.d/rescan" - fi - - sed -i "s/placeholderSHA1/$sha1/" "/etc/init.d/rescan" - - # Create our on start file so we have use our own dotfile, rather than make the user - # use their existing .xbmc dotfile - if [ -f "$scriptdir/XBMC-cfgs/extra/xbmc-retrorig" ]; then - cp -v "$scriptdir/XBMC-cfgs/extra/xbmc-retrorig" "/usr/bin" - fi - - chmod 755 "/etc/init.d/rescan" - - # Link the startXBMC.sh startup script to /usr/bin, so users can call "retrorig" at will - ln -sf "/usr/share/applications/startXBMC.sh" "/usr/bin/retrorig" - - # update init scripts - update-rc.d rescan defaults - - # start service - $cmd_rescan_start - - # Tell aptitude to hold our packages to avoid unwanted upgrades - # Please refer to the top of this script, where the hold is released for upgrade purposes - $cmd_hold_pkg xbmc xbmc-bin - - echo "*****" - echo "*****" - echo "***** please fix me! Background for xbmc *****" - echo "*****" - echo "*****" - # somewhere must be a command to set these files - # in guisetting.xml - # The settings should point directly to - # $scriptdir/Artwork/XBMC/XBMC-logo-Ace-Skin.png and gears.png - ln -sf $scriptdir/Artwork/XBMC/* "$rootdir/Artwork/XBMC/" - chown $user $rootdir/Artwork/XBMC/* - chgrp $user $rootdir/Artwork/XBMC/* - - #corect permissions - h_correct_perms - -} - -function rrs_retrorig_cfgs() -{ - cp -Rv "$scriptdir/retrorig-cfgs/retrorig.cfg" "$configFile" - - ln -sf "$scriptdir/scripts" "$config_home/scripts" - chown "$user" "$config_home/scripts" - chgrp "$user" "$config_home/scripts" -} - -function rrs_xbmc_cfgs() -{ - clear - - # set local vars for this function - local gamedb_org="$xbmc_home/userdata/addon_data/script.games.rom.collection.browser/MyGames.db" - local gamedb_tmp="/tmp/MyGames.db" - - # back the current MyGames.db file if it exists - if [[ -d "$gamedb_org" ]]; then - cp -v "$gamedb_org" "/tmp" - fi - - # xbmc does not (at least for Ubuntu's repo pkg) load the - # dot files without loading XBMC at least once, so let's copy ours in first - - # Copy in default folder base from first run: - cp -Rv "$scriptdir/XBMC-cfgs/addons" "$xbmc_home" - cp -Rv "$scriptdir/XBMC-cfgs/userdata" "$xbmc_home" - - # Restore MyGames.db if it exists - if [[ -d "$gamedb_tmp" ]]; then - # copy file over - cp -v "$gamedb_tmp" "$xbmc_home/userdata/addon_data/script.games.rom.collection.browser/" - # remove /tmp file - # rm -f "$gamedb_tmp" - fi - - # set the system user to an absolute value. - # RCB and some config files don't like using $config_home, rather /home/test/ - # Let's change the config files to reflect the current username - sed -i "s|/home/test/|/home/$user/|g" "$xbmc_home/userdata/addon_data/script.games.rom.collection.browser/config.xml" - - # Change hardcoded paths in "$xbmc_home/userdata/guisettings.xml" (Ace XBMC skin adds these) - # - # Side note: For the Ace XBMC theme, backgrounds are loaded into "$xbmc_home/userdata/Database/Textures13.db" - # Therefore, it is VERY important to do a fresh install of the Ace theme, and configure from scatch to avoid - # corruption, segfaults, or other oddities. - sed -i "s|installdir_temp|$rootdir|g" "$xbmc_home/userdata/guisettings.xml" - - # XBMC custom settings launchers (Advanced Launcher) - sed -i "s|config_temp|$config_home|g" "$xbmc_home/userdata/addon_data/plugin.program.advanced.launcher/launchers.xml" - - # echo user change - echo "The user applied to configuration files was: $user" - - # correct permissions - h_correct_perms -} - -function rrs_done() -{ - - # The 3.14 manual kernel upgrade for Ubuntu systems is no longer necessary - # This is confirmed to be fixed since linux: 3.13.0-38.65 - # Confirmed to be fine in current 3.13.0-37-generic. - # Please see commit efeb2bd for legacy code. This message will be - # Removed in due time. - - dialog --backtitle "LibreGeek.org - RetroRig Setup. Installation folder: $rootdir for user $user" --msgbox "Finished main install tasks.\n\nYou now have to copy roms to the roms folders. \nThis can be done via SSH, Samba, or via your graphic folder manager (please see settings menu for more)\n\nAll current config folders used were appended with .old for restoration purposes.\n\n" 18 50 - - # correct permissions - h_correct_perms -} - -function rrs_showHelp() -{ - #set color for highlights - # Arch Linux wiki color listing: http://bit.ly/1nhkU8Y - PATHCOLOR="36m" #Cyan text - TITLECOLOR="33m" #Yellow text - BARCOLOR="35m" #Yellow text - - #Console help file - clear - echo "" - echo -e "\e[0"$BARCOLOR$"============================================================\e[0m" - echo -e "\e[0"$TITLECOLOR$"RetroRig Help File\e[0m" - echo -e "\e[0"$BARCOLOR$"============================================================\e[0m" - echo "" - echo "This script installs XBMC as a backend, many emulators, -and ROM Collection Browser as the graphical front end. -Because it needs to install some APT packages it has to be -run with root priviliges." - - echo "" - echo "When using..." - echo "sudo ./retrorig_setup.sh -The installation directory is:" -echo -e "\e[0$PATHCOLOR$xbmc_home/RetroRig for the current user\e[0m" - - echo "" - echo "When using..." - echo "sudo ./retrorig_setup.sh USERNAME -The installation directory is:" -echo -e "\e[0$PATHCOLOR/$xbmc_home/USERNAME/RetroRig for user USERNAME\e[0m" - - echo "" - echo "When using..." - echo "sudo ./retrorig_setup.sh USERNAME ABSPATH -The installation directory is:" -echo -e "\e[0"$PATHCOLOR"ABSPATH for user USERNAME\e[0m" - echo "" - echo "Please submit all issues to GitHub: bit.ly/1ocT0we" - - echo -e "\e[0"$BARCOLOR$"============================================================\e[0m" - echo "End Help File" - echo -e "\e[0"$BARCOLOR$"============================================================\e[0m" - echo "" -} - -function rrs_prereq() -{ - if [[ -z $(type -P git) || -z $(type -P dialog) || -z $(type -P figlet) ]]; then - echo "" - echo "######################################" - echo "Pre-req checks" - echo "######################################" - echo "Did not find 1 or more of the needed packages: git, dialog, or figlet" - echo "Attempting to install these now." - echo "" - sleep 3s - # Update system first - $cmd_update_system - # fetch needed pkgs - $cmd_install_pkg git dialog figlet - if [ $? == '0' ]; then - echo "Successfully installed 'git/dialog/figlet'." > "$rootdir/logs/prechecks.log" - sleep 3s - prereqs="true" - else - echo "Could not install 'git' and/or 'dialog/figlet'. Exiting..." > "$rootdir/logs/prechecks.log" - prereqs="false" - sleep 3s - exit 1 - fi - else - echo "Found needed packages 'git/dialog/figlet'." > "$rootdir/logs/prechecks.log" - prereqs="true" - sleep 2s - fi - - -echo "Current install user: $SUDO_USER" >> "$rootdir/logs/prechecks.log" -echo "Current install rootdir is: $rootdir" >>"$rootdir/logs/prechecks.log" -echo "Current script dir is: $rootdir" >>"$rootdir/logs/prechecks.log" - -if [ "$prereqs" == "true" ]; then - echo "Pre-checks were sucessful!!!" >> "$rootdir/logs/prechecks.log" -else - echo "Pre-checks were NOT sucessful. Sad crab!" >> "$rootdir/logs/prechecks.log" -fi - -chown -R "$user" "$rootdir/logs/prechecks.log" -chgrp -R "$user" "$rootdir/logs/prechecks.log" - -} - -function rrs_reboot() -{ - - #confirm reboot is the intended action - dialog --title "Confirm yes/no" \ - --backtitle "LibreGeek.org RetroRig Installer" \ - --yesno "Are you sure you want to reboot?" 6 0 - - # Get exit status - # 0 means user hit [yes] button. - # 1 means user hit [no] button. - # 255 means user hit [Esc] key. - response=$? - case $response in - 0) - clear - $cmd_reboot - ;; - - 1) - return - ;; - - 255) - return - ;; - esac -} - -function rrs_kernel_check() -{ - - # The 3.14 manual kernel upgrade for Ubuntu systems is no longer necessary - # This is confirmed to be fixed since linux: 3.13.0-38.65 - # Confirmed to be fine in current 3.13.0-37-generic. - # Please see commit efeb2bd for legacy code. This message will be - # Removed in due time. - - # It may be a good idea to put the detection code back in here - # in case we actually need to use it for reference - echo "" > /dev/null - -} - diff --git a/scriptmodules/syscalls-deb.shinc.orig b/scriptmodules/syscalls-deb.shinc.orig deleted file mode 100644 index 8b0f5df..0000000 --- a/scriptmodules/syscalls-deb.shinc.orig +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# -# RetroRig Debian syscall module -# This module converts the abstract syscall variable wrappers into -# Distro-specific actions. This avoids having to write insane -# amounts of if-statements and lengthening the code even more. -# -# Please report any errors via a pull request -# You can also reach me on twitter: @N3RD42 -# -# prepare folder structure for emulator, cores, front end, and roms - -<<<<<<< HEAD -################## -# System only -################## - -cmd_reboot="reboot" - -################## -# Packaging -################## - -cmd_install_pkg="apt-get install -y" -cmd_remove_pkg="apt-get remove -y" -cmd_autoremove_pkg="apt-get autoremove -y" -======= -# System only -cmd_reboot="reboot" - -# Packaging -cmd_install_pkg="apt-get install -y" -cmd_remove_pkg="apt-get remove -y" ->>>>>>> 423e998258a746a6bf33be60c41035a5ad2dcead -cmd_query_pkg="dpkg-query -s" -cmd_hold_pkg="apt-mark hold" -cmd_unhold_pkg="apt-mark unhold" -cmd_update_system="apt-get update -y" -cmd_upgrade_system="apt-get upgrade -y" -cmd_add_repo="add-apt-repository -y" - -<<<<<<< HEAD -################## -# Init -################## -# update rescan init -update_init_rescan="update-rc.d rescan defaults" - - -################## -# Services -################## - -# sixad -cmd_sixad_start="service sixad start" -cmd_sixad_restart="service sixad restart" -cmd_sixad_stop="service sixad stop" -#rescan -cmd_rescan_start="service rescan start" -cmd_rescan_restart="service rescan restart" -cmd_rescan_stop="service rescan stop" -# xboxdrv -cmd_xboxdrv_start="service xboxdrv start" -cmd_xboxdrv_restart="service xboxdrv restart" -cmd_xboxdrv_stop="service xboxdrv stop" -cmd_remove_xboxdrv="update-rc.d -f xboxdrv remove" -# samba -cmd_samba_start="service samba start" -cmd_samba_restart="service samba restart" -cmd_samba_stop="service samba stop" -# ssh -cmd_ssh_start="service ssh start" -cmd_ssh_restart="service ssh restart" -cmd_ssh_stop="service ssh stop" - -################## -# Various -################## -cmd_add_32bit_arch="dpkg --add-architecture i386" -cmd_remove_32bit_arch="dpkg --remove-architecture i386" - -======= -# Services -cmd_sixad_start="service sixad start" -cmd_sixad_restart="service sixad restart" -cmd_rescan_start="service rescan start" -cmd_rescan_restart="service rescan restart" - -# Various -cmd_add_32bit_arch="dpkg --add-architecture i386" ->>>>>>> 423e998258a746a6bf33be60c41035a5ad2dcead diff --git a/scripts/scripts b/scripts/scripts deleted file mode 120000 index cb748b8..0000000 --- a/scripts/scripts +++ /dev/null @@ -1 +0,0 @@ -/home/mikeyd/RetroRig/scripts \ No newline at end of file From 65ee6707f8c79e40e3a62444ccd205e177f707d2 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Wed, 29 Oct 2014 20:40:34 +0100 Subject: [PATCH 09/21] changed to --- scriptmodules/setup.shinc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scriptmodules/setup.shinc b/scriptmodules/setup.shinc index 36cdeb5..45fe9ad 100644 --- a/scriptmodules/setup.shinc +++ b/scriptmodules/setup.shinc @@ -1141,16 +1141,14 @@ rrs_kernel_check() # cleanup packages rm -f /tmp/linux-headers-3.14* rm -f /tmp/linux-image-3.14* - echo "true" > "$scriptdir/logs/kernelUpdate" + echo "true" > "$rootdir/logs/kernelUpdate" elif [ $user_kernel -ge "$target_kernel" ]; then # Do nothing echo "Kernel 3.14.x or greater found, exiting" sleep 2s - echo "false" > "$scriptdir/logs/kernelUpdate" + echo "false" > "$rootdir/logs/kernelUpdate" fi } -} - From 4a7ba2980bc522e9edc30f77fb713d86c822ea9a Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Wed, 29 Oct 2014 23:05:55 +0100 Subject: [PATCH 10/21] PS3 / USB hotplug support --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 126 ++++++++++++++++++++------ 1 file changed, 99 insertions(+), 27 deletions(-) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index 8e3b538..117c01f 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -2,53 +2,125 @@ # Project RetroRig: https://github.com/ProfessorKaos64/RetroRig # This script detects a change on available PS controller. If detected, it notifies XBMC. -# Author: Jens-Christiansen, aka beaumanvienna/JC -# Revision: 2014/10/28, initial version +# Author: Jens-Christian, aka beaumanvienna/JC +# Revision: 2014/10/29, support for PS3 / USB and auto start XBMC function -controllerAvailable=`cat /proc/bus/input/devices | grep PLAYSTATION` +autostartXBMC_PS3_USB=enabled +#autostartXBMC_PS3_USB=disabled + +autostartXBMC_PS3_BT=enabled +#autostartXBMC_PS3_BT=disabled + +PS3_BT_controllerAvailable=`cat /proc/bus/input/devices | grep "PLAYSTATION(R)3 Controller ("` +PS3_USB_controllerAvailable=`lsusb | grep "PlayStation 3 Controller"` while [ 0 ] do - oldControllerAvailable=$controllerAvailable - controllerAvailable=`cat /proc/bus/input/devices | grep PLAYSTATION` - if [ "$controllerAvailable" != "$oldControllerAvailable" ]; then + oldPS3_BT_controllerAvailable=$PS3_BT_controllerAvailable + oldPS3_USB_controllerAvailable=$PS3_USB_controllerAvailable + + #check for PS3 / USB controller + PS3_USB_controllerAvailable=`lsusb | grep "PlayStation 3 Controller"` + if [ "$PS3_USB_controllerAvailable" != "$oldPS3_USB_controllerAvailable" ]; then + echo "[begin:] PS3 / USB controller changed" + service xboxdrv restart echo "sending gamepad reconfiguration request" killall xbmc.bin -SIGUSR1 - + #auto start xbmc for first controller to be switched on - autostarted=false - if [ -z "$oldControllerAvailable" ]; then - #first controller was switched on - echo "first controller was switched on" + if [ "$autostartXBMC_PS3_USB" == "enabled" ]; then + echo "auto start function" + autostarted=false + if [ -z "$oldPS3_USB_controllerAvailable" ]; then + #first controller was switched on + echo "first controller was switched on" - if [ -z "$(ps ax|grep xbmc.bin|grep -v grep)" ]; then - # xbmc not running yet - echo "xbmc not running yet" + if [ -z "$(ps ax|grep xbmc.bin|grep -v grep)" ]; then + # xbmc not running yet + echo "xbmc not running yet" - # get user name - user=`ps aux |grep "/bin/dbus-daemon --config-file"|grep -v grep|cut -f 1 -d " "` + # get user name + user=`ps aux |grep "/bin/dbus-daemon --config-file"|grep -v grep|cut -f 1 -d " "` - export export DISPLAY=:0.0 - echo "auto starting RetroRig for user $user" - sudo -u $user -g $user -s /usr/share/applications/startXBMC.sh & - autostarted=true + export export DISPLAY=:0.0 + echo "auto starting RetroRig for user $user" + sudo -u $user -g $user -s /usr/share/applications/startXBMC.sh & + autostarted=true + fi + fi + + #diagnostic message + sleep 2 + if [ "$autostarted" == "true" ]; then + if [ -n "$(ps ax|grep xbmc.bin|grep -v grep)" ]; then + echo "RetroRig sucessfully started" + else + echo "attempt to start RetroRig failed" + fi + else + echo "RetroRig *not* started automatically (either first controller not switched on or xbmc already running)" fi + else + echo "auto start function disabled" fi - #diagnostic message - sleep 2 - if [ "$autostarted" == "true" ]; then - if [ -n "$(ps ax|grep xbmc.bin|grep -v grep)" ]; then - echo "RetroRig sucessfully started" + #Avoid starting XBMC after USB is unplugged. + #For some reasons the game controller connects via + #BT after being unplugged from USB + autostartXBMC_PS3_BT=disabled + echo "[end:] PS3 / USB controller changed" + fi + + #check for PS3 / Bluetooth controller + + PS3_BT_controllerAvailable=`cat /proc/bus/input/devices | grep "PLAYSTATION(R)3 Controller ("` + if [ "$PS3_BT_controllerAvailable" != "$oldPS3_BT_controllerAvailable" ]; then + echo "[begin:] PS3 / Bluetooth controller changed" + + echo "sending gamepad reconfiguration request" + killall xbmc.bin -SIGUSR1 + + #auto start xbmc for first controller to be switched on + if [ "$autostartXBMC_PS3_BT" == "enabled" ]; then + echo "auto start function" + autostarted=false + if [ -z "$oldPS3_BT_controllerAvailable" ]; then + #first controller was switched on + echo "first controller was switched on" + + if [ -z "$(ps ax|grep xbmc.bin|grep -v grep)" ]; then + # xbmc not running yet + echo "xbmc not running yet" + + # get user name + user=`ps aux |grep "/bin/dbus-daemon --config-file"|grep -v grep|cut -f 1 -d " "` + + export export DISPLAY=:0.0 + echo "auto starting RetroRig for user $user" + sudo -u $user -g $user -s /usr/share/applications/startXBMC.sh & + autostarted=true + + fi + fi + + #diagnostic message + sleep 2 + if [ "$autostarted" == "true" ]; then + if [ -n "$(ps ax|grep xbmc.bin|grep -v grep)" ]; then + echo "RetroRig sucessfully started" + else + echo "attempt to start RetroRig failed" + fi else - echo "attempt to start RetroRig failed" + echo "RetroRig *not* started automatically (either first controller not switched on or xbmc already running)" fi else - echo "RetroRig *not* started automatically (either first controller not switched on or xbmc already running)" + echo "auto start function disabled" fi + echo "[end:] PS3 / Bluetooth controller changed" fi sleep 1 done From b318d5874090b775e0002a8da498b1cc1491a331 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Wed, 29 Oct 2014 23:19:55 +0100 Subject: [PATCH 11/21] typo --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index 117c01f..fa96366 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -28,7 +28,7 @@ do echo "sending gamepad reconfiguration request" killall xbmc.bin -SIGUSR1 - #auto start xbmc for first controller to be switched on + #auto start xbmc for first controller being switched on if [ "$autostartXBMC_PS3_USB" == "enabled" ]; then echo "auto start function" autostarted=false @@ -82,7 +82,7 @@ do echo "sending gamepad reconfiguration request" killall xbmc.bin -SIGUSR1 - #auto start xbmc for first controller to be switched on + #auto start xbmc for first controller being switched on if [ "$autostartXBMC_PS3_BT" == "enabled" ]; then echo "auto start function" autostarted=false From 88a01c7a02400b482bb303d87b3c11300f7c7180 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Thu, 30 Oct 2014 21:28:19 +0100 Subject: [PATCH 12/21] enable or disable auto start function / hotplug support PS3 BT --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 102 +++++++++++++++++--------- scriptmodules/gamepads.shinc | 60 ++++++++++++++- scriptmodules/setup.shinc | 1 + 3 files changed, 127 insertions(+), 36 deletions(-) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index fa96366..7596020 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -1,15 +1,19 @@ #!/bin/bash # Project RetroRig: https://github.com/ProfessorKaos64/RetroRig -# This script detects a change on available PS controller. If detected, it notifies XBMC. +# +# This script detects a change of the amount available PS controller. +# If such a change was detected, it notifies XBMC. +# +# If enabled, it will start RetroRig automatically +# for the first game controller being switched on. +# # Author: Jens-Christian, aka beaumanvienna/JC +# # Revision: 2014/10/29, support for PS3 / USB and auto start XBMC function autostartXBMC_PS3_USB=enabled -#autostartXBMC_PS3_USB=disabled - autostartXBMC_PS3_BT=enabled -#autostartXBMC_PS3_BT=disabled PS3_BT_controllerAvailable=`cat /proc/bus/input/devices | grep "PLAYSTATION(R)3 Controller ("` PS3_USB_controllerAvailable=`lsusb | grep "PlayStation 3 Controller"` @@ -24,6 +28,13 @@ do PS3_USB_controllerAvailable=`lsusb | grep "PlayStation 3 Controller"` if [ "$PS3_USB_controllerAvailable" != "$oldPS3_USB_controllerAvailable" ]; then echo "[begin:] PS3 / USB controller changed" + + #first attempt + service xboxdrv restart + echo "sending gamepad reconfiguration request" + killall xbmc.bin -SIGUSR1 + + #second attempt service xboxdrv restart echo "sending gamepad reconfiguration request" killall xbmc.bin -SIGUSR1 @@ -32,23 +43,37 @@ do if [ "$autostartXBMC_PS3_USB" == "enabled" ]; then echo "auto start function" autostarted=false - if [ -z "$oldPS3_USB_controllerAvailable" ]; then - #first controller was switched on - echo "first controller was switched on" + setup_running=`ps ax|grep retrorig-setup| grep -v grep` - if [ -z "$(ps ax|grep xbmc.bin|grep -v grep)" ]; then - # xbmc not running yet - echo "xbmc not running yet" + if [ -z "$setup_running" ]; then + #retrorig-setup is not running + echo "retrorig-setup is not running" - # get user name - user=`ps aux |grep "/bin/dbus-daemon --config-file"|grep -v grep|cut -f 1 -d " "` + if [ -z "$oldPS3_USB_controllerAvailable" ]; then + #first controller was switched on + echo "first controller was switched on" + + xbmc_running=`ps ax|grep xbmc.bin|grep -v grep` + if [ -z "$xbmc_running" ]; then + # xbmc not running yet + echo "xbmc not running yet" - export export DISPLAY=:0.0 - echo "auto starting RetroRig for user $user" - sudo -u $user -g $user -s /usr/share/applications/startXBMC.sh & - autostarted=true + # get user name + user=`ps aux |grep "/bin/dbus-daemon --config-file"|grep -v grep|cut -f 1 -d " "` + export export DISPLAY=:0.0 + echo "auto starting RetroRig for user $user" + sudo -u $user -g $user -s /usr/share/applications/startXBMC.sh & + autostarted=true + + else + echo "RetroRig *not* started automatically: XBMC already running, xbmc_running="$xbmc_running + fi + else + echo "RetroRig *not* started automatically: first controller not switched on, oldPS3_USB_controllerAvailable="$oldPS3_USB_controllerAvailable fi + else + echo "RetroRig *not* started automatically: setup_running="$setup_running fi #diagnostic message @@ -59,9 +84,8 @@ do else echo "attempt to start RetroRig failed" fi - else - echo "RetroRig *not* started automatically (either first controller not switched on or xbmc already running)" fi + else echo "auto start function disabled" fi @@ -69,7 +93,7 @@ do #Avoid starting XBMC after USB is unplugged. #For some reasons the game controller connects via #BT after being unplugged from USB - autostartXBMC_PS3_BT=disabled + autostartXBMC_PS3_BT=enabled echo "[end:] PS3 / USB controller changed" fi @@ -86,23 +110,36 @@ do if [ "$autostartXBMC_PS3_BT" == "enabled" ]; then echo "auto start function" autostarted=false - if [ -z "$oldPS3_BT_controllerAvailable" ]; then - #first controller was switched on - echo "first controller was switched on" + setup_running=`ps ax|grep retrorig-setup| grep -v grep` - if [ -z "$(ps ax|grep xbmc.bin|grep -v grep)" ]; then - # xbmc not running yet - echo "xbmc not running yet" + if [ -z "$setup_running" ]; then + #retrorig-setup is not running + echo "retrorig-setup is not running" - # get user name - user=`ps aux |grep "/bin/dbus-daemon --config-file"|grep -v grep|cut -f 1 -d " "` + if [ -z "$oldPS3_BT_controllerAvailable" ]; then + #first controller was switched on + echo "first controller was switched on" + + xbmc_running=`ps ax|grep xbmc.bin|grep -v grep` + if [ -z "$xbmc_running" ]; then + # xbmc not running yet + echo "xbmc not running yet" - export export DISPLAY=:0.0 - echo "auto starting RetroRig for user $user" - sudo -u $user -g $user -s /usr/share/applications/startXBMC.sh & - autostarted=true + # get user name + user=`ps aux |grep "/bin/dbus-daemon --config-file"|grep -v grep|cut -f 1 -d " "` + export export DISPLAY=:0.0 + echo "auto starting RetroRig for user $user" + sudo -u $user -g $user -s /usr/share/applications/startXBMC.sh & + autostarted=true + else + echo "RetroRig *not* started automatically: XBMC already running, xbmc_running="$xbmc_running + fi + else + echo "RetroRig *not* started automatically: first controller not switched on, oldPS3_BT_controllerAvailable="$oldPS3_BT_controllerAvailable fi + else + echo "RetroRig *not* started automatically: setup_running="$setup_running fi #diagnostic message @@ -113,9 +150,8 @@ do else echo "attempt to start RetroRig failed" fi - else - echo "RetroRig *not* started automatically (either first controller not switched on or xbmc already running)" fi + else echo "auto start function disabled" fi diff --git a/scriptmodules/gamepads.shinc b/scriptmodules/gamepads.shinc index 12b8972..0490c0c 100644 --- a/scriptmodules/gamepads.shinc +++ b/scriptmodules/gamepads.shinc @@ -255,7 +255,6 @@ function gp_ps3_blu_main() ps3_set_ctrl_assignments ps3_set_emulator_ids dialog --msgbox "Pairing of Player 1 Controller complete" 5 43 - sleep 5s ;; 2) @@ -505,6 +504,59 @@ function ps3_set_emulator_ids() } +function enable_autostart_RetroRig() +{ + #################################################################### + # + # Function Description: + # + # enable / disable auto start function for RetroRig + # + #################################################################### + + clear + + PS3_USB=$(grep -m 1 -Ee "autostartXBMC_PS3_USB" "/usr/share/applications/gp_autodetect_xbmc.sh") + PS3_BT=$(grep -m 1 -Ee "autostartXBMC_PS3_BT" "/usr/share/applications/gp_autodetect_xbmc.sh") + + #default is disabled + autostart=disabled + + dialog --title "Confirm yes/no" \ + --backtitle "Auto Start RetroRig" \ + --yesno "Do you want to have RetroRig started automatically for the first gamepad being switch on? (Currently only for PS3 controller available)" 6 60 + # Get exit status + # 0 means user hit [yes] button. + # 1 means user hit [no] button. + # 255 means user hit [Esc] key. + response=$? + case $response in + 0) + autostart=enabled + ;; + + 1) + autostart=disabled + ;; + + 255) + autostart=disabled + ;; + esac + + if [ "$autostart" == "enabled" ]; then + sed -i "s|$PS3_USB|autostartXBMC_PS3_USB=enabled|g" "/usr/share/applications/gp_autodetect_xbmc.sh" + sed -i "s|$PS3_BT|autostartXBMC_PS3_BT=enabled|g" "/usr/share/applications/gp_autodetect_xbmc.sh" + else + sed -i "s|$PS3_USB|autostartXBMC_PS3_USB=disabled|g" "/usr/share/applications/gp_autodetect_xbmc.sh" + sed -i "s|$PS3_BT|autostartXBMC_PS3_BT=disabled|g" "/usr/share/applications/gp_autodetect_xbmc.sh" + fi + + clear + service rescan restart + sleep 2 +} + function wii_motion_controller_for_dolphin() { #################################################################### @@ -544,8 +596,6 @@ function wii_motion_controller_for_dolphin() esac sed -i "s|PLAYER_SRC|$src|g" "$config_home/.dolphin-emu/Config/WiimoteNew.ini" - - sleep 2s } function ps3_pair_blu() @@ -846,6 +896,7 @@ RetorRig loads to use the gamepad" 14 60 # Let the user know about reboot dialog --msgbox "Please reboot to fully enable the controller!" 5 60 + sixad --boot-no } function gp_x360_wireless() @@ -1122,6 +1173,8 @@ RetorRig loads to use the gamepad" 14 60 # Let the user know about reboot dialog --msgbox "Please reboot to fully enable the controller(s)." 5 52 + + sixad --boot-no } function gp_x360_usb() @@ -1399,4 +1452,5 @@ RetorRig loads to use the gamepad" 14 60 dialog --msgbox "Using wired controllers, the pairing is in sequence. If you \ received the wrong LED, unplug and plug the USB cable back in until you get the correct LED number. Please reboot to fully enable the controller" 10 40 + sixad --boot-no } diff --git a/scriptmodules/setup.shinc b/scriptmodules/setup.shinc index 45fe9ad..a5814b7 100644 --- a/scriptmodules/setup.shinc +++ b/scriptmodules/setup.shinc @@ -310,6 +310,7 @@ options=(1 "Xbox 360 Controller (wireless)" done wii_motion_controller_for_dolphin + enable_autostart_RetroRig } From 49c85b728da979ae3d474f2d1ede0a2d4f1feafe Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Thu, 30 Oct 2014 21:30:34 +0100 Subject: [PATCH 13/21] typo --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index 7596020..abdb8a8 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -2,7 +2,7 @@ # Project RetroRig: https://github.com/ProfessorKaos64/RetroRig # -# This script detects a change of the amount available PS controller. +# This script detects a change of the amount of available PS controller. # If such a change was detected, it notifies XBMC. # # If enabled, it will start RetroRig automatically From 0e725a8076e8bd3e81381670c3bc8b08450559de Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Thu, 30 Oct 2014 21:31:31 +0100 Subject: [PATCH 14/21] typo --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index abdb8a8..9232239 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -2,7 +2,7 @@ # Project RetroRig: https://github.com/ProfessorKaos64/RetroRig # -# This script detects a change of the amount of available PS controller. +# This script detects a change of the amount of available PS3 controller. # If such a change was detected, it notifies XBMC. # # If enabled, it will start RetroRig automatically From f351242e1ecc7da0a2298503bc0c84def186e9ed Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Thu, 30 Oct 2014 21:32:35 +0100 Subject: [PATCH 15/21] typo --- XBMC-cfgs/extra/gp_autodetect_xbmc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh index 9232239..c5df847 100644 --- a/XBMC-cfgs/extra/gp_autodetect_xbmc.sh +++ b/XBMC-cfgs/extra/gp_autodetect_xbmc.sh @@ -10,7 +10,7 @@ # # Author: Jens-Christian, aka beaumanvienna/JC # -# Revision: 2014/10/29, support for PS3 / USB and auto start XBMC function +# Revision: 2014/10/30, support for PS3 / USB and auto start XBMC function autostartXBMC_PS3_USB=enabled autostartXBMC_PS3_BT=enabled From f9626b8af2660127a27d801438b00f018108c461 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Fri, 31 Oct 2014 17:42:31 +0100 Subject: [PATCH 16/21] prerequisites for pcsx2 (what the duck??) --- scriptmodules/emulators.shinc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scriptmodules/emulators.shinc b/scriptmodules/emulators.shinc index 76aee25..6ad5fc5 100644 --- a/scriptmodules/emulators.shinc +++ b/scriptmodules/emulators.shinc @@ -25,6 +25,10 @@ function em_install_yabause() function em_install_pcsx2() { + + #prerequisites + $cmd_install_pkg libportaudio2:i386 libjack-jackd2-0:i386 + echo "Installing Playstation 2 emulator PCSX2" $cmd_install_pkg pcsx2 # Unstable version still needs testing: From 99ea2dd960562a52b500206602c86341ccabdf3e Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Fri, 31 Oct 2014 23:19:35 +0100 Subject: [PATCH 17/21] amendement for system service / retrorig-setup build script --- scriptmodules/gamepads.shinc | 2 +- supplemental/build-retrorig-setup-ppa.sh | 16 +++++++++++++--- supplemental/retrorig-setup/changelog | 8 +++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/scriptmodules/gamepads.shinc b/scriptmodules/gamepads.shinc index 0490c0c..d7963f7 100644 --- a/scriptmodules/gamepads.shinc +++ b/scriptmodules/gamepads.shinc @@ -553,7 +553,7 @@ function enable_autostart_RetroRig() fi clear - service rescan restart + $cmd_rescan_restart sleep 2 } diff --git a/supplemental/build-retrorig-setup-ppa.sh b/supplemental/build-retrorig-setup-ppa.sh index b7a9c79..01de329 100755 --- a/supplemental/build-retrorig-setup-ppa.sh +++ b/supplemental/build-retrorig-setup-ppa.sh @@ -19,7 +19,7 @@ BASE=0.9.5 # In this case, this level will be used to denote incremental changes # instead of a specific branch for now (beta/master only exist at the # momement). -PL=4.3 +PL=4.4 #choose user #user="pk" @@ -41,6 +41,9 @@ if [ "$user" == "pk" ]; then #define upload target LAUNCHPAD_PPA="ppa:mdeguzis/retrorig" #LAUNCHPAD_PPA="ppa:mdeguzis/pkg-testing" + + #changed in package + CHANGE_TEXT="add comments here" #define uploader, date and time zone for changelog uploader_date="Michael DeGuzis Sun, 26 Oct 2014 00:00:00 -0300" @@ -69,8 +72,11 @@ if [ "$user" == "jc" ]; then #define upload target LAUNCHPAD_PPA="ppa:beauman/retrorig-testing" + #changed in package + CHANGE_TEXT="PS3 controller reworked (js device index bug, auto start function and USB hotplug support)" + #define uploader, date and time zone for changelog - uploader_date="Jens-Christian Lache Tue, 28 Oct 2014 19:00:00 +0100" + uploader_date="Jens-Christian Lache Tue, 31 Oct 2014 23:00:00 +0100" #define package maintainer for dsc and control file pkgmaintainer="RetroRig Development Team " @@ -92,7 +98,10 @@ echo "" echo "user is: "$user echo "package maintainer is: "$pkgmaintainer echo "" -echo "version: *** "$PRE.$BASE.$PL" *** from "$source_reprository", branch "$BRANCH +echo "version: *** "$PRE:$BASE.$PL" *** from "$source_reprository", branch "$BRANCH +echo "" +echo "changed: "$CHANGE_TEXT +echo "" echo "uploading to: "$LAUNCHPAD_PPA echo "" echo "Did you adapt debian/changelog accordingly?" @@ -194,6 +203,7 @@ echo "changelog" cp ~/RetroRig/supplemental/retrorig-setup/changelog debian/ sed -i "s|version_placeholder|$PRE:$BASE.$PL|g" debian/changelog sed -i "s|uploader_date|$uploader_date|g" debian/changelog +sed -i "s|changelog_text|$CHANGE_TEXT|g" debian/changelog echo "control" cp ~/RetroRig/supplemental/retrorig-setup/control debian/ diff --git a/supplemental/retrorig-setup/changelog b/supplemental/retrorig-setup/changelog index 9246ba5..43e0dad 100644 --- a/supplemental/retrorig-setup/changelog +++ b/supplemental/retrorig-setup/changelog @@ -1,8 +1,14 @@ retrorig-setup (version_placeholder) trusty; urgency=medium - * + * changelog_text -- uploader_date + +retrorig-setup (0:0.9.5.4.4) trusty; urgency=medium + + * PS3 controller reworked (js device index bug, auto start function and USB hotplug support) + + -- Jens-Christian Lache Tue, 31 Oct 2014 23:00:00 +0100 retrorig-setup (0:0.9.5.4.3) trusty; urgency=medium From 83b468ba5c26fcf681810d59e2ac999dc5350342 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Sat, 1 Nov 2014 09:21:16 +0100 Subject: [PATCH 18/21] amendment for sys abstraction code and auto start function --- scriptmodules/emulators.shinc | 2 +- scriptmodules/gamepads.shinc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scriptmodules/emulators.shinc b/scriptmodules/emulators.shinc index 6ad5fc5..bea4fc8 100644 --- a/scriptmodules/emulators.shinc +++ b/scriptmodules/emulators.shinc @@ -181,7 +181,7 @@ function em_install_gens() $cmd_remove_pkg gens echo "Installing Gens Sega CD/32X emulator" - $cmd_pkg_install install gens + $cmd_pkg_install gens # deprecated: installation from libregeek.org: #wget --tries=50 -P /tmp "http://www.libregeek.org/RetroRig/Ubuntu-Trusty/emulators/gens//Gens_2.16.7_i386.deb" diff --git a/scriptmodules/gamepads.shinc b/scriptmodules/gamepads.shinc index d7963f7..89125f9 100644 --- a/scriptmodules/gamepads.shinc +++ b/scriptmodules/gamepads.shinc @@ -524,7 +524,7 @@ function enable_autostart_RetroRig() dialog --title "Confirm yes/no" \ --backtitle "Auto Start RetroRig" \ - --yesno "Do you want to have RetroRig started automatically for the first gamepad being switch on? (Currently only for PS3 controller available)" 6 60 + --yesno "Do you want to have RetroRig started automatically for the first gamepad being switch on? (Only PS3 ctrl.)" 6 60 # Get exit status # 0 means user hit [yes] button. # 1 means user hit [no] button. From 78905d85b2f1a50303adba02b01c0958fb88a186 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Sat, 1 Nov 2014 09:47:24 +0100 Subject: [PATCH 19/21] typo in GensGS installation --- scriptmodules/emulators.shinc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scriptmodules/emulators.shinc b/scriptmodules/emulators.shinc index bea4fc8..e37e208 100644 --- a/scriptmodules/emulators.shinc +++ b/scriptmodules/emulators.shinc @@ -181,7 +181,7 @@ function em_install_gens() $cmd_remove_pkg gens echo "Installing Gens Sega CD/32X emulator" - $cmd_pkg_install gens + $cmd_install_pkg gens # deprecated: installation from libregeek.org: #wget --tries=50 -P /tmp "http://www.libregeek.org/RetroRig/Ubuntu-Trusty/emulators/gens//Gens_2.16.7_i386.deb" From faa20ed5bb8ea2ef6114f7ce00acbdc331d382a5 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Sat, 1 Nov 2014 10:43:53 +0100 Subject: [PATCH 20/21] PS3/USB doesn't need a reboot anymore --- scriptmodules/gamepads.shinc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scriptmodules/gamepads.shinc b/scriptmodules/gamepads.shinc index 89125f9..6873563 100644 --- a/scriptmodules/gamepads.shinc +++ b/scriptmodules/gamepads.shinc @@ -725,7 +725,7 @@ function gp_ps3_usb() # inform user that you must have controller connected or restart dialog --msgbox "The xboxdrv userland module detects the number of USB PS3 controllers connected \ when it starts. Therefore, we must specify how many you have connected or want to use. \ -You must reboot to have these changes take effect. If you tell xboxdrv I have 3 controllers, when you only have one, \ +If you tell xboxdrv I have 3 controllers, when you only have one, \ the service may fail to start correctly.\n\nPlease see /etc/default/xboxdrv for more. Press the PS Button after \ RetorRig loads to use the gamepad" 14 60 @@ -893,9 +893,6 @@ RetorRig loads to use the gamepad" 14 60 # correct permissions since we install using sudo access h_correct_perms - # Let the user know about reboot - dialog --msgbox "Please reboot to fully enable the controller!" 5 60 - sixad --boot-no } From 66d20c9022045066ffc3b2eb09973a111cc23db0 Mon Sep 17 00:00:00 2001 From: beaumanvienna Date: Sat, 1 Nov 2014 11:09:18 +0100 Subject: [PATCH 21/21] build script for retrorig-setup with all final amendments --- supplemental/build-retrorig-setup-ppa.sh | 2 +- supplemental/retrorig-setup/changelog | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/supplemental/build-retrorig-setup-ppa.sh b/supplemental/build-retrorig-setup-ppa.sh index 01de329..6d53537 100755 --- a/supplemental/build-retrorig-setup-ppa.sh +++ b/supplemental/build-retrorig-setup-ppa.sh @@ -19,7 +19,7 @@ BASE=0.9.5 # In this case, this level will be used to denote incremental changes # instead of a specific branch for now (beta/master only exist at the # momement). -PL=4.4 +PL=4.5 #choose user #user="pk" diff --git a/supplemental/retrorig-setup/changelog b/supplemental/retrorig-setup/changelog index 43e0dad..9075abf 100644 --- a/supplemental/retrorig-setup/changelog +++ b/supplemental/retrorig-setup/changelog @@ -4,6 +4,12 @@ retrorig-setup (version_placeholder) trusty; urgency=medium -- uploader_date +retrorig-setup (0:0.9.5.4.5) trusty; urgency=medium + + * PS3 controller reworked (js device index bug, auto start function and USB hotplug support) + + -- Jens-Christian Lache Tue, 31 Oct 2014 23:00:00 +0100 + retrorig-setup (0:0.9.5.4.4) trusty; urgency=medium * PS3 controller reworked (js device index bug, auto start function and USB hotplug support)