Skip to content

Commit

Permalink
IGNITE-18230 Packaging: Add MSI installer for winget package (apache#…
Browse files Browse the repository at this point in the history
…1368)

* Use the setupbuilder plugin to create MSI installer for the ignite3-db.
* Use `gradlew msi` to create an installer in the `packaging\db\build\distributions\ignite3-db-3.0.0.msi`.
* Update Micronaut since the old version doesn't work when installed in the path with spaces.
  • Loading branch information
valepakh authored Jan 12, 2023
1 parent 5272ba8 commit 4a1baf4
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 3 deletions.
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ okhttp = "4.9.1"
gson = "2.8.9"
gsonFire = "1.8.5"
threetenbp = "1.5.2"
micronaut = "3.5.3"
micronaut = "3.7.4"
micronautPicocli = "4.1.0"
micronautJunit5 = "3.4.0"
mockito = "4.3.1"
Expand Down Expand Up @@ -87,6 +87,7 @@ modernizer = "com.github.andygoossens.modernizer:1.6.2"
nebula = "nebula.ospackage:9.1.1"
docker = "com.palantir.docker:0.34.0"
checksum = "org.gradle.crypto.checksum:1.4.0"
setupbuilder = "de.inetsoftware.setupbuilder:7.2.13"
aggregateJavadoc = "io.freefair.aggregate-javadoc:6.5.1"

[libraries]
Expand Down
1 change: 0 additions & 1 deletion packaging/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
id 'java'
id 'signing'
alias(libs.plugins.docker)
alias(libs.plugins.nebula)
alias(libs.plugins.checksum)
}

Expand Down
63 changes: 63 additions & 0 deletions packaging/db/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ plugins {
id 'signing'
alias(libs.plugins.nebula)
alias(libs.plugins.checksum)
alias(libs.plugins.setupbuilder)
}

import org.apache.tools.ant.filters.ReplaceTokens
Expand Down Expand Up @@ -235,3 +236,65 @@ if (project.hasProperty('prepareRelease')) {
}
}
}

setupBuilder {
vendor = "Apache Software Foundation"
application = "Apache Ignite"
description = "Apache Ignite is a distributed database for high-performance computing with in-memory speed"
appIdentifier = "ignite3-db"

// '-SNAPSHOT' is not valid in Windows versions
version = project.version.toString().replace("-SNAPSHOT", "")

// Actually a classpath
mainJar = "lib\\*"
mainClass = "org.apache.ignite.app.IgniteRunner"

licenseFile = "$rootDir/LICENSE"

msi {
languages = ["en-US"]
}

service {
// The working directory of the service, relative to installation root
workDir = "."

jvm = '%JAVA_HOME%\\bin\\server\\jvm.dll'

javaVMArguments = ["--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.lang.invoke=ALL-UNNAMED",
"--add-opens=java.base/java.lang.reflect=ALL-UNNAMED",
"--add-opens=java.base/java.io=ALL-UNNAMED",
"--add-opens=java.base/java.nio=ALL-UNNAMED",
"--add-opens=java.base/java.math=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED",
"--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED",
"-Dio.netty.tryReflectionSetAccessible=true",
"-Djava.util.logging.config.file=etc\\ignite.java.util.logging.properties",
"-Dio.netty.tryReflectionSetAccessible=true"]

startArguments = "--node-name node1 --work-dir work --config-path etc\\ignite-config.conf"
}

into('') {
into('') {
from("$rootDir/LICENSE")
from("$rootDir/NOTICE")
from("$rootDir/assembly/README.md")
}
into('log') {
from('log')
}
into('etc') {
from "${rootDir}/packaging/config/ignite-config.conf"
}
into('etc') {
from("ignite.java.util.logging.properties")
filter(ReplaceTokens, tokens: [LOG_DIR: 'log'])
}
into('lib') {
from configurations.dbArtifacts
}
}
}
Empty file added packaging/db/log/.empty
Empty file.
3 changes: 2 additions & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<gson.version>2.8.9</gson.version>
<gson-fire.version>1.8.5</gson-fire.version>
<threetenbp.version>1.5.2</threetenbp.version>
<micronaut.version>3.5.3</micronaut.version>
<micronaut.version>3.7.4</micronaut.version>
<micronaunt-picocli.version>4.1.0</micronaunt-picocli.version>
<micronaut.test.junit5.version>3.4.0</micronaut.test.junit5.version>
<mockito.version>4.3.1</mockito.version>
Expand Down Expand Up @@ -1612,6 +1612,7 @@
<exclude>gradle/**</exclude> <!-- Gradle internal -->
<exclude>gradlew</exclude> <!-- Gradle internal -->
<exclude>gradlew.batc</exclude> <!-- Gradle internal -->
<exclude>**/.empty</exclude> <!-- Empty files -->
</excludes>
</configuration>
</plugin>
Expand Down

0 comments on commit 4a1baf4

Please sign in to comment.