Add a “How to build engine from source” section in the README file
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?
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
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.
- People unfamiliar with Git need to be told how to clone the repo.
-
./gradlew installwon't work at the Windows command prompt, which uses\as the file path separator. -
./gradlew installassumes you have a JDK installed and it's on your exec path. -
./gradlew installassumes your working directory contains thegradlewandgradlew.batscripts. - Unlike the
buildtask, theinstalltask is a custom task, not standard Gradle. - People unfamiliar with Gradle need to be told about the
runandcleantasks as well.
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
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.
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.