ci-server-engineer/examples/CI-Eng-Sample/feed/install_feed.ps1
cliu d299bdf312 Sample: merged live-data feed (cieng_feed.ps1) replaces trend_feed.ps1
- feed/cieng_feed.ps1: -Seconds (default, LEVEL +/-25 %), -UntilFlag (DEMO.FEED_ON for the
  display Start/Stop), -Alarms (+/-33 %, crosses L/H), -System (SYSTEM.* items, skipped while
  the monitoring processes run); single-copy lock; log in %TLS_LST_PATH%\cieng_feed.log
- feed/cieng_feed_start.cmd, feed/install_feed.ps1: installed to C:\Users\Public\CI-Eng-Sample\feed
  (outside the CI Server package) for the server-side display command
- Item CI-Eng-Sample.DEMO.FEED_ON in 02_item_df.qli / 91_remove_item_df.qli
- Tested on CI Server R1.03.00 2026-10-06: default run, single copy, start wrapper with flag
  stop, system items written and skipped with a monitor process present

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 10:15:14 +11:00

18 lines
1.1 KiB
PowerShell

# Install or remove the CI-Eng-Sample live-data feed (CI Server R1.03.00).
# Copies cieng_feed.ps1 and cieng_feed_start.cmd to C:\Users\Public\CI-Eng-Sample\feed: a fixed folder
# outside the CI Server installation (the feed is not part of the CI Server package) that the CI
# Server service account can read. The display button "Start" calls the .cmd there.
# No admin rights needed. Usage: powershell -ExecutionPolicy Bypass -File install_feed.ps1 [-Remove]
param([switch]$Remove)
$dest = 'C:\Users\Public\CI-Eng-Sample\feed'
if ($Remove) {
if (Test-Path $dest) { Remove-Item -LiteralPath $dest -Recurse -Force }
$parent = Split-Path $dest
if ((Test-Path $parent) -and -not (Get-ChildItem -LiteralPath $parent -Force)) { Remove-Item -LiteralPath $parent -Force }
'Feed removed from ' + $dest
return
}
New-Item -ItemType Directory -Force -Path $dest > $null
Copy-Item -LiteralPath (Join-Path $PSScriptRoot 'cieng_feed.ps1') -Destination $dest -Force
Copy-Item -LiteralPath (Join-Path $PSScriptRoot 'cieng_feed_start.cmd') -Destination $dest -Force
'Feed installed in ' + $dest