[bt-devel] Windows Build status

Troy A. Griffitts scribe at crosswire.org
Tue Feb 24 05:37:31 MST 2009


I realize it might make more sense to just use QDir, but we have 
services in FileMgr to do most everything you need in a platform 
agnostic way:

static signed char existsFile(const char *ipath, const char *ifileName = 0);
static signed char existsDir(const char *ipath, const char *idirName = 0);
static char isDirectory(const char *path);
static int createParent(const char *pName);
static int createPathAndFile(const char *fName);
static int openFileReadOnly(const char *fName);
static int copyFile(const char *srcFile, const char *destFile);
static int copyDir(const char *srcDir, const char *destDir);
static int removeDir(const char *targetDir);
static int removeFile(const char *fName);

If they're useful for you.



Chris Little wrote:
> 
> 
> Greg Hellings wrote:
>> strcasecmp - the case agnostic string comparison function is called
>> stricmp on Windows.  Change the name and it works marvelously
>> (probably a simple #define macro could work perfectly, even in
>> config.h.cmake).
> 
> If it's useful to you, sword\src\utilfuns\utilstr.cpp contains the 
> generic stricmp definition used by Sword, which in turn calls the 
> platform-specific version of the function.
> 
>> dirent.h - there is also no such file in Visual Studio, though there
>> is in MinGW.  Just glancing through the Qt4 documentations, use of the
>> QDir object would allow the same functionality that is being used in
>> CSwordBackend::moduleConfig.  As in the case of pthread, it's probably
>> desirable to move to using all native Qt functions rather than
>> non-Standard  system headers like dirent.h.  But I don't think that I
>> quite grasp the exact functionality at this hour, so I will refrain
>> from trying to submit a patch for that.
> 
> dirent for Win32 is located in sword\src\utilfuns\win32.
> 
> --Chris
> 
> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel




More information about the bt-devel mailing list