18 #include <gwenhywfar/debug.h> 19 #include <gwenhywfar/directory.h> 22 #include <sys/types.h> 31 static int _writeDistFiles(
const char *initialSourceDir,
const GWB_FILE_LIST2 *fileList,
const char *folder);
38 GWB_FILE_LIST2 *projectFileList;
41 const char *initialSourceDir;
42 const char *projectName;
45 int versionPatchlevel;
47 const char *versionTag;
51 if (projectFileList==
NULL) {
57 if (xmlProjectInfo==
NULL) {
59 GWB_File_List2_free(projectFileList);
70 if (!(projectName && *projectName)) {
73 GWB_File_List2_free(projectFileList);
82 versionMajor, versionMinor, versionPatchlevel, versionBuild,
83 versionTag?versionTag:
"");
88 versionMajor, versionMinor, versionPatchlevel,
89 versionTag?versionTag:
"");
93 DBG_ERROR(
NULL,
"Error copying files into dist folder \"%s\"",
97 GWB_File_List2_free(projectFileList);
102 GWB_File_List2_free(projectFileList);
111 const GWB_FILE_LIST2 *fileList,
114 GWB_FILE_LIST2_ITERATOR *it;
116 it=GWB_File_List2_First(fileList);
124 file=GWB_File_List2Iterator_Data(it);
157 DBG_ERROR(
NULL,
"Error copying \"%s\" into dist folder (%d)",
168 file=GWB_File_List2Iterator_Next(it);
172 GWB_File_List2Iterator_free(it);
char * GWEN_Buffer_GetStart(const GWEN_BUFFER *bf)
#define GWEN_DIR_SEPARATOR_S
GWEN_XMLNODE * GWB_Utils_ReadProjectInfoFromFile(const char *fileName)
#define GWB_FILE_FLAGS_DIST
GWEN_BUFFER * GWEN_Buffer_new(char *buffer, uint32_t size, uint32_t used, int take)
void GWEN_Buffer_Reset(GWEN_BUFFER *bf)
int GWEN_XMLNode_GetIntValue(const GWEN_XMLNODE *n, const char *name, int defValue)
const char * GWB_File_GetFolder(const GWB_FILE *f)
const char * GWB_File_GetName(const GWB_FILE *f)
GWB_FILE_LIST2 * GWB_Utils_ReadFileList2(const char *fileName)
const char * GWEN_XMLNode_GetCharValue(const GWEN_XMLNODE *n, const char *name, const char *defValue)
int GWEN_Buffer_AppendArgs(GWEN_BUFFER *bf, const char *fmt,...)
#define GWEN_ERROR_GENERIC
void GWEN_Buffer_free(GWEN_BUFFER *bf)
void GWEN_XMLNode_free(GWEN_XMLNODE *n)
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
int GWB_Utils_CopyFile(const char *sSrcPath, const char *sDestPath)
#define DBG_ERROR(dbg_logger, format, args...)
uint32_t GWB_File_GetFlags(const GWB_FILE *f)
static int _writeDistFiles(const char *initialSourceDir, const GWB_FILE_LIST2 *fileList, const char *folder)
struct GWEN__XMLNODE GWEN_XMLNODE
#define GWB_FILE_FLAGS_GENERATED
int GWEN_Buffer_AppendString(GWEN_BUFFER *bf, const char *buffer)