Merge pull request #1 from radmanplays/main

add desktop runtime compile script
This commit is contained in:
PeytonPlayz595 2024-04-15 23:11:57 -04:00 committed by GitHub
commit 4e6d20be7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 52 additions and 0 deletions

14
README.md Normal file
View 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

View 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'
}