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
We don't want to remove install folder before we download a binary - in the case of a download failure we could end up
just removing the installed version which isn't wanted. Added the removal to before the tar unpacking / verification.
Remove some checks for function existing for cases where it had been done earlier and move some logic for
install/install_bin to later case statement to clean up logic a bit
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.
* default signing key can be overridden with __gpg_signing_key
* added gpg dependency by default
* download retropie key from ubuntu keyserver if it doesn't exist in keyring
* added download helper function
* rework logic for rp_installBin and rp_createBin
* copy secret key to chroots for package building
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
* create a rp_getBinaryUrl function to get the binary url of a package
* if a module has a __binary_url and it returns an empty string, treat this as no binary available - this allows removing hardcoded logic for sdl1/sdl2 from getDepends
* if a module doesn't have this function but it has its own install_bin don't test for a binary and assume it's ok
* check at end of build stage if install function exists - if not set the pkg info then - this adds package info for a few drivers such as xpad and mkarcadejoystick etc
* now make _binary_ always update/reinstall - but add an _update_ function to automatically update if needed - this enables us to force an update via _auto_ or use _update_ to check
* eg debian packages or binaries from sources we don't handle, or when there is no pkg_date (eg from older retropie) - we don't know if there is an update or not
* in this case, we display the message "Binary update may be available" in the gui, and we will try and update
* default pkg_origin to unknown, and adjust _auto_ logic. Check for binary before passing over the _binary_ install
* rework setup menu logic for individual package management
* added remote binary date to the retropie.pkg and compare on binary update - this speeds up updating from binary, and also should help with our server bandwidth :-)
* allow modules using 3rd party binaries to echo binary url in __binary_url_MODULEID
* set pkg_date on source installs also
* rework rp_installModule / rp_callModule logic to use this, which will also de-dupe some logic in retropie-setup
* you can now call retropie_packages.sh with parameters _auto_ _binary_ _source_ after the module name to update via last method used (auto), or force binary or source. no parameters works the same as before which is the same as using _source_
This should be backward compatible with the previous behaviour. By default all platforms are included.
Previously if you wanted a rpi+videocore only module you had to use lots of flags to exclude other platforms - eg
!x86 !mali !kms
which isn't ideal as new platforms are added.
Now this can be changed now by using a !all flag
!all videocore
which would first exclude all platforms, then enable the module just for videocore.
* needed by the stats code and useful for testing / development
* initialise / clear global package arrays in rp_registerAllModules so we can regenerate from that function
The module/package variable rp_module_section used to need a single string containing
the section for the module - eg "core" "main" "opt".
With this change, you can provide additional space separated parameters to specify the
section for a specific platform flag. This is useful for example to have a module by default
in "opt", but then promote it to "main" for certain systems.
eg for mame4all (mostly useful for slower armv6 devices) you could do
rp_module_section="opt armv6=main"
which would place it in the main section only for armv6
* Use OpenGL acceleration for Mesa (RPI3/4) & X11
* Use software rendering for other GLES targets (including
videocore)
Rationale for switching to lzdoom:
* zdoom is no longer maintained and doesn't build against GCC 8.
* lzdoom is actively maintained as a recommended GZDoom fork for legacy systems.
* lzdoom supports software rendering (for GLES2 targets).
* lzdoom supports OpenGL 2.1 rendering (for Mesa/X11 targets).
* Using a more up-to-date fork brings better compatibility with popular mods such as FreeDoom and Brutal Doom.
* always check for required files even if previous errors to be more verbose
* logic was broken so you could not use both md_ret_require and md_ret_files
* flag is set in module, and file RP-NEWBRCMLIBS is created in "$md_inst" on install (not on binary install,
but updated binaries will include the file when created)
* runcommand checks for the file, and if it doesn't exist, switches SDL to use the old library names.
this will allow us to add the flag for new modules so we have compatibility during the switcher. the
flag / logic from runcommand can be removed in the future