Merge pull request #1 from radmanplays/main
add desktop runtime compile script
This commit is contained in:
commit
4e6d20be7c
14
README.md
Normal file
14
README.md
Normal file
|
@ -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
|
38
build-desktopruntime.gradle
Normal file
38
build-desktopruntime.gradle
Normal file
|
@ -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'
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user