Page 1 of 1

What's going on with increasing exe filesize?

Posted: Monday 31st August 2020 12:32pm
by BruceSteers
So here's me scenario...
That GForm app i've made i didn't want/need the cumbersome .gambas on the end of it so i rename it to just GForm.

Then...
When i recompile the GForm.gambas exe while the GForm exe exists in the folder my new exe becomes larger ???
When i say larger it got up to 26mb , just the Gambas exe alone. wtf !!

If I delete the renamed GForm file and compile again the new GForm.gambas exe suddenly drops to just under 400k

It's like the contents of the folder are being added to the compiled exe or something?

Very strange behaviour..

Re: What's going on with increasing exe filesize?

Posted: Monday 31st August 2020 4:06pm
by BruceSteers
Answering my own question here.

Just read this in the Gambas beginers guide...

"The Gambas
archiver transforms the entire project directory structure into a standalone
executable."

Now i did not know that , better clear everything out of the folder that's not code i guess :-\

Re: What's going on with increasing exe filesize?

Posted: Monday 31st August 2020 4:12pm
by BruceSteers
Cleared all the images, help files, scripts out of the folder and just left the GForm code

Now the executable filesize has gone from 600k to 22.1k

Wow.

There's a lesson for us all

So each time i renamed the exe to just GForm the next compilation would add the GForm exe to the GForm.gambas exe

adding the exe that's had exe's already added to it to the new exe over and over again :-\

Re: What's going on with increasing exe filesize?

Posted: Monday 31st August 2020 5:31pm
by sjsepan
Good to know! Thanks,
SteveS

Re: What's going on with increasing exe filesize?

Posted: Tuesday 1st September 2020 5:01pm
by BruceSteers
You're welcome :)
I agree , it was good to know and worth sharing i thought for those who didn't know,
I wish i'd known it before.

It certainly has a plus side though.
i've now realised i can make my app show some help texts using some text files i've put in the source folder , now after the app is compiled the text files don't need to exist with the Executable , they are built in and load using just the filenames with no path prefix.
:)