Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move resources to a separate package? #141

Open
martonmiklos opened this issue Dec 25, 2018 · 17 comments
Open

Move resources to a separate package? #141

martonmiklos opened this issue Dec 25, 2018 · 17 comments

Comments

@martonmiklos
Copy link
Collaborator

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!

@martonmiklos martonmiklos changed the title Separate resources to a separate package? Move resources to a separate package? Dec 25, 2018
@jdrescher2006
Copy link
Owner

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
Copy link
Owner

Do you know an app with a download manager?

@martonmiklos
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

@jdrescher2006
Copy link
Owner

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
Copy link
Collaborator Author

@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
Copy link
Owner

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

@martonmiklos
Copy link
Collaborator Author

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

@jdrescher2006
Copy link
Owner

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

@martonmiklos
Copy link
Collaborator Author

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
Copy link
Owner

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
Copy link
Collaborator Author

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

@jdrescher2006
Copy link
Owner

That sounds good!

@topiasv
Copy link

topiasv commented Apr 24, 2019

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
Copy link
Owner

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

@jdrescher2006
Copy link
Owner

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
Copy link
Collaborator Author

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:

  • Package the voice assets per language and upload to openrepos (I know that ball is bouncing at me for a long time, but I will get some time to implement it.)
  • Get the Storeman to register a custom URL handler which would allow to open app pages in that by using storeman://jdrescher/laufhelden (or similar) format. (According to this https://unix.stackexchange.com/questions/497146/create-a-custom-url-protocol-handler it should not be a big deal.)
  • In the Laufhelden then we could just add the list of the uploaded asset rpms links.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants