-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathinstaller.gradle
36 lines (36 loc) · 1.38 KB
/
installer.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
runtime {
options = ['--bind-services', '--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
jvmArgs = ["-Dawt.useSystemAAFontSettings=on", "-Dswing.aatext=true", "-Dsun.java2d.xrender=true"]
noConsole = true
}
jpackage {
def os = org.gradle.internal.os.OperatingSystem.current()
installerOptions += [
'--resource-dir', "src/main/resources",
'--app-version', version
]
mainJar = "${project.name}-${VERSION_NAME}.jar" // doesn't work with -SNAPSHOT versions
mainClass = project.mainClassName
imageOptions += ['--name', project.name]
if (os.windows) {
installerType = "msi"
installerOptions += [
'--win-per-user-install', // TODO: because data is written into the install dir.
'--win-dir-chooser',
'--win-menu',
'--win-shortcut'
]
imageOptions += [
'--icon', "icon/icon.ico",
'--win-console'
]
} else if (os.macOsX) {
installerType = "dmg"
imageOptions += ['--mac-package-identifier', project.name]
imageOptions += ['--icon', "icon/icon.icns"]
} else {
imageOptions += ['--icon', "icon/icon.png"]
}
}
}