From 18b9962493aaff9f64d18b390e695dc5341b2181 Mon Sep 17 00:00:00 2001 From: radmanplays <95340057+radmanplays@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:42:41 +0330 Subject: [PATCH 1/2] Create build-desktopruntime.gradle --- build-desktopruntime.gradle | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 build-desktopruntime.gradle 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' +} From 4073f51a180a14107edfbdbb7a34a060ec12b941 Mon Sep 17 00:00:00 2001 From: radmanplays <95340057+radmanplays@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:52:56 +0330 Subject: [PATCH 2/2] Create README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 README.md 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