Skip to content

feat: add run-after-update option to launch program after update#6

Merged
asforest merged 2 commits intoBalloonUpdate:mainfrom
gege-tlph:pr/run-after-update
May 5, 2026
Merged

feat: add run-after-update option to launch program after update#6
asforest merged 2 commits intoBalloonUpdate:mainfrom
gege-tlph:pr/run-after-update

Conversation

@gege-tlph
Copy link
Copy Markdown

Description

Adds a run-after-update configuration option to mcpatch.yml that specifies a program to launch automatically after the update process completes.

This is particularly useful for launching PCL2 or other Minecraft launchers immediately after updating modpack files, providing a seamless end-to-end update-and-launch experience.

Changes

File Change
client/src/global_config.rs Add run_after_update field + parsing
client/src/work.rs Spawn configured program after update completes

Configuration

```yaml

Program to launch after update completes

Leave empty to do nothing

Example: "Plain Craft Launcher 2.exe"

run-after-update: ""
```

Testing

  • Compiles successfully (`cargo build --release -p client`)
  • Compiles successfully (`cargo build -p client`)
  • Launch works correctly with a real launcher (manual test)

Tested on both Debug and Release profiles on Windows.

Notes

The program is spawned via `std::process::Command::new(...).spawn()` after the update workflow returns `Ok(())`. If the program path is invalid, the error is silently ignored to avoid interrupting the update flow. The spawned program runs in the background and does not block the update exit.

ZIQIN and others added 2 commits May 4, 2026 23:36
Add a new configuration option `run-after-update` that specifies a
program to launch automatically after the update process completes.

When set to an empty string (default), no program is launched.
When set to a path like "Plain Craft Launcher 2.exe", the specified
program is spawned after all updates are applied.

This is particularly useful for launching PCL2 or other Minecraft
launchers immediately after updating modpack files.
@asforest asforest merged commit f005e2a into BalloonUpdate:main May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants