Coder Social home page Coder Social logo

Comments (8)

SomeTroglodyte avatar SomeTroglodyte commented on August 27, 2024 1

test this on your Linux systems

Nah, still some repair to do first.

Also, I remember vaguely experimenting with that months ago and dropping it, for whatever reason. You can bet your life insurance that it won't work 100% out of the box, for the same reasons jlink doesn't - analysis won't find some dependencies. That's possibly the trigger for that "without configuration". Plus, will it link the natives that come with Gdx? How will it deal with the assets? After all, a native image has different file structures on different platforms, not all possibly having provisions for "resource" streams, while a jar is a jar is a jar everywhere. Pretty likely it will not package them at all but need a separate subfolder, meaning another packaging layer..

But even more curious is that you seem to run Unciv with a Java-21-level runtime - I thought neither Gdx nor Gradle are 21-compatible yet?

from unciv.

touhidurrr avatar touhidurrr commented on August 27, 2024

Also, why would it be any better? What's the difference between out current standalones and that?

from #11909 (comment)

There are some improvements:

  1. Faster exec and startup times.
  2. Only ship one file (no need to zip)
  3. Possibly smaller size (due to having to ship no JRE's)
  4. No need for packr
  5. Overall better user experience (on systems such as Mac where to recommend java -jar Unciv.jar)

from unciv.

touhidurrr avatar touhidurrr commented on August 27, 2024

For some reason, standalone builds are successfully failing. Need to do more research.

from unciv.

touhidurrr avatar touhidurrr commented on August 27, 2024

Update: It is fast! But not complete.....

I am getting the error:

Warning: Aborting stand-alone image build due to dynamic proxy use without configuration.
Warning: Image 'Unciv' is a fallback image that requires a JDK for execution (use --no-fallback to suppress fallback image generation and to print more detailed information why a fallback image was necessary).

While only warnings, requires a JDK - is a kill switch for us. I did try the --no-fallback flag but it made an executable that crashed on runtime. The fallback binary is really fast though.

@yairm210 @SomeTroglodyte can you guys test this on your Linux systems?

The command is ./graalvm*/bin/native-image -jar Unciv.jar --gc=G1 -march=native.

from unciv.

touhidurrr avatar touhidurrr commented on August 27, 2024

https://www.graalvm.org/latest/reference-manual/native-image/

from unciv.

touhidurrr avatar touhidurrr commented on August 27, 2024

But even more curious is that you seem to run Unciv with a Java-21-level runtime - I thought neither Gdx nor Gradle are 21-compatible yet?

Java is pretty strongly backwards compatible. Not Java 21 compatible generally means that they don't support new features that comes with Java 21 or something like that. But that's a devtool synergy thing. Once a jar is compiled (Or code it written), you can run it with any higher JRE version as it is still backwards compatible. (APIs are deprecated but not removed)

At least for me, I am doing almost from the from the time I got my Windows laptop and has faced no problems so far. If I had, you would have seen an issue already. (lol)

from unciv.

touhidurrr avatar touhidurrr commented on August 27, 2024

Gradle are 21-compatible yet?

No, Gradle 8.8 that I use supports Java 21/22. See: https://docs.gradle.org/current/userguide/compatibility.html#kotlin

Yes, I currently use locally installed gradle, not the ./gradlew.bat that is shipped with Unciv. I used that also with JRE 21 with almost no issues. Just needed to set jvmToolchain(21) manually. (But that's more like a soft limit) With locally installed gradle, things changes though. As it makes it much better! IDE no longer keeps telling you to update gradle for every project and so on!

from unciv.

touhidurrr avatar touhidurrr commented on August 27, 2024

Although, I did need to downgrade to GraalVM 21 from 22 mainly because of lagging issues not stability issues. I often noticed lags with GraalVM 22 while opening multiple IDE's at the same time. But I guess that's an optimization issue with their version 22. But that's to be expected as 22 is a current release and 21 is LTE.

from unciv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.