Open nephros opened 2 years ago
I think to store data in ~/.local/share/ is the best idea. I haven't tried this in a .spec yet but assume there's a way to do it. Suggestions! The only drawback to this approach is the data hanging around in .local after uninstall. hmmm.
The data being in /usr/share/app/data also has the downside that testing with QML live is a bust.
Thanks for the feedback.
install -D -t %{buildroot}/%{_datadir}/%{name}/data/* \
~/.local/share/de.poetaster/appname/data \
maybe.
I'm going to look at getting the sound files (that's a third of the data!) smaller first... Maybe I can smoosh the data to suit our needs :)
for file in ls *.ogg
; do ffmpeg -i $file -c:a libvorbis -b:a 64k -ac 1 ${file}.ogg;done
The hammer here is stereo to mono, which I wouldn't normally do. The 64K down from 160 is just fine (only audible on studio monitors).
That takes one directory from 13 MB down to 4.8.
All the wave files for fx where too large and stereo. Which explains why the game stutters when a lot of cannons are going.
Ok, it's down to 22.1M now, in total. I can refine the png crush and probably save another 1-2 MB. Smaller than patience deck :)
Still, I'll look at doing this in stages:
This would get us under 10mb. But I'll have to find the time.
At ~36 MB MVM is one of the larger packages out there on SFOS, and regularly one of those that get uninstalled before system upgrades to make space.
The majority of the space is taken up by the
data/
subdirectory.Suggestion:
~/.local/share
or~/.cache
)Alternative:
The second would allow one to just uninstall the space hog, and have the app functional without reinstalling. It would also allow separate life-cycles (versions) of app and level data if that is useful.