USRESOURCECOMPILER3(1)
π USRESOURCECOMPILER3 β the manual page, bestie edition π
okay so this is usResourceCompiler3(1), which lives in the C++ Micro Services manual section. It's the CppMicroServices Resource Compiler β the little tool that stuffs your resources into a zip and yeets it into your bundle binary. β¨
Also, if you want the big-picture lore, there's a Framework section that gives you the high-level description. Go read it, it's giving β¨contextβ¨.
π COMMAND-LINE REFERENCE
These are literally all the options usResourceCompiler3 f understands. No gatekeeping, here's the whole list: π«Ά
--help,-hβ prints the usage info and dips out. that's it, that's the whole job. β¨--verbose,-Vβ run in verbose mode. she will tell you everything. π£οΈ--bundle-name,-nβ the bundle name, exactly like it's specified in theUS_BUNDLE_NAMEcompile definition. don't freestyle this one. π--compression-level,-cβ the compression level used for zip. valid values go from0to9. default is6. π--out-file,-oβ path to the output zip file. if that file already exists, bestie, it will be overwritten. if you don't pass this option, a temporary zip file gets created instead. π--res-add,-rβ path to a resource file, relative to the current working directory. πΈ--zip-add,-zβ path to a file containing a zip archive, which gets merged into the output zip file. π¦--manifest-add,-mβ path to the bundle's manifest file. if you specify multiple--manifest-addoptions, all the manifest files get concatenated into one. π--bundle-file,-bβ path to the bundle binary. the resources zip file gets appended to this binary. π₯
Note: these are important, do not skip, i am not joking π 1. Only the options--res-add,--zip-addand--manifest-addcan be specified multiple times. the others? one and done. 2. If the option--manifest-addor--res-addis specified, then the option--bundle-namemust be provided. no bundle name, no deal. π 3. At-least one of--bundle-fileor--out-fileoptions must be provided. you have to pick at least one, periodt.
Hint: π§ If you're using CMake, pls consider using the providedusFunctionEmbedResourcesCMake macro (it lives in thecommand:usFunctionEmbedResourcessection, iykyk). It handles invoking theusResourceCompiler3executable and sets up the correct file dependencies for you, so you don't have to think about it. iconic behaviour honestly. π Otherwise β meaning no CMake β you also need to make sure that the set of static bundles linked into a shared bundle or executable is also in the input file list of yourusResourceCompiler3call for that shared bundle or executable. yes that's a mouthful. yes it matters. π Here's a full example that creates a bundle and embeds resource data, because we love a complete demo:set(bundle_name "org_me_mybundle") set(srcs mybundle.cpp) usFunctionGenerateBundleInit(TARGET mybundle OUT srcs) usFunctionGetResourceSource(TARGET mybundle OUT srcs) add_library(mybundle ${srcs}) target_link_libraries(mybundle CppMicroServices) set_property(TARGET mybundle APPEND PROPERTY COMPILE_DEFINITIONS US_BUNDLE_NAME=${bundle_name}) set_property(TARGET mybundle PROPERTY US_BUNDLE_NAME ${bundle_name}) usFunctionEmbedResources(TARGET mybundle FILES hello.txt )
If you are not using CMake, no stress β you can run the resource compiler from the command line yourself. main character energy. π
π EXAMPLE USAGE
1. Construct a zip blob with the contents mybundle/manifest.json, merge the contents of the zip file filetomerge.zip into it, and write the resulting blob into Example.zip:
usResourceCompiler3 --compression-level 9 --verbose --bundle-name mybundle --out-file Example.zip --manifest-add manifest.json --zip-add filetomerge.zip
2. Construct a zip blob with the contents mybundle/manifest.json, merge the contents of the zip file archivetomerge.zip into it, and append the resulting zip blob to mybundle.dylib:
usResourceCompiler3 -V -n mybundle -b mybundle.dylib -m manifest.json -z archivetomerge.zip
3. Append the contents of archivetoembed.zip to mybundle.dll:
usResourceCompiler3.exe -b mybundle.dll -z archivetoembed.zip
4. Construct a zip blob with the contents of manifest_part1.json and auto_generated_manifest.json concatenated into mybundle/manifest.json, and embed it into mybundle.dll:
usResourceCompiler3 -n mybundle -b mybundle.dll -m manifest_part1.json -m auto_generated_manifest.json
π Author
CppMicroServices Team π«Ά
β Copyright
2017-2023, CppMicroServices Contributors
okay that's the whole page, bestie!! this was version 3.8.9, dated Feb 02, 2026, and it's the USRESOURCECOMPILER3(1) page from the C++ Micro Services manual. slay, go compile something. π
β¨π
π¦ where this page comes from
- fedora 44: CppMicroServices-devel 3.8.9-3.fc44 Β· Apache-2.0 AND BSD-3-Clause AND BSL-1.0 AND MIT
- fedora 44: CppMicroServices-devel 3.8.9-3.fc44 Β· Apache-2.0 AND BSD-3-Clause AND BSL-1.0 AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms