Flatpak

67 views
Skip to first unread message

joh.h...@googlemail.com

unread,
Apr 18, 2019, 8:50:03 AM4/18/19
to mnemosyne-proj-users
Hello everyone,

I have put together a basic flatpak manifest here:
https://github.com/linuxrider/org.mnemosyneproj.Mnemosyne

With flatpak-builder and org.kde.Sdk//5.12 installed and after cloning
the git it should be easily installable with
flatpak-builder --user --install --ccache build org.mnemosyneproj.Mnemosyne.yaml

I would like to hear your opinion.

Best regards
Johannes

Peter Bienstman

unread,
Apr 19, 2019, 3:08:35 AM4/19/19
to mnemosyne-...@googlegroups.com
Hi,

Nice, I didn't even know that flatpak existed.

If you want to keep this up to date, I'd be happy to give you access to sourceforge so that you upload new versions. Could you also provide more detailed instructions for our website on how to use this?

Cheers,

Peter
--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To post to this group, send email to mnemosyne-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/72c29305-044d-4c9f-8ab5-14c92e77fb4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sebastian Tur

unread,
Apr 11, 2023, 9:24:01 AM4/11/23
to mnemosyne-proj-users
With flathub getting more and more popular I think this is a great idea.
Let's take a Steam Deck gaming console as an example. It shipps with flathub enabled KDE distro where ppl would happily use mnemosyne - for exmaple me and my kids :)

Peter Bienstman

unread,
Apr 11, 2023, 9:25:29 AM4/11/23
to mnemosyne-...@googlegroups.com
If someone wants to act as a developer for this, I'm happy to give them access to sourceforge, but it's not something that's on my own todo list, I'm afraid...

Peter

Sebastian Turzański

unread,
Apr 11, 2023, 4:21:02 PM4/11/23
to mnemosyne-...@googlegroups.com
Hi Johannes
I created a pull request on the gihub with update dependency URLs + a request for further assistance

You received this message because you are subscribed to a topic in the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mnemosyne-proj-users/8DjSuqtg2nc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mnemosyne-proj-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPHO1P_ZfALDW0-bhUbQjUsm0NTmkTcx62nKDe9N4DSjFg%40mail.gmail.com.

Peter Bienstman

unread,
Apr 11, 2023, 4:33:53 PM4/11/23
to mnemosyne-proj-users
Btw, you created the pull request in Linuxrider's repository (which I can't control) , not in the main Mnemosyne repository... 

Peter 

Sebastian Turzański

unread,
Apr 11, 2023, 4:46:56 PM4/11/23
to mnemosyne-...@googlegroups.com
That's why I mentioned Johannes:)

Sebastian Tur

unread,
May 25, 2023, 3:45:41 PM5/25/23
to mnemosyne-proj-users
I did not received any help from Johannes but still I was able to do some progress.
the issue I'm facing curently is that setup.py does not respect --prefix for data_files

so I get
error: could not create '/usr/share/locale/ca/LC_MESSAGES/mnemosyne.mo': Permission denied

and the same for menmosyne.desktop and mnemosyne.png

So in the end flatpak-builder is not able to prepare a package in its confined dir.

Are you able to adapt setup.py to respect --prefix ?

Peter Bienstman

unread,
May 25, 2023, 3:52:45 PM5/25/23
to mnemosyne-...@googlegroups.com
Feel free to submit a patch for setup.py!

Peter

Sebastian Turzański

unread,
May 26, 2023, 2:21:11 AM5/26/23
to mnemosyne-...@googlegroups.com
If I had a skills  I would not even waste your time for reading that :)
I'm not even skilled for hello world in python but maybe I'll try chatgpt to help me fix that.

Sebastian Tur

unread,
May 26, 2023, 3:04:49 PM5/26/23
to mnemosyne-proj-users
good news Peter - indeed chatpgt created the code that modifies the path :)

Certainly! Here's the modified code snippet to consider the `--prefix` parameter for the `data_files` path you provided:


# Add the following code after the setup() function
if sys.argv[1] == 'install':
    # Retrieve the value of the --prefix parameter
    prefix = ''
    for arg in sys.argv:
        if arg.startswith('--prefix='):
            prefix = arg.split('=')[1]
            break

    # Update the paths of data_files using the --prefix parameter
    if prefix:
        new_data_files = []
        for data_path, files in setup_kwargs['data_files']:
            new_data_path = os.path.join(prefix, data_path)
            new_files = [os.path.join(new_data_path, file) for file in files]
            new_data_files.append((new_data_path, new_files))
        setup_kwargs['data_files'] = new_data_files
```

In this modified code, the `data_files` list has been directly included in the setup arguments with the appropriate paths. The rest of the code remains the same as before.

Remember to pass the `--prefix` parameter when running the `setup.py` script with the `install` command to ensure the correct installation path for the data files.

Peter Bienstman

unread,
May 26, 2023, 3:19:44 PM5/26/23
to mnemosyne-...@googlegroups.com
Thanks! 

>Remember to pass the `--prefix` parameter when running the `setup.py` script with the `install` command to ensure the correct installation path for the data files.

Could you please change your code so that that is not needed? 'python setup.py install' should still work as before without needing to explicitly pass directories.

Also, please provide a pull request on github, rather than describing in words what needs to be changed.

Cheers,

Peter

Johannes Hermann

unread,
May 27, 2023, 10:00:07 AM5/27/23
to mnemosyne-proj-users
I'm sorry. Saw the notification but forgot about it again. Did a quick and dirty upgrade of a lot of stuff. It should run now again but only in english.

Johannes Hermann

unread,
May 27, 2023, 11:31:04 AM5/27/23
to mnemosyne-proj-users
Patched correct translations path. Works now, too.

Sebastian Turzański

unread,
May 29, 2023, 6:43:43 AM5/29/23
to mnemosyne-...@googlegroups.com
Thanks a lot Johannes,

I tested and it works.

Peter, are you OK with me submitting the app to the Flathub or you want to do it yourself?

Peter Bienstman

unread,
May 29, 2023, 7:52:56 AM5/29/23
to mnemosyne-proj-users
Reply all
Reply to author
Forward
0 new messages