Commit graph

397 commits

Author SHA1 Message Date
cmitu
64d16476ec image: add a link to the project's web site. 2022-03-29 05:58:18 +01:00
Jools Wills
e1506e15a6 image - update rpi2 image name/meta data to include Zero 2 W 2022-01-24 06:42:12 +00:00
Jools Wills
e12f285667 image - updated buster raspios lite image url
Buster is now being supported as the "oldstable" release and newer downloads are available via

https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf_latest redirect
2022-01-24 06:36:01 +00:00
Jools Wills
3e9b0ef40b crosscomp - update url for libisl and default to buster for "setup" function 2022-01-18 17:09:23 +00:00
Jools Wills
7e76934deb
Merge pull request #3431 from cmitu/wifi-osk
joy2key,wifi: add an on-screen keyboard dialog
2021-12-07 20:03:54 +00:00
cmitu
d6cede74de joy2key,wifi: add an on-screen keyboard dialog
Currently, the WiFi configuration from RetroPie menu needs a keyboard for configuring a connection.
Added a `python` script to display on-screen keyboard which can be operated with `joy2key` and the gamepad, which allows entering the WiFi network/key/password without a keyboard.

The script accepts keyboard input, so it's suited for both keyboard and joystick input. It's using the `urwid` library (https://urwid.org).

The WiFi scriptmodule was modified to use the new OSK script instead of the `dialog` based inputboxes.

Additional modifications to the WiFi module:
 - added a confirmation step before removing the WiFi config and stopping the WiFi
 - added an info message during the WiFi scanning (instead of having a black screen)
 - removed the check for the pass length, it's done by the new OSK script
 - reformatted a bit the 'country' warning

NOTE: I've tested the new OSK script with smaller displays, but anything less than 40 cols will not be displayed fully. The OSK keyboard will scroll horizontally (when there's no more space on screen), but this is non-intuitive and might confuse users. _If_ we need to accomodate an even smaller screen size, then the OSK display area should be probably changed to accomodate that (i.e. less letters on a 'keyboard' row).
2021-12-07 15:10:50 +00:00
cmitu
9fa622cf6c joy2key: fix crash on older pythons/py-sdl2 and init update
* Added a local fix for a crash when using older Python and Py-SDL2 versions.
 Upstream bug: https://github.com/marcusva/py-sdl2/issues/75.
 Upstream fixed the issue, but older distros (Ubuntu 18.04 based) don't have an updated `python3-sdl2` package.

* It seems that initializing the video is not really required for the joystick subsystem to work.
 On newer SDL versions (tested with 2.0.16), initialization will fail with video added if the video cannot be initialized.
 This prevents starting `joy2key_sdl.py` if ES is already started or trying to run it headless (i.e. no KMS/X available).
 While this is not a use case we're covering, it's better to remove the video initialization if it's not needed.
2021-11-30 08:15:11 +00:00
Jools Wills
259d94a2bb image / create_chroot - update buster image location, and add entry for bullseye.
Default to "buster" if no dist parameter is provided.

Raspberry Pi OS bulleye based image is now out, and is the default image so we needed to update the URL
for buster to the last archived version.
2021-11-09 17:43:21 +00:00
cmitu
99fb97f5ae joy2key: fix spurious initialization events
For certain joysticks (axis), SDL will generate spurious axis movement events during initialization.
It seems that for axis where `absmin` and `absmax` are asymmetrical (ex. 0-255 instead of -255 - 255), SDL generates extra events which are not user generated. This can causes issues - i.e. automatically trigger the `runcommand` menu without user interaction, unintended scrolling, etc.

