How to compile modified version of EmulationStation and update it on RetroPie
-
Pi Model: Raspberry Pi 3 - Model B
Power Supply: CanaKit 5V 2.5A Raspberry Pi 3 Power Supply / Adapter / Charger
RetroPie Version: 4.1
Built From: Pre made SD image. (Boots on Micro SD, filesystem is on Flash Drive)
USB Devices: Keyboard, Pokken Pro Controller, Flash Drive with filesystem on itI want to make a few changes to EmulationStation to include more sounds for each UI interaction. In order to do this I'd need to build it to run on the RetroPie, and then replace the current version of ES on my RetroPie with the newly built one.
I've been looking around for information and tutorials. ES's page tells you how to build it for RetroPie but it only states how to do it through RetroPie's setup script. What are the steps I need to take for the following?
- Is it possible to build EmulationStation on Windows for RetroPie? If not, how do I go about building it on my RetroPie?
- What files do I replace on the RetroPie after it's been built.
-
@trigger_death you're thinking of this the wrong way. What you'll want to do is fork the repo on GitHub and point your module to your fork then you can build it directly on your pi as you make updates
-
@herb_fargus Ah I see now this makes a bit more sense. Just a few questions then.
- Do I fork the RetroPie fork of EmulationStation (if that's even possible), or the original EmulationStation? (I'm not aware if the latest ES works with RetroPie)
- Are all of the required libraries already installed?
So I just want to confirm, are these the steps you're talking about to build and point the module? And this is the correct directory to build in right?
git clone https://github.com/trigger-death/EmulationStation cd /opt/retropie/supplementary/emulationstation git checkout unstable cmake -DCMAKE_CXX_COMPILER=g++-4.7 . make
Edit: Also is there a way to debug this without dealing with the estimated multi-hour compile time?
Edit 2: Found this guide for compiling on Windows. This should do the trick for the above question. VS2015 takes forever to install sadly. -
@trigger_death use the child friendly module as an example from the scriptmodule folder on how to build it as a retropie module
I dont know as far as debugging goes for building as each function is a piece of the build and the build folder may just be temporary (or may persist if it fails) I haven't looked at it extensively enough to test, I'm not as familiar with the code.
You can call each module function with retropiepackages as that's really what does all the work for the modules
-
Alright, I've figured it out and got it all working and building! :D It took about 10-30 minutes to build on my Pi 3 (I probably should have timed it). For people who want to follow suit, here's the steps I took:
How to specify source for EmulationStation by making a custom module/package:
- In the terminal enter "sudo nano /home/pi/RetroPie-Setup/scriptmodules/supplementary/emulationstation-custom.sh"
- Paste the following code:
#!/usr/bin/env bash rp_module_id="emulationstation-custom" rp_module_desc="A modified version of EmulationStation." rp_module_section="core" function depends_emulationstation-custom() { depends_emulationstation } function sources_emulationstation-custom() { sources_emulationstation "https://github.com/retropie/EmulationStation" "master" } function build_emulationstation-custom() { build_emulationstation } function install_emulationstation-custom() { install_emulationstation } function configure_emulationstation-custom() { configure_emulationstation } function gui_emulationstation-custom() { gui_emulationstation }
- Change "https://github.com/retropie/EmulationStation" to the fork you would like to use.
- Change "master" to the branch you would like to use.
- You can change the description at the top to anything you like and you can also change the name from "emulationstation-custom" to something else, note this must be reflected in all the function names as well.
- The rp_module_section value can be changed too but the only name for the other sections I'm aware of is "exp" for experimental.
- Press Ctrl+X, Y, then enter to save.
- Now when you build go to build EmulationStation there will be an option to build your custom version.
Note: The original emulationstation package/module will still say (installed) after installing your custom module. This is normal.
How to build EmulationStation from source:
- Now open RetroPie Setup in EmulationStation.
- Select Manage packages
- Select Manage core packages
- Select emulationstation (emulationstation-custom if you followed the later method)
- Select Update from source
- Now wait for however long it takes to compile. (This took 15 minutes on my Pi 3)
Temperature Warning:
Your Raspberry Pi can get pretty hot while compiling. A temp warning symbol will appear in the top right corner of your screen when the temperature reaches 75-80+ Celsius. The symbol appeared for me while compiling and I was not overclocking. I was using this case which has no real ventilation so it may not be a real issue for everyone.If you're concerned and want to check what the temperature is:
Login to your Pi from Putty. (Enter retropie as the host name then hit enter. Login: pi, Password: raspberry). Then enter "/opt/vc/bin/vcgencmd measure_temp" to receive temperature readings.- I'm not sure what to do if there were build errors when compiling, if EmulationStation still works from the previous installation then that's great. But I don't really have the time to purposefully build something that will fail to test it out.
- Now exit the RetroPie Setup app and restart EmulationStation for the changes to take effect.
Hope this helps others.
-
@trigger_death Nice patch! (or little hack?)
-
@trigger_death just as a note: it is a bad approach to overwrite retropie's default scripts as they will get overwritten if you update retropie-setup. You should better add a new supplementary containing your custom ES (like the kids version).
-
@daeks How's that? I added that method to the instructions. I'll completely remove the other method once I have time to test it to make sure it's correct but I don't have the time at the moment.
Edit: I ended up having time to test it. And it works fine. Thanks. :)
-
@trigger_death Just wanted to say thanks for this, worked perfectly - I added support for a DACand RPi3 didn't even go over 65c when compiling :) Many thanks.
-
@trigger_death
thanks you
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.