worshop work
This commit is contained in:
parent
0d44c65ea5
commit
3829a4a83d
92 changed files with 487 additions and 110 deletions
|
|
@ -1,5 +1,7 @@
|
|||
# Workshop System
|
||||
|
||||
Workspace reference: [`GSP-WORKSPACE.md`](../../../GSP-WORKSPACE.md)
|
||||
|
||||
## Current State
|
||||
|
||||
The current Workshop/content work is split across two module lines:
|
||||
|
|
@ -24,8 +26,9 @@ Important files:
|
|||
Workshop is Panel-side orchestration. The active workflow lives in Server Content Manager and uses existing agent primitives only:
|
||||
|
||||
- Panel writes manifests with validated numeric Workshop IDs.
|
||||
- Panel deploys an OS-appropriate bundled handler script into the server home.
|
||||
- Panel invokes the handler through the existing authenticated agent `exec` RPC.
|
||||
- Panel generates a per-job shell script under the server home.
|
||||
- The generated job script writes a temporary SteamCMD runscript and runs `steamcmd +runscript <scriptfile>`.
|
||||
- Panel invokes the job script through the existing authenticated agent `exec` RPC.
|
||||
- Agents do not need new Workshop-specific business logic.
|
||||
- Legacy agent RPCs from the old `steam_workshop` module remain compatibility-only and are not the primary path.
|
||||
|
||||
|
|
@ -42,19 +45,29 @@ The Panel writes a manifest under the server home:
|
|||
|
||||
- `{SERVER_HOME}/gsp_server_content/workshop_manifest.json`
|
||||
|
||||
The Panel syncs the bundled install script to:
|
||||
The Panel writes a generated per-job script to:
|
||||
|
||||
- `{SERVER_HOME}/gsp_server_content/scripts/workshop/generic_steam_workshop_linux.sh`
|
||||
- `{SERVER_HOME}/gsp_server_content/scripts/workshop/generic_steam_workshop_windows_cygwin.sh`
|
||||
- `{SERVER_HOME}/gsp_server_content/jobs/workshop/workshop_job_<timestamp>_<random>.sh`
|
||||
|
||||
The agent executes the synced script with the manifest path by using the existing generic command execution path. Customers do not need to place scripts manually on the agent.
|
||||
The agent executes the generated script with the manifest path by using the existing generic command execution path. Customers do not need to place scripts manually on the agent.
|
||||
|
||||
Script selection rules:
|
||||
Script/job rules:
|
||||
|
||||
1. If game XML defines a custom `workshop_script_linux` or `workshop_script_windows` and that script exists on the agent, use it.
|
||||
2. If the custom script is missing, log a fallback warning and stage the bundled generic handler.
|
||||
3. If no custom script is defined, stage the bundled generic handler for the server OS.
|
||||
4. The default script filename must never be treated as a pre-existing agent path. The Panel must copy the bundled script first.
|
||||
1. Server Content Manager always generates the primary Workshop job script per action.
|
||||
2. Old XML/static script settings are logged as deprecated and ignored by the primary path.
|
||||
3. The default script filename must never be treated as a pre-existing agent path.
|
||||
4. The agent does not require `generic_steam_workshop_linux.sh` or `generic_steam_workshop_windows_cygwin.sh` to exist on disk.
|
||||
|
||||
The generated job script uses this SteamCMD runscript pattern:
|
||||
|
||||
```text
|
||||
@ShutdownOnFailedCommand 0
|
||||
@NoPromptForPassword 1
|
||||
force_install_dir <server_root>
|
||||
login anonymous
|
||||
workshop_download_item <workshop_app_id> <workshop_id> validate
|
||||
quit
|
||||
```
|
||||
|
||||
The manifest includes:
|
||||
|
||||
|
|
@ -200,7 +213,7 @@ Per-item update policy values stored on `server_content_workshop.update_policy`:
|
|||
|
||||
| Symptom | Meaning | Fix |
|
||||
|---|---|---|
|
||||
| `Configured workshop script not found on agent host: generic_steam_workshop_windows_cygwin.sh` | Old Panel logic treated the default script filename as an agent path. | Update the Panel. Current logic stages the bundled handler under `gsp_server_content/scripts/workshop/`. |
|
||||
| `Configured workshop script not found on agent host: generic_steam_workshop_windows_cygwin.sh` | Old Panel logic treated the default script filename as an agent path. | Update the Panel. Current logic generates a per-job script under `gsp_server_content/jobs/workshop/`. |
|
||||
| `SteamCMD is missing on the agent host.` | The handler could not find SteamCMD at the configured path, `STEAMCMD_PATH`, or common locations. | Install SteamCMD on the agent and/or set the SteamCMD path in the Workshop profile/template. |
|
||||
| `Workshop App ID is missing` | No template/profile/XML provided an app ID. | Add `workshop_app_id` to the Server Content template or game XML. |
|
||||
| Download succeeds but mod does not load | Startup parameters are not yet regenerated from installed Workshop rows. | Manually add the installed `@...` folders to the game startup params until Phase 2 startup integration is complete. |
|
||||
|
|
@ -219,16 +232,22 @@ Use `addonsmanager` as the main future home for:
|
|||
|
||||
Treat `steam_workshop` as a legacy bridge for migration only.
|
||||
|
||||
## References Reviewed
|
||||
|
||||
- `reference/Module-Steam_Workshop` is the local legacy OGP module. It confirms that the Panel historically owned Workshop state/configuration and used the agent for execution.
|
||||
- The uploaded `steam-workshop-downloader` reference was not present in this workspace, but its reviewed behavior is reflected in the active design: generate a SteamCMD runscript, call `workshop_download_item <appid> <workshop_id> validate`, copy or link the downloaded `steamapps/workshop/content/<appid>/<workshop_id>` folder into the server's mod location, optionally lowercase files for Linux, copy Arma/DayZ keys, and generate future `-mod=` data from installed items.
|
||||
|
||||
## Panel-Agent Contract
|
||||
|
||||
Phase 1 does not use the legacy `steam_workshop` XML-RPC method for the primary user workflow. Instead:
|
||||
|
||||
1. Panel parses customer input into numeric Workshop IDs.
|
||||
2. Panel writes `{SERVER_HOME}/gsp_server_content/workshop_manifest.json`.
|
||||
3. Panel stages the OS-appropriate bundled handler under `{SERVER_HOME}/gsp_server_content/scripts/workshop/`.
|
||||
4. Panel invokes the handler through the existing authenticated agent `exec` RPC.
|
||||
5. The handler writes `workshop_install.log` or `workshop_install_windows.log` under `gsp_server_content`.
|
||||
6. Panel updates `server_content_workshop.install_state` from queued/installing to installed/failed/removed.
|
||||
3. Panel writes a generated per-job script under `{SERVER_HOME}/gsp_server_content/jobs/workshop/`.
|
||||
4. The job script writes a temporary SteamCMD runscript.
|
||||
5. Panel invokes the job script through the existing authenticated agent `exec` RPC.
|
||||
6. The job writes `workshop_install.log` or `workshop_install_windows.log` under `gsp_server_content`.
|
||||
7. Panel updates `server_content_workshop.install_state` from queued/installing to installed/failed/removed.
|
||||
|
||||
Important manifest fields:
|
||||
|
||||
|
|
@ -245,7 +264,7 @@ Important manifest fields:
|
|||
- `extra.copy_keys`
|
||||
- `extra.keys_target_path`
|
||||
|
||||
Both bundled handlers validate numeric item IDs, keep writes under the server home, use SteamCMD, copy files into the resolved target path, and copy `.bikey` files for DayZ/Arma strategies when enabled.
|
||||
Generated Workshop jobs validate numeric item IDs, keep writes under the server home, use SteamCMD through a temporary runscript, copy files into the resolved target path, and copy `.bikey` files for DayZ/Arma strategies when enabled.
|
||||
|
||||
Bundled handler actions:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue