airbreather / StepperUpper

Some tools for making STEP happen.
MIT License
9 stars 2 forks source link

Support STEP Packs #3

Closed airbreather closed 7 years ago

airbreather commented 7 years ago

Main Use Case

Someone has developed something called a "STEP Pack", which is an additional sequence of files and tasks that define a modpack, assuming that STEP Core has already been installed on the system. STEP Extended is the main example of a "STEP Pack".

What these individuals need in order to benefit from this tool is the ability to define a list of files to check and tasks to run, not from a clean slate but assuming that a particular XML file has been run.

Alternate Use Case

"Official" XML files, especially large ones, are likely to go through some minor churn on a somewhat regular basis due to third-party mods being updated. This means that if a user wants to change some parameters in the XML file, they're faced with the decision to either make their changes to the XML file each time, or just add some manual steps.

Proposed Solution

Add a "Requires" attribute to the <Modpack> element that allows specifying the modpacks that must have been installed before, and allow the "-p" command-line argument (or similar) to specify a sequence of XML files rather than a single one.

To install, first make sure the sequence is compatible with the chain of "Requires" attributes. Then combine all <Files> sections from all XML files into one list (we check all elements from a <Files> section concurrently anyway), and fail if any of the specified files from any of the XML definitions are missing. Then run the <Tasks> from each specified XML file in turn. Alternatively, allow "WaitFor" attributes to optionally cross file boundaries, though that sounds low-bang/high-buck.

airbreather commented 7 years ago

Done in 88dff40.