February 26, 2017, 12:06
bigger smaller reset 800px Wide width Full width Reset * *

Gildor's Forums

  Homepage Facebook Donate
Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length
« previous next »
Pages: [1] Print
Author Topic: Umodel source code  (Read 5628 times)
Gildor
Administrator
Hero Member
*****
Posts: 5586



View Profile WWW
« on: July 16, 2014, 17:40 »

Hi all,

Today I've posted an Umodel source code on GitHub - https://github.com/gildor2/UModel

The source code license wasn't chosen yet. Feel free to post any questions/comments here (on this board).

Thanks,
Konstantin
« Last Edit: September 19, 2014, 23:28 by Gildor » Logged
VendorX
Jr. Member
**
Posts: 44



View Profile
« Reply #1 on: July 16, 2014, 23:51 »

Thanks for your trust - I will check the source right now ...  Grin
Logged
warrantyvoider
Full Member
***
Posts: 110


View Profile
« Reply #2 on: September 20, 2014, 00:02 »

so you finally did it?! congratz! and thanks alot!  Grin

greetz WV
Logged
Gildor
Administrator
Hero Member
*****
Posts: 5586



View Profile WWW
« Reply #3 on: September 23, 2014, 20:30 »

I wrote some build instructions, available here:
https://github.com/gildor2/UModel/blob/master/README.md
Logged
switchit
Newbie
*
Posts: 1


View Profile
« Reply #4 on: November 25, 2014, 13:50 »

I am trying to compile the source on Linux but it doesn't work so well...

I actually just wanted to use the UmdExtract Tool, so I tried to to compile only that first:

g++ Main.cpp -o umdextract

But I got a bunch of errors saying stuff like:

Code:
UnGnuG.h:20:3: error: #error Unsupported platform.
  #error Unsupported platform.

In file included from Core.h:29:0,
                 from Main.cpp:1:
UnGnuG.h:254:15: warning: missing terminating " character [enabled by default]
  asm volatile("
               ^

/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:212:23: error: ‘size_t’ has a previous declaration as ‘typedef long unsigned int size_t’
 typedef __SIZE_TYPE__ size_t;
                       ^
UnTemplate.h: In member function ‘void TMapBase<TK, TI>::Rehash()’:
UnTemplate.h:1390:46: error: ‘HashCount’ was not declared in this scope
   INT* NewHash = new(TEXT("HashMapHash"))INT[HashCount];

Since I could not get that to work I tried compiling Umodel but that didnt work either...

make -f makefile-linux

Then I got this:

Code:
gcc -pipe -c -msse -std=c++0x -fno-strict-aliasing -fno-stack-protector -Wno-invalid-offsetof -Os -I . -I ./Core -I ./Unreal -I ./libs/include -I ./libs/nvtt -I ./libs/PowerVR -I UmodelTool -I UI -o ./obj/umodel-unix/Exporters.o Exporters/Exporters.cpp
Exporters/Exporters.cpp: In member function ‘int ExportedObjectEntry::GetHash() const’:
Exporters/Exporters.cpp:64:18: error: cast from ‘const UnPackage*’ to ‘int’ loses precision [-fpermissive]
   return ( ((int)Package >> 3) ^ ExportIndex ^ (ExportIndex << 4) ) & (EXPORTED_LIST_HASH_SIZE - 1);
                  ^
make: *** [obj/umodel-unix/Exporters.o] Error 1

Finally I tried just running the executable directly in Linux...

./umodel
Code:
./umodel: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory

After giving up on getting it to work in Linux, I installed VirtualBox and Windows XP and tried to run the application there.

But when I select my umd file and try to export it I get this error message:

Code:
Fatal Error

Wrong tag in package: 16F5489A

I don't think there is anything else I can try to do to get Umodel to work for me, but could someone please help me to extract the content of my umd file if I send it to you?




Logged
Gildor
Administrator
Hero Member
*****
Posts: 5586



View Profile WWW
« Reply #5 on: November 25, 2014, 14:05 »

I am trying to compile the source on Linux but it doesn't work so well...

I actually just wanted to use the UmdExtract Tool, so I tried to to compile only that first:

g++ Main.cpp -o umdextract
This will not work - a long list of defines etc is required, that's why makefile exists.

Quote
Since I could not get that to work I tried compiling Umodel but that didnt work either...

make -f makefile-linux

Then I got this:

Code:
gcc -pipe -c -msse -std=c++0x -fno-strict-aliasing -fno-stack-protector -Wno-invalid-offsetof -Os -I . -I ./Core -I ./Unreal -I ./libs/include -I ./libs/nvtt -I ./libs/PowerVR -I UmodelTool -I UI -o ./obj/umodel-unix/Exporters.o Exporters/Exporters.cpp
Exporters/Exporters.cpp: In member function ‘int ExportedObjectEntry::GetHash() const’:
Exporters/Exporters.cpp:64:18: error: cast from ‘const UnPackage*’ to ‘int’ loses precision [-fpermissive]
   return ( ((int)Package >> 3) ^ ExportIndex ^ (ExportIndex << 4) ) & (EXPORTED_LIST_HASH_SIZE - 1);
                  ^
make: *** [obj/umodel-unix/Exporters.o] Error 1
Very strange error. I'm building with GCC too, but have no such kind of problem. May be your compiler tries to build 64-bit code? (I don't know which gcc switches required for that)

Quote
Finally I tried just running the executable directly in Linux...

./umodel
Code:
./umodel: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
You should install libsdl2 package.

Quote
After giving up on getting it to work in Linux, I installed VirtualBox and Windows XP and tried to run the application there.

But when I select my umd file and try to export it I get this error message:

Code:
Fatal Error

Wrong tag in package: 16F5489A
Are you trying to open UMD file in umodel or with UnUmd?
Logged
Gildor
Administrator
Hero Member
*****
Posts: 5586



View Profile WWW
« Reply #6 on: November 25, 2014, 20:59 »

I think you wasn't able to build UModel for Linux because you used Linux x64 while UModel wasn't prepared for 64-bit builds. I've fixed all 64-bit issues and was able to build Win64 version of UModel. Most likely these fixes enough to compile UModel under Linux x64. Please try updated code.

Unfortunately I can't check Linux x64 build right now by myself because I have x86 Linux installed under VMware. Making a working Linux under VMware wasn't easy task for me - I was forced to find and install a working kernel (the kernel shipped with latest kubuntu isn't supported by this system, so hardware rendering acceleration and shared folders didn't work), etc. Also, setting up everything in Linux isn't a quick task either.
« Last Edit: November 25, 2014, 21:04 by Gildor » Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS