A basic 64bit WowModelViewer client running on macOS

Something to discuss or share around development, here is the right place
Forum rules
Before requesting support, please make sure:
- your problem is not already discussed in this forum
- your poblem is not already listed here : https://wowmodelviewer.net:8443/issues/?filter=10901
Please enclose logs and clear workflow (+ screenshot if applicable) to help understand your issue.
Thanks !
Jeromnimo
Post Reply
Norod
Posts: 3
Joined: Tue Mar 13, 2018 11:19 am

A basic 64bit WowModelViewer client running on macOS

Post by Norod » Tue Mar 13, 2018 11:57 am

Hello all,

I was playing around with your WowModelViewer's code and managed to compile a basic version of the client to as an x86_64 target for macOS.

Here is a link to a short screen recording of it: https://youtu.be/6ERz5DL-njw

While my fork contains a lot of experiments, and quick & dirty workarounds, it does fix a few issues which are probably present in your Windows client:
  • There are several lines which look something like

    Code: Select all

    result = (*reinterpret_cast <unsigned int*>(val));
    where a Heap over-reading occur when/if the allocated bytes for val < sizeof(unsigned int)
  • modelheaders.h - Got many CPU exceptions thrown in 64bit mode with byte alignment = 1. Setting it to 8 solved it.

    Code: Select all

    #pragma pack(push,8)
Here is my Fork's commit list: https://bitbucket.org/Norod/wowmodelviewer/commits/all
Specifically commits d6fb2e0 and
8b54e53 are the ones who also contain the fixes to the issues I mentioned above

Cheers!
You guys are doing an amazing work!

CiniCraft
Posts: 2
Joined: Thu Apr 12, 2018 2:57 am

Re: A basic 64bit WowModelViewer client running on macOS

Post by CiniCraft » Mon Apr 16, 2018 4:30 am

It looks awesome. Can you write a few compiling instructions on getting a binary built?

I mostly write in Python, Objective-C and Swift. I've only compiled a C++ app once to get a Bitcoin miner working on my Hackintosh and MacBook Pro :)
I'd really like to take a stab at repairing the M3 exporter, I'm using WoW Model Viewer 7.0.5 atm since it still worked on that older build.

Norod
Posts: 3
Joined: Tue Mar 13, 2018 11:19 am

Re: A basic 64bit WowModelViewer client running on macOS

Post by Norod » Tue Jul 24, 2018 1:03 pm

CiniCraft wrote:
Mon Apr 16, 2018 4:30 am
It looks awesome. Can you write a few compiling instructions on getting a binary built?
Thanx, the compilation wasn't so easy for me. I used CMake -G 'Xcode' to generate an Xcode project, but then I had to update a lot of things manually, make modifications on the code and even change things in the wxWidget library it depends on :(

I suppose I should find the time to make a proper build branch, make sure it didn't break Windows compilation and simply make a PR or something.
CiniCraft wrote:
Mon Apr 16, 2018 4:30 am
I'd really like to take a stab at repairing the M3 exporter
Question: Are those supposed to be audio files? Because I don't see .m3 files, but I do see a lot of .mp3 files and a lot of .ogg ones. If this is what you mean, I just managed to "dump" them all out via CascLib directly.

You can try and run my CascLib build script for Mac https://github.com/Norod/CascLibMacOS
and then change

Code: Select all

hFind = CascFindFirstFile(hStorage, "*", &FindData, szListFile);
to

Code: Select all

hFind = CascFindFirstFile(hStorage, "*.mp3", &FindData, szListFile);
run it and then run again with

Code: Select all

hFind = CascFindFirstFile(hStorage, "*.ogg", &FindData, szListFile);

Post Reply