-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fetch the project information from neptune
- Loading branch information
1 parent
b6c340f
commit fd5bff8
Showing
5 changed files
with
95 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/kotlin/io/runescript/plugin/ide/execution/neptuneExeUtil.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.runescript.plugin.ide.execution | ||
|
||
import com.intellij.execution.configurations.GeneralCommandLine | ||
import com.intellij.openapi.projectRoots.JavaSdk | ||
import com.intellij.openapi.projectRoots.Sdk | ||
import java.io.File | ||
|
||
fun createNeptuneJvmCommand( | ||
javaSdk: Sdk, | ||
neptuneHome: File, | ||
workDirectory: String | ||
) = createNeptuneJvmCommand(JavaSdk.getInstance().getVMExecutablePath(javaSdk), neptuneHome, workDirectory) | ||
|
||
fun createNeptuneJvmCommand( | ||
vmExecutablePath: String, | ||
neptuneHome: File, | ||
workDirectory: String | ||
) = GeneralCommandLine() | ||
.withExePath(vmExecutablePath) | ||
.withParameters(createNeptuneJvmArgs(neptuneHome.toString())) | ||
.withWorkDirectory(workDirectory) | ||
.withEnvironment(System.getenv()) | ||
|
||
private fun createNeptuneJvmArgs( | ||
homeDirectory: String | ||
): MutableList<String> { | ||
val args = mutableListOf<String>() | ||
args += "-classpath" | ||
args += "$homeDirectory${File.separator}lib${File.separator}*" | ||
args += "me.filby.neptune.clientscript.compiler.ClientScriptCompilerApplicationKt" | ||
return args | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters