jdrescher2006 / Laufhelden

Sport tracker for Sailfish OS
GNU General Public License v3.0
16 stars 17 forks source link

Move resources to a separate package? #141

Open martonmiklos opened 5 years ago

martonmiklos commented 5 years ago

Hi @jdrescher2006

I have recently did some development on the Laufhelden, and realised that deploying takes more time than before even if I select deploy binaries in the QtCreator. According to the logs in these cases it downloads the voice files to the device as well. I would suggest to create a separated laufhelden-data rpm and store these files in there so it would not be necessary to download these each time.

Or if you have a better solution (development build target for e.g.) please let me know!

Thanks and merry Christmas!

jdrescher2006 commented 5 years ago

HI @martonmiklos, unfortunately I have no better solution. I am thinking about placing the voice files into a separate directory. And exclude these files from the app. The user would have to download them (for his specific language) and place them into the directory. Maybe we could place a small download manager into the app so that this process is automated.

jdrescher2006 commented 5 years ago

Do you know an app with a download manager?

martonmiklos commented 5 years ago

Well I am not aware of any apps with builtin download manager (other than storeman haha ;) ).

I would rather suggest not implement a download manager but provide separate rpm packages for the separate language assets (via openrepos). Implementing a download manager would took some coding time and you (or someone) need to take care of the hosting the assets.

By this method it would open up the possibility to the users to build and publish their own language packages.

martonmiklos commented 5 years ago

If you need help with creating the spec files for the asset RPMs just let me know!

jdrescher2006 commented 5 years ago

Hi @martonmiklos, I think this is a good idea. At least we could provide a download manager later on.

I will push a new version to git today, which expects these files in /home/nemo/Laufhelden/voicefiles As before, the files are then expected in four subfolders: /audio /headers /numbers /units

So far we have 3 voice files for 3 languages: english, german, russian That means we would create 3 asset RPM's? I have not created an asset RPM before, maybe you can help me with those? I guess I have to create github projects for them?

martonmiklos commented 5 years ago

@jdrescher2006 Well I think if we install the assets from RPMs I would not place them into the /home path, but rather to /usr/share/harbour-laufhelden/

I would recommend to create per language asset rpms (so as for today we need to create 3 of them).

I will create the RPM spec files for the rpms at the evening and came up with a PR.

I think it is not necessary to create separate github repo for each of them, we could manage to develop them via this repo.

jdrescher2006 commented 5 years ago

Sounds good, let's do it as you recommend! I pushed to github and expected folder is /usr/share/harbour-laufhelden/voicefiles/

martonmiklos commented 5 years ago

Hi @jdrescher2006 I have just seen that you have removed the asset wavs in the last commit. Was that intentional?

jdrescher2006 commented 5 years ago

Yes that was intentional. You can still download the files from here.

martonmiklos commented 5 years ago

What is the long term plan for these? I think it would be useful to host them in the same repo where the localized asset rpms spec file lives. As mentioned before we could either move them to a separate repo or we can keep them here as well.

jdrescher2006 commented 5 years ago

Yes it makes sense to host them same repo where the localized asset rpms spec files are. I can copy them there or you can do it, as you like.

martonmiklos commented 5 years ago

I will PR them back together to the repo with the asset RPM spec files.

jdrescher2006 commented 5 years ago

That sounds good!

topiasv commented 5 years ago

I seem to constantly run into space issues every time I update my Xperia X and Laufhelden is one of the packages taking up a lot of space because of the wav files. Have you considered encoding the voice files with some other format such as .ogg or the like? Also I think moving the voice files to ~/.local/share which resides in a separate partition than root would probably be a better place to store the files to avoid these issues. Love the app but I have to uninstall the app every update.

jdrescher2006 commented 5 years ago

Hi @martonmiklos, do you have any news on this topic? Can you help by creating seperate RPM's for the voice files?

jdrescher2006 commented 4 years ago

As many have asked for, since the last version 1.1.4-1 the voice files are no longer contained in the RPM. This of course makes the RPM package much smaller. The disadvantage is that the user has to download and copy the files for the desired language manually. This is for sure not the ideal solution. I keep thinking that a download manager within Laufhelden would be the best solution in terms of easyness for the user.

martonmiklos commented 4 years ago

I am under the impression that adding download manager is kind of reinventing the wheel, so I would like to share the following idea for comments:

What do you think about this? If you like this approack I will consult about this with the Storeman developer.