reswrap(1)
π NAME π
okay so reswrap β wrap icon resources into C code. that's it. that's the whole gig, bestie. β¨
this is reswrap(1), from the FOX Programmers Manual, and it's about to become your new favorite build-step bestie. π«Ά
π SYNOPSIS π
reswrap [options] [-o[a] outfile] files...
πΈ DESCRIPTION πΈ
so here's the tea: reswrap is the tool that turns images, text, and other resource files into C++ data arrays. the whole point is that all kinds of binary resources can get embedded right into your source code and compiled into the application. iconic behavior, honestly. π
if you're doing graphical application development with FOX, this is the move for embedding icons and images for the user interface straight into the executable, which eliminates the need to distribute separate icon and image files. no more loose files floating around. we love a self-contained moment. π
reswrap is typically invoked as a part of the build process, generating C++ source files out of a whole collection of icons and images and other binary resources. so it's like, a build-system girlie. π οΈβ¨
and by default? reswrap interprets the files you list as a stream of raw bytes and outputs them as an initialized data array to stdout. that's the default vibe. π
β¨ OPTIONS β¨
-o[a] outfileβ write the result into the file outfile instead of writing tostdout. with plain-o, outfile gets overwritten with the data from the input. with-oa, the resulting code is appended to the output file, which means multiple input files can all be placed into one single source file. π-hβ print a short usage message. that's it, just the lil help text. π¬-vβ just print out the version number and license information. π·οΈ-dβ write data as decimal numbers instead of using the default hexadecimal numbers.-mβ read files with MS-DOS mode (the default is binary). this replaces"\r\n"with"\n"when reading the resource file. πͺ-xβ write data as hexadecimal numbers (this is the default). π’-t[a]β write data as a text string, with each byte represented as a hexadecimal escape sequence, as in"\x33".
heads up bestie: the C++ compiler appends a nul-character at the end of the text string, which makes the data array one character longer than the file. π
with the a option, printable ascii characters are passed unescaped, while special characters like tabs and newlines are given the usual escape codes. π
-eβ places the storage modifierexternin front of the data array, ensuring that the data array can be linked with other compilation units. normally, constant declarations are not visible in other compilation units, so this is the glow-up that fixes that. π-iβ instead of generating an array definition, only write a declaration, which can be included as a header file. π-kβ this option causes reswrap to keep the file extension, replacing the"."with an underscore"_". usage of this option is recommended because it reduces errors when using the data arrays. fr fr, take the advice. π-sβ this option suppresses comments inserted by reswrap to indicate the original file name from which the data statement was generated. π€«-pprefix β prepend the given prefix in front of the name of the resource; this may be used to generate class names or namespace names in front of symbols. π·οΈβ¨-nnamespace β generate all declarations inside the given C++ namespace declaration. using a namespace may be used to ensure that declarations are only accessible within the given scope, and thus won't clash with symbols. π‘οΈ-ccols β writes cols columns instead of the default number of columns in the data statements generated by reswrap. the default number of columns for decimal and hex printout is 16 characters; the default for text string printout is 80 characters. π-uβ force output as unsigned chars in text mode. π§-zβ output the size of the resource in the declaration of a resource-array. this allows the C++sizeof()operator to return the correct size of the resource even for external declarations. note that in text mode (the-toption), an extra byte is added to the size for the end of string character. π-rname β instead of using a resource name based on the filename, reswrap substitutes name for the resource name used in the declaration or definition for the following resource file. this is useful if the filename can not be used as an identifier, for example if the filename is a reserved word in C or C++, like"while". π«
π CAVEATS π
when using the text string mode, please remember the C compiler appends one nul-character after the string, making the data array one element longer than the resource file. like, the array is bigger than the file. that's not a bug, that's just how strings work. π
π«Ά AUTHOR π«Ά
this manpage was originally written by Torsten Landschoff (torsten@debian.org) for the Debian distribution of the FOX Toolkit, and is currently maintained by Jeroen van der Zijp (jeroen@fox-toolkit.org). legends only. π
π COPYRIGHT π
Copyright Β© 1997,2005 Jeroen van der Zijp.
this is free software; see the source for copying conditions. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. read that again, bestie β NO warranty. π
π₯ SEE ALSO π₯
the reswrap program is a part of the FOX GUI Toolkit. further information about reswrap can be found at:
the FOX Toolkit website includes detailed information about reswrap and its use. go click around, it's giving documentation. π
and that's the whole page, bestie!! this was reswrap(1) from The FOX C++ GUI Toolkit, dated Sept 2005 β go wrap some icons, slay, and remember: one nul-character longer than the file. periodt. π
β¨π
π¦ where this page comes from
- fedora 43: fox-utils 1.6.59-2.fc43 Β· GPL-2.0-or-later
- fedora 44: fox-utils 1.6.59-3.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms