Giter VIP home page Giter VIP logo

rickdangerousupdate's Introduction

Nice banner saying Insanium Edition Update Tool

Disclaimer: This repository is only for educational purpose. Only use this with your own files/backups.

This script aims to help people adding improvements, fixing known bugs or resetting certain configurations. It can be run directly from the retropie and apply updates locally, or you can run it on a device in the same local network by providing ssh credentials.

Join Rick's discord server to keep track on the latest changes.

RickDangerousDiscordBanner

Installation of the Tool

Simply run the following command on your Retropie via SSH (this is the recommended way, click here for further instruction) or access a terminal by connecting a keyboard and pressing F4 (Replace [link] with a URL to the MEGA storage containing the updates):

bash <(curl 'https://raw.githubusercontent.com/h3xp/RickDangerousUpdate/main/install.sh' -s -N) [link]

Installation will make the tool available from the "Options" tab in EmulationStation.

screenshot of the tools options entry inside of emulationstation

The script will also install a new command "update_tool" with which you can easily run the script from the CLI.

Note that if you do not install the tool, it will not be able to track what updates you have applied to your system and you will be prompted the install all available updates each time you run the tool until you do properly install it.

Warning

  • It is strongly recommended to actually install the tool rather than just running it.
  • Running the tool without installing it is at your own risk and is no longer supported.
  • The script has been tested, however we can't give a 100% guarantee that it might not break something on your retropie. Therefore, use this at your own risk.

Features

Improvements

This is the "main" feature and reason to create this tool.

Download and Install Updates

This will allow you to easily select single or multiple updates to download from the MEGA drive directory and install them.

Manually Install Downloaded Updates

This allows you to install updates that you have manually downloaded from the MEGA drive directory.

Manually Install Downloaded Unofficial Updates

This allows you to install unofficial update packages that you have found and manually downloaded from that are not part of the official build.

Package Unofficial Updates

This allows you to create distribution packages of unofficial games you have previously manually added to your installation of the build.

Update Status

This does a check of your exisiting installation and lets you know which updates you have installed and what other updates are available to you.

Validate Downloaded Updates

This option checks the update files you have downloaded to confirm their validity for use.

Manual Updates Story

This option will describe the effects of applying manually downloaded updates before they are applied.

System Tools and Utilities

Various settings, tools and resets.

Gamelist (Etc) Utilities

Gamelist (Etc) Utilities provide a lot of functions to clean up, in general, and work with your gamelist.xml files.

Check or Clean Game List Utilities

Check Game Lists

This will check your gamelist.xml files and optionally check for orphaned roms, artwork, video snapshots, and multiple disk files.

Clean Game Lists

This will clean your gamelist.xml files by removing invalid entries, it will also delete orphaned files like roms.

Restore Clean Game List Logs

This will let you reverse the changes you applied with the "Clean Game Lists"-feature.

Remove Check or Clean Game List Logs

Allows you to delete log files left by previous gamelist utilities clean or check actions.

Clean Unofficial Roms

Allows you to select and uninstall unofficial roms you have previously added to your installation.

Genre Utilities

Manually Select Genres

Allows you to manually select official Rick Dangerous genres for roms that you have added manually, and add them to the correct collections.

Realign Genre Collections

Scans gamelist.xml files and completely rebuilds genre collections from gamelist entries.

Clear Recent Additions Collection

Resets Recent Additions collection to empty.

Sort Game Lists

Sorts your gamelist.xml files by Name for easier readability.

Check or Clean Emulators Config Utilities

Check Emulators Config

This will check your emulators.cfg file for duplicate or invalid entries.

Clean Emulators Config

Sorts your emulators.cfg file, removing duplicate or invalid entries.

Remove Check or Clean Emulators Config Logs

Allows you to delete log files left by previous gamelist utilities clean or check actions.

Count of Games

Displays the total game count within gamelist.xml files from selected systems. When you count all systems this will also drop a counts.txt file and a games_list.txt file, so you can easily validate against official game counts and view a comprehensive listing of all games.

System overlay

This lets you easily activate and deactivate the bezels/overlays for each system.

Handheld mode

