-
Notifications
You must be signed in to change notification settings - Fork 0
/
runprebuild.sho2
217 lines (168 loc) · 7.19 KB
/
runprebuild.sho2
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#!/bin/sh
echo START: assemblies perms
chmod 755 bin/*.so bin/*.exe bin/*.dll bin/*.config bin/*.xml
echo END: assemblies perms
echo START: copy assemblies
# Check if directories exist before copying
if [ -d "sources/external/Radegast/assemblies" ]; then
cp sources/external/Radegast/assemblies/*.dll bin/
else
echo "Directory sources/external/Radegast/assemblies does not exist"
fi
if [ -d "sources/external/Radegast" ]; then
cp sources/external/Radegast/*.dll bin/
cp sources/external/Radegast/*.pdb bin/
cp sources/external/Radegast/*.config bin/
rm -f sources/external/Radegast/libop*
cp sources/external/Radegast/*.so bin/
cp sources/external/Radegast/*.dylib bin/
else
echo "Directory sources/external/Radegast does not exist"
fi
svn revert bin/LAIR*.dll
echo DONE: copy assemblies
echo START: Generating NANT build files
# Check if mono is installed
if command -v mono >/dev/null 2>&1; then
# Replace 'path/to/your/actual_assembly.exe' with the actual command you need to run
mono bin/your_actual_assembly.exe
else
echo "mono is not installed"
fi
# Add more commands here as needed
echo DONE: Generating NANT build files
# Ensure directories exist before copying NullBuild.txt
if [ -d "./sources/external/LAIR.ResourceAPIs/Wikipedia/MirrorTables" ]; then
cp NullBuild.txt ./sources/external/LAIR.ResourceAPIs/Wikipedia/MirrorTables/MirrorTables.exe.build
else
echo "Directory ./sources/external/LAIR.ResourceAPIs/Wikipedia/MirrorTables does not exist"
fi
if [ -d "./bin" ]; then
cp NullBuild.txt ./bin/CogbotLib.dll.build
else
echo "Directory ./bin does not exist"
fi
if [ -d "./sources/external/LAIR.ResourceAPIs/Cogbot.LAIR" ]; then
cp NullBuild.txt ./sources/external/LAIR.ResourceAPIs/Cogbot.LAIR/Cogbot.LAIR.exe.build
else
echo "Directory ./sources/external/LAIR.ResourceAPIs/Cogbot.LAIR does not exist"
fi
echo DONE: Generating NANT build files
# Remove specific files
rm -rf bin/RadSpeechWin*.*
#!/bin/sh
echo START: assemblies perms
chmod 755 bin/*.so bin/*.exe bin/*.dll bin/*.config bin/*.xml
echo END: assemblies perms
echo START: copy assemblies
# Check if directories exist before copying
if [ -d "sources/external/Radegast/assemblies" ]; then
cp sources/external/Radegast/assemblies/*.dll bin/ || echo "No DLLs found in sources/external/Radegast/assemblies"
else
echo "Directory sources/external/Radegast/assemblies does not exist"
fi
if [ -d "sources/external/Radegast" ]; then
cp sources/external/Radegast/*.dll bin/ || echo "No DLLs found in sources/external/Radegast"
cp sources/external/Radegast/*.pdb bin/ || echo "No PDBs found in sources/external/Radegast"
cp sources/external/Radegast/*.config bin/ || echo "No config files found in sources/external/Radegast"
rm -f sources/external/Radegast/libop*
cp sources/external/Radegast/*.so bin/ || echo "No SO files found in sources/external/Radegast"
cp sources/external/Radegast/*.dylib bin/ || echo "No DYLIB files found in sources/external/Radegast"
else
echo "Directory sources/external/Radegast does not exist"
fi
svn revert bin/LAIR*.dll || echo "SVN revert failed for bin/LAIR*.dll"
echo DONE: copy assemblies
echo START: Generating NANT build files
# Check if mono is installed
if command -v mono >/dev/null 2>&1; then
# Use local NAnt installation
if [ -f "./nant.exe" ]; then
mono ./nant.exe || echo "Failed to run NAnt"
else
echo "NAnt.exe not found in the current directory"
fi
else
echo "mono is not installed"
fi
# Add more commands here as needed
echo DONE: Generating NANT build files
# Ensure directories exist before copying NullBuild.txt
if [ -d "./sources/external/LAIR.ResourceAPIs/Wikipedia/MirrorTables" ]; then
cp NullBuild.txt ./sources/external/LAIR.ResourceAPIs/Wikipedia/MirrorTables/MirrorTables.exe.build
else
echo "Directory ./sources/external/LAIR.ResourceAPIs/Wikipedia/MirrorTables does not exist"
fi
if [ -d "./bin" ]; then
cp NullBuild.txt ./bin/CogbotLib.dll.build
else
echo "Directory ./bin does not exist"
fi
if [ -d "./sources/external/LAIR.ResourceAPIs/Cogbot.LAIR" ]; then
cp NullBuild.txt ./sources/external/LAIR.ResourceAPIs/Cogbot.LAIR/Cogbot.LAIR.exe.build
else
echo "Directory ./sources/external/LAIR.ResourceAPIs/Cogbot.LAIR does not exist"
fi
echo DONE: Generating NANT build files
# Remove specific files
rm -rf bin/RadSpeechWin*.*
echo To just build CSProloge.exe
echo './runprebuild.sh ; find -iname "*.build" -not -name Cogbot.build -not -name CSProlog.*.build -exec cp NullBuild.txt '\''{}'\'' \; ; ./nant.exe'
echo otherwise type: ./nant.exe#!/bin/sh
echo START: assemblies perms
chmod 755 bin/*.so bin/*.exe bin/*.dll bin/*.config bin/*.xml 2>/dev/null
echo END: assemblies perms
echo START: copy assemblies
# Check if directories exist before copying
if [ -d "sources/external/Radegast/assemblies" ]; then
cp sources/external/Radegast/assemblies/*.dll bin/ 2>/dev/null || echo "No DLLs found in sources/external/Radegast/assemblies"
else
echo "Directory sources/external/Radegast/assemblies does not exist"
fi
if [ -d "sources/external/Radegast" ]; then
cp sources/external/Radegast/*.dll bin/ 2>/dev/null || echo "No DLLs found in sources/external/Radegast"
cp sources/external/Radegast/*.pdb bin/ 2>/dev/null || echo "No PDBs found in sources/external/Radegast"
cp sources/external/Radegast/*.config bin/ 2>/dev/null || echo "No config files found in sources/external/Radegast"
rm -f sources/external/Radegast/libop* 2>/dev/null
cp sources/external/Radegast/*.so bin/ 2>/dev/null || echo "No SO files found in sources/external/Radegast"
cp sources/external/Radegast/*.dylib bin/ 2>/dev/null || echo "No DYLIB files found in sources/external/Radegast"
else
echo "Directory sources/external/Radegast does not exist"
fi
svn revert bin/LAIR*.dll 2>/dev/null || echo "SVN revert failed for bin/LAIR*.dll"
echo DONE: copy assemblies
echo START: Generating NANT build files
# Check if mono is installed
if command -v mono >/dev/null 2>&1; then
# Use local NAnt installation
if [ -f "./nant.exe" ]; then
mono ./nant.exe || echo "Failed to run NAnt"
else
echo "NAnt.exe not found in the current directory"
fi
else
echo "mono is not installed"
fi
echo DONE: Generating NANT build files
# Ensure directories exist before copying NullBuild.txt
if [ -d "./sources/external/LAIR.ResourceAPIs/Wikipedia/MirrorTables" ]; then
cp NullBuild.txt ./sources/external/LAIR.ResourceAPIs/Wikipedia/MirrorTables/MirrorTables.exe.build
else
echo "Directory ./sources/external/LAIR.ResourceAPIs/Wikipedia/MirrorTables does not exist"
fi
if [ -d "./bin" ]; then
cp NullBuild.txt ./bin/CogbotLib.dll.build
else
echo "Directory ./bin does not exist"
fi
if [ -d "./sources/external/LAIR.ResourceAPIs/Cogbot.LAIR" ]; then
cp NullBuild.txt ./sources/external/LAIR.ResourceAPIs/Cogbot.LAIR/Cogbot.LAIR.exe.build
else
echo "Directory ./sources/external/LAIR.ResourceAPIs/Cogbot.LAIR does not exist"
fi
echo DONE: Generating NANT build files
# Remove specific files
rm -rf bin/RadSpeechWin*.*
echo To just build CSProloge.exe
echo './runprebuild.sh ; find -iname "*.build" -not -name Cogbot.build -not -name CSProlog.*.build -exec cp NullBuild.txt '\''{}'\'' \; ; ./nant.exe'
echo otherwise type: ./nant.exe