Moved map viewer into tools:map-viewer

This commit is contained in:
Collin Smith 2020-11-20 22:44:43 -08:00
parent 980af282ab
commit a428615e5f
5 changed files with 47 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Map Viewer" type="Application" factoryName="Application" singleton="true">
<option name="MAIN_CLASS_NAME" value="com.riiablo.map.MapViewer" />
<module name="riiablo.tools" />
<module name="riiablo.tools.map-viewer" />
<option name="PROGRAM_PARAMETERS" value="&quot;C:\Program Files (x86)\Steam\steamapps\common\Diablo II&quot; 0 0 0" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/assets" />

View File

@ -7,3 +7,4 @@ include 'tools', 'ds1viewer', 'mpqviewer'
include 'tester'
include 'server:bnls', 'server:bncs', 'server:mcp', 'server:d2gs'
include 'server:netty'
include 'tools:map-viewer'

View File

@ -17,3 +17,22 @@ dependencies {
implementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
implementation "com.badlogicgames.box2dlights:box2dlights:$box2DLightsVersion"
}
subprojects {
apply plugin: 'java'
apply plugin: 'application'
dependencies {
implementation project(':core')
implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
implementation "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
implementation "commons-cli:commons-cli:$cliVersion"
implementation "com.kotcrab.vis:vis-ui:$visuiVersion"
}
dependencies {
testImplementation 'junit:junit:4.12'
}
}

View File

@ -0,0 +1,26 @@
application {
mainClass = 'com.riiablo.map.MapViewer'
}
run {
workingDir = rootProject.file('assets').path
setIgnoreExitValue(true)
// Required to run LWJGL3 java apps on MacOS
if (org.gradle.internal.os.OperatingSystem.current() == org.gradle.internal.os.OperatingSystem.MAC_OS) {
jvmArgs += "-XstartOnFirstThread"
}
}
jar {
archiveBaseName = project.name
dependsOn configurations.runtimeClasspath
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes 'Main-Class': application.mainClass
}
doLast {
file(archiveFile).setExecutable(true, false)
}
}