Retera / WarsmashModEngine

An emulation engine to improve Warcraft III modding
GNU Affero General Public License v3.0
192 stars 37 forks source link

Building on Windows fails #14

Closed tdauth closed 1 year ago

tdauth commented 2 years ago

See

WarsmashModEngine> gradlew.bat desktop:dist
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':fdfparser:compileJava'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_311 contains a valid JDK installation.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 7s
2 actionable tasks: 2 executed

It would be a good idea to add instructions for Windows users to the README since many will use Windows while playing Warcraft (I am not a fan of Windows).

Retera commented 2 years ago

I use Windows most of the time when building this project. Are you trying to compile the "main" branch or the "experimental" branch? At the time of writing, "experimental" is setup for using JDK17 but the "main" branch is still set to use JDK8.

It looks like you might be trying to compile on a computer that does not have JDK installed and only has JRE. I am not sure how familiar you are with that, but in concept JDK includes the compiler to build java programs while JRE only includes the interpreter to run java programs. So, rather than trying to compile against your "jre" folder, which says that the "tools.jar" is not found, I suggest that you make sure that your computer has a java compiler in order to build this program.

tdauth commented 2 years ago

I see, I will try with the JDK defined. Its installed by IntelliJ IDEA so it might not get found when building with the .bat file.

tdauth commented 1 year ago

Works now with JDK 17.