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

[Feature Request] Linux Support #34

Open
Henry-Hiles opened this issue Sep 2, 2024 · 27 comments
Open

[Feature Request] Linux Support #34

Henry-Hiles opened this issue Sep 2, 2024 · 27 comments

Comments

@Henry-Hiles
Copy link

Hello! I'm not sure if it's possible, but it would be great if linux support could be added to this app.

I have a linux phone, and there currently aren't any good solitaire games (and this is the best I've seen for Android). Again, I have no GDX knowledge, so this might be impossible, sorry if so. If you can get it compiling for Linux, I can package it as a Flatpak and put it on Flathub, so it can be downloaded on any linux distro. Thanks!

@Henry-Hiles
Copy link
Author

Since libGDX is cross-platform, it should be possible, right?

@mimoguz
Copy link
Owner

mimoguz commented Sep 2, 2024

Since libGDX is cross-platform, it should be possible, right?

Probably? Apparently LibGDX already supports Linux on Arm, and the project genarator I used, gdx-liftoff, creates basic setup for cross-compiling lwjgl3 module using construo. I'd been able to create a Linux x64 runnable by simply running ./gradlew packageLinuxX64. I don't know anything about Linux phones though.

@mimoguz
Copy link
Owner

mimoguz commented Sep 2, 2024

A small upadate: I played with the build config a bit and was able to add Linux AARCH64 as a target. Now ./gradlew packageLinuxAARCH64 creates something 🙂. I don't know if that 'something' works though.

@Henry-Hiles
Copy link
Author

A small upadate: I played with the build config a bit and was able to add Linux AARCH64 as a target. Now ./gradlew packageLinuxAARCH64 creates something 🙂. I don't know if that 'something' works though.

If you've pushed that build config change I'll try it on my Linux phone later today :)

@mimoguz
Copy link
Owner

mimoguz commented Sep 2, 2024

If you've pushed that build config change I'll try it on my Linux phone later today :)

I did.

@Henry-Hiles
Copy link
Author

I ran it, where does it output to?

@mimoguz
Copy link
Owner

mimoguz commented Sep 2, 2024

I ran it, where does it output to?

lwjgl3/build/construo/<target OS & architecture>/roast/

@Henry-Hiles
Copy link
Author

ty

@Henry-Hiles
Copy link
Author

Hmm.
Screenshot from 2024-09-02 14-33-55

@Henry-Hiles
Copy link
Author

Got a better error:
Screenshot from 2024-09-02 14-36-24

@Henry-Hiles
Copy link
Author

ah
Screenshot from 2024-09-02 14-41-28

@mimoguz
Copy link
Owner

mimoguz commented Sep 2, 2024

But it's there, right?

Screenshot from 2024-09-02 21-45-42

Or not. It's complaining about ld-linux...

@Henry-Hiles
Copy link
Author

Looks related to this?: 00-Evan/shattered-pixel-dungeon#385 (comment)

@Henry-Hiles
Copy link
Author

What version of libgdx is used

@Henry-Hiles
Copy link
Author

But it's there, right?

Screenshot from 2024-09-02 21-45-42

Or not. It's complaining about ld-linux...

wait a second, thats not there for me

@Henry-Hiles
Copy link
Author

oh did you unpack the jar

@mimoguz
Copy link
Owner

mimoguz commented Sep 2, 2024

oh did you unpack the jar

Yes

@Henry-Hiles
Copy link
Author

Oh yeah its in the unpacked jar.

@mimoguz
Copy link
Owner

mimoguz commented Sep 2, 2024

Maybe that? : https://forums.raspberrypi.com/viewtopic.php?t=357800. 32 bit OS?

@Henry-Hiles
Copy link
Author

Certainly I'm not on 32 bit, its arm64

@Henry-Hiles
Copy link
Author

Looks related to this?: 00-Evan/shattered-pixel-dungeon#385 (comment)

Did you see this? What version of libgdx is being used? Also maybe this? libgdx/libgdx#1127

@Henry-Hiles
Copy link
Author

shattered-pixel-dungeon definitely has a working flatpak linux aarch64 build (ive played it)

@mimoguz
Copy link
Owner

mimoguz commented Sep 2, 2024

Did you see this? What version of libgdx is being used? Also maybe this? libgdx/libgdx#1127

gdxVersion=1.12.1

Well native libs are there, and linuxX64 build works 😐

@mimoguz
Copy link
Owner

mimoguz commented Sep 20, 2024

Quite a late and probably unhelpful addition: I finally grabbed a micro-HDMI adapter, hooked my Raspberry Pi 4 to a monitor, and tried the AARCH64 build there. It just worked:
20240920_21h16m18s_grim

So, I think the build artifacts are not the issue on your phone.

@Henry-Hiles
Copy link
Author

Hmm. Ill test again soon, but maybe libgdx requires glibc rather than musl?

@mimoguz
Copy link
Owner

mimoguz commented Sep 20, 2024

maybe libgdx requires glibc rather than musl?

That might be the problem yeah.
libgdx/libgdx#6983

@Henry-Hiles
Copy link
Author

Great! This means we just need to flatpak it and it'll work I think! (or we need to wait for that issue to br fixed maybe)

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