Skip to content

Commit

Permalink
Temporary workaround for MovingBlocks#414 - avoid splash screen on Ma…
Browse files Browse the repository at this point in the history
…c (and partially elsewhere)

Breaks use of embedded JRE on Macs which needs to be re-enabled when the splash mystery is puzzled out
  • Loading branch information
Cervator committed Jun 2, 2019
1 parent 6fb8de1 commit 8f2a2b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions config/gradle/ide.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ ext {
// Add our run configs - this one launches with homedir set to local and the Crash Reporter off
def runManager = iwsNode.find { it.@name == 'RunManager' }
// TODO: Probably should make these run config blocks generic already ...
// TODO: Undo the -noSplash tag and -XstartOnFirstThread when the splash screen works on Macs again. See https://github.com/MovingBlocks/DestinationSol/issues/414
runManager.append(new XmlParser().parseText('''
<configuration default="false" name="DestSol" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" runner="idea">
Expand All @@ -99,8 +100,8 @@ ext {
</pattern>
</extension>
<option name="MAIN_CLASS_NAME" value="org.destinationsol.desktop.SolDesktop"/>
<option name="VM_PARAMETERS" value="-splash:engine/src/main/resources/assets/textures/mainMenu/mainMenuLogo.png -Xms256m -Xmx1024m -Dlog4j.configuration=log4j-debug.properties"/>
<option name="PROGRAM_PARAMETERS" value="-noCrashReport"/>
<option name="VM_PARAMETERS" value="-splash:engine/src/main/resources/assets/textures/mainMenu/mainMenuLogo.png -XstartOnFirstThread -Xms256m -Xmx1024m -Dlog4j.configuration=log4j-debug.properties"/>
<option name="PROGRAM_PARAMETERS" value="-noCrashReport -noSplash"/>
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$"/>
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"/>
<option name="ALTERNATIVE_JRE_PATH" value=""/>
Expand Down
5 changes: 4 additions & 1 deletion desktop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ dependencies {

task run(type: JavaExec) {
dependsOn classes
jvmArgs = ["-splash:../engine/src/main/resources/assets/textures/mainMenu/mainMenuLogo.png", "-Dlog4j.configuration=log4j-debug.properties"]
jvmArgs = ["-splash:../engine/src/main/resources/assets/textures/mainMenu/mainMenuLogo.png", "-XstartOnFirstThread", "-Dlog4j.configuration=log4j-debug.properties"]
//TODO: Remove extra args when the splash screen works on Macs again - see https://github.com/MovingBlocks/DestinationSol/issues/414
String[] runArgs = ["-noSplash"]
args runArgs
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
Expand Down
4 changes: 3 additions & 1 deletion launcher/solOSX.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/usr/bin/env bash
lwjreOSX/bin/java -jar libs/solDesktop.jar
# TODO: Target the embedded JRE again when it'll listen to arguments or otherwise find the magic trick to allow that
#lwjreOSX/bin/java -XstartOnFirstThread -jar libs/solDesktop.jar -noSplash
java -XstartOnFirstThread -jar libs/solDesktop.jar -noSplash

0 comments on commit 8f2a2b1

Please sign in to comment.