File Size For Project With Only One Button Is Too Big
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 22
- Joined: Wed Jan 20, 2021 12:36 am
File Size For Project With Only One Button Is Too Big
I am just starting to learn LiveCode so I followed a tutorial, dragged a button, added three lines of code in MouseUp. That´s it.
Exported as Windows standalone.
Size of the executable is 16 MB.
Why is the file size so big?
Are there any settings to reduce the file size? I mean, what will happen when my project becomes more complex...?
I have some experience with other programming language and environment and I know Window executables are quite large but... for a single button?
I am using LiveCode Indy in Windows 10, 64 bits.
When exported as 32 bits standalone size is 14 MB.
thanks a lot.
PS: I want to share my file but forum does not allow tho share URL link!
David R.
Exported as Windows standalone.
Size of the executable is 16 MB.
Why is the file size so big?
Are there any settings to reduce the file size? I mean, what will happen when my project becomes more complex...?
I have some experience with other programming language and environment and I know Window executables are quite large but... for a single button?
I am using LiveCode Indy in Windows 10, 64 bits.
When exported as 32 bits standalone size is 14 MB.
thanks a lot.
PS: I want to share my file but forum does not allow tho share URL link!
David R.
Re: File Size For Project With Only One Button Is Too Big
I am on a Mac, and the basic standAlone I maintain is 39MB. The Windows version is 17MB.
Remember that the entire engine needs to ride inside the executable to run the standalone. The actual stacks that make up the package are about 2.7MB.
Craig
Remember that the entire engine needs to ride inside the executable to run the standalone. The actual stacks that make up the package are about 2.7MB.
Craig
Re: File Size For Project With Only One Button Is Too Big
The file size is that big because the Livecode engine is embedded in the stand alone. The minimum size is that 16 MB, but it will only grow very slowly as the code increases. If you had lots of graphics or videos inside the app, it will grow quickly again. But the actual code and vector based UI elements are small, so they will have little effect on size.
If you look at other apps, you will see that 16 MB is still pretty modest these days...
You have to make 10 posts on the forum before you have graphics posting and attachment privileges. Keep posting and asking questions and you could be up to full status tomorrow.
There are a lot of one or two message spammers that seem to be attracted here.
Welcome!
Kelly
If you look at other apps, you will see that 16 MB is still pretty modest these days...
You have to make 10 posts on the forum before you have graphics posting and attachment privileges. Keep posting and asking questions and you could be up to full status tomorrow.

Welcome!
Kelly
-
- Posts: 22
- Joined: Wed Jan 20, 2021 12:36 am
Re: File Size For Project With Only One Button Is Too Big
thanks Craig, good to know that the actual stacks are small.
-
- Posts: 22
- Joined: Wed Jan 20, 2021 12:36 am
Re: File Size For Project With Only One Button Is Too Big
Thanks Kelly!kdjanz wrote: ↑Wed Jan 20, 2021 1:11 amThe file size is that big because the Livecode engine is embedded in the stand alone. The minimum size is that 16 MB, but it will only grow very slowly as the code increases. If you had lots of graphics or videos inside the app, it will grow quickly again. But the actual code and vector based UI elements are small, so they will have little effect on size.
If you look at other apps, you will see that 16 MB is still pretty modest these days...
You have to make 10 posts on the forum before you have graphics posting and attachment privileges. Keep posting and asking questions and you could be up to full status tomorrow.There are a lot of one or two message spammers that seem to be attracted here.
Welcome!
Kelly
I am working on a project that will use simple vector graphics (rectangles, circles) and I might use images to be loaded as requested.
It will connect to database.
I know that 16 MB is modest compared to other Window apps (even comparing to what Craig reported in Mac standalone) but I prefer small files whenever possible.
Anyway LiveCode seems a fantastic alternative for my needs.
David R.
Re: File Size For Project With Only One Button Is Too Big
There are a few things you can do to keep the final size as small as possible (in this case with the newest IDEs, roughly around the 17 to 30 or so MB size depending on platform) .
One thing you can do is make either a generic or specific launcher stack, and develop the main part of the program as just plain stacks. As an example, this is how the IDE is made up (for the most part), as you can see below - The 3 parts your likely to see most often (The menubar, tools and project browser palettes) which have more than a few objects on them, come in at pretty paltry sizes, as shown below -
Please note that a number of the parts that comprise the IDE have been changed from standard stacks to script only stacks, however, the savings in size is not that far different, if it exists at all. The menubar folder, for instance, currently totals 106 items @ 409.4 kb in size total. In the previous IDE where it was just a stack with substacks, its size was 657.6 kb.
Finally, you can point that launcher either at a local file or a hosted one, should you so decide. If you update your program, you don't need to reship the executable again, just the parts that make it up which are quite small. If you host the files and the app calls the server for them, the end user sees no difference between out of date and up to date.
How does this compare to a program using one of the languages you can make the exe smaller in? I'll use the one I'm most familiar with, Free Pascal + Lazarus (think Delphi 7) which is cross platform much like Lc, and Real Basic which is probably the closest competitor Lc has at the moment.
Your simple test,
Lazarus + FPC - a stack and button with no code can be stripped when compiled to produce a 5.8 MB exe. If you decide to update it, you have to deliver that size at minimum each and every time.
RealBasic / Xojo - the exe is small (1.5 MB) but requires libs to run. All told, when tested it totaled 39 MB total for a stack, button, and no code.
Something to think about.
One thing you can do is make either a generic or specific launcher stack, and develop the main part of the program as just plain stacks. As an example, this is how the IDE is made up (for the most part), as you can see below - The 3 parts your likely to see most often (The menubar, tools and project browser palettes) which have more than a few objects on them, come in at pretty paltry sizes, as shown below -
Please note that a number of the parts that comprise the IDE have been changed from standard stacks to script only stacks, however, the savings in size is not that far different, if it exists at all. The menubar folder, for instance, currently totals 106 items @ 409.4 kb in size total. In the previous IDE where it was just a stack with substacks, its size was 657.6 kb.
Finally, you can point that launcher either at a local file or a hosted one, should you so decide. If you update your program, you don't need to reship the executable again, just the parts that make it up which are quite small. If you host the files and the app calls the server for them, the end user sees no difference between out of date and up to date.
How does this compare to a program using one of the languages you can make the exe smaller in? I'll use the one I'm most familiar with, Free Pascal + Lazarus (think Delphi 7) which is cross platform much like Lc, and Real Basic which is probably the closest competitor Lc has at the moment.
Your simple test,
Lazarus + FPC - a stack and button with no code can be stripped when compiled to produce a 5.8 MB exe. If you decide to update it, you have to deliver that size at minimum each and every time.
RealBasic / Xojo - the exe is small (1.5 MB) but requires libs to run. All told, when tested it totaled 39 MB total for a stack, button, and no code.
Something to think about.