As a workaround, discard any axis movement events _immediately_ after the device is added.
NOTE: this will discard any potential valid axis events from another (already connected) device if they are present, forcing the user to probably re-center the joystick they were using.
2021-11-01 14:09:28 +00:00
cmitu
4341e2fa68 joy2key: remove events for a gamepad on disconnect 2021-11-01 07:18:57 +00:00
Jools Wills
4f89d083b0 builder - don't use hardcoded RetroPie-Setup path on host - use $scriptdir
Also fix bad indentation
2021-10-10 04:29:17 +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
626fdde43d builder - fix check for rp_hasNewerModule to build with return codes other than 1 2021-08-24 03:34:54 +01:00
Jools Wills
8957344ccc joy2key - start/stop joy2key on module install/removal 2021-08-04 00:03:32 +01:00
Jools Wills
3f01c51848 joy2key - remove ini config allowing overriding of joy2key script
There has been no user reports of issues, and fron my own testing I have found no issues why
we may need to force the old version apart from if the python library isn't available.
2021-08-04 00:03:32 +01:00
Jools Wills
50ed2e781e joy2key - split out into standalone module and rework helper code
Move much of the helpers.sh start/stop logic and default parameters to a joy2key wrapper script.

Switch runcommand.sh to use new wrapper script

Add tab button to "y" key for use in edit dialogs

Remove runcommand $md_inst on update. If old joy2key is present in runcommand install, trigger joy2key module install.

Remove system.sh python3-sdl2 dependency check - moved to joy2key_depends
2021-08-04 00:03:32 +01:00
Jools Wills
19cff6b59c builder - added __builder_use_ccache for chroot builds 2021-07-31 06:38:38 +01:00
Jools Wills
df6d20e63b builder - more verbose details when building modules
Show some output when building and reasons for not during the various checks.
2021-06-18 04:14:37 +01:00
Jools Wills
1566c679b1 builder - rsync packages from host to chroot on initial set-up
This avoids rebuilding all packages if starting from a clean chroot etc.

Also de-duplicate some paths by moving them into variables
	# Please enter the commit message for your changes. Lines starting
2021-06-18 03:47:42 +01:00
Jools Wills
da429b2f47 builder - don't exclude .pkg files when copying archives from chroot 2021-06-18 02:45:40 +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
f5bb8b20fb tools - added basic check_licences function for testing module licence urls 2021-05-11 02:45:54 +01:00
Jools Wills
3939435920 stats - update Chart.js to v2.9.4
Updating due to github security alert regarding the previous version.

There are newer versions but sticking with v2.9.x as don't have time to check compatibility etc. We probably
could use an external cdn referenced version of this file rather than having it on our repository also.
2021-05-11 02:25:22 +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
9b3371e800 builder - only build binaries when newer
Copy retropie.pkg to archive folder named as $md_id.pkg and use this in rp_hasNewerModule if no installed
package is found. Adjust the builder code to check for a newer source package to utilise this so we only
rebuild binaries as are needed.
2021-03-01 23:08:53 +00:00
Jools Wills
14b0376d93 fixed some left over references to __mod_flags[id] to __mod_info[id/flags] 2021-02-22 03:14:59 +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
5dd84579e4 tools - use new rp_getRemoteRepoHash function to simpify code
If a module has a function hook for rp_module_repo then call it with the parameter "check"

The function should output any errors, and return 1 if an error is encountered after all checks are complete.
2021-02-15 23:54:13 +00:00
Jools Wills
272777bb36 packages / helpers - allow rp_module_repo to have function hooks as parameters
rp_module_repo is currently in the format

TYPE URL BRANCH COMMIT

where type is file, git or svn

If rp_module_repo URL BRANCH or COMMIT starts with a : the rest is considered to be a function that
will return the URL, BRANCH, or COMMIT via an echo. This allows for using of the new rp_module_repo
by modules that use some logic to determine what branch / commit is used.

eg. Some modules will use an older branch based on the system they are running on.

These variables are resolved before use, as some modules query the net for information, so we only
want to check these just before they are used.
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
80ae339cd7 tools - inital tools module with repo_check function
This allows checking of rp_module_repo variables and testing repositories
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
f421c7dbab
Merge pull request #3296 from joolswills/module_info_merge_arrays
Merge module arrays and include all modules in setup
2021-01-26 00:41:36 +00:00
Jools Wills
dd46cdfebf builder - don't build for stetch by default 2021-01-25 23:23:05 +00:00