flying-dice / dcs-dropzone-mod-manager

DCS World Mod Manager (WIP) DO NOT USE YET
3 stars 0 forks source link

RFC: Enhancement of DCS Dropzone Mod Manager with `install.md` File Integration #6

Closed JonathanTurnock closed 2 weeks ago

JonathanTurnock commented 9 months ago

1. Introduction

Background

DCS Dropzone has evolved to use Markdown files with YAML front matter for mod properties and release information. This approach has significantly improved flexibility and clarity. However, there's still potential for further enhancement, particularly in the installation process of mods.

Objective

This RFC proposes the integration of an install.md file into the DCS Dropzone Mod Manager. The install.md file will contain instructions for creating symlinks to target directories, enhancing the mod installation process. Additionally, it will handle hash-routed files, streamlining the process of sourcing mod files from external URLs.

2. Proposed Changes

New File: install.md

Structure of install.md

Example install.md

---
- source: "http://xyz.com/simple-script.lua"
  target: "/path/to/target/directory/simple-script.lua"

- source: "http://xyz.com/my-mod.zip/#/my-folder/script.lua"
  target: "/path/to/target/directory/script.lua"

- source: "http://xyz.com/my-mod.zip/#/my-folder/texture.png"
  target: "/path/to/target/directory/texture.png"

- source: "http://xyz.com/my-mod.zip/#/my-folder"
  target: "/path/to/target/directory"
---
Instructions or additional notes about the installation process.

Handling Hash-Routed Files

3. Advantages

4. Implementation Considerations

The general workflow of the Mod Manager would be

A) Subscribe to a mod

B) Enable a mod

C) Disable a mod

D) Unsubscribe to a mod

john681611 commented 9 months ago

This sounds good but doesn't account for the download link changing per release. We can't expect users to put in the full download link on each release it kinda kills the automated part of the release process

For repos where we can infer the actual link from a base then this is possible where mod-*.zip is a glob when grabbing assets

  source: "mod-*.zip/#/my-folder/script.lua"
  target: "/path/to/target/directory/simple-script.lua"

This gets worse when you think of the mess that can be made by manual releases using GoogleDrive one week and DropBox the next. What happens when a mod gets more files or less?

Its becoming more clear to me that this install config is gonna have to exist in the release/version object which is either manually uploaded to us or a known asset in a GH release.

JonathanTurnock commented 9 months ago

Yea so the GH integration would assemble this and commit it along with the release file and create the commit to the registry.

The install.md in the integrated repo would be a starter with placeholders and such that gets converted into a concrete install.md in the registry which in turn becomes the install.json.

Manual releases I don’t see anny issues people just author a new commit with concrete info.

I would say as files increase or decrease that’s why I though a subfolder. And the updating is just a process of automatically downloading disabling old enabling new and deleting old. But that can be easily the same as a swap folder.

john681611 commented 9 months ago

I think a simple asset-mapping file is perfectly reasonable to ask devs to upload as part of a release or commit to the repository. This then solves a few issues.

JonathanTurnock commented 2 weeks ago

Closing this one as I think we have a solid baseline now with the current install.md