flathub / org.godotengine.Godot

Godot engine
https://flathub.org/apps/details/org.godotengine.Godot
37 stars 23 forks source link

Try to fix SDK extension installation with Godot Flatpak #160

Closed Zishan-Rahman closed 4 months ago

Zishan-Rahman commented 6 months ago

When I tried to install the test build for #158, it seemed that the OpenJDK 17 SDK extension didn't install with it. In fact, I can't find a JDK in there at all.

Upon finding out #158 had just been merged before I got to fixing it, I thought I'd try to fix it with this PR, otherwise Android builds will be basically non-existent. Please do not merge this PR until we're absolutely sure Android exports can be built with it. I'm going to test it myself each time the test build succeeds, and I highly encourage others who want to test each coming test build to do the same.

flathubbot commented 6 months ago

Started test build 103234

flathubbot commented 6 months ago

Build 103234 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/86014/org.godotengine.Godot.flatpakref
j20001970 commented 6 months ago

Build 103234 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/86014/org.godotengine.Godot.flatpakref

I tried to install from this command, but OpenJDK doesn't get installed along with it , is it normal?

Zishan-Rahman commented 6 months ago

I tried to install from this command, but OpenJDK doesn't get installed along with it , is it normal?

It shouldn't be, I set no-autodownload to false for the SDK extension in org.godotengine.Godot.yaml. It's likely the way I wrote the add-extensions part in the manifest, but I'm trying to figure out why the SDK extension's not being installed.

Of course, if anyone else has any suggestions on their own, I'd be happy to look into those.

flathubbot commented 6 months ago

Started test build 103296

flathubbot commented 6 months ago

Build 103296 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/86076/org.godotengine.Godot.flatpakref
j20001970 commented 6 months ago

We can try add sdk-extensions back:

sdk-extensions:
   - org.freedesktop.Sdk.Extension.openjdk17
j20001970 commented 6 months ago

We can try add sdk-extensions back:

sdk-extensions:
   - org.freedesktop.Sdk.Extension.openjdk17

Nvm, that did not work.

flathubbot commented 6 months ago

Started test build 103390

flathubbot commented 6 months ago

Build 103390 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/86171/org.godotengine.Godot.flatpakref
Zishan-Rahman commented 6 months ago

OK, it created an /app/jdk folder, as instructed by the change(s) in this commit I just pushed, but nothing's in there. That's strange, but I must keep looking into this.

DekosAnjo commented 6 months ago

looking at others repositories, it's missing this:

modules:
  - name: jre
    buildsystem: simple
    build-commands:
      - mkdir -p /app/jdk
      - ln -s jdk/jvm/openjdk-17 /app/jre
flathubbot commented 6 months ago

Started test build 104138

flathubbot commented 6 months ago

Build 104138 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/86928/org.godotengine.Godot.flatpakref
Calinou commented 6 months ago

Ping me when this is OK to merge, by the way 🙂

DekosAnjo commented 6 months ago

did it work?

Zishan-Rahman commented 6 months ago

did it work?

I don't remember it working when I tried installing it after the test build succeeded, but now that the test build's removed from the Buildbot server, I'll rebuild it now and try again.

Zishan-Rahman commented 6 months ago

bot, build

flathubbot commented 6 months ago

Queued test build for org.godotengine.Godot.

flathubbot commented 6 months ago

Started test build 105073

flathubbot commented 6 months ago

Build 105073 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/87878/org.godotengine.Godot.flatpakref
Zishan-Rahman commented 6 months ago

did it work?

I don't remember it working when I tried installing it after the test build succeeded, but now that the test build's removed from the Buildbot server, I'll rebuild it now and try again.

Nope. Still nothing.

j20001970 commented 6 months ago

/app/jdk does contain OpenJDK files, but only when I install org.freedesktop.Sdk.Extension.openjdk17 manually.

DekosAnjo commented 6 months ago

I don't think this method is solving the problem. Is it okay if I try a different approach @Zishan-Rahman ?

edit: i will send a PR just to speed things up. but feel free to say something

Calinou commented 6 months ago

Note that https://github.com/flathub/org.godotengine.Godot/pull/161 was merged in the meantime.

Zishan-Rahman commented 4 months ago

bot, build

flathubbot commented 4 months ago

Queued test build for org.godotengine.Godot.

flathubbot commented 4 months ago

Started test build 116845

flathubbot commented 4 months ago

Build 116845 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/99663/org.godotengine.Godot.flatpakref
flathubbot commented 4 months ago

Started test build 116847

flathubbot commented 4 months ago

Build 116847 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/99665/org.godotengine.Godot.flatpakref
Calinou commented 4 months ago

Is this OK to merge now?

flathubbot commented 4 months ago

Started test build 117801

flathubbot commented 4 months ago

Build 117801 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/100627/org.godotengine.Godot.flatpakref
flathubbot commented 4 months ago

Started test build 117807

flathubbot commented 4 months ago

Build 117807 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/100633/org.godotengine.Godot.flatpakref
Zishan-Rahman commented 4 months ago

I apologise for the lack of activity from my end here since March.

I've been looking at @j20001970's comment for a while:

/app/jdk does contain OpenJDK files, but only when I install org.freedesktop.Sdk.Extension.openjdk17 manually.

And I realised that the test Flatpak builds on a custom remote called godot-origin (all test builds do this with a -origin remote containing the tail-end of their ID), whereas the extension would (I assume) be installed from the flathub remote obviously pointing to Flathub. Therefore, I assume that when installing from Flathub after this gets merged, org.freedesktop.Sdk.Extension.openjdk17 should install automatically with this Flatpak, as extensions do for other Flatpaks on Flathub when they are set to do so in their manifests, since both this Flatpak and the extension will be on the same Flathub remote.

I definitely wish there was a more robust way to test this before pushing changes like this to Flathub, but for now the only way we'll know if it works on Flathub is if we merge it and see for ourselves once the modified Flatpak goes live. So:

Is this OK to merge now?

@Calinou I'm going to suggest you merge it and we'll see what happens. It's a good thing you merged @DekosAnjo's PR first (thanks for your PR, @DekosAnjo, and sorry for not replying to your earlier message). Hopefully, if this ends up working, I can start working on getting Flatpak External Data Checker settings into this Flatpak in order to get #163 resolved. And, finally, sorry for all the pings.

Zishan-Rahman commented 4 months ago

It appears that the official build taken from this PR merge hasn't been published to Flathub yet. I can't publish it myself as I don't have commit permissions to this repository.

j20001970 commented 4 months ago

It appears that the official build taken from this PR merge hasn't been published to Flathub yet. I can't publish it myself as I don't have commit permissions to this repository.

We'll have to wait for it to see if the PR actually work I guess?

Edit: After today's reinstalling org.godotengine.Godot, OpenJdk17 will be installed together!