Pyro can store scripts and other files in BSA and BA2 packages using BSArch, of which the latest unmodified version is distributed with Pyro under the MPL 2.0 license.
To configure packages:
Package
attribute to the PapyrusProject
node. Set the value to True
.Packages
block with as many Package
child blocks as needed.Package
child block can contain as many Include
and Match
nodes as needed.<Packages Output="@OutputPath">
<Package Name="@ModName" RootDir="@OutputPath">
<Match In="Scripts">*.pex</Match>
<Match In="Strings">*.*strings</Match>
<Match In="interface\translations">*.txt</Match>
</Package>
<Package Name="@ModName - Textures" RootDir="@OutputPath">
<Include>*.dds</Include>
</Package>
</Packages>
Files can be included in packages using both Include
and Match
nodes.
Include
node supports relative file and folder paths, absolute file and folder paths, and glob expressions.Match
node supports wildcard file patterns, including file negation and directory exclusion patterns.All matches are case insensitive. Files cannot be matched outside the project root.
<!-- Search for pattern "README.md" from the project path, recursively if not found in the project root -->
<Include NoRecurse="false">README.md</Include>
<!-- Like above but adds the file to the "docs" folder -->
<Include Path="docs">README.md</Include>
<!-- Search for pattern "docs\README.md" from the project path, recursively if not found from the project root -->
<Include>docs\README.md</Include>
<!-- Search for pattern "docs\*.md" from the project path, recursively -->
<Include>docs\*.md</Include>
<!-- Search for all files in the "docs" folder from the project path, recursively -->
<Include>docs</Include>
<!-- Match "*.esp" from the project path, recursively -->
<Match>*.esp</Match>
<!-- Match "*.esp" from the project path, recursively, but exclude file matches starting with "optional" -->
<Match>*.esp|-optional</Match>
<!-- Match "*.esp" in only the project path -->
<Match NoRecurse="true">*.esp</Match>
<!-- Match "*.esp" from the "optional" folder in the project path, recursively -->
<Match In="optional">*.esp</Match>
<!-- Match "*.esp" from the "optional" folder in the project path, recursively -->
<Match Exclude="*|-optional">*.esp</Match>
<!-- Match "*.esp" from the project path, recursively, but exclude matches in the "optional" folder -->
<Match Exclude="optional">*.esp</Match>
The packaging system uses a default temporary folder, or a folder specified by --temp-path
, where compiled scripts and includes are copied. BSArch uses this path to build a BSA/BA2 package.