1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2025-02-10 00:41:19 +01:00

MacOS custom dir support

This commit is contained in:
Jurek Weber 2016-10-18 21:17:29 -05:00
parent 64ed29f9c0
commit 4e16fce61f
2 changed files with 4 additions and 1 deletions

View File

@ -194,6 +194,8 @@ public class Bootstrap {
String osName = System.getProperty("os.name").toLowerCase();
if (osName.contains("win")) {
return new File(getFileChooseDefaultDir(), getProperties().getProperty("homeFolderWindows"));
} else if (osName.contains("mac") && getProperties().getProperty("homeFolderMac") != null) {
return new File(getFileChooseDefaultDir(), getProperties().getProperty("homeFolderMac"));
} else {
return new File(System.getProperty("user.home"), getProperties().getProperty("homeFolder"));
}

View File

@ -5,6 +5,7 @@
#
homeFolderWindows=Example Launcher
homeFolderMac=Library/Application Support/ExampleLauncher
homeFolder=.examplelauncher
launcherClass=com.skcraft.launcher.Launcher
latestUrl=http://update.skcraft.com/quark/launcher/latest.json
latestUrl=http://update.skcraft.com/quark/launcher/latest.json