Commit graph

200 commits

Author SHA1 Message Date
G Derber
f7761fd635
Add ability to differentiate group ownership from user ownership. 2024-08-06 09:38:25 -04:00
cmitu
2c9ef678e2 admin: expand the warning about config removals
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.
2024-02-29 17:22:29 +00:00
Jools Wills
cbb0b5f4e2 setup - only show the kms driver warning on Debian 10 and older 2023-10-19 17:10:43 +01:00
Jools Wills
51a035d9c5 setup - only show enabled modules in config section
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.
2023-02-18 19:49:29 +00:00
Jools Wills
e041a0c513 setup - fix up warnings with git 2.34.1 in retropie-setup
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.
2022-04-25 22:34:38 +01:00
Jools Wills
ad449c6730 setup - add additional packaging menus
Add inst menu, for managing of all installed packages in a single list
Add all menu, for managing of all packages in a single list
2021-09-08 03:14:14 +01:00
Jools Wills
cb81fd310a setup / rps_printInfo - don't print log reference if no log parameter is provided
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.
2021-06-16 05:36:52 +01:00
Jools Wills
8d2121c5e2 setup - start joy2key before depends_setup so early dialogs can be closed with joystick 2021-06-16 04:37:08 +01:00
Jools Wills
833721febe setup - added dialog while checking for updates for a package 2021-03-02 05:52:34 +00:00
Jools Wills
43e9d5532f Rework the checks and error messages displayed on network error
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.
2021-03-02 05:52:34 +00:00
Jools Wills
c32ffe4236 setup - added per package menu option to show package info
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.
2021-03-02 00:18:55 +00:00
Jools Wills
8f8118facb setup - allow updating of OS packages on non Raspberry Pi OS systems 2021-02-16 00:59:26 +00:00
Jools Wills
d31164668a helpers / setup - add --ff-only for git pull to avoid warnings on recent versions of git 2021-02-16 00:31:03 +00:00
Jools Wills
51781ecae5 setup - remove "Not available for your system" for disabled modules in manage packages
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.
2021-02-16 00:25:55 +00:00
Jools Wills
86122e647b setup - don't allow running main menu install/update options if no connection is detected 2021-02-15 23:54:13 +00:00
Jools Wills
927b9922df setup / packages - fix up installing retropiemenu / runcommand without a network connection
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.
2021-02-15 23:54:13 +00:00
Jools Wills
687a250187 packages / setup - quietly handle issues with unparseable dates 2021-02-15 23:54:13 +00:00
Jools Wills
ed20022055 packages / setup - rework logic to handle cases where there is no internet connection 2021-02-15 23:54:13 +00:00
Jools Wills
a07d8ed569 packages / setup - re-implement rp_getPackageInfo as rp_loadPackageInfo
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.
2021-02-15 23:54:13 +00:00
Jools Wills
6b0055ae3c setup - adjust logic to support source version checking 2021-02-15 23:54:13 +00:00
Jools Wills
52dca5dd1d setup - change colours around to work with other terminals
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.
2021-02-08 00:31:39 +00:00
Jools Wills
4902a43749 setup - show built date in UTC format 2021-02-01 05:15:08 +00:00
Jools Wills
500b97084b setup - make sure we clear last_type so it's not set on later iterations of loop 2021-01-31 22:47:45 +00:00
Jools Wills
cd653cc8c1 setup - fix up module vendor / type headings to use vendor in check
This fixes cases where only the script vendor changes rather than just the type of package, which
could mean a heading is missed.
2021-01-31 22:11:15 +00:00
Jools Wills
f2e2422566 packages / setup - make sure module ids are unique
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.
2021-01-27 04:47:30 +00:00
Jools Wills
a20f2e63f2 setup - make headings blue 2021-01-26 03:22:08 +00:00
Jools Wills
8fe4d254e8 packages / setup - add vendor to module info and display in setup
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
2021-01-26 03:00:15 +00:00
Jools Wills
7e6b8b5b59 setup - highlight installed package ids in white 2021-01-23 04:03:00 +00:00
Jools Wills
a98c59597f packages / setup - show all modules and if they are not enabled for a system
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.
2021-01-23 03:27:17 +00:00
Jools Wills
4cf07a67c1 packages - use a single associative array for module info
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
2021-01-23 01:48:07 +00:00
Jools Wills
1d92a12075 setup / packages - switch to using curl / check curl return values 2021-01-21 05:18:32 +00:00
Jools Wills
58fb1fb92d setup - move logfile pruning to log init function
it could throw an error if $__logdir didn't exist, and this is a better place really - prune before making new logs
2021-01-14 22:29:25 +00:00
Jools Wills
b182f1c6c7 setup - clear screen before package removal 2021-01-07 05:10:02 +00:00
Jools Wills
35d89a003f setup - continue on error when updating to match main install / section updating 2021-01-07 05:10:02 +00:00
Jools Wills
ca78a7325e setup - remember default/selected item on per package menu
Avoids accidents when choosing help, and exiting and being back on the first entry for example
2021-01-07 05:10:02 +00:00
Jools Wills
acdb1ddac8 Switch to associative arrays for module data and storage
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.
2021-01-07 05:10:02 +00:00
Jools Wills
1f3716aa95 system / setup - Raspbian Stretch is no longer supported
Disable binaries for Raspbian Stretch and adjust warning message accordingly.
2020-12-17 03:07:49 +00:00
Jools Wills
320480f9f4 setup - remove unused "force" parameter
looks like it was added during some development of an earlier commit, and left in despite never being used
2020-12-08 07:17:11 +00:00
Jools Wills
82cb6d8671 setup - don't clean up sources on failure unless we are calling from setup gui
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.
2020-12-02 00:14:03 +00:00
Jools Wills
e91a9bcb7c setup - continue on error when doing installs or updates of multiple packages
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.
2020-11-26 00:36:44 +00:00
Jools Wills
ebf1fd1654 setup - inform users about removal of binaries for Raspbian Stretch
* 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.
2020-10-12 07:17:59 +01:00
Jools Wills
c5333d6891 Revert "setup - add warning and link to information about the libretro hack"
This reverts commit eacddf0b82.
2020-08-25 22:19:21 +01:00
Jools Wills
eacddf0b82 setup - add warning and link to information about the libretro hack 2020-08-17 11:34:41 +01:00
Jools Wills
7c8c888a39 setup - added a warning regarding 64bit support on the RPI not being officially supported 2020-07-30 04:28:30 +01:00
Jools Wills
faa14f44e6 system / setup - added __arch global with system architecture and include in retropie-setup
* include in logging and retropie-setup main menu heading, with some reformatting changes
2020-07-30 04:28:30 +01:00
Jools Wills
982714fe75 setup - update warning message for unsupported Debian/Ubuntu
* change Ubuntu version to 18.04 in the warning
 * remove mention of what version to upgrade to (as it was incorrectly saying to update to stretch)
2020-06-30 19:00:48 +01:00
Jools Wills
4d161eac2c setup - fix logic on updating section packages aborting on the first uninstalled package 2020-05-03 15:21:11 +01:00
cmitu
5a82a16176 setup: add back the question for the install/update dialog 2020-03-24 11:02:03 +00:00
Jools Wills
2987d8fbba setup - more clear wording for updating all in section to "Update all installed"
* was "Update all" before so wanted to clarify it only affects already installed packages
2020-03-23 04:17:12 +00:00
Jools Wills
731bb20a30 added depends package section and show in setup gui
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
2020-03-23 04:17:06 +00:00