diff --git a/README.md b/README.md new file mode 100644 index 0000000..064f30a --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Shadow-4.0 + + +# Compiling desktop runtime +1. download the zip of this repo or make a github codespace (extract the zip to a folder if you downloaded a zip) +2. rename build.gradle to build-teavm.gradle or anything else +3. rename build-desktopruntime.gradle to build.gradle +4. open a terminal or cmd in the folder with the repo and type `./gradlew jar` + +# Running desktop runtime without compiling to jar +note: this dosnt work on github codespaces +1. follow step 1 through 3 of "Compiling desktop runtime" +2. open a terminal or cmd in the folder with the repo and type `./gradlew runclient` +3. wait for it to compile the classes diff --git a/build-desktopruntime.gradle b/build-desktopruntime.gradle new file mode 100644 index 0000000..e02ad00 --- /dev/null +++ b/build-desktopruntime.gradle @@ -0,0 +1,38 @@ +//rename this file to build.gradle + + +plugins { + id 'java' + id 'eclipse' +} + +sourceSets { + main { + java { + srcDir 'src/main/java' + srcDir 'src/lwjgl/java' + } + } +} + +repositories { + mavenCentral() +} + +// https://stackoverflow.com/questions/21037879/add-library-to-gradle-build +dependencies { + implementation fileTree(dir: './desktopRuntime/eclipseProject/deps_fix/', include: '*.jar') +} + +//credit to MCPreborn +tasks.register('runclient', JavaExec) { + group = "ShadowClient" + description = "Runs the client" + classpath sourceSets.main.runtimeClasspath + if (System.getProperty("os.name").toLowerCase().contains("mac")) { + jvmArgs '-XstartOnFirstThread' + } + + workingDir "./desktopRuntime" + main 'net.lax1dude.eaglercraft.v1_8.internal.lwjgl.MainClass' +}