-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support auto-installation of box64 when required + fix libX11 loading…
… on Linux (#1459) * Fixes libX11 loading on Linux K/N * Support auto-installation of box64 when required * Some fixes allowing to run linuxX64 in arm box64 * Include Arm64 target
- Loading branch information
Showing
9 changed files
with
133 additions
and
28 deletions.
There are no files selected for viewing
73 changes: 63 additions & 10 deletions
73
buildSrc/src/main/kotlin/com/soywiz/korge/gradle/targets/CrossExecType.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
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
26 changes: 26 additions & 0 deletions
26
buildSrc/src/main/kotlin/com/soywiz/korge/gradle/util/SystemExec.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,26 @@ | ||
package com.soywiz.korge.gradle.util | ||
|
||
import java.io.* | ||
|
||
fun executeSystemCommand(command: Array<String>, cwd: File? = null, envs: Map<String, String>? = null): SystemExecResult { | ||
val output = StringBuilder() | ||
var exitCode = -1 | ||
val processBuilder = ProcessBuilder(*command) | ||
cwd?.let { processBuilder.directory(it) } | ||
envs?.let { processBuilder.environment().putAll(it) } | ||
processBuilder.redirectErrorStream(true) | ||
val process = processBuilder.start() | ||
BufferedReader(InputStreamReader(process.inputStream)).use { reader -> | ||
var line: String? | ||
while (reader.readLine().also { line = it } != null) { | ||
output.append(line).append("\n") | ||
println(line) | ||
} | ||
exitCode = process.waitFor() | ||
} | ||
return SystemExecResult(exitCode, output.toString()) | ||
} | ||
class SystemExecResult(var exitCode: Int, var stdout: String) { | ||
val success get() = exitCode == 0 | ||
val failed get() = !success | ||
} |
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
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