Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging: Dynamically set linux package name #2324

4 changes: 4 additions & 0 deletions apps/desktop/desktop-app-launcher/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ application {
mainClass.set("bisq.desktop_app_launcher.DesktopAppLauncher")
}

packaging {
name.set("Bisq 2")
}

javafx {
version = "17.0.1"
modules = listOf("javafx.controls", "javafx.media")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBGNRef4BEAClC9boA6cdHohUN10kDtJxmYYvbLkv3deMhAAbQUf92Pa2xUR9
WNLd7VTTnyZTG5Mns5uul5BLma1kO2kifXNPLofongTTBWN1n+s4IL4vn18h6wMH
vplg76WkgkwDaj7+xJ4KFLY4J80lLnFG57gTkztYkslOR348rZmS7Qk+i0j+est1
MFaFIlDNF+ecNkOOQQhooleFtlkxin3tsJvOwMY9umcTPJ5TJhiTrfsfzrV+0Y/K
Pu5h79vjymNy1pwVx0+ZnvkQwkZ6yVmeP5fVR1TYTT0pObKBTvdMFPo9wDENZByT
1RksCGjHzI5+Cv+mg0kQS7VzFbBP7gYR9qthTq+slhDSHjnUJhxMndBPqsBvCCAE
X31EpivNR97g3B6GAYjEhQkSTksWAKh6hbNiWEnYBKhePinMnoQriWGN0cshL6HB
p+tBp1ESpyY3/jEMfcdVmhv8Fg/8KMGlvT58/7AfoH0oye7hyoWUu1XxmTWcbr1S
eVZrOt32t1tcFQBjDW+1POiUwjOtXQZAZ6Otn2P+zKNkGfelb9YUqLZnFs6C2PEw
ST14hQZ1vQqWX3m8y9W8t6PY3zTmar5ImWccCXbK3GC4d7B5JIJZh3KQsxocv0NB
lkonKTOlmOjWJ22gEnUHQUQmwgb3S3NKnJFJ951FCsWdZZyIQW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yMRNrZQ2c2MpGK18Asxl3aW+OdG03Wek+0Gk+j
RU3NOq3K1YG/B0O1k2wUV1gIjc+M0s/v2JIVDMrELm/4Dw4Q1W83f9kr2ep9OtnI
wZqbZnD2LMIObxM3CGeKAsX7JZONhXdKtrhAXin1Pq03MzXgQmNsGv2cIyTSMbvd
E75tU69fX3jkrGUnqLQIJ/yI3fXUCXnd
=ektd
-----END PGP PUBLIC KEY BLOCK-----
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ abstract class JPackageTask : DefaultTask() {
@get:InputFile
abstract val licenseFile: RegularFileProperty

@get:Input
abstract val appName: Property<String>

@get:Input
abstract val appVersion: Property<String>

Expand All @@ -57,11 +60,12 @@ abstract class JPackageTask : DefaultTask() {
runtimeImageDirPath = runtimeImageDirectory.asFile.get().toPath(),

appConfig = JPackageAppConfig(
appVersion = appVersion.get(),
mainJarFileName = mainJarFile.asFile.get().name,
mainClassName = mainClassName.get(),
jvmArgs = jvmArgs.get(),
licenceFilePath = licenseFile.asFile.get().absolutePath
name = appName.get(),
appVersion = appVersion.get(),
mainJarFileName = mainJarFile.asFile.get().name,
mainClassName = mainClassName.get(),
jvmArgs = jvmArgs.get(),
licenceFilePath = licenseFile.asFile.get().absolutePath
),

packageFormatConfigs = getPackageFormatConfigs()
Expand All @@ -81,12 +85,12 @@ abstract class JPackageTask : DefaultTask() {

OS.MAC_OS -> {
val resourcesPath = packagePath.resolve("macosx")
MacPackage(resourcesPath)
MacPackage(resourcesPath, appName.get())
}

OS.LINUX -> {
val resourcesPath = packagePath.resolve("linux")
LinuxPackages(resourcesPath)
LinuxPackages(resourcesPath, appName.get())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package bisq.gradle.packaging

import org.gradle.api.DefaultTask
import org.gradle.api.file.ConfigurableFileCollection
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.TaskAction
import java.io.File

abstract class MergeOsSpecificJarHashesTask : DefaultTask() {

@get:InputFiles
abstract val hashFiles: ConfigurableFileCollection

@get:OutputFile
abstract val outputFile: RegularFileProperty

@TaskAction
fun run() {
val outputFile: File = outputFile.get().asFile
val bufferedWriter = outputFile.bufferedWriter()

for (file: File in hashFiles.files) {
val linePrefix = getLinePrefix(file.name)
for (line in file.readLines()) {
bufferedWriter.write("$linePrefix:$line\n")
}
}

bufferedWriter.close()
}

private fun getLinePrefix(fileName: String): String =
when {
fileName.contains("mac") -> "macOS"
fileName.contains("linux") -> "linux"
fileName.contains("windows") -> "windows"
else -> throw IllegalStateException("Unknown hash file: $fileName")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import org.gradle.jvm.toolchain.JavaLanguageVersion
import org.gradle.jvm.toolchain.JavaToolchainService
import org.gradle.jvm.toolchain.JvmImplementation
import org.gradle.jvm.toolchain.JvmVendorSpec
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.findByType
import org.gradle.kotlin.dsl.register
import java.io.File
Expand All @@ -27,6 +28,8 @@ class PackagingPlugin @Inject constructor(private val javaToolchainService: Java
}

override fun apply(project: Project) {
val extension = project.extensions.create<PackagingPluginExtension>("packaging")

val installDistTask: TaskProvider<Sync> = project.tasks.named("installDist", Sync::class.java)

val generateHashesTask = project.tasks.register<Sha256HashTask>("generateHashes") {
Expand All @@ -51,6 +54,7 @@ class PackagingPlugin @Inject constructor(private val javaToolchainService: Java
jvmArgs.set(javaApplicationExtension.applicationDefaultJvmArgs)

licenseFile.set(File(project.projectDir.parentFile.parentFile.parentFile, "LICENSE"))
appName.set(extension.name)
appVersion.set(APP_VERSION)

val packageResourcesDirFile = File(project.projectDir, "package")
Expand All @@ -63,6 +67,12 @@ class PackagingPlugin @Inject constructor(private val javaToolchainService: Java

outputDirectory.set(project.layout.buildDirectory.dir("packaging/jpackage/packages"))
}

val releaseBinariesTaskFactory = ReleaseBinariesTaskFactory(project)
releaseBinariesTaskFactory.registerCopyReleaseBinariesTask()
releaseBinariesTaskFactory.registerCopyMaintainerPublicKeysTask()
releaseBinariesTaskFactory.registerCopySigningPublicKeyTask()
releaseBinariesTaskFactory.registerMergeOsSpecificJarHashesTask()
}

private fun getHashFileForOs(project: Project): Provider<RegularFile> {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package bisq.gradle.packaging

import org.gradle.api.provider.Property

abstract class PackagingPluginExtension {
abstract val name: Property<String>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
package bisq.gradle.packaging

import org.gradle.api.Project
import org.gradle.api.file.Directory
import org.gradle.api.file.RegularFile
import org.gradle.api.provider.Provider
import org.gradle.api.tasks.Copy
import org.gradle.kotlin.dsl.register

class ReleaseBinariesTaskFactory(private val project: Project) {
companion object {
private const val MAINTAINER_PUBLIC_KEY_DIRECTORY: String = "maintainer_public_keys"
}

private val releaseDir: Provider<Directory> = project.layout.buildDirectory.dir("packaging/release")
private val inputBinariesProperty: Provider<String> = project.providers
.gradleProperty("bisq.release.binaries_path")

fun registerCopyReleaseBinariesTask() {
val releaseDir: Provider<Directory> = project.layout.buildDirectory.dir("packaging/release")
project.tasks.register<Copy>("copyReleaseBinaries") {
from(inputBinariesProperty)
include("*.dmg", "*.deb", "*.exe", "*.rpm")
into(releaseDir)
/* Bisq 1: "Bisq-1.9.15.dmg" -> "Bisq-1.9.15.dmg"
"bisq_1.9.15-1_amd64.deb" -> "Bisq-64bit-1.9.15.deb"
"Bisq-1.9.15.exe" -> "Bisq-64bit-1.9.15.exe"
"bisq-1.9.15-1.x86_64.rpm" -> "Bisq-64bit-1.9.15.rpm"

Bisq 2: "bisq2_2.0.4-1_amd64.deb" -> "Bisq-2.0.4.deb"
"Bisq 2-2.0.4.dmg" -> "Bisq-2.0.4.dmg"
"Bisq 2-2.0.4.exe" -> "Bisq-2.0.4.exe"
"bisq2-2.0.4-1.x86_64.rpm" -> "Bisq-2.0.4.rpm" */
rename { fileName: String ->
if (fileName.startsWith("Bisq 2") || fileName.contains("bisq2")) {
fileName.replace("Bisq 2", "Bisq") // "Bisq 2-2.0.4.exe", "Bisq 2-2.0.4.dmg"
.replace("bisq2_", "Bisq-") // "bisq2_2.0.4-1_amd64.deb"
.replace("bisq2-", "Bisq-") // "bisq2-2.0.4-1.x86_64.rpm"
.replace("-1_amd64", "")
.replace("-1.x86_64", "")
} else {
if (fileName.endsWith(".exe")) { // "Bisq-64bit-1.9.15.exe"
fileName.replace("Bisq-", "Bisq-64bit-")
} else if (fileName.endsWith(".rpm")) { // Bisq-64bit-1.9.15.rpm
fileName.replace("bisq-", "Bisq-64bit-")
.replace("-1.x86_64.rpm", ".rpm")// "bisq-1.9.15-1.x86_64.rpm"
} else if (fileName.endsWith(".deb")) { // "bisq_1.9.15-1_amd64.deb"
fileName.replace("bisq_", "Bisq-64bit-")
.replace("-1_amd64.deb", ".deb")// "Bisq-64bit-1.9.15.deb"
} else {
fileName
}
}
}
}
}

fun registerCopyMaintainerPublicKeysTask() {
val maintainerPublicKeys = project.layout.files(
"$MAINTAINER_PUBLIC_KEY_DIRECTORY/387C8307.asc",
"$MAINTAINER_PUBLIC_KEY_DIRECTORY/E222AA02.asc"
)
project.tasks.register<Copy>("copyMaintainerPublicKeys") {
from(maintainerPublicKeys)
into(releaseDir)
}
}

fun registerCopySigningPublicKeyTask() {
val signingPublicKey = project.layout.projectDirectory
.file("$MAINTAINER_PUBLIC_KEY_DIRECTORY/E222AA02.asc")
project.tasks.register<Copy>("copySigningPublicKey") {
from(signingPublicKey)
into(releaseDir)
rename { "signingkey.asc" }
}
}

fun registerMergeOsSpecificJarHashesTask() {
val files = project.files(
inputBinariesProperty.map { inputDir ->
"$inputDir/desktop-${PackagingPlugin.APP_VERSION}-all-mac.jar.SHA-256"
},
inputBinariesProperty.map { inputDir ->
"$inputDir/desktop-${PackagingPlugin.APP_VERSION}-all-linux.jar.SHA-256"
},
inputBinariesProperty.map { inputDir ->
"$inputDir/desktop-${PackagingPlugin.APP_VERSION}-all-windows.jar.SHA-256"
}
)
val mergedShaFile: Provider<RegularFile> = project.layout.buildDirectory
.file("packaging/release/Bisq-${PackagingPlugin.APP_VERSION}.jar.txt")
project.tasks.register<MergeOsSpecificJarHashesTask>("mergeOsSpecificJarHashes") {
hashFiles.setFrom(files)
outputFile.set(mergedShaFile)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package bisq.gradle.packaging.jpackage

data class JPackageAppConfig(
val name: String,
val appVersion: String,
val mainJarFileName: String,
val mainClassName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PackageFactory(private val jPackagePath: Path, private val jPackageConfig:
mutableListOf(
"--dest", jPackageConfig.outputDirPath.toAbsolutePath().toString(),

"--name", "Bisq 2",
"--name", appConfig.name,
"--copyright", "Copyright © 2013-${Year.now()} - The Bisq developers",
"--vendor", "Bisq",
"--license-file", appConfig.licenceFilePath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package bisq.gradle.packaging.jpackage.package_formats

import java.nio.file.Path

class LinuxPackages(private val resourcesPath: Path) : JPackagePackageFormatConfigs {
class LinuxPackages(private val resourcesPath: Path, private val appName: String) : JPackagePackageFormatConfigs {
override val packageFormats = setOf(PackageFormat.DEB, PackageFormat.RPM)

override fun createArgumentsForJPackage(packageFormat: PackageFormat): List<String> {
Expand All @@ -13,7 +13,7 @@ class LinuxPackages(private val resourcesPath: Path) : JPackagePackageFormatConf

"--description", "A decentralized bitcoin exchange network.",

"--linux-package-name", "bisq2",
"--linux-package-name", appName.toLowerCase().replace(" ", ""),
"--linux-app-release", "1",

"--linux-menu-group", "Network",
Expand Down
Loading
Loading