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

Create Flatpak image for AwesomeBump #151

Open
hcw70 opened this issue Sep 5, 2019 · 6 comments
Open

Create Flatpak image for AwesomeBump #151

hcw70 opened this issue Sep 5, 2019 · 6 comments

Comments

@hcw70
Copy link

hcw70 commented Sep 5, 2019

To create a Flatpak image for AwesomeBump would be a good way to provide an unified binary for all linux variants and lower the entry barriers for using a great tool more easily....

See also flatpak/flatpak#875

@kmkolasinski
Copy link
Owner

I have managed to create a working manifest file for flatpak-builder. However, I'm still not sure how to publish the image to fluthub etc. Here is mine first iteration of the manifest file:

{
    "app-id": "org.kde.AwesomeBump",
    "branch": "Release",
    "build-options": {
        "no-debuginfo": true,
        "strip": true
    },
    "command": "awesomebump",
    "finish-args": [
        "--share=ipc",
        "--socket=x11",
        "--socket=system-bus",
        "--device=dri",
        "--filesystem=home",
        "--own-name=org.kde.AwesomeBump"
    ],
    "modules": [
        {
            "name": "AwesomeBump",
            "no-autogen": true,
            "no-make-install": false,
            "no-parallel-make": false,
            "sources": [
                {
                    "branch": "Release",
                    "type": "git",
                    "url": "https://github.com/kmkolasinski/AwesomeBump"
                },
                {
                    "commands": [
                       "qmake ./AwesomeBump.pro 'CONFIG+=gl330'", "make clean", "make -j 8"
                    ],
                    "dest-filename": "configure",
                    "type": "script"
                }
            ],
            "build-commands": [
                "install -D /run/build/AwesomeBump/workdir/linux-g++-gl3/bin/AwesomeBump /app/bin/AwesomeBump",
                "cp -r /run/build/AwesomeBump/Bin/Configs /app/bin/Configs",
                "cp -r /run/build/AwesomeBump/Bin/Core /app/bin/Core", 
                "echo '#!/bin/bash\ncd /app/bin/\n./AwesomeBump' > /app/bin/awesomebump", "chmod +x /app/bin/awesomebump"
            ]
        }
    ],
    "runtime": "org.kde.Platform",
    "runtime-version": "5.12",
    "sdk": "org.kde.Sdk",
    "separate-locales": false
}

Build with:

flatpak-builder --force-clean  build manifest.json

I'm not sure how to deal with different runtimes versions e.g. Gnome and KDE and the same for AB versions like 5.1,5.2 etc, as well as with GL330 binary: AwesomeBump vs AwesomeBumpGL330.

@hcw70
Copy link
Author

hcw70 commented Sep 12, 2019

Great news!
For submitting to flathub, see https://github.com/flathub/flathub/wiki/App-Submission#how-to-submit-an-app .
Regarding different runtime versions:
The thing of flatpak is that your app comes with its own fitting runtime environment (so with a correct NVIDIA driver).
About GL330 i dont know what the diff is between those two, if they obey different runtime requirements, this is not an issue since you bring your own runtime with your app.

If the issue is with NVIDIA / non NVIDIA cards, maybe you should define variants of your app, i.e. AB-NVidida, AB-Radeon... (dunno the details here since i didnt yet build a flatpak yet).....
Maybe you can also include a runtime which includes all graphics drivers already.

Maybe a mesa-only variant may be needed also....
See i.e. https://askubuntu.com/questions/1114324/why-do-i-need-to-install-nvidia-driver-for-flatpak-applications or https://www.linuxuprising.com/2018/06/how-to-get-flatpak-apps-and-games-built.html ...

@Calinou
Copy link
Collaborator

Calinou commented Sep 12, 2019

You could include both AwesomeBump binaries in the same Flatpak. Users whose hardware doesn't support OpenGL 4.x can run the AwesomeBumpGL330 binary manually using flatpak run. This way, you only create a single app manifest.

Since OpenGL 4.x is supported on most hardware by now (including Mesa drivers), it should probably be fine.

@kmkolasinski
Copy link
Owner

I made a PR to flathub flathub/flathub#1161

@hcw70
Copy link
Author

hcw70 commented Sep 16, 2019

Build fails:

flatpak-builder --download-only --no-shallow-clone --allow-missing-runtimes --state-dir=/srv/buildbot/sources /srv/buildbot/sources/.builddir ""
 in dir /srv/buildbot/worker/download-sources/build (timeout 3600 secs)
 watching logfiles {}
 argv: [b'flatpak-builder', b'--download-only', b'--no-shallow-clone', b'--allow-missing-runtimes', b'--state-dir=/srv/buildbot/sources', b'/srv/buildbot/sources/.builddir', b'']
 using PTY: True
Can't load '': Error reading file “/srv/buildbot/worker/download-sources/build”: Is a directory
program finished with exit code 1
elapsedTime=0.044290

@kmkolasinski
Copy link
Owner

Thanks, I saw it, but now I have no time to dig into this problem. Do you guys have idea where is the problem:

Can't load '': Error reading file “/srv/buildbot/worker/download-sources/build”: Is a directory

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

No branches or pull requests

3 participants