PlumyGames / mgpp

The next generation of Mindustry modding.
https://plumygames.github.io/mgpp/
GNU General Public License v3.0
48 stars 3 forks source link

[v1.1.12] Cannot `runClient` on macOS #34

Closed liplum closed 1 year ago

liplum commented 1 year ago

Gradle Log

[W] Applying -XstartOnFirstThread for macOS support.

Since Mindustry is a libGDX project, the -XstartOnFirstThread is needed on macOS.

liplum commented 1 year ago

Before mgpp v1.1.13 release, as a workaround, you can add these lines into build.gradle.kts

import org.apache.tools.ant.taskdefs.condition.Os
// ... other codes
afterEvaluate {
    tasks.named<JavaExec>("runClient") {
        if (Os.isFamily(Os.FAMILY_MAC)) {
            jvmArgs = (jvmArgs ?: mutableListOf()) + "-XstartOnFirstThread"
        }
    }
}