Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install DraStic directly into cores instead of requiring a migration script #67

Open
josegonzalez opened this issue Apr 21, 2024 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@josegonzalez
Copy link
Contributor

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...

@goweiwen
Copy link
Owner

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 ( Drastic emulator has no sound #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.

@goweiwen goweiwen added enhancement New feature or request good first issue Good for newcomers labels May 8, 2024
@josegonzalez
Copy link
Contributor Author

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

@goweiwen
Copy link
Owner

goweiwen commented May 8, 2024

You're right, maybe Drastic should be bundled.

@josegonzalez
Copy link
Contributor Author

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).

@goweiwen
Copy link
Owner

goweiwen commented Jun 1, 2024

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

@goweiwen goweiwen changed the title Upgrading emulators Install DraStic directly into cores instead of requiring a migration script Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants