March 29, 2024, 03:49
bigger smaller reset     1020px Wide width Full width Reset   * *

Gildor's Forums

  Homepage Facebook Read news on Twitter Youtube channel Github page
Welcome, Guest. Please login or register.
Did you miss your activation email?

« previous next »
Print
Author Topic: Umodel source code  (Read 18089 times)
Gildor
Administrator
Hero Member
*****
Posts: 7978



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: 60



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: 109


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: 7978



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: 7978



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: 7978



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
gf1593
Newbie
*
Posts: 2


View Profile
« Reply #7 on: May 13, 2017, 17:28 »

Can't set it up for windows visual studio 2015. Cry
After all files been put in the right directory, and run the build.sh, I get this message:
Generating makefile from UmodelTool/umodel.project ...
Gathering dependency info ...
Makefile generated.
Using Visual C++ 11 (32 bit) found at "C:/Program Files (x86)/microsoft visual studio 11.0/vc" ...
CALLING jom makefile-vc-win32
Core.cpp
GlWindow.cpp
d:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\libs\includewin32\SDL2/SDL_syswm.h(58) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Core/Core.cpp(12) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

jom: D:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\makefile-vc-win32 [.\obj\umodel-win32\Core.obj] Error 2
CoreWin32.cpp
Core/CoreWin32.cpp(Cool : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
TextContainer.cpp
jom: D:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\makefile-vc-win32 [.\obj\umodel-win32\CoreWin32.obj] Error 2
jom: D:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\makefile-vc-win32 [.\obj\umodel-win32\GlWindow.obj] Error 2
Build time: 0.5 sec
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #8 on: May 13, 2017, 18:19 »

I've re-uploaded BuildTools.zip, please try it. Changed "vc32tools" file. Now VS2015 should compile UModel.
You shouldn't use MSVCRT.lib for the build. Most likely you didn't use it anyway, but just in case - set "OLDCRT" variable in common.project to 0. OLDCRT is supported up to VS2013 build.
« Last Edit: May 13, 2017, 22:56 by Gildor » Logged
gf1593
Newbie
*
Posts: 2


View Profile
« Reply #9 on: May 16, 2017, 10:26 »

I started over from the beginning...
I do notice something in the message:
Code:
Using Visual C++ 11 (2012) [32 bit] found at "C:/Program Files (x86)/microsoft visual studio 11.0/vc" ...
This is some remaining files from uninstalled Visual C++ I think, not my vs 2015 folder, it's in my "E" disk.
Code:
Cannot open include file: 'GL/gl.h': No such file or directory
Missing gl.h, I found it in the "MSVCRT.zip" file, and copied it into "Core/Gl" folder, but of course it led more problems Undecided
Sorry I just can't get it right
Code:
../Shaders.h does not exists, creating ...
Generating makefile from UmodelTool/umodel.project ...
Gathering dependency info ...
Makefile generated.
Using Visual C++ 11 (2012) [32 bit] found at "C:/Program Files (x86)/microsoft visual studio 11.0/vc" ...
CALLING jom makefile-vc-win32
Export3D.cpp
Exporters.cpp
ExportMaterial.cpp
d:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\Core\CoreGL.h(5) : fatal error C1083: Cannot open include file: 'GL/gl.h': No such file or directory
d:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\Core\CoreGL.h(5) : fatal error C1083: Cannot open include file: 'GL/gl.h': No such file or directory
d:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\Core\CoreGL.h(5) : fatal error C1083: Cannot open include file: 'GL/gl.h': No such file or directory
jom: D:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\makefile-vc-win32 [.\obj\umodel-win32\Exporters.obj] Error 2
ExportMd5.cpp
jom: D:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\makefile-vc-win32 [.\obj\umodel-win32\Export3D.obj] Error 2
d:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\Core\CoreGL.h(5) : fatal error C1083: Cannot open include file: 'GL/gl.h': No such file or directory
jom: D:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\makefile-vc-win32 [.\obj\umodel-win32\ExportMd5.obj] Error 2
jom: D:\My Documents\Visual Studio 2015\Projects\GitHub\UModel\makefile-vc-win32 [.\obj\umodel-win32\ExportMaterial.obj] Error 2
Build time: 0.6 sec
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #10 on: May 16, 2017, 10:33 »

Try setting Visual Studio version in build.sh: see line 47, "export vc_ver=2010".
Logged
mirzu42
Newbie
*
Posts: 12


View Profile
« Reply #11 on: July 06, 2018, 04:25 »

hi, im trying to build it on linux but it doesent seem to work at all. i have gcc and sdl2 2.0.7 installed but it just says error everytime when i try. any help?
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #12 on: July 06, 2018, 10:45 »

What problem do yo have? You provided zero information for being able to answer.

I'd suggest you reading this thread, just in case:
http://www.gildor.org/smf/index.php/topic,2493.0.html
Logged
mirzu42
Newbie
*
Posts: 12


View Profile
« Reply #13 on: July 08, 2018, 00:38 »

What problem do yo have? You provided zero information for being able to answer.

I'd suggest you reading this thread, just in case:
http://www.gildor.org/smf/index.php/topic,2493.0.html



yea i got it to work.
you should add somewhere that you need to git clone it because if you just download zip it wont work for some reason. a gui would be nice but its not needed tho.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #14 on: July 08, 2018, 12:17 »

I've fixed build without use of "git clone".
Logged
Print 
« previous next »
Jump to:  

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