Packager is a .NET tool that bundles your mod installation into a distributable ZIP archive. It reads a package manifest to determine which files to include or exclude, names the resulting archive with a UTC timestamp, and automatically removes any previously generated archives on successful completion. The tool is included in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/twhl-community/halflife-unified-sdk/llms.txt
Use this file to discover all available pages before exploring further.
hlu/tools directory of every Unified SDK release.
Packager is a .NET tool. On Windows you can run it as
Packager.exe [options] or dotnet Packager.dll [options]. On Linux use dotnet Packager.dll [options].Command line usage
Options
--mod-directory should point to your local copy of the mod installation — for example the hlu folder inside your Half-Life game directory.
--package-manifest should point to the PackageManifest.json file in the game installation. This file defines which files are included in and excluded from the archive.
--package-name is the prefix used when naming the output file. The archive is created with the format PackageName-yyyy-MM-dd-HH-mm-ss.zip. Timestamps use UTC time, not local time. For example, a package name of HalfLifeUnified-Game might produce HalfLifeUnified-Game-2022-05-17-09-28-18.zip.
--verbose enables additional log output showing which files are being added or renamed inside the archive.
--list-omitted prints the names of files that were found but excluded by the manifest rules.
Running Packager
- Windows
- Linux
Using a script
It is recommended to save the command in a script placed in the directory that contains the game installation (typically theHalf-Life folder).
- Windows batch file
- Linux shell script
pause at the end keeps the window open so you can read the output before it closes.Error reporting
If any errors occur, Packager logs the details to the console and stops execution. Old packages are only removed if the run completes successfully, so an interrupted or failed run will not delete your previous archive.PackageManifest.json format
The package manifest controls which files are included in or excluded from the archive. It is a JSON file containing an array of pattern groups.Top-level structure
PatternGroups is an array of objects, each describing one set of paths and patterns.
Paths is an array of path objects. Each Path value is a relative path starting in the Half-Life game directory (for example hlu). If Required is true (the default when omitted), Packager will stop if the path does not exist.
IncludePatterns is an array of glob patterns for files to add to the archive.
ExcludePatterns is an array of glob patterns for files to exclude. Exclusions take precedence — a file matching both an include and an exclude pattern will not be included.
Pattern syntax follows the .NET Matcher class glob format.
Any occurrence of
%ModDirectory% in Path, IncludePatterns, or ExcludePatterns is substituted with the mod directory name provided by --mod-directory.