Skip to content

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.

PropertyValue
Applies toDaemon
TriggerUser requests that an enabled release be deactivated in DCS World
PreconditionsThe release has been enabled

Inputs

releaseId : String, required. The identifier of the release to disable.

Assertions

AssertionStatus
The release must exist in the Daemon's local storeImplemented

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

EffectStatus
Symlinks are removed from disk using the installed paths stored in the Daemon's local storeImplemented
The installed path of each successfully removed symlink is cleared from the Daemon's local storeImplemented
If a symlink cannot be removed, a warning is logged and the installed path is left in placeImplemented
The release is marked as disabled in the Daemon's local storeImplemented
Scripts/DropzoneMissionScriptsBeforeSanitize.lua is rebuilt to exclude before-sanitize mission scripts from this releaseImplemented
Scripts/DropzoneMissionScriptsAfterSanitize.lua is rebuilt to exclude after-sanitize mission scripts from this releaseImplemented
removeSymlinks.bat is rebuilt to exclude the removed symlinksImplemented

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:#000

See 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/linker package that handles symlink creation and removal.