orontee / taranis

Local weather data on your PocketBook e-book reader.
GNU General Public License v3.0
24 stars 0 forks source link

Check size information displayed by installer #85

Closed orontee closed 9 months ago

orontee commented 9 months ago

Context

Cyfranek ask whether the announced size is the effective size:

Analysis

With current directory populated with an extract from the .pbi file attached to last pre-release, I see:

matthias@peitho:~/Téléchargements/taranis$ tree -sh .
[4.0K]  .
├── [  96]  _scriptInstall
└── [4.0K]  sinstall
    ├── [4.0K]  icons
    │   ├── [ 11K]  icon_taranis.bmp
    │   └── [ 11K]  icon_taranis_f.bmp
    └── [1.3M]  taranis.app

So the size displayed during install is the right size.

Why is the executable damn so big?

The explanation comes from embedded icons, see:

matthias@peitho:~/Projets/taranis$  ls -alh builddir/src/icons.cc 
-rw-r--r-- 1 matthias matthias 1,1M  5 janv. 21:10 builddir/src/icons.cc

Improvement

If the executable size is a problem, we could convert icons to PNG and package them out of the executable: It should reduce the executable size to <300K! No idea of the possible impact on application startup time if icons must be loaded from PNG files (using LoadPNGToFormat())...

matthias@peitho:~/Projets/taranis$ convert icons/icon_09n_2x.bmp ~/Téléchargements/icon_09n_2x.png
matthias@peitho:~/Projets/taranis$ ls -al ~/Téléchargements/icon_09n_2x.png 
-rw-r--r-- 1 matthias matthias 1059  6 févr. 23:11 /home/matthias/Téléchargements/icon_09n_2x.png
matthias@peitho:~/Projets/taranis$ ls -al icons/icon_09n_2x.bmp
-rw-r--r-- 1 matthias matthias 11162  5 janv. 20:05 icons/icon_09n_2x.bmp
orontee commented 9 months ago

Executable size isn't a problem right now.