ResourcePacker is a .NET CLI tool for packing and unpacking ShapeEngine resource directories.
- Package ID:
DaveGreen.ShapeEngine.ResourcePacker - Tool command:
shapeengine-resourcepacker - Target framework:
net10.0
It supports two formats:
- binary resource packs for compact distribution
- text-based packs when you use a
.txtextension
Install it as a local tool inside a consuming repository:
dotnet new tool-manifest
dotnet tool install --local DaveGreen.ShapeEngine.ResourcePackerThen restore it on any machine that has the manifest:
dotnet tool restoreYou can also install it globally if you prefer:
dotnet tool install --global DaveGreen.ShapeEngine.ResourcePackerThe CLI keeps the current command shape:
shapeengine-resourcepacker pack <sourceDirectoryPath> <outputFilePath> [--exceptions <.ext1> <.ext2> ...] [--debug] [--parallel]
shapeengine-resourcepacker unpack <sourceFilePath> <outputDirectoryPath> [--exceptions <.ext1> <.ext2> ...] [--debug] [--parallel]
shapeengine-resourcepacker help
shapeengine-resourcepacker --help
Notes:
.txtoutput/input uses the text-based format.- any other file extension uses the binary format.
- running the tool with no arguments still opens the interactive prompt.
Pack a Resources folder into a binary resource pack:
dotnet tool run shapeengine-resourcepacker -- pack Resources ./build/resources.resPack into a text-based resource pack:
dotnet tool run shapeengine-resourcepacker -- pack Resources ./build/resources.txtUnpack a resource pack:
dotnet tool run shapeengine-resourcepacker -- unpack ./build/resources.res ./build/unpacked-resourcesExclude some file extensions while packing:
dotnet tool run shapeengine-resourcepacker -- pack Resources ./build/resources.res --exceptions .psd .asepriteEnable debug logging and parallel processing:
dotnet tool run shapeengine-resourcepacker -- pack Resources ./build/resources.res --debug --parallelIf another repo currently does this:
dotnet run --project ../ResourcePacker/ResourcePacker.csproj -- pack Resources <output>replace it with:
dotnet tool restore
dotnet tool run shapeengine-resourcepacker -- pack Resources <output>This removes the dependency on a sibling checkout path and makes the tool version explicit in the tool manifest.
If you are working on ResourcePacker itself, you can still run it directly from source:
cd /tmp
dotnet run --project "/Users/davegreen/Developer/repos/ShapeEngine/ResourcePacker/ResourcePacker.csproj" -- help
dotnet run --project "/Users/davegreen/Developer/repos/ShapeEngine/ResourcePacker/ResourcePacker.csproj" -- pack "/absolute/path/to/Resources" "/absolute/path/to/output/resources.res"For packing and publishing the NuGet tool package, see PUBLISHING.md.