Skip to content

Commit

Permalink
MacPackage: Add Bisq 1 icon support
Browse files Browse the repository at this point in the history
  • Loading branch information
alvasw committed Jun 24, 2024
1 parent defb288 commit 2694a46
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import java.nio.file.Path
class MacPackage(private val resourcesPath: Path, private val appName: String) : JPackagePackageFormatConfigs {
override val packageFormats = setOf(PackageFormat.DMG)

override fun createArgumentsForJPackage(packageFormat: PackageFormat): List<String> =
mutableListOf(
"--resource-dir", resourcesPath.toAbsolutePath().toString(),
"--mac-package-name", appName,
"--icon", resourcesPath.resolve("Bisq2.icns").toAbsolutePath().toString(),
)
override fun createArgumentsForJPackage(packageFormat: PackageFormat): List<String> {
// App name is "Bisq" or "Bisq 2"
val iconFileName = "${appName.replace(" ", "")}.icns"
return mutableListOf(
"--resource-dir", resourcesPath.toAbsolutePath().toString(),
"--mac-package-name", appName,
"--icon", resourcesPath.resolve(iconFileName).toAbsolutePath().toString(),
)
}
}

0 comments on commit 2694a46

Please sign in to comment.