forked from LAL/xtremweb-hep
-
Notifications
You must be signed in to change notification settings - Fork 9
/
mac.gradle
124 lines (102 loc) · 4.4 KB
/
mac.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import org.apache.tools.ant.filters.ReplaceTokens
apply from: 'common.gradle'
task makeMacDir(type: Exec) {
commandLine("sh", "-c",
"mkdir -p " + project.distMacInstallers
)
}
task copyMac(type: Copy) {
dependsOn(makeMacDir)
into(project.distMacInstallers)
into(".") {
from project.macInstallers
filter(ReplaceTokens, tokens: [XWVERSION : "${version}".toString(),
SYSTEMUSER: 'xwhep'])
}
}
task copyMacClient(type: Copy) {
dependsOn(copyMac)
into(project.distMacInstallers + '/xwhep.client/installer/PckRoot')
into("/Applications/xwhep.client/conf") {
from project.templates + '/xtremweb.client.conf.in'
rename { fileName -> fileName.replace('xtremweb.client.conf.in', 'xtremweb.client.conf') }
filter(ReplaceTokens, tokens: [LAUNCHERURL : 'http://nohost/',
KEYDIR : '.',
DEFAULTUSER : '',
DEFAULTPASSWORD: ''])
}
into("/Applications/xwhep.client/lib") {
from(project.libXtremWeb)
include('bcprov-jdk15on-151.jar')
include('bcpkix-jdk15on-151.jar')
}
}
task copyMacWorker(type: Copy) {
dependsOn(copyMac)
into(project.distMacInstallers + '/xwhep.worker/installer/PckRoot')
into(project.privateEtc + "/xwhep.worker/conf") {
from project.templates + '/xtremweb.worker.conf.in'
rename { fileName -> fileName.replace('xtremweb.worker.conf.in', 'xtremweb.worker.conf') }
filter(ReplaceTokens, tokens: [LAUNCHERURL : 'http://nohost/',
DATASERVERS : '${data.servers}',
KEYDIR : privateEtc + '/xwhep.worker',
DEFAULTUSER : '${xtremweb.worker.login}',
DEFAULTPASSWORD: '${xtremweb.worker.password}'])
}
into(project.privateEtc + "/xwhep.worker") {
from misc
include('worker-start.html')
rename('worker-start.html', 'index.html')
}
into(project.privateEtc + "/xwhep.worker/conf") {
from misc
include('xwhep.sb')
}
}
task copyMacVworker(type: Copy) {
dependsOn(copyMac)
into(project.distMacInstallers + '/xwhep.vworker/installer/PckRoot')
into(project.privateEtc + "/xwhep.worker/conf") {
from project.templates + '/xtremweb.worker.conf.in'
rename { fileName -> fileName.replace('xtremweb.worker.conf.in', 'xtremweb.worker.conf') }
filter(ReplaceTokens, tokens: [LAUNCHERURL : 'http://nohost/',
DATASERVERS : '${data.servers}',
KEYDIR : project.privateEtc + '/xwhep.worker',
DEFAULTUSER : '${xtremweb.vworker.login}',
DEFAULTPASSWORD: '${xtremweb.vworker.password}'])
}
into(project.privateEtc + "/xwhep.worker") {
from misc
include('worker-start.html')
rename('worker-start.html', 'index.html')
}
into(project.privateEtc + "/xwhep.worker/conf") {
from misc
include('xwhep.sb')
}
}
task copyMacServer(type: Copy) {
dependsOn(copyMac)
into(project.distMacInstallers + '/xwhep.server/installer/PckRoot')
into("/Applications/xwhep.server/conf") {
from project.templates + '/xtremweb.server.conf.in'
rename { fileName -> fileName.replace('xtremweb.server.conf.in', 'xtremweb.server.conf') }
filter(ReplaceTokens, tokens: [LAUNCHERURL : 'http://nohost/',
KEYDIR : project.privateEtc + '/xwhep.server',
DEFAULTUSER : '',
DEFAULTPASSWORD: ''])
}
into('/Applications/xwhep.server/doc') {
from project.doc
include('*.png')
}
into(project.privateEtc + "/xwhep.server/lib") {
from(project.dist + '/lib')
//include('bcprov-jdk15on-151.jar')
//include('bcpkix-jdk15on-151.jar')
//include('xtremweb.jar')
}
}
task copyMacInstaller {
dependsOn(copyMacClient, copyMacWorker, copyMacVworker, copyMacServer)
}