HLLib: Difference between revisions
|  (→External links:  Restoring original website) | Thunder4ik (talk | contribs)  m (→Screenshot: Unicodifying, replaced: [[Image: → [[File:) | ||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| {{hllib|4.1}} is a LGPL open source programming library, which abstracts several Half-Life and Half-Life 2 package formats and provides a simple interface for all of them. HLLib works natively in both {{win|4}} and {{Linux|4}}. | |||
| HLLib is written in native [[C++]] but exposes both a [[C]] and C++ interface which can be used in any C or C++ application (additional languages may also use the library with Win32 imports).   | HLLib is written in native [[C++]] but exposes both a [[C]] and C++ interface which can be used in any C or C++ application (additional languages may also use the library with Win32 imports).   | ||
| Line 21: | Line 21: | ||
| === Screenshot === | === Screenshot === | ||
| [[ | [[File:Hlextract.png]] | ||
| === Common Options === | === Common Options === | ||
| Line 68: | Line 68: | ||
| *[https://web.archive.org/web/20200201044113/http://nemesis.thewavelength.net/index.php?p=35 Original HLLib Homepage] | *[https://web.archive.org/web/20200201044113/http://nemesis.thewavelength.net/index.php?p=35 Original HLLib Homepage] | ||
| *[https://nemstools.github.io/pages/Miscellaneous-HLLib.html New HLLib Homepage (because original is unavailable)] | *[https://nemstools.github.io/pages/Miscellaneous-HLLib.html New HLLib Homepage (because original is unavailable)] | ||
| {{sdktools|0}} | |||
| [[Category:Third Party Tools]] | [[Category:Third Party Tools]] | ||
Latest revision as of 09:48, 8 January 2024
 HLLib is a LGPL open source programming library, which abstracts several Half-Life and Half-Life 2 package formats and provides a simple interface for all of them. HLLib works natively in both
 HLLib is a LGPL open source programming library, which abstracts several Half-Life and Half-Life 2 package formats and provides a simple interface for all of them. HLLib works natively in both  Windows and
 Windows and  Linux.
 Linux.
HLLib is written in native C++ but exposes both a C and C++ interface which can be used in any C or C++ application (additional languages may also use the library with Win32 imports).
Created by Ryan "Nemesis" Gregg.
File formats
HLExtract
HLLib contains a example application called HLExtract. HLExtract is a GPL command-line utility written in C that can browse, extract, validate and defragment all supported packages. It provides a lean and mean shell-like interface for browsing as well as a command-line interface for automating tasks. HLExtract works natively in both Windows and Linux.
Screenshot
Common Options
- -p <path>
- Package file to open.
- -d <path>
- Directory to extract content to (defaults to the package's directory).
- -e <path>
- Path to a file for folder in the package to extract.  Chain these for multiple items.  -e rootfor everything.
- -t <path>
- Path to a file for folder in the package to validate.  Chain these for multiple items.  -t rootfor everything.
- -l[d][f]
- List the contents of the package.  -ldfor directories.-lffor files.-ldffor everything.
- -f
- Defragment the package.
- -c
- Drop into shell-like console mode.
- -s
- Silent mode. Display minimal messages.
- -m
- Use file mapping.
- -q
- Use quick file mapping. (Must also specify -m.)
- -v
- Allow volatile access. Enable this to share file access with other processes such as Steam.
- -o
- Don't overwrite files when extracting.
- -r
- Force complete lexicographical reordering of files during defragment even if there is no fragmentation.
- -n <path>
- The directory to find a NCF file's data in (for validation for example).
 Note:Dragging and dropping a package onto HLExtract.exe is equivalent to passing
Note:Dragging and dropping a package onto HLExtract.exe is equivalent to passing HLExtract.exe -p %1 -c -v.
Examples
HLExtract.exe -p "half-life.gcf" -d "backup" -e "root\valve\models" -e "root\valve\config.cfg" HLExtract.exe -p "half-life.gcf" -c -m -v HLExtract.exe -p "half-life.gcf" -lf "half-life.txt" HLExtract.exe -p "half-life.gcf" -m -f
Console Commands
- dir
- List the current directory's contents.
- cd <name>
- Change directory to <name>.  Type cd ..to go up one level.
- info <name>
- Display information about <name>.
- extract <name>
- Extract <name> to destination directory (specified by -d).
- validate <name>
- Validate <name> and its subdirectories.
- find <string>
- Search for <string> if the current directory and its subdirectories.
- type <name>
- Type the contents of <name> to the console.
- open <name>
- Open the package <name> within the current package.
- root
- Change to the root directory.
- status
- Display information about the package.
- cls
- Clear the screen.
- help
- Display program help.
- exit
- Exit the current package.
External links
| 
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||





