Open Goooler opened 1 week ago
Workaround:
/**
* TODO: workaround for https://github.com/JetBrains/compose-multiplatform/issues/4976.
*/
val renameDmg by tasks.registering(Copy::class) {
group = "distribution"
description = "Rename the DMG file"
val packageDmg = tasks.named<AbstractJPackageTask>("packageDmg")
// build/compose/binaries/main/dmg/*.dmg
val fromFile = packageDmg.map {
it.appImage.get().dir("../dmg").asFile.toPath()
.listDirectoryEntries("$baseName*.dmg").single()
}
from(fromFile)
into(fromFile.map { it.parent })
rename {
"kotlin-explorer-$currentArch-$version.dmg"
}
}
Now I configure the macOS output dist name like:
This will generate the output dmg files like
Foo-1.0.dmg
, if I want to rename the dist will setpackageName
to something likefoo-x64
, but this will lead the extracted app name tofoo-x64-1.0.app
, which is not what I expected. Seems I don't find any direct way to leave the dist name and the app name different. It would be great to support this feature.