-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
275 lines (188 loc) · 5.25 KB
/
build.bat
File metadata and controls
275 lines (188 loc) · 5.25 KB
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
@echo off
del /Q /S export\ > NUL 2>&1
del /Q /S installer\ > NUL 2>&1
mkdir export\ > NUL 2>&1
GOTO :MAIN
:win_installer_start
echo --== WINDOWS INSTALLERS
EXIT /B 0
:win_installer_i386
set GOOS=windows
set GOARCH=386
echo -= win_i386
go build -o ru.exe main.go
iscc builder\win_i386.iss > NUL 2>&1
del /Q ru.exe > NUL 2>&1
EXIT /B 0
:win_installer_amd64
set GOOS=windows
set GOARCH=amd64
echo -= win_amd64
go build -o ru.exe main.go
iscc builder\win_amd64.iss > NUL 2>&1
del /Q ru.exe > NUL 2>&1
EXIT /B 0
:win_installer_arm
set GOOS=windows
set GOARCH=arm
echo -= win_arm
go build -o ru.exe main.go
iscc builder\win_arm.iss > NUL 2>&1
del /Q ru.exe > NUL 2>&1
EXIT /B 0
:win_installer_arm64
set GOOS=windows
set GOARCH=arm64
echo -= win_arm64
go build -o ru.exe main.go
iscc builder\win_arm64.iss > NUL 2>&1
del /Q ru.exe > NUL 2>&1
EXIT /B 0
:: WINDOWS BUILDs
:windows_start
echo --== WINDOWS
EXIT /B 0
:windows_i386
set GOOS=windows
set GOARCH=386
echo -= windows_i386
go build -o ru.exe main.go
tar -cf windows_i386.tar -C .\ alias.json app.json config.json ru.exe > NUL 2>&1
7z a -t7z -mx=9 windows_i386.tar.xz windows_i386.tar > NUL 2>&1
move windows_i386.tar.xz export\ > NUL 2>&1
del /Q *.tar > NUL 2>&1
del /Q ru.exe > NUL 2>&1
EXIT /B 0
:windows_amd64
set GOOS=windows
set GOARCH=amd64
echo -= windows_amd64
go build -o ru.exe main.go
tar -cf windows_amd64.tar -C .\ alias.json app.json config.json ru.exe > NUL 2>&1
7z a -t7z -mx=9 windows_amd64.tar.xz windows_amd64.tar > NUL 2>&1
move windows_amd64.tar.xz export\ > NUL 2>&1
del /Q *.tar > NUL 2>&1
del /Q ru.exe > NUL 2>&1
EXIT /B 0
:windows_arm
set GOOS=windows
set GOARCH=arm
echo -= windows_arm
go build -o ru.exe main.go
tar -cf windows_arm.tar -C .\ alias.json app.json config.json ru.exe > NUL 2>&1
7z a -t7z -mx=9 windows_arm.tar.xz windows_arm.tar > NUL 2>&1
move windows_arm.tar.xz export\ > NUL 2>&1
del /Q *.tar > NUL 2>&1
del /Q ru.exe > NUL 2>&1
EXIT /B 0
:windows_arm64
set GOOS=windows
set GOARCH=arm64
echo -= windows_arm64
go build -o ru.exe main.go
tar -cf windows_arm64.tar -C .\ alias.json app.json config.json ru.exe > NUL 2>&1
7z a -t7z -mx=9 windows_arm64.tar.xz windows_arm64.tar > NUL 2>&1
move windows_arm64.tar.xz export\ > NUL 2>&1
del /Q *.tar > NUL 2>&1
del /Q ru.exe > NUL 2>&1
EXIT /B 0
:: LINUX BUILDs
:linux_start
echo --== LINUX
EXIT /B 0
:linux_i386
set GOOS=linux
set GOARCH=386
echo -= linux_i386
go build -o ru main.go
tar -cf linux_i386.tar -C .\ alias.json app.json config.json ru > NUL 2>&1
7z a -t7z -mx=9 linux_i386.tar.xz linux_i386.tar > NUL 2>&1
move linux_i386.tar.xz export\ > NUL 2>&1
del /Q *.tar > NUL 2>&1
del /Q ru > NUL 2>&1
EXIT /B 0
:linux_amd64
set GOOS=linux
set GOARCH=amd64
echo -= linux_amd64
go build -o ru main.go
tar -cf linux_amd64.tar -C .\ alias.json app.json config.json ru > NUL 2>&1
7z a -t7z -mx=9 linux_amd64.tar.xz linux_amd64.tar > NUL 2>&1
move linux_amd64.tar.xz export\ > NUL 2>&1
del /Q *.tar > NUL 2>&1
del /Q ru > NUL 2>&1
EXIT /B 0
:linux_arm
set GOOS=linux
set GOARCH=arm
echo -= linux_arm
go build -o ru main.go
tar -cf linux_arm.tar -C .\ alias.json app.json config.json ru > NUL 2>&1
7z a -t7z -mx=9 linux_arm.tar.xz linux_arm.tar > NUL 2>&1
move linux_arm.tar.xz export\ > NUL 2>&1
del /Q *.tar > NUL 2>&1
del /Q ru > NUL 2>&1
EXIT /B 0
:linux_arm64
set GOOS=linux
set GOARCH=arm64
echo -= linux_arm64
go build -o ru main.go
tar -cf linux_arm64.tar -C .\ alias.json app.json config.json ru > NUL 2>&1
7z a -t7z -mx=9 linux_arm64.tar.xz linux_arm64.tar > NUL 2>&1
move linux_arm64.tar.xz export\ > NUL 2>&1
del /Q *.tar > NUL 2>&1
del /Q ru > NUL 2>&1
EXIT /B 0
:: MAC OS BUILDs
:darwin_start
echo --== MAC OS
EXIT /B 0
:darwin_amd64
set GOOS=darwin
set GOARCH=amd64
echo -= mac_os_amd64
go build -o ru main.go
tar -cf mac_os_amd64.tar -C .\ alias.json app.json config.json ru > NUL 2>&1
7z a -t7z -mx=9 mac_os_amd64.tar.xz mac_os_amd64.tar > NUL 2>&1
move mac_os_amd64.tar.xz export\ > NUL 2>&1
del /Q *.tar > NUL 2>&1
del /Q ru > NUL 2>&1
EXIT /B 0
:darwin_arm64
set GOOS=darwin
set GOARCH=arm64
echo -= mac_os_arm64
go build -o ru main.go
tar -cf mac_os_arm64.tar -C .\ alias.json app.json config.json ru > NUL 2>&1
7z a -t7z -mx=9 mac_os_arm64.tar.xz mac_os_arm64.tar > NUL 2>&1
move mac_os_arm64.tar.xz export\ > NUL 2>&1
del /Q *.tar > NUL 2>&1
del /Q ru > NUL 2>&1
EXIT /B 0
:padding
echo ---------------------
EXIT /B 0
:MAIN
call :win_installer_start
call :win_installer_i386
call :win_installer_amd64
call :win_installer_arm
call :win_installer_arm64
call :padding
call :windows_start
call :windows_i386
call :windows_amd64
call :windows_arm
call :windows_arm64
call :padding
call :linux_start
call :linux_i386
call :linux_amd64
call :linux_arm
call :linux_arm64
call :padding
call :darwin_start
call :darwin_amd64
call :darwin_arm64
call :padding