diff --git a/app/assets/images/minecraft.icns b/app/assets/images/minecraft.icns new file mode 100644 index 0000000..60ce69d Binary files /dev/null and b/app/assets/images/minecraft.icns differ diff --git a/app/assets/js/preloader.js b/app/assets/js/preloader.js index 7ed19ac..6cd68be 100644 --- a/app/assets/js/preloader.js +++ b/app/assets/js/preloader.js @@ -19,7 +19,7 @@ if(ConfigManager.getSelectedServer() == null){ ConfigManager.save() } -// Clean up temp dir. +// Clean up temp dir incase previous launches ended unexpectedly. rimraf(path.join(os.tmpdir(), ConfigManager.getTempNativeFolder()), (err) => { if(err){ console.warn('Error while cleaning temp dir', err) diff --git a/app/assets/js/processbuilder.js b/app/assets/js/processbuilder.js index 8332c29..adf8d21 100644 --- a/app/assets/js/processbuilder.js +++ b/app/assets/js/processbuilder.js @@ -116,6 +116,11 @@ class ProcessBuilder { this.classpathArg(mods, tempNativePath).join(process.platform === 'win32' ? ';' : ':'), this.forgeData.mainClass] + if(process.platform === 'darwin'){ + args.unshift('-Xdock:name=WesterosCraft') + args.unshift('-Xdock:icon=' + path.join(__dirname, '..', 'images', 'minecraft.icns')) + } + // For some reason this will add an undefined value unless // the delete count is 1. I suspect this is unintended behavior // by the function.. need to keep an eye on this.