[SOLVED] - File Size CEGUI?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

tomadom
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 05, 2014 13:08

[SOLVED] - File Size CEGUI?

Postby tomadom » Fri Dec 05, 2014 13:12

Hi
I'm strill trying to build CEGUI so I can't answer this one question.
Could anyone give me an example of how big the binary files are when creating a simple window with a Hello World on it.
Is it around the 5mb size or down around the 500kb size? ie.. WxWidgets as opposed to FLTK.

Just trying to determine whether this toolkit will be suitable for my needs in the future.

Thanks
Last edited by tomadom on Sat Dec 06, 2014 01:42, edited 1 time in total.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: File Size CEGUI?

Postby Kulik » Fri Dec 05, 2014 14:21

On Fedora Linux 20 with -O3 (optimize for speed, not size, that means many things are inlined) libCEGUIBase-0.so is ~5MB. When you optimize for size libCEGUIBase-0.so is 2.4 MB. If you were to strip property documentation and other string literals you should be able to get to 2MB easily.

So the answer is that it depends on your platform, compiler, compiler flags, other tools used (upx), ...

User avatar
Ident
CEGUI Team
Posts: 1995
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: File Size CEGUI?

Postby Ident » Fri Dec 05, 2014 16:37

On Windows cegui+deps take around 4 MB in total on a Release build (speed-optimized, not size-optimized). You could probably make it way smaller if you wanted by using non-default compiler options and non-default dependencies.

What is your use-case for that if I may ask?
CrazyEddie: "I don't like GUIs"

lucebac
Just can't stay away
Just can't stay away
Posts: 193
Joined: Sat May 24, 2014 21:55

Re: File Size CEGUI?

Postby lucebac » Fri Dec 05, 2014 18:13

tomadom wrote:Could anyone give me an example of how big the binary files are when creating a simple window with a Hello World on it.

The size of the CEGUI lib is not depending on the things you are going to do with it. But your app's main executable file will stay around a few dozens of KB's.
I created some test app's which only open a window and handle mouse/keyboard input and not doing anything else.
They use hardoded glfw3 and SDL2 initialisation code and have a size of 47KB (glfw3) and 22KB (SDL2) in release mode on Windows 8.1 with MSVC13.

tomadom
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 05, 2014 13:08

Re: File Size CEGUI?

Postby tomadom » Sat Dec 06, 2014 00:14

Ident wrote:On Windows cegui+deps take around 4 MB in total on a Release build (speed-optimized, not size-optimized). You could probably make it way smaller if you wanted by using non-default compiler options and non-default dependencies.

What is your use-case for that if I may ask?



I think you're a little off track here. What I'm asking is if I build a small program and compile it, what size would it be.
For example, a CEGUI frame with a label which says "hello world". I'm asking because I sometimes need to build smaller programs and wanted to know how CEGUI performs in this case.

tomadom
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 05, 2014 13:08

Re: File Size CEGUI?

Postby tomadom » Sat Dec 06, 2014 00:17

lucebac wrote:
tomadom wrote:Could anyone give me an example of how big the binary files are when creating a simple window with a Hello World on it.

The size of the CEGUI lib is not depending on the things you are going to do with it. But your app's main executable file will stay around a few dozens of KB's.
I created some test app's which only open a window and handle mouse/keyboard input and not doing anything else.
They use hardoded glfw3 and SDL2 initialisation code and have a size of 47KB (glfw3) and 22KB (SDL2) in release mode on Windows 8.1 with MSVC13.


Thanks, this is what I was asking. So the file size is much lower than I thought. Is that statically or dynamically linked.
I would answer my own question here but I am having some difficulties building CEGUI which initially seemed easy.
Zlib errors for one. I have built Zlib dozens of times in the past so I'm not sure why this is going so badly.

Anyway.. it's the simple hello world program output size I was after so thanks for answering that.

User avatar
Ident
CEGUI Team
Posts: 1995
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: File Size CEGUI?

Postby Ident » Sat Dec 06, 2014 00:27

tomadom wrote:Zlib errors for one. I have built Zlib dozens of times in the past so I'm not sure why this is going so badly.

There is unfortunately no way we can help you based on this one-liner. Please make a new thread if you have issues. We do not know what OS you are on, as you have not told us. Dont forget to post all necessary info in a new thread.
tomadom wrote: So the file size is much lower than I thought. Is that statically or dynamically linked.

Dynamically linked of course. If you link it statically on Windows, you will most likely run into all sorts of issues on the long run and your executable's file size will become bloated. It is generally not advisable to link any libraries statically on Windows (there might be exceptions of course).
As far as I know, static linking is also quite dead on Linux (source: http://stackoverflow.com/questions/3430 ... ng-is-dead )

tomadom wrote:I think you're a little off track here. What I'm asking is if I build a small program and compile it, what size would it be.

Clearly I wasn't the only one who misunderstood you there. To clarify: I would consider the libraries that the executable directly depends on as part of the "program".

tomadom wrote:For example, a CEGUI frame with a label which says "hello world". I'm asking because I sometimes need to build smaller programs and wanted to know how CEGUI performs in this case.

Lucebac's post should answer that well. Also look at lucebac's application templates, the code there is all you need to run your hello world demo. And it generally contains all the code that you need to run CEGUI, it is basically the CEGUI beginner's guide, simply implemented and set up for a window creation system (glfw etc).
CrazyEddie: "I don't like GUIs"

tomadom
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 05, 2014 13:08

Re: File Size CEGUI?

Postby tomadom » Sat Dec 06, 2014 00:50

I'll make another post if I can't solve my zlib issues. Right now it was just a passing comment, not a question.

User avatar
Ident
CEGUI Team
Posts: 1995
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: File Size CEGUI?

Postby Ident » Sat Dec 06, 2014 01:31

Yea no worries. Do you feel like your question is acceptably answered? If yes please edit the title so that it starts with "[Solved]". Thanks!
CrazyEddie: "I don't like GUIs"

tomadom
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 05, 2014 13:08

Re: File Size CEGUI?

Postby tomadom » Sat Dec 06, 2014 01:41

Ident wrote:Yea no worries. Do you feel like your question is acceptably answered? If yes please edit the title so that it starts with "[Solved]". Thanks!


Thanks, I'll do that now.
Cheers.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests