Vidalia 0.3.1
Classes | Macros | Typedefs | Functions
wixtool.cpp File Reference
#include <QFile>
#include <QDomDocument>
#include <QTextStream>
#include <QTextCodec>
#include <QStringList>
#include <stdlib.h>

Go to the source code of this file.

Classes

struct  s_SpliceData
 
struct  s_ReplaceData
 
struct  s_AddData
 
struct  s_UserLocalData
 

Macros

#define WIX_ATTR_ID   "Id"
 
#define WIX_ATTR_DIRACTION   "uninstall"
 
#define WIX_ATTR_REGACTION   "createAndRemoveOnUninstall"
 
#define WIX_ATTR_VALUE   "Value"
 
#define WIX_ATTR_KEY   "KeyPath"
 
#define WIX_ATTR_GUID   "Guid"
 
#define WIX_ATTR_NAME   "Name"
 
#define WIX_ATTR_REG_TYPE   "Type"
 
#define WIX_ATTR_REG_NAME   "Name"
 
#define WIX_ATTR_REG_ROOT   "Root"
 
#define WIX_ATTR_REG_KEYPATH   "Key"
 
#define WIX_ATTR_REG_ACTION   "Action"
 
#define WIX_REG_KEY_TYPE   "integer"
 
#define WIX_TAG_FILE   "File"
 
#define WIX_TAG_DIR   "Directory"
 
#define WIX_TAG_FEATURE   "Feature"
 
#define WIX_TAG_COMPONENT   "Component"
 
#define WIX_TAG_COMPONENT_REF   "ComponentRef"
 
#define WIX_TAG_CREATEDIR   "CreateFolder"
 
#define WIX_TAG_REMOVEDIR   "RemoveFolder"
 
#define WIX_TAG_REGKEY   "RegistryKey"
 
#define WIX_TAG_REGVAL   "RegistryValue"
 

Typedefs

typedef void(* TraverseCallback) (void *cbdata, QDomElement e)
 
typedef struct s_SpliceData SpliceData
 
typedef struct s_ReplaceData ReplaceData
 
typedef struct s_AddData AddData
 
typedef struct s_UserLocalData UserLocalData
 

Functions

bool do_walkdoc (QDomNode n, TraverseCallback cb, void *cbdata, QString *errorMessage)
 
bool walkdoc (QDomDocument *doc, TraverseCallback cb, void *cbdata, QString *errorMessage)
 
void splicefunc (void *cbdata, QDomElement e)
 
bool docsplice (QDomDocument *doc, QString arguments, QString *errorMessage)
 
void replacefunc (void *cbdata, QDomElement e)
 
bool docreplace (QDomDocument *doc, QString arguments, QString *errorMessage)
 
void addfunc (void *cbdata, QDomElement e)
 
bool docadd (QDomDocument *doc, QString arguments, QString *errorMessage)
 
void createRegLocalComponent (QDomElement e, QString dirName, QString keyPath)
 
void createDirMgmtComponent (QDomElement e, QString dirName)
 
void userlocalfunc (void *cbdata, QDomElement e)
 
bool docuserlocal (QDomDocument *doc, QString argument, QString *errorMessage)
 
void print_usage_and_exit ()
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ WIX_ATTR_DIRACTION

#define WIX_ATTR_DIRACTION   "uninstall"

Definition at line 17 of file wixtool.cpp.

◆ WIX_ATTR_GUID

#define WIX_ATTR_GUID   "Guid"

Definition at line 21 of file wixtool.cpp.

◆ WIX_ATTR_ID

#define WIX_ATTR_ID   "Id"

Definition at line 16 of file wixtool.cpp.

◆ WIX_ATTR_KEY

#define WIX_ATTR_KEY   "KeyPath"

Definition at line 20 of file wixtool.cpp.

◆ WIX_ATTR_NAME

#define WIX_ATTR_NAME   "Name"

Definition at line 22 of file wixtool.cpp.

◆ WIX_ATTR_REG_ACTION

#define WIX_ATTR_REG_ACTION   "Action"

Definition at line 27 of file wixtool.cpp.

◆ WIX_ATTR_REG_KEYPATH

#define WIX_ATTR_REG_KEYPATH   "Key"

Definition at line 26 of file wixtool.cpp.

◆ WIX_ATTR_REG_NAME

#define WIX_ATTR_REG_NAME   "Name"

Definition at line 24 of file wixtool.cpp.

◆ WIX_ATTR_REG_ROOT

#define WIX_ATTR_REG_ROOT   "Root"

Definition at line 25 of file wixtool.cpp.

◆ WIX_ATTR_REG_TYPE

#define WIX_ATTR_REG_TYPE   "Type"

Definition at line 23 of file wixtool.cpp.

◆ WIX_ATTR_REGACTION

#define WIX_ATTR_REGACTION   "createAndRemoveOnUninstall"

Definition at line 18 of file wixtool.cpp.

◆ WIX_ATTR_VALUE

#define WIX_ATTR_VALUE   "Value"

Definition at line 19 of file wixtool.cpp.

◆ WIX_REG_KEY_TYPE

#define WIX_REG_KEY_TYPE   "integer"

Definition at line 28 of file wixtool.cpp.

◆ WIX_TAG_COMPONENT

#define WIX_TAG_COMPONENT   "Component"

