Disable Release
Stable
Disabling a release deactivates the mod in DCS World by removing the symlinks that were created when the release was enabled, and rebuilding the mission scripting files and remove-symlinks script to exclude the release.
| Property | Value |
|---|---|
| Applies to | Daemon |
| Trigger | User requests that an enabled release be deactivated in DCS World |
| Preconditions | The release has been enabled |
Inputs
releaseId : String, required. The identifier of the release to disable.
Assertions
| Assertion | Status |
|---|---|
| The release must exist in the Daemon's local store | Implemented |
Outputs
Result<void, ReleaseNotFound | DcsPathNotConfigured> : On success, returns void. On failure, returns one of the following error types:
ReleaseNotFound : The release does not exist in the Daemon's local store.
DcsPathNotConfigured : The DCS path required to rebuild the mission scripting files and remove-symlinks script has not been configured.
Effects
| Effect | Status |
|---|---|
| Symlinks are removed from disk using the installed paths stored in the Daemon's local store | Implemented |
| The installed path of each successfully removed symlink is cleared from the Daemon's local store | Implemented |
| If a symlink cannot be removed, a warning is logged and the installed path is left in place | Implemented |
| The release is marked as disabled in the Daemon's local store | Implemented |
Scripts/DropzoneMissionScriptsBeforeSanitize.lua is rebuilt to exclude before-sanitize mission scripts from this release | Implemented |
Scripts/DropzoneMissionScriptsAfterSanitize.lua is rebuilt to exclude after-sanitize mission scripts from this release | Implemented |
removeSymlinks.bat is rebuilt to exclude the removed symlinks | Implemented |
Behavior
mermaid
flowchart TD
Start([disable releaseId]) --> Exists{Release exists?}
Exists -- No --> ErrNotFound([Reject: ReleaseNotFound])
Exists -- Yes --> GetLinks[Get symlinks for release<br/>from local store]
GetLinks --> DisableLinks[Linker.disable all installed links]
DisableLinks --> RemoveOk{All removed?}
RemoveOk -- "Yes (ok)" --> ClearAll[Clear installed paths<br/>in local store]
RemoveOk -- "Partial failure (err)" --> ClearSucceeded[Clear installed paths<br/>for successfully removed links.<br/>Log warning for failures.]
ClearAll --> MarkDisabled[Mark release as disabled]
ClearSucceeded --> MarkDisabled
MarkDisabled --> RebuildBefore[Rebuild<br/>DropzoneMissionScriptsBeforeSanitize.lua]
RebuildBefore --> RebuildAfter[Rebuild<br/>DropzoneMissionScriptsAfterSanitize.lua]
RebuildAfter --> RebuildBat[Rebuild removeSymlinks.bat]
RebuildBefore -- DCS path not configured --> ErrDcsPath([Reject: DcsPathNotConfigured])
RebuildAfter -- DCS path not configured --> ErrDcsPath
RebuildBat -- DCS path not configured --> ErrDcsPath
RebuildBat --> Done([Release reaches DISABLED state])
style ErrNotFound fill:#f87171,color:#fff
style ErrDcsPath fill:#f87171,color:#fff
style ClearSucceeded fill:#fb923c,color:#fff
style Done fill:#4ade80,color:#000See Also
- Enable Release — Spec page for activating a release in DCS World.
- Remove Release — Spec page for fully removing a release from the Daemon.
- Add Release — Spec page for downloading a release before it can be enabled.
- How the Daemon works — Guide covering the symlink mechanism and mission scripting files.
- Linker — Reference for the
@packages/linkerpackage that handles symlink creation and removal.