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

iRASPA packaged as Flatpak #6

Open
kevinsmia1939 opened this issue Jun 20, 2022 · 1 comment
Open

iRASPA packaged as Flatpak #6

kevinsmia1939 opened this issue Jun 20, 2022 · 1 comment

Comments

@kevinsmia1939
Copy link

kevinsmia1939 commented Jun 20, 2022

Hi,
I tried to package iRASPA as Flatpak.
Here is the manifest https://github.com/kevinsmia1939/flathub/tree/org.iraspa.iRASPA
Right now it compile and run, however, the log console show.

error (10:28:54): Gallery database not found
error (10:28:54): IZA database not found
error (10:28:54): CoREMOF database not found
error (10:28:54): CoREMOF-DDEC database not found
verbose (10:28:54): OpenGL initialized
verbose (10:28:54): OpenGL major version: 3
verbose (10:28:54): OpenGL major version: 3
verbose (10:28:54): OpenGL core profile
verbose (10:28:54): max texture size: 32768
verbose (10:28:54): multisampling: 8
verbose (10:28:54): pixel device ratio: 1

In my flatpak manifest, I did install them like this.

      - install -m 644 iraspa/datafiles/databasecoremof.irspdoc ${FLATPAK_DEST}/share/iraspa
      - install -m 644 iraspa/datafiles/databasecoremofddec.irspdoc ${FLATPAK_DEST}/share/iraspa
      - install -m 644 iraspa/datafiles/databaseiza.irspdoc ${FLATPAK_DEST}/share/iraspa
      - install -m 644 iraspa/datafiles/libraryofstructures.irspdoc ${FLATPAK_DEST}/share/iraspa
      - install -m 644 iraspa/datafiles/license-gpl.pdf ${FLATPAK_DEST}/share/iraspa
      - install -m 644 iraspa/datafiles/acknowledgedlicenses.pdf ${FLATPAK_DEST}/share/iraspa
      - install -Dm 644 iraspa/datafiles/iraspa.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop

where ${FLATPAK_DEST} corresponds to /app
I assume iRASPA just don't know where to look for them, how do I change this?
Also, would you be ok if I submit this to Flathub? I will keep it update, but the core devs would be invite to be the maintainer as well.

Also, the idea of adding RASPA into iRASPA flatpak comes to mind, would it make sense?
Thanks.

@dubbelda
Copy link
Member

In 'MainWindow::readDatabase' in file 'iraspagui/mainwindow.cpp', there is:
#ifdef USE_SNAP
QDir dir("/snap/iraspa/current/usr/share/iraspa/");
#else
QDir dir("/usr/share/iraspa/");
//QDir dir(QCoreApplication::applicationDirPath());
#endif

So, the default location is "/usr/share/iraspa/". You could add -DFLATPAK when compiling and:
#ifdef USE_SNAP
QDir dir("/snap/iraspa/current/usr/share/iraspa/");
#elif FLATPAK
QDir dir("flatpak-location");
#else
QDir dir("/usr/share/iraspa/");
//QDir dir(QCoreApplication::applicationDirPath());
#endif
and fill in the appropriate flatpak location.

Submitting to Flathub is fine. One issue with snaps and flatpaks is that OpenCL is not supported and iRASPA falls back to CPU-computation for certain computations.

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

2 participants