Definition at line 32 of file wixtool.cpp.

◆ WIX_TAG_COMPONENT_REF

#define WIX_TAG_COMPONENT_REF   "ComponentRef"

Definition at line 33 of file wixtool.cpp.

◆ WIX_TAG_CREATEDIR

#define WIX_TAG_CREATEDIR   "CreateFolder"

Definition at line 34 of file wixtool.cpp.

◆ WIX_TAG_DIR

#define WIX_TAG_DIR   "Directory"

Definition at line 30 of file wixtool.cpp.

◆ WIX_TAG_FEATURE

#define WIX_TAG_FEATURE   "Feature"

Definition at line 31 of file wixtool.cpp.

◆ WIX_TAG_FILE

#define WIX_TAG_FILE   "File"

Definition at line 29 of file wixtool.cpp.

◆ WIX_TAG_REGKEY

#define WIX_TAG_REGKEY   "RegistryKey"

Definition at line 36 of file wixtool.cpp.

◆ WIX_TAG_REGVAL

#define WIX_TAG_REGVAL   "RegistryValue"

Definition at line 37 of file wixtool.cpp.

◆ WIX_TAG_REMOVEDIR

#define WIX_TAG_REMOVEDIR   "RemoveFolder"

Definition at line 35 of file wixtool.cpp.

Typedef Documentation

◆ AddData

typedef struct s_AddData AddData

◆ ReplaceData

typedef struct s_ReplaceData ReplaceData

◆ SpliceData

typedef struct s_SpliceData SpliceData

◆ TraverseCallback

typedef void(* TraverseCallback) (void *cbdata, QDomElement e)

Definition at line 39 of file wixtool.cpp.

◆ UserLocalData

Function Documentation

◆ addfunc()

void addfunc ( void cbdata,
QDomElement  e 
)

◆ createDirMgmtComponent()

void createDirMgmtComponent ( QDomElement  e,
QString  dirName 
)

Definition at line 409 of file wixtool.cpp.

References WIX_ATTR_DIRACTION, WIX_ATTR_ID, WIX_TAG_CREATEDIR, and WIX_TAG_REMOVEDIR.

Referenced by userlocalfunc().

◆ createRegLocalComponent()

void createRegLocalComponent ( QDomElement  e,
QString  dirName,
QString  keyPath 
)

◆ do_walkdoc()

bool do_walkdoc ( QDomNode  n,
TraverseCallback  cb,
void cbdata,
QString *  errorMessage 
)

Definition at line 98 of file wixtool.cpp.

References do_walkdoc(), tc::error(), and i().

Referenced by do_walkdoc(), and walkdoc().

◆ docadd()

bool docadd ( QDomDocument *  doc,
QString  arguments,
QString *  errorMessage 
)

Make modifications to requested documents. returns false on error and errorMessage will be set.

Definition at line 349 of file wixtool.cpp.

References addfunc(), s_AddData::did, s_AddData::dtag, s_AddData::newprop, s_AddData::newpropval, s_AddData::newtag, and walkdoc().

Referenced by main().

◆ docreplace()

bool docreplace ( QDomDocument *  doc,
QString  arguments,
QString *  errorMessage 
)

Make modifications to requested documents. returns false on error and errorMessage will be set.

Definition at line 276 of file wixtool.cpp.

References s_ReplaceData::did, s_ReplaceData::dprop, s_ReplaceData::dtag, s_ReplaceData::newprop, s_ReplaceData::newpropval, s_ReplaceData::newtag, replacefunc(), and walkdoc().

Referenced by main().

◆ docsplice()

bool docsplice ( QDomDocument *  doc,
QString  arguments,
QString *  errorMessage 
)

Make modifications to requested documents. returns false on error and errorMessage will be set.

Definition at line 165 of file wixtool.cpp.

References s_SpliceData::did, s_SpliceData::dtag, i(), s_SpliceData::splice, splicefunc(), walkdoc(), and WIX_ATTR_ID.

Referenced by main().

◆ docuserlocal()

bool docuserlocal ( QDomDocument *  doc,
QString  argument,
QString *  errorMessage 
)

Make modifications to requested documents. returns false on error and errorMessage will be set.

Definition at line 541 of file wixtool.cpp.

References s_UserLocalData::featureid, s_UserLocalData::keypath, userlocalfunc(), and walkdoc().

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ print_usage_and_exit()

void print_usage_and_exit ( )

Display application usage and exit.

Definition at line 561 of file wixtool.cpp.

References tc::error().

Referenced by main().

◆ replacefunc()

void replacefunc ( void cbdata,
QDomElement  e 
)

◆ splicefunc()

void splicefunc ( void cbdata,
QDomElement  e 
)

Definition at line 133 of file wixtool.cpp.

References s_SpliceData::did, s_SpliceData::dtag, i(), s_SpliceData::splice, and WIX_ATTR_ID.

Referenced by docsplice().

◆ userlocalfunc()

void userlocalfunc ( void cbdata,
QDomElement  e 
)

◆ walkdoc()

bool walkdoc ( QDomDocument *  doc,
TraverseCallback  cb,
void cbdata,
QString *  errorMessage 
)

Definition at line 121 of file wixtool.cpp.

References do_walkdoc(), and tc::error().

Referenced by docadd(), docreplace(), docsplice(), and docuserlocal().