This will reset the video settings and deactivate the bezels for these systems to make them more enjoyable on a handheld screen. Don't use this if you have your retropie connected to a TV. These systems will be adjusted:

  • atarylynx
  • gamegear
  • gb
  • gba
  • gbc
  • ngpc
  • wonderswancolor

Reset Permissions

Reset Permissions will correct the ownership of parts of the installation if they have been accidentally changed.

Installation

Install

N.B. This option is here for existing users who have not previously installed the tool who know how to directly run the tool. The method of operation is no longer officially recommended.

This option will install the update tool fresh to the "Options" tab in EmulationStation. If an existing configuration exists then an Update operation is performed instead. This is done to avoid losing your installation history.

Update

This option will update your version to the most current version of the tool available.

Uninstall

This option will remove the tool entirely from the "Options" tab in EmulationStation and from your system.

Settings

Select Update Notification

Select Update Notification allows you to set what method is used to notify you of image updates and tool updates

  • False - No notifications of updates or upgrades are displayed
  • Theme - A message is displayed on the system selection screen when image updates or an upgrade to the tool is available
  • Tool - At boot time the update tool can be optionally executed when image updates are available. This option should only be set if you have a keyboard attached to your Pi. This option includes the behaviour of the Theme notification.

Toggle Auto Clean

Toggle Auto Clean allows you to turn on or off automatic cleaning of your gamelist files after any updates are loaded.

Toggle Count Official

Toggle Count Offical allows to turn on or off inclusion of unofficial games within gamelist.xml files. Offical games are those provided by Rick. These are tagged noting their origin.

Support

Displays links to the Discord server and the Update Tool project

SSH Remote Installation

  1. Make sure your pi is connected to the same network as your personal computer.

  2. Make sure ssh is installed on your computer.

    • If you are on Windows you can check this by pressing Windowskey + R then type cmd and hit return.
    • Now a command line windows should have opened. Simply type ssh and hit return.
    • If you have ssh installed your output should look like this:
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]host[:port]] [-L address]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] destination [command]
  • If it doesnt look like that, you can find help for Windows here
  1. Now you need to know your retropies IP address. The easiest way to get it is by opening the "Options" tab in EmulationStation and use the "Show IP" menu entry.
  2. You are all set! Simply run this command in your command line window (Windowskey + R then type cmd and hit return):

Replace [IP] with the IP adress you just found out and [link] with a URL to the MEGA storage containing the updates.

ssh pi@[IP] bash <(curl 'https://raw.githubusercontent.com/h3xp/RickDangerousUpdate/main/install.sh' -s -N) [link]
  1. Enjoy !

rickdangerousupdate's People

Contributors

aidanjacobson avatar h3xp avatar holly79 avatar lizardwiz avatar mrludo001 avatar wolfrevo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rickdangerousupdate's Issues

Keep track of installed updates

Put in update_tool.ini
[INSTALLED_UPDATES]
update_name=datetime.datetime.utcnow().strftime("%Y%m%d-%H%M%S")

that way we can automatically check the ones that need to be implemented for the "Apply Selected" option.

Manually fix gamelist genres

For people who add games manually, scan gamelist entries and allow them to pick a genres that aligns with Rick's

Dump game list from counts.

make a tab delimited file with system/name.

Change menu option to games/counts, or something to reflect the change.

Gamelist check and clean possible enhancements

While the check and clean already works impressive there are possible improvements.

  1. gamelists/retropie/gamelist.xml
Oct 06 15:25:36 lvl2:   Parsing XML file "/home/pi/.emulationstation/gamelists/retropie/gamelist.xml"...
Oct 06 15:25:36 lvl1:   File "/home/pi/RetroPie/retropiemenu/+Start PICO8.sh" does not exist! Ignoring.
  1. collections/custom-PC ENGINE.cfg
Oct 06 15:25:37 lvl2:   Loading custom collection config file at /home/pi/.emulationstation/collections/custom-PC ENGINE.cfg
Oct 06 15:25:37 lvl2:   Couldn't find game referenced at '/home/pi/RetroPie/roms/pcengine/Street Fighter II' - Champion Edition (Japan).zip' for system config '/home/pi/.emulationstation/collections/custom-PC ENGINE.cfg'
  1. collections/custom-strategy.cfg
