Navigation: Project Root > Scripts
Sub-pages: Setup | Build | camtek_kaijaytu
Automation scripts for the DMC project lifecycle on Windows (Win10/Win11) and RHEL 9.2 (linux-x64).
install → build → deploy → test → undeploy → clean → uninstall
scripts/
├── pipeline_install.sh # One-click: install environment (root)
├── pipeline_start.sh # One-click: build + deploy + run (user)
├── pipeline_stop.sh # One-click: undeploy + clean (user)
├── pipeline_uninstall.sh # One-click: remove environment (root)
├── setup/
│ ├── install_deps.bat # Install dependencies (Windows)
│ ├── uninstall_deps.bat # Remove dependencies (Windows)
│ ├── install_deps_rhel.sh # Install dependencies (RHEL 9.2)
│ └── uninstall_deps_rhel.sh # Remove dependencies (RHEL 9.2)
├── build/
│ ├── build.bat # Build C# (Windows)
│ ├── clean.bat # Clean build artifacts (Windows)
│ ├── build.sh # Build (Linux, auto-detect platform)
│ ├── build_rhel.sh # Build C++ and C# for RHEL 9.2
│ └── clean_rhel.sh # Clean build artifacts (RHEL 9.2)
├── deploy/
│ ├── deploy.bat # Deploy (Windows)
│ ├── deploy.sh # Deploy (Linux, auto-detect platform)
│ ├── deploy_rhel.sh # Deploy to RHEL 9.2 target directory
│ └── undeploy_rhel.sh # Remove deployed files (RHEL 9.2)
└── test/
├── test.bat # Run tests (Windows)
└── test.sh # Run tests (Linux)
# Give execute permission
chmod +x scripts/pipeline_*.sh scripts/setup/*.sh scripts/build/*.sh scripts/deploy/*.sh
# First time: install environment (as root)
su - root
./scripts/pipeline_install.sh
exit
# Build + Deploy + Run (as user, prompts for root password at deploy)
./scripts/pipeline_start.sh
# Run tests (as user, after build)
./scripts/test/test.sh
# Undeploy + Clean (as user, prompts for root password at undeploy)
./scripts/pipeline_stop.sh
# Remove environment (as root)
su - root
./scripts/pipeline_uninstall.sh| Script | What it does | Run As |
|---|---|---|
pipeline_install.sh |
Install all system dependencies | root |
pipeline_start.sh |
Build → Deploy → Run (auto switches to root for deploy) | user |
pipeline_stop.sh |
Undeploy → Clean (auto switches to root for undeploy) | user |
Note:
pipeline_start.shaccepts optional arguments:
./scripts/pipeline_start.sh [deploy_dir] [port](defaults:/opt/dmc5050) |pipeline_uninstall.sh| Remove all installed dependencies | root |
REM Full Install → Build → Clean → Uninstall
scripts\setup\install_deps.bat &REM Install .NET SDK, CMake
scripts\build\build.bat &REM Build C# (Debug)
scripts\build\clean.bat &REM Clean build artifacts
scripts\setup\uninstall_deps.bat &REM Remove installed dependencies# Prerequisites
chmod +x scripts/setup/*.sh scripts/build/*.sh scripts/deploy/*.sh scripts/test/*.sh
# Full Install → Build → Deploy → Test
./scripts/setup/install_deps_rhel.sh # Install dotnet, cmake, gcc-c++
./scripts/build/build_rhel.sh # Build C++ and C#
./scripts/deploy/deploy_rhel.sh [dir] # Deploy to /opt/dmc
/opt/dmc/run.sh # Run
./scripts/test/test.sh # Run all tests
# Full Undeploy → Clean → Uninstall
./scripts/deploy/undeploy_rhel.sh [dir] # Remove deployed files
./scripts/build/clean_rhel.sh # Clean build artifacts
./scripts/setup/uninstall_deps_rhel.sh # Remove installed dependenciesAll scripts enforce identity checks at startup:
| Script Type | Required Identity | Rejected Identity | Check Method |
|---|---|---|---|
| setup/install, setup/uninstall | root | user | id -u != 0 |
| deploy, undeploy | root | user | id -u != 0 |
| build, clean | user | root | id -u == 0 |
| Windows setup | Administrator | user | net session |
| Windows build, clean | user | Administrator | net session |
Installs required system packages and records what was installed in .dmc_install_manifest.
| What it installs | Purpose |
|---|---|
| Microsoft repo (packages-microsoft-prod) | Package source for .NET |
| dotnet-sdk-8.0 | Build and publish C# projects |
| cmake | Build C++ HardwareLogic |
| gcc-c++ | Compile C++17 code |
| make | Build system |
Pre-existing packages are recorded but NOT removed during uninstall.
Reads .dmc_install_manifest and removes only packages that were installed by install_deps_rhel.sh. Packages that existed before are left untouched.
Builds the complete project:
- C++ HardwareLogic →
libHardwareLogic.so - C# DMC Server → self-contained linux-x64 executable
- Packages both into
camtek_kaijaytu/build/output/bin/
Removes all build artifacts:
camtek_kaijaytu/build/hardware/(C++ build)camtek_kaijaytu/build/output/(final output)camtek_kaijaytu/src/bin/,obj/(dotnet intermediate)
Source code is not affected.
Deploys built binaries to a target directory (default /opt/dmc):
- Copies executable and shared libraries
- Sets file permissions
- Creates
run.shlauncher withLD_LIBRARY_PATH
Removes the deployment directory. Prompts for confirmation before deleting.
Runs the complete DMC test suite on Linux (RHEL 9.2):
- C++ Fault Injection Tests — Compiles and runs
test_main.cppagainstlibHardwareLogic.so- Null pointer handling
- Invalid buffer/data sizes
- Operations in illegal states (before init, after shutdown)
HW_GetLastErrorthread safety (50 threads × 10,000 iterations)
- C# Concurrency Stress Tests — Builds and runs
HardwareLogicConcurrencyTests.cs- 100 concurrent threads performing parallel read/write
- Init/Shutdown race conditions
- Read storm, throughput measurement
- Re-initialization cycle (1000×)
Returns exit code 0 if all tests pass, 1 otherwise.
Runs the C# concurrency stress tests on Windows. Requires HardwareLogic.dll (or .so) to be accessible via PATH.
Installs required tools via winget and records what was installed in .dmc_install_manifest_win.
| What it installs | Purpose |
|---|---|
| Microsoft.DotNet.SDK.8 | Build and run C# projects |
| Kitware.CMake (optional) | Build C++ if needed |
Pre-existing tools are recorded but NOT removed during uninstall.
Reads .dmc_install_manifest_win and removes only packages installed by install_deps.bat.
Builds the C# project in Debug mode for local development.
Removes all build artifacts:
camtek_kaijaytu/build/win/(Windows build output)camtek_kaijaytu/build/output/,hardware/(cross-compile output)camtek_kaijaytu/src/bin/,obj/(dotnet intermediate)
Each platform generates its own manifest file at the project root:
| Platform | Manifest File | Install Script | Uninstall Script |
|---|---|---|---|
| Windows | .dmc_install_manifest_win |
install_deps.bat |
uninstall_deps.bat |
| RHEL 9.2 | .dmc_install_manifest |
install_deps_rhel.sh |
uninstall_deps_rhel.sh |
PRE_EXISTING_RPM=cmake # Was already installed, will NOT remove
PRE_EXISTING_RPM=gcc-c++ # Was already installed, will NOT remove
INSTALLED_RPM=dotnet-sdk-8.0 # Installed by us, WILL remove on uninstall
INSTALLED_REPO=microsoft-prod # Installed by us, WILL remove on uninstall
PRE_EXISTING=dotnet-sdk # Was already installed, will NOT remove
INSTALLED_WINGET=Kitware.CMake # Installed by us, WILL remove on uninstall
This ensures both workstations can be restored to their exact pre-development state.