Skip to content

Commit bd30980

Browse files
authored
Making the generated batch file set user.dir so relative path lookups work. (RLBot#12)
1 parent a04b6f9 commit bd30980

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ mainClassName = 'rlbotexample.JavaExample'
1515
// This directory will be created and the interface dll copied into it at runtime.
1616
// The end result is that the interface dll will be available for loading.
1717
def dllDirectory = 'build/dll'
18-
applicationDefaultJvmArgs = ["-Djna.library.path=" + dllDirectory]
18+
19+
applicationDefaultJvmArgs = ["-Djna.library.path=" + dllDirectory, "-Duser.dir=MY_WORKING_DIR"]
20+
21+
// https://www.mkyong.com/gradle/gradle-application-plugin-app_home-in-applicationdefaultjvmargs/
22+
startScripts {
23+
doLast {
24+
windowsScript.text = windowsScript.text.replace('MY_WORKING_DIR', "%~dp0.")
25+
}
26+
}
1927

2028
dependencies {
2129
// Fetch the framework jar file

0 commit comments

Comments
 (0)