forked from marytts/marytts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
applicationLogic.gradle
73 lines (63 loc) · 2.1 KB
/
applicationLogic.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
apply plugin: 'application'
dependencies {
runtime project(':marytts-runtime')
runtime project(':marytts-languages').subprojects
runtime project(':voice-cmu-slt-hsmm')
}
mainClassName = 'marytts.server.Mary'
run {
dependsOn installDist
systemProperties << ['mary.base': installDist.destinationDir]
doFirst {
classpath += fileTree(installDist.destinationDir).include('lib/voice-*.jar', 'lib/marytts-lang-*.jar')
}
}
task runInstallerGui(type: JavaExec) {
group 'Application'
description 'Runs the MaryTTS Installer GUI as a JVM application'
dependsOn installDist
classpath run.classpath
main 'marytts.tools.install.InstallerGUI'
systemProperties << ['mary.base': installDist.destinationDir]
}
distributions {
main {
contents {
from 'download', {
into 'download'
}
from 'LICENSE.md'
}
}
}
distTar {
compression Compression.BZIP2
extension 'tar.bz2'
}
startScripts {
applicationName = 'marytts-server'
}
task installerGuiStartScripts(type: CreateStartScripts) {
applicationName = 'marytts-component-installer'
outputDir = startScripts.outputDir
classpath = startScripts.classpath
mainClassName = 'marytts.tools.install.InstallerGUI'
startScripts.finalizedBy it
}
tasks.withType(CreateStartScripts) {
group 'Distribution'
description startScripts.description
doLast {
// hack mary.base property into DEFAULT_JVM_OPTS
unixScript.text = unixScript.text.replaceAll('DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-Dmary.base=\\$APP_HOME"')
windowsScript.text = windowsScript.text.replaceAll('set DEFAULT_JVM_OPTS=', 'set DEFAULT_JVM_OPTS="-Dmary.base=%APP_HOME%"')
// hack classpath
unixScript.text = unixScript.text.replaceAll('-classpath "\\\\"\\$CLASSPATH\\\\""', '-classpath "\\\\"\\$APP_HOME/lib/*\\\\""')
windowsScript.text = windowsScript.text.replaceAll('-classpath "%CLASSPATH%"', '-classpath "%APP_HOME%\\\\lib\\\\*"')
}
}
installDist {
preserve {
include 'download/*', 'installed/*', 'lib/**'
}
}