Skip to content
Snippets Groups Projects
Commit e383edbc authored by Roman Shishkin's avatar Roman Shishkin
Browse files

Use new default config and split show_progress

parent 9bb246b4
No related branches found
Tags 2.0
No related merge requests found
Pipeline #3911 canceled
......@@ -37,13 +37,18 @@ class Andesite(
logger.info("Using directory {}", baseDirectory)
var progressFrame: ProgressFrame? = null
if (launchConfig.show_progress) {
val os = PlatformTools.getOS()
if (
(os == "linux" && launchConfig.show_progress.linux) ||
(os == "windows" && launchConfig.show_progress.windows) ||
(os == "macos" && launchConfig.show_progress.macos)
) {
logger.info("Show download progress")
progressFrame = ProgressFrame()
}
logger.info("Sync Java bundle")
val javaVersion = "jre-${launchConfig.java_version}-${PlatformTools.getOS()}-${PlatformTools.getArch()}"
val javaVersion = "jre-${launchConfig.java_version}-${os}-${PlatformTools.getArch()}"
val javaBundle = updater.getBundle(javaVersion)
javaBundle.syncTo(baseDirectory.resolve(javaVersion)) { current, max ->
progressFrame?.updateProgress(javaBundle.name, current, max)
......
......@@ -14,10 +14,17 @@ data class Config(
data class LaunchConfig(
val java_version: String = "17",
val directory: String = ".",
val show_progress: Boolean = false,
val show_progress: ShowProgressConfig = ShowProgressConfig(),
val bundles: List<String> = listOf(),
val files: List<String> = listOf(),
val classpath: List<String> = listOf(),
val arguments: List<String> = listOf(),
val detach: Boolean = false,
)
@Serializable
data class ShowProgressConfig(
val linux: Boolean = false,
val windows: Boolean = false,
val macos: Boolean = false,
)
......@@ -3,7 +3,7 @@ package world.lipras.andesite
object Constants {
const val UPDATER_HOST = "https://updater.uwcdn.net"
const val CONFIGS_BUNDLE = "lipras-andesite-configs"
const val DEFAULT_CONFIG = "launcher.yml"
const val DEFAULT_CONFIG = "launcher-lipras-v1.yml"
const val WINDOW_TITLE = "Lipras.World"
const val WINDOW_HEIGHT = 100
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment