mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 17:59:11 +07:00
Add .ico file to Windows distribution
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
import com.google.common.io.Files
|
||||||
import com.unciv.build.BuildConfig
|
import com.unciv.build.BuildConfig
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@ -159,6 +160,7 @@ for (platform in Platform.values()) {
|
|||||||
" --vmargs Xmx1G " +
|
" --vmargs Xmx1G " +
|
||||||
" --output ${config.outDir}"
|
" --output ${config.outDir}"
|
||||||
command.runCommand(rootDir)
|
command.runCommand(rootDir)
|
||||||
|
Files.copy(File("$rootDir/extraImages/Icons/Unciv.ico"), File(config.outDir, "Unciv.ico"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Zip>("zip${platformName}") {
|
tasks.register<Zip>("zip${platformName}") {
|
||||||
|
@ -122,16 +122,16 @@ internal object DesktopLauncher {
|
|||||||
HardenGdxAudio(DesktopGame(config, customDataDir), config)
|
HardenGdxAudio(DesktopGame(config, customDataDir), config)
|
||||||
exitProcess(0)
|
exitProcess(0)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun updateDockIconForMacOs(fileName: String) {
|
private fun updateDockIconForMacOs(fileName: String) {
|
||||||
try {
|
try {
|
||||||
val defaultToolkit: Toolkit = Toolkit.getDefaultToolkit()
|
val defaultToolkit: Toolkit = Toolkit.getDefaultToolkit()
|
||||||
val imageResource: URL = FileHandle(fileName).file().toURI().toURL()
|
val imageResource: URL = FileHandle(fileName).file().toURI().toURL()
|
||||||
val image: Image = defaultToolkit.getImage(imageResource)
|
val image: Image = defaultToolkit.getImage(imageResource)
|
||||||
val taskbar = Taskbar.getTaskbar()
|
val taskbar = Taskbar.getTaskbar()
|
||||||
taskbar.iconImage = image
|
taskbar.iconImage = image
|
||||||
} catch (throwable: Throwable) {
|
} catch (throwable: Throwable) {
|
||||||
throwable.printStackTrace()
|
throwable.printStackTrace()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user