Jump to content
  • 0

[OS X] Building vmap Extractor/Assembler


Cala

Question

Hello,

For mangos-zero and mangos-one on Mac OS X, I can use the binary extractor/assembler to extract and assemble the vmaps from client 1.12.1 and 2.4.3.

I have to rely on the wine emulator as both binaries are windows executables (*.exe) and I downloaded a few more DLLs, but it works.

However, for Mangos Master, wine failed using the extractor, something related to C++ Runtime (don't have the error message right here, but I can post it tonight).

As the source code is provided, I tried to build it. Cmake returns no errors but make failed (still don't have the error message right here, something related to VC90 but can post it this evening).

My question is: can the extractor/assembler be build for Mac OS X? Are there specific dependencies?

For Zero and One, I can use the wine emulator but building OS X executables would be easier. For Master, as of today, I have no way to extract/assemble the vmaps.

Thanks for your help.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

I just had a quick look, and it seems the executables in One are built with Visual Studio 2010, while those in master are built with Visual Studio 2008. I have no idea about Zero, I don't have a Zero repository here :P

So my guess is that you didn't install the Visual Studio 2008 runtime libraries, so wine can't use them. I don't know if you have something like winetricks on Mac OS X too, but if you do, you could try "winetricks vcrun2008". I believe just running the Windows installer for the "Microsoft Visual C++ 2008 Redistributable Package" also worked for me (back in wine 1.3.something on my Linux machine).

I don't recall specific dependencies for the build (except libmpq), so you can probably build the binaries yourself too. But if my experience on Linux is any indication, it'll probably take you a while to get them to build and work, depending on your skills of course, but I still believe the wine path is much quicker. I have to note that my experience was like a year ago or so, so things might have changed (or not). For what it's worth: I remember having trouble getting libmpq to build. After some local hacking it compiled, but then I got errors running the extractor (the extractor couldn't handle the large archives in the client; files >2 GB), so I had to convince the tools to use "large file" aware API etc. I managed in the end, but still...

In fact, I should try that again, and sort out my fixes and post them instead of being lazy :P

Link to comment
Share on other sites

Thank you for these answer, I'll look this way though at the moment, I have no idea how to get the MV C++ 2008 packages.

By the way, as posted above, here are the error message I get when building the extractor:

/usr/include/sys/stat.h: In function ‘int main(int, char**)’:
/usr/include/sys/stat.h:433: error: too few arguments to function ‘int mkdir(const char*, mode_t)’
/Users/mo/Desktop/mangos-two/mangos/contrib/vmap_extractor_v3/vmapextract/vmapexport.cpp:474: error: at this point in file
make[2]: *** [vmapextract/CMakeFiles/vmapextractor.dir/vmapexport.cpp.o] Error 1
make[1]: *** [vmapextract/CMakeFiles/vmapextractor.dir/all] Error 2
make: *** [all] Error 2

And the errors when running the binary with wine:

R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.

err:module:attach_process_dlls "MSVCR90.dll" failed to initialize, aborting
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\\\Applications\\\\Jeux\\\\World of Warcraft WotLK\\\\vmapExtractor3.exe" failed, status c0000142

Link to comment
Share on other sites

By the way, as posted above, here are the error message I get when building the extractor:

/usr/include/sys/stat.h: In function ‘int main(int, char**)’:
/usr/include/sys/stat.h:433: error: too few arguments to function ‘int mkdir(const char*, mode_t)’
/Users/mo/Desktop/mangos-two/mangos/contrib/vmap_extractor_v3/vmapextract/vmapexport.cpp:474: error: at this point in file

I had a look at that code, and I see I got lucky on my Linux machine:

   // Create the working directory
   if(mkdir(szWorkDirWmo
#ifdef __linux__
                   , 0711
#endif
                   ))
           success = (errno == EEXIST);

The mkdir call has the same signature on Mac OS X as on Linux I believe, so you could try to change that into something that not only covers Linux. I'm not sure what defines are available (no Mac OS X with a compiler in range here) that can also cover BSD in general (as I'm sure the mkdir call is the same for FreeBSD/OpenBSD/etc too)... but I'm reasonably sure that __MACH__ will be defined for you, so change those lines (vmapexport.cpp, around line 474) to something like this:

   // Create the working directory
   if(mkdir(szWorkDirWmo
#if defined( __linux__ ) || defined ( __MACH__ )
                   , 0711
#endif
                   ))
           success = (errno == EEXIST);

But I bet that's only the start of more compile misery, because it surely looks like this code was never meant to built on Mac OS X...

And the errors when running the binary with wine:

R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.

err:module:attach_process_dlls "MSVCR90.dll" failed to initialize, aborting
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\\\Applications\\\\Jeux\\\\World of Warcraft WotLK\\\\vmapExtractor3.exe" failed, status c0000142

Hmm, sounds like a missing DLL (or something wrong with the manifests, but let's assume missing for now).

I would check if you can find a file MSVCR90.dll on your system (might be lower case msvcr90.dll though). In my wine installation, it's in the windows/system32 subfolder of the "system" drive.

If it's not there, see if it helps if you install the redistributables (Windows executable, so run with wine). You can download them here: http://www.microsoft.com/en-us/download/details.aspx?id=29. If you need the SP1 update, you can find it here: http://www.microsoft.com/en-us/download/details.aspx?id=5582.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use