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
retroarch-config
andretroarch-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.- Running
make migrations
(or justmake
) will package the migrations. Each migration has to have its own task in the Makefile. For Drastic specifically, this is the task:Line 69 in 5f50d0c
- 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
- 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
- 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 therun.sh
file in the migrations directory.Allium/static/.tmp_update/updater
Line 48 in 5f50d0c
- 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.