1 #ifndef COMMON_BUNDLER_DEFS
2 #define COMMON_BUNDLER_DEFS
a_sprintf is a specialization of astring that provides printf style support.
Provides a dynamically resizable ASCII character string.
const char * s() const
synonym for observe. the 's' stands for "string", if that helps.
Defines the base class for all string processing objects in hoople.
virtual base_string & assign(const base_string &s)=0
Sets the contents of this string to "s".
A very common template for a dynamic array of bytes.
A base class for objects that can provide a synopsis of their current state.
virtual const char * class_name() const =0
Returns the bare name of this class as a constant character pointer.
Provides file managment services using the standard I/O support.
A simple object that wraps a templated set of strings.
special_bundling_flags
Contains some definitions used by both the bundle creator and unpacker.
@ TEST_VARIABLE_DEFINED
check for required variable's presence.
@ OMIT_PACKING
for a source side exe, do not pack the file.
@ SET_VARIABLE
this item just has a variable assignment.
@ RECURSIVE_SRC
source is a recursive folder.
@ SOURCE_EXECUTE
the file should be executed before bundling.
@ QUIET_FAILURE
when errors happen, no popup message happens.
@ IGNORE_ERRORS
if set, errors in an item will not stop program.
@ TARGET_EXECUTE
the file should be executed on unbundling.
@ MAKE_BACKUP_FILE
save a copy if original file already exists.
@ NO_OVERWRITE
target file will not be overwritten if exists.
unsigned int un_int
Abbreviated name for unsigned integers.
we will read the manifest pieces out of our own exe image.
basis::un_int _flags
uses the special_bundling_flags.
basis::astring _parms
the parameters to pass on the command line.
static basis::astring read_a_string(filesystem::byte_filer &bundle)
reads a string from the "bundle" file, one byte at a time.
basis::astring _payload
guts of the chunk, such as location for file on target or a variable definition.
void pack(basis::byte_array &target) const
streams out into the "target".
static bool read_an_obscured_int(filesystem::byte_filer &bundle, basis::un_int &found)
reads in our obscured packing format for an int, which takes 8 bytes.
static bool read_manifest(filesystem::byte_filer &bundle, manifest_chunk &to_fill)
reads a chunk out of the "bundle" and stores it in "to_fill".
virtual ~manifest_chunk()
static bool read_a_filetime(filesystem::byte_filer &bundle, basis::byte_array &found)
retrieves packed_filetime_size() byte timestamp from the "bundle".
static bool read_an_int(filesystem::byte_filer &bundle, basis::un_int &found)
reads an integer (4 bytes) from the file into "found".
basis::un_int _size
the size of the packed file.
virtual void text_form(basis::base_string &state_fill) const
Provides a text view of all the important info owned by this object.
bool unpack(basis::byte_array &source)
streams in from the "source".
static int packed_filetime_size()
manifest_chunk(int size, const basis::astring &target, int flags, const basis::astring &parms, const structures::string_set &keywords)
the chunk is the unit found in the packing manifest in the bundle.
basis::byte_array c_filetime
more than enough room for unix file time.
DEFINE_CLASS_NAME("manifest_chunk")
structures::string_set _keywords
keywords applicable to this item.