Oct 06 15:25:38 lvl2:   Loading custom collection config file at /home/pi/.emulationstation/collections/custom-strategy.cfg
Oct 06 15:25:38 lvl2:   Couldn't find game referenced at '/home/pi/RetroPie/roms/amigacd32/e Fodder (Europe).cue' for system config '/home/pi/.emulationstation/collections/custom-strategy.cfg'
Oct 06 15:25:38 lvl2:   Loading custom collection config file at /home/pi/.emulationstation/collections/custom-trackball.cfg
  1. missing items like referenced pictures in the themes xml files (see emulationstation log file: ~/.emulationstation/es_log.txt)

Installer script

Write installer script so that it will be native on retropie and show on the options menu.

Sorting Algorithm of Updates

I suspect that we may cross the 100 mark at some point. We need to plan for that. Parse out the number portion and sort on that int value, rather than using list.sort() method...

I we don't we will see:
Update 09
Update 10
Update 100
Update 101
Update 102
Update 11
Update 12
etc...

Clean gamelists processes orphaned m3u files incorrectly

Process orphaned files puts all files supposed to be in .data folder into a single file called .data in roms directory.

You can't undo these changes

shutil.move(file_path, dir_backup)
needs to be changed to:
if not os.path.exists(dir_backup):
os.makedirs(dir_backup)
shutil.move(file_path, dir_backup)

Update script

Let the installed tool update itself based on version...

Clean Auto-Cleans on Bad Roms

If the image/video is used in a previous gamelist entry, the file will be removed from supporting_files(i.e. directory of snaps/boxart), and it will not be counted as a found file...
Since the rom is not found, when the image/video file do not appear in found_files, it is auto cleaned.

process_supporting files:
# delete validated files
if len(file) > 0:
if file in supporting_files:
if file not in found_files:
found_files.append(file)
index = supporting_files.index(file)
del supporting_files[index]

process_gamelist:
# check for auto gamelist removal
if len(found_files) == 0:
if rom_file not in remove_entries:
remove_entries.append(rom_file)

# remove entry that shouldn't be there
for entry in remove_entries:

Error handling

When errors occur during improvement installation the script does not exit gracefully and temporary files in /tmp do not get deleted.

add progress bars

Downloads can take a while. Progress bars make the waiting more bearable.

Parse m3u fails on amastradcpc update

Rick has put in commands so the file entries look like this:
#COMMAND:RUN"AFOX
.data/Arctic Fox (1988)(Electronic Arts)[a].dsk

Discard anything that begins with #

starting the update tool from options menu throws error

starting the update tool from options menu throws this error:
/dev/fd/63: line 10: update: command not found
/dev/fd/63: line 11: update: command not found
/dev/fd/63: line 12: update: command not found
/dev/fd/63: line 13: update: command not found
/dev/fd/63: line 14: update: command not found
/dev/fd/63: line 15: update: command not found
/dev/fd/63: line 16: update: command not found
/dev/fd/63: line 17: update: command not found
this doesn't seem to affect the process, it just continues to work afterwards, but still something to get rid off

root privileges?

Does the script work for updates that require root privileges?

updates are not recognized on next tool-run

The tool shows me all available updates.
But when I start them and leave for several hours the screensaver is active and when I run the tool again it has not updated the installed improvements.
I think it might happen when it failed to update an improvement (maybe of mega download-limits).
You should update the installed improvments right after each installation and not at the end (if this is the casee ;) )

Reset Emulationstation controls

Resetting the emulation station controls takes a few clicks which can be unintuitive for novice users, the script could make this very easy

installation/uninstallation should reboot the system/ES

After installing the script or uninstalling the script the system should automatically reboot.
At least a prompt to reboot the system to apply changes is mandatory. Without the reboot the menu option does not show up after installation and it stays in the menu after uninstallation until the system is rebootet.

Download Fixes

Process after each download.
Remove "i" reference before assignment.

overwriting gamelist.xml

If there is a gamelist.xml present in an improvement the script would overwrite any personal changes someone might have added.
The script should take in account for that and keep personal preferences.

check wrong permissions function is wrong

the check wrong permissions function is checking a wrong directory/file for wrong permissions.
This only needs the correct path to work correctly.
We need to ask someone who did not fix the permissions yet which file is wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.