The omero-javapackager-plugin is a Gradle plugin that provides
infrastructure for packaging Java applications for different platforms, including
.dmg
for Mac OS X and .exe
for Windows.
Include the following at the top of your build.gradle file:
plugins {
id "org.openmicroscopy.packager" version "x.y.z"
}
Targets of the form:
packageNAMEApplicationTYPE
exist for the various components. For example, to create an OMERO.importer .dmg run:
packageImporterApplicationDmg
Gradle plugin configuration example:
deploy {
main {
icon = "${projectDir}/icons/omeroInsight" // Change the icon, file extension is automatic depending on OS
arguments = ["container.xml"]
}
}
Full custom example:
deploy {
someApp {
outputTypes = ["exe", "dmg"] // this deploy config will create tasks for exe or dmg installers, depending on OS
mainClassName = "org.myurl.Main" // main class package and name
javaOptions = ["-Xms256m", "-Xmx1024m"] // custom JVM options
mainJar = "someApp" // you application jar filename
sourceDir = file("$buildDir/install/someApp) // the root directory of your distributable application
sourceFiles = fileTree("$buildDir/install/someApp).include("**/*.*")
applicationVersion = "$version"
dmg {
systemWide = true
simple = false
}
msi {
copyright = "MIT"
addShortcut = false
}
}
}