jmonkeyengine icon indicating copy to clipboard operation
jmonkeyengine copied to clipboard

Add a “How to build engine from source” section in the README file

Open capdevon opened this issue 1 year ago • 5 comments

Hi everyone, It would be helpful to include a section in the README file that explains how to build the engine from source code, similar to what Stephen does in his projects.

@stephengold , could you please add this section?

capdevon avatar Aug 23 '24 22:08 capdevon

Sure, if there's consensus for the change.

The build instructions in the Wiki don't satisfy the need? https://wiki.jmonkeyengine.org/docs/3.4/getting-started/build_from_sources.html

stephengold avatar Aug 23 '24 23:08 stephengold

What instructions did you envision beyond: ./gradlew install ? ...which is literally what I expect from any gradle project, to be honest. Not being snarky... just wondering if we are somehow making this sound harder than it is.

pspeed42 avatar Aug 23 '24 23:08 pspeed42

  • People unfamiliar with Git need to be told how to clone the repo.
  • ./gradlew install won't work at the Windows command prompt, which uses \ as the file path separator.
  • ./gradlew install assumes you have a JDK installed and it's on your exec path.
  • ./gradlew install assumes your working directory contains the gradlew and gradlew.bat scripts.
  • Unlike the build task, the install task is a custom task, not standard Gradle.
  • People unfamiliar with Gradle need to be told about the run and clean tasks as well.

stephengold avatar Aug 24 '24 15:08 stephengold

We could add JDK automatic download to the Gradle script. If I'm not mistaken, adding:

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(xx)
    }
}

will specify the Java version needed for the project and download the appropriate JDK if no compatible ones found. Of course this setting affects other things but something to consider. https://docs.gradle.org/current/userguide/toolchains.html

tonihele avatar Aug 24 '24 15:08 tonihele

Ah, I see we are talking about instructions for "someone who has never built a Java project before" and not "someone who has build lots of Java projects before." I have no opinion on what's appropriate for a README.md file where you already have to have stumbled into GIT to even see it.

Otherwise, the wiki has really nice "I've never built a Java project before but somehow I still want to build JME from source" instructions.

pspeed42 avatar Aug 24 '24 15:08 pspeed42

I appreciate Stephen's practice of including clear instructions directly in project READMEs. It's much more accessible than relying on outdated wiki that has not been updated since version 3.4 of the engine.

To attract more contributors, let's consider adopting similar practices. Even small details like up-to-date READMEs can make a big difference. Many potential contributors may not consult the wiki, so let's make onboarding as smooth as possible.

capdevon avatar Oct 26 '24 15:10 capdevon