Due to the recent addition of the GameMode support, RetroArch needs access to the user's DBUS session socket.
When starting RetroArch from the RetroPie menu, `su` is used to launch it as the install user, but the DBUS socket path is not preserved (`DBUS_SESSION_BUS_ADDRESS`), leading to a en error and then a crash.
Prevent the crash by setting the XDG_RUNTIME_DIR when RetroArch is started with `su`.
NOTE: this primarily affects X11/PC users, where GameMode is part of the desktop install.
The previous changes to check for an internet connection to avoid showing options to update failed
with these modules as they have install_bin functions which are handled by rp_hasBinary but don't
require an internet connection.
To workaround this, I have added a "nonet" flag, which if set, will force has_net to 1 in setup and packages
so the install options will show, and they can be removed and reinstalled even if no network connection is available.
runcommand can still fail due to not being able to install mesa-drm - which will be reported, but it's safer to allow
the main runcommand to be installed even without mesa-drm in case of accidental removal.
Previously all the module data was in indexed arrays with matching offsets.
Each scriptmodule folder had an initial index and it was incremented per module.
Many package functions expected an index. Indexes were never unique and could change
depending on added modules etc. We also had to convert between them and module IDs.
Now it's all done by module id. There is a numbered index of all modules found, that
increments which is used in the GUI setup menus. But it's not needed by any packaging functions.
md_idx is dropped and the few modules that used it for install checks etc now use md_id.
all packaging functions use the id.
retropie_packages.sh now accepts the module id only.
* the function obtains an externally routable source IP address for the machine
* an IPv4 route is tried first and, if not found, then an IPv6 route is tried
* the function also handles queries for specific devices (used in `wifi.sh`)
* replace all instances of `ip route (...)` with new `getIPAddress` function
* the gamelist.xml was not removed on removal of the module, and this is used to detect an upgrade from older retropie where no $md_inst was created. This caused the module to be marked as installed when running the update hook
* the delSystem call had the wrong parameter order, causing the es_systems.cfg entry to not be removed
* Fallback to ip link set commands, needed when wlan0 is not defined
in /etc/network/interfaces.
* Restart dhcpcd during link up to work around wpa_supplicant trigger
failure.
* Ensure wlan0 is up before initiating scan & wait 1 second before start,
or else interface scan can fail.
* Fix display of IP address & only show actual wlan0 IP address.
Also fix IP address display in retropiemenu.
* call a _add_rom_module function for each setting
* add _add_rom_emulationstation function for managing gamelists
* add _add_rom_attractmode function for managing attractmode romlists
* rename _addsystem_module to _add_system_module
This reverts commit 7728b5c83d.
will cause a problem if we want to add new items to the menu - if users want to customise
the gamelist for the menu they can copy it to ~/RetroPie/retropiemenu
* add _update_hook function support - these get run on updating retropie-setup.
* add update_hook functions for modules so they show up as installed on retropie-setup 4.x - eg modules that
previously just apt-get installed a package.
* rp_module_menus is no more - instead use rp_module_section with one of
- core (core packages)
- main (main packages - which will be installed by default in the image)
- opt (optional packages)
- exp (experimental packages)
- driver (driver packages)
- config (configuration packages / tools)
* The setup menu organises the data based on the above sections. more could be added in the future if needed. Packages (internally modules), can be added / configured / removed individually, or as entire sections.
* The setup menu will automatically detect if a binary is available to be installed. the nobin flag is no longer needed. modules that install directly from binary via aptInstall or via a prebuilt binary need to use an install_bin_ function instead of install_
* rp_module_section of type "config" will have the "gui_" function called first if it's available, otherwise a standard depends/sources/build/install/configure will be called
* configure is no longer used for "gui" configuration function - use gui_ instead. Had already started to move to this before, but now it is required.
if a module has a "gui" function - call that are dependencies, else call "configure". this is due to some modules containing source install and configure options as well as an additional gui functionality.
we should move all gui menus to a gui function so that configure functions are always non-interactive