Tell the user to save their configuration files if they intend to use any of RetroPie components after removal, i.e. if they previously had an emulator/port installed and they still want to use it after removing RetroPie.
Since a98c59597f we now need to check if a module is enabled.
This fixes incorrectly showing config modules like wifi on systems where it is not supported.
Git reports
fatal: unsafe repository ('$HOME/RetroPie-Setup' is owned by someone else)
This is due to us running `git log` under root on a repo owned by the user it was installed for.
This commit also switches from su to sudo in setup.sh for consistency with other code.
This shouldn't happen as currently only some __INFMSGS are set rather than __ERRMSGS before we reach this point,
but as depends_setup calls it without a parameter it's best to handle this case.
Create a new function isConnected in helpers.sh which calls getIPAddress, but also sets a new global
__NET_ERRMSG if not connected. This is used in setup.sh and packages.sh so we don't duplicate the same
message between files.
Split out a new function runCurl from the download function, to do lower level curl calls, but capture any
errors into __NET_ERRMSG for display in setup.sh or via the packaging functions. Use a connect timeout of 10
in the download function rather than 60 which is quite long, but keep the 60 second limit on no data transfer.
Adjust rp_remoteFileExists to use runCurl, so we can capture any error when checking a remote file,
and use this value for display in setup and in logs etc. Switch to using long versions of curl options for
readability, and add --show-error so we still output errors when being silent.
Also switch rp_getFileDate to use new runCurl function, so that any curl argument overrides are handled, and use
long format parameters also. No error handling is done here though.
Adds an option to show some of the main retropie.pkg information for an installed package.
Will be expanded in the future, but it's useful to see more information about what is installed now we have it.
The message was overly verbose and cluttered the menu a bit. The red colour should be enough but choosing
the disabled package shows a dialog with information anyway.
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 we eval's the return of getPackageInfo so the package variables could be created
locally to the function. However, due to the use of a subshell we couldn't cache anything in a variable
for use later.
The functions is now renamed to rp_loadPackageInfo and loads the package information into __mod_info[ID/FIELD]
eg. __mod_info[ID/pkg_origin] will contain the retropie.pkg origin field for the installed module
It also uses just grep to load the data rather than our existing ini functions for performance. As it's not
considered a user editable file, performance is key here, as we need this data when traversing the
RetroPie-Setup menus.
If a full load of a retropie.pkg is done, __mod_info[ID/pkg_info] is set to 1, as a cache flag so the data can be
reused without reloading on an additional call. rp_SetPackageInfo will clear this flag
Optional parameters for rp_loadPackageInfo can choose individual fields but if used the data won't be
cached, but it can be a lot faster - we use this to grab pkg_origin for the section menus in RetroPie-Setup.
On the Raspberry Pi console, bold text results in a lighter colour, rather than actually being bold.
One user (it may not be a common issue) reported on their terminal that they couldn't see installed
packages. This was due to our "bold white" for installed applications which ended up being bold grey on a grey
background - so they couldn't see what was installed without hovering over it.
We don't colour installed packages now - but add unavailable packages as red.
This can always be changed later also if needed of course.
Do a grep to extract the rp_module_id before sourcing a file and check if it has already been used.
We don't want additional modules overriding existing, or accidental duplication.
Store the path of a module in __mod_info(ID/path)
Display any info/error messages when launching setup as otherwise they wouldn't be seen - they are
shown otherwise at the end of retropie_packages.sh.
Used to separate 3rd party packages from RetroPie ones. Added some extra menu items in setup showing
above each type like a heading with
---- VENDOR - TYPE ----
Where:
* VENDOR is RetroPie or the name of the folder the 3rd party repo is installed in
* TYPE is the module/package type such as emulator, libretrocore, port etc
Some users have found the ordering of the menus confusing and this should help with that also.
3rd party packages always appear at the end of a section
Previously, allthough all modules were read in, we only displayed modules that were enabled for
the current system. This has caused some confusion in the past with people installing RetroPie on another
system and wondering where a package is.
Now all packages are shown via retropie_packages.sh and in setup menus with information if they are
not enabled for the current system.
rather than multiple arrays for each module info we now use a single array with
__mod_info(ID/KEY) where key is type/desc/help/licence/flags etc
we still keep __mod_id() - a standard indexed array with every module id (used for setup menus etc) and
__mod_idx() which references the index # from the id
this will make it easier to extend in the future
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.
This adds a __setup global variable which is used for this (set to 1 during setup_depends).
In the past, sources were not cleaned on error which was an issue for some users when an
upstream source changed causing a custom patch to fail or upstream url code changed. It was
changed so source folders were cleaned up on error which was useful for end users.
This wasn't helpful for development and testing though, so when using retropie_packages
directly, the source folder won't be removed. When building a module and testing via
./retropie_packages.sh MODULE sources, it was nuisance to have the source folder removed on
a patch failure, especially on larger repositories.
Although aborting on error is cautious, it's more user friendly to continue and then show the failed installs,
otherwise in the case of an upstream change it could make it difficult to do a full install or update.
* binaries will only be built for a few months more, then it will be source only. Also some packages may no longer work, and we may not guarantee compatibility due to the age of the distro.
this allows switching dependencies between binary/source installs and removal if needed - useful in some cases,
as it's possible if our server was offline for a source install to be used, which with the new packaging will be
rememebered - so this allows switching back to binary.
added golang / mesa-drm omxiv / sdl1 and sdl2 to depends section