-
- Posts: 22
- Joined: Wed Jan 20, 2021 12:36 am
Re: File Size For Project With Only One Button Is Too Big
bogs,
yes, definitely something to think about!
I am just starting to learn Livecode but I believe I understand what you say about making several stacks to make it easy to update and keep size small.
I will try it, thanks a lot.
David R.
yes, definitely something to think about!
I am just starting to learn Livecode but I believe I understand what you say about making several stacks to make it easy to update and keep size small.
I will try it, thanks a lot.
David R.
Re: File Size For Project With Only One Button Is Too Big
This lesson should give you a good idea of how it works - https://lessons.livecode.com/m/4071/l/1 ... pplication

-
- Posts: 22
- Joined: Wed Jan 20, 2021 12:36 am
Re: File Size For Project With Only One Button Is Too Big
Nice.bogs wrote: ↑Mon Jan 25, 2021 5:02 pmThis lesson should give you a good idea of how it works - https://lessons.livecode.com/m/4071/l/1 ... pplication
So the concept of having a standalone "launcher" that only calls for the Main App is very good and I believe it can be applied like this:
- The .exe file (launcher) can appear as a shortcut file in desktop PC. That way the .exe itself is very lightweight and keeps the livecode MainApp from being visible.
David R.
Re: File Size For Project With Only One Button Is Too Big
You can actually see just how fast it works even when calling a stack from over the net from inside the IDE, thanks to FourthWorld.
If you go to the Development menu and drop down to Plugins, you'll see a selection called "GoRevNet". In this example, the launcher would be the actual IDE itself, the plugin is just a stack which calls another stack to show up from a server which populates the plugin.
If you want a real treat, click on the various buttons. He did a nice job with the movements
If you go to the Development menu and drop down to Plugins, you'll see a selection called "GoRevNet". In this example, the launcher would be the actual IDE itself, the plugin is just a stack which calls another stack to show up from a server which populates the plugin.
If you want a real treat, click on the various buttons. He did a nice job with the movements


-
- Posts: 22
- Joined: Wed Jan 20, 2021 12:36 am
Re: File Size For Project With Only One Button Is Too Big
Great to know FourthWorld has us covered!
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: File Size For Project With Only One Button Is Too Big
Thanks for the kind words, Bogs.bogs wrote: ↑Mon Jan 25, 2021 7:08 pmYou can actually see just how fast it works even when calling a stack from over the net from inside the IDE, thanks to FourthWorld.
If you go to the Development menu and drop down to Plugins, you'll see a selection called "GoRevNet". In this example, the launcher would be the actual IDE itself, the plugin is just a stack which calls another stack to show up from a server which populates the plugin.
If you want a real treat, click on the various buttons. He did a nice job with the movements![]()
In recent version the name of the plugin has been changed to "GoLiveNet", though the functionality as a living demo of a downloadable mashup of network services remains its mission.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: File Size For Project With Only One Button Is Too Big
LOL! I'm glad you popped in to say so, seeing as I almost never am in the newer versions, and didn't know hehFourthWorld wrote: ↑Tue Feb 02, 2021 6:57 pmIn recent version the name of the plugin has been changed to "GoLiveNet"

