goweiwen / Allium

A custom launcher for the Miyoo Mini and Miyoo Mini Plus handheld devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install DraStic directly into cores instead of requiring a migration script

josegonzalez opened this issue · comments

Is there a way to upgrade emulators? I'd like to contribute an update of drastic and I see references to migrations and such, so its not super clear how to go about this...

The migration process is a bit obfuscated, but let me try to break it down:

Compile Time

  1. retroarch-config and retroarch-core-overrides contain config files that are stored in the repository as plaintext, but are zipped up when packaging Allium, and unzipped when migrations are being run.
  2. Running make migrations (or just make) will package the migrations. Each migration has to have its own task in the Makefile. For Drastic specifically, this is the task:
    $(MIGRATIONS_DIR)/0002-drastic-1.7/drastic.zip:
  3. Drastic has its own migration task that downloads Drastic from steward's repository: https://github.com/goweiwen/Allium/blob/main/migrations/0002-drastic-1.7/package.sh
  4. Drastic then gets downloaded into dist/.allium/migrations/0002-drastic-1.7/drastric.zip, which gets packaged into the final zip during release.

Run Time

  1. On device boot, we try to run all the migrations that don't already have a .done file in the migrations directory ($ROOT/.allium/migrations/*). Migrations are run using the run.sh file in the migrations directory.
    for script in "$ROOT"/.allium/migrations/*; do
  2. Drastic's migration script unzips Drastic into .allium/cores, and patches the launch script to fix the audio (#48 (comment))

The version of Drastic is included in the migration name as a hack so that when Drastic is updated, we can rename the migration and existing installations will re-run the migration. For updating Drastic, you can simply rename all references of drastic-1.7 to 1.8, update the download link, and test that the launch.sh patch still works.

Should emulators be installed/updated via migrations? These seem fairly slow to run and kinda frustrating for a first-time user to perform.

You're right, maybe Drastic should be bundled.

Ditto for the other migrations actually. I first booted it up and it started running them and seemed to stall but it wasn't clear where (the text output by the launch scripts isnt output anywhere).

8928bac updates DraStic to 1.8. I'll leave this issue open for moving DraStic into cores directly instead of through a migration.