Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/contrib/extractor/System.cpp b/contrib/extractor/System.cpp
- index a851412..031c6b0 100644
- --- a/contrib/extractor/System.cpp
- +++ b/contrib/extractor/System.cpp
- @@ -872,7 +872,12 @@ void ExtractMapsFromMpq()
- }
- // draw progress bar
- printf("Processing........................%d%%\r", (100 * (y+1)) / WDT_MAP_SIZE);
- +#if defined( __APPLE__ ) && defined( __MACH__ )
- + // OS X: Using \r does not automatically redraw the line
- + fflush(stdout);
- +#endif
- }
- + printf("\n");
- }
- delete [] areas;
- delete [] map_ids;
- @@ -966,6 +971,19 @@ inline void CloseMPQFiles()
- int main(int argc, char * arg[])
- {
- +
- +#if defined( __APPLE__ ) && defined( __MACH__ )
- +// OS X: Set the working directory to the executable path
- +// Allows double-click in Finder, similar to Windows port
- +if (strrchr(arg[0],'/'))
- +{
- + char execPath[128];
- + strcpy(execPath,arg[0]);
- + *(strrchr(execPath,'/'))=0;
- + chdir(execPath);
- +}
- +#endif
- +
- printf("Map & DBC Extractor\n");
- printf("===================\n\n");
- diff --git a/contrib/extractor/libmpq/common.h b/contrib/extractor/libmpq/common.h
- index 5794c16..a00b2c8 100644
- --- a/contrib/extractor/libmpq/common.h
- +++ b/contrib/extractor/libmpq/common.h
- @@ -31,6 +31,11 @@
- #define LIBMPQ_CONF_EOPEN_DIR -1 /* error on open directory */
- #define LIBMPQ_CONF_EVALUE_NOT_FOUND -2 /* value for the option was not found */
- +// OSX
- +#ifndef lseek64
- +#define lseek64 lseek
- +#endif
- +
- #if defined( __GNUC__ )
- #include <sys/types.h>
- #include <unistd.h>
Add Comment
Please, Sign In to add comment