/
Step6-GetStage3Packages.ps1
432 lines (382 loc) · 12.8 KB
/
Step6-GetStage3Packages.ps1
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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
#
# Step6_GetStage3Packages.ps1
#
# GNURadio Windows Build System
# Geof Nieboer
# script setup
$ErrorActionPreference = "Stop"
# setup helper functions
if ($script:MyInvocation.MyCommand.Path -eq $null) {
$mypath = "."
} else {
$mypath = Split-Path $script:MyInvocation.MyCommand.Path
}
if (Test-Path $mypath\Setup.ps1) {
. $mypath\Setup.ps1 -Force
} else {
. $root\scripts\Setup.ps1 -Force
}
$mm = GetMajorMinor($gnuradio_version)
# ____________________________________________________________________________________________________________
#
# airspy
#
GetPackage https://github.com/airspy/airspyone_host.git airspy -Stage3 -branch "$airspy_version"
GetPatch airspy_vs2015.7z airspy/libairspy/vc -Stage3
# ____________________________________________________________________________________________________________
#
# airspyHF
#
GetPackage https://github.com/airspy/airspyhf.git -Stage3 -branch "$airspyhf_version"
# ____________________________________________________________________________________________________________
#
# bladeRF
#
GetPackage https://github.com/Nuand/bladeRF.git -Stage3 -branch "$bladerf_version"
# ____________________________________________________________________________________________________________
#
# rtl-sdr
#
GetPackage https://github.com/osmocom/rtl-sdr.git -Stage3 -branch "$rtlsdr_version"
# ____________________________________________________________________________________________________________
#
# hackRF
#
GetPackage https://github.com/mossmann/hackrf.git -Stage3 -branch "$hackrf_version"
# ____________________________________________________________________________________________________________
#
# freeSRP
#
GetPackage https://github.com/myriadrf/libfreesrp.git -Stage3 -branch "$freeSRP_version"
# ____________________________________________________________________________________________________________
#
# SoapySDR
#
GetPackage https://github.com/pothosware/SoapySDR.git -Stage3 -branch "soapy-sdr-$SoapySDR_version"
# ____________________________________________________________________________________________________________
#
# osmosdr
#
GetPackage https://github.com/osmocom/gr-osmosdr.git -Stage3
GetPackage https://github.com/osmocom/osmo-sdr.git -Stage3
# ____________________________________________________________________________________________________________
#
# gr-iqbal
#
# upstream: https://github.com/osmocom/gr-iqbal.git
if ($mm -eq "3.8") {
GetPackage https://github.com/gnieboer/gr-iqbal.git -Stage3 -branch "gr3.8"
cd $root/src-stage3/oot_code/gr-iqbal
git pull --recurse-submodules=on
git submodule update
} else {
GetPackage http://www.gcndevelopment.com/gnuradio/downloads/sources/gr-iqbal.7z -Stage3
}
# ____________________________________________________________________________________________________________
#
# gr-benchmark
#
GetPackage https://github.com/osh/gr-benchmark.git -Stage3
# ____________________________________________________________________________________________________________
#
# gr-acars2
#
# use this version instead of the original repo at antoinet unlike the fix gets merged
#
if ($mm -eq "3.8") {
# not yet 3.8 compatible
} else {
GetPackage https://github.com/gnieboer/gr-acars2.git -Stage3
}
# ____________________________________________________________________________________________________________
#
# gr-adsb
#
if ($mm -eq "3.8") {
GetPackage https://github.com/mhostetter/gr-adsb.git -Stage3 -branch "maint-3.8"
} else {
GetPackage https://github.com/mhostetter/gr-adsb.git -Stage3 -branch "maint-3.7"
}
# ____________________________________________________________________________________________________________
#
# gr-air-modes
#
if ($mm -eq "3.8") {
GetPackage https://github.com/bistromath/gr-air-modes.git -Stage3
} else {
GetPackage https://github.com/gnieboer/gr-air-modes.git -Stage3
}
# ____________________________________________________________________________________________________________
#
# gr-fosphor
#
# awaiting merge requests to go back to upstream repo instead of my fork
#
if ($mm -eq "3.8") {
GetPackage https://github.com/osmocom/gr-fosphor.git -Stage3
} else {
GetPackage https://github.com/gnieboer/gr-fosphor.git -Stage3
}
GetPackage https://github.com/glfw/glfw.git -Stage3
# ____________________________________________________________________________________________________________
#
# gqrx
#
if ($mm -eq "3.8") {
# GetPackage https://github.com/lukaskuzmiak/gqrx.git -Stage3 -Branch "3.8_tech_preview_compatibility"
GetPackage https://github.com/csete/gqrx.git -Stage3 -Branch v$gqrx_version
} else {
GetPackage https://github.com/csete/gqrx.git -Stage3 -Branch v$gqrx_version
}
# ____________________________________________________________________________________________________________
#
# Armadillo
#
GetPackage https://downloads.sourceforge.net/project/arma/armadillo-7.800.1.tar.xz -Stage3
# ____________________________________________________________________________________________________________
#
# gflags
#
GetPackage https://github.com/gflags/gflags.git -Stage3
# ____________________________________________________________________________________________________________
#
# glog
#
GetPackage https://github.com/google/glog.git -Stage3
# ____________________________________________________________________________________________________________
#
# GNUTLS (binaries!)
#
GetPackage ftp://ftp.gnutls.org/gcrypt/gnutls/w32/gnutls-3.5.8-w64.zip gnutls -Stage3 -AddFolderName
# ____________________________________________________________________________________________________________
#
# gr-inspector
#
if ($mm -eq "3.8") {
# not yet 3.8 compatible
} else {
GetPackage https://github.com/gnuradio/gr-inspector.git -Stage3
}
# ____________________________________________________________________________________________________________
#
# gr-specest
#
if ($mm -eq "3.8") {
GetPackage https://github.com/gnieboer/gr-specest.git -Stage3 -branch "gr-3.8"
} else {
GetPackage https://github.com/gnieboer/gr-specest.git -Stage3 -branch "msvc_fixes"
}
# ____________________________________________________________________________________________________________
#
# gr-cdma
#
if ($mm -eq "3.8") {
# not yet 3.8 compatible
} else {
GetPackage https://github.com/anastas/gr-cdma.git -Stage3
}
# ____________________________________________________________________________________________________________
#
# gr-rds
#
if ($mm -eq "3.8") {
GetPackage https://github.com/bastibl/gr-rds.git -Stage3 -Branch "maint-3.8"
} else {
GetPackage https://github.com/bastibl/gr-rds.git -Stage3 -Branch "maint-3.7"
}
# ____________________________________________________________________________________________________________
#
# gr-ais
#
# Awaiting incorporation of pull request
#
if ($mm -eq "3.8") {
# not yet 3.8 compatible
} else {
GetPackage https://github.com/gnieboer/gr-ais.git -Stage3 -branch "msvc-fixes"
}
# ____________________________________________________________________________________________________________
#
# gr-display
#
GetPackage https://github.com/dl1ksv/gr-display.git -Stage3 -branch "v$grdisplay_version"
# ____________________________________________________________________________________________________________
#
# gr-ax25
#
if ($mm -eq "3.8") {
# not yet 3.8 compatible
} else {
GetPackage https://github.com/dl1ksv/gr-ax25.git -Stage3
}
# ____________________________________________________________________________________________________________
#
# gr-radar
#
#
if ($mm -eq "3.8") {
GetPackage https://github.com/gnieboer/gr-radar.git -Stage3 -branch "gr-3.8"
} else {
GetPackage https://github.com/gnieboer/gr-radar.git -Stage3 -branch "msvc_fixes"
}
# ____________________________________________________________________________________________________________
#
# gr-paint
#
if ($mm -eq "3.8") {
GetPackage https://github.com/drmpeg/gr-paint38.git -Stage3
} else {
GetPackage https://github.com/drmpeg/gr-paint.git -Stage3
}
# ____________________________________________________________________________________________________________
#
# gr-mapper
#
# Awaiting incorporation of pull request
#
if ($mm -eq "3.8") {
GetPackage https://github.com/gnieboer/gr-mapper.git -Stage3 -branch "gr-3.8"
} else {
GetPackage https://github.com/gnieboer/gr-mapper.git -Stage3 -branch "msvc_fixes"
}
# ____________________________________________________________________________________________________________
#
# gr-nacl
#
#
if ($mm -eq "3.8") {
# not yet 3.8 compatible
} else {
GetPackage https://github.com/stwunsch/gr-nacl.git -Stage3
}
# ____________________________________________________________________________________________________________
#
# gr-eventstream
#
#
if ($mm -eq "3.8") {
# not yet 3.8 compatible
} else {
GetPackage https://github.com/osh/gr-eventstream.git -Stage3
}
# ____________________________________________________________________________________________________________
#
# gr-burst
#
# Minor change from main repo
#
if ($mm -eq "3.8") {
GetPackage https://github.com/gnieboer/gr-burst.git -Stage3 -branch "gr-3.8"
} else {
GetPackage https://github.com/gnieboer/gr-burst.git -Stage3 -branch "msvc_fixes"
}
# ____________________________________________________________________________________________________________
#
# gr-soapy
#
#
if ($mm -eq "3.8") {
GetPackage https://gitlab.com/librespacefoundation/gr-soapy.git -Stage3 -branch "maint-3.8"
} else {
GetPackage https://gitlab.com/librespacefoundation/gr-soapy.git -Stage3 -branch "master"
}
# ____________________________________________________________________________________________________________
#
# gr-lte
#
if ($mm -eq "3.8") {
# not yet 3.8 compatible
} else {
GetPackage https://github.com/gnieboer/gr-lte.git -Stage3 -branch "msvc_fixes"
}
# ____________________________________________________________________________________________________________
#
# OpenLTE
#
GetPackage https://downloads.sourceforge.net/project/openlte/openlte_v$openlte_version.tgz -Stage3
# ____________________________________________________________________________________________________________
#
# gr-gsm
#
if ($mm -eq "3.8") {
GetPackage https://github.com/velichkov/gr-gsm.git -Stage3 -branch "maint-3.8"
} else {
GetPackage https://github.com/ptrkrysik/gr-gsm.git -Stage3
}
# The below are all packages that will not currently build but are 'in work' for inclusion at a later date
# please feel free to give them a shot.
if ($false)
{
# ____________________________________________________________________________________________________________
#
# libosmocore
#
GetPackage https://github.com/osmocom/libosmocore.git -Stage3
# ____________________________________________________________________________________________________________
#
# GNSS-SDR
#
GetPackage https://github.com/gnss-sdr/gnss-sdr.git -Stage3
}
# ____________________________________________________________________________________________________________
#
# gnuradio
#
SetLog "Retrieve GNURadio"
Write-Host -NoNewline "cloning GNURadio..."
if (!(Test-Path $root/src-stage3/src)) {
cd $root/src-stage3
mkdir src 2>&1 >> $log
}
if (!(Test-Path $root/src-stage3/src/gnuradio)) {
cd $root/src-stage3/src
$ErrorActionPreference = "Continue"
# most packages we just get the most recent commit when coming from git
# however, since this is the one most users might want to modify, we'll get more.
git clone --depth=150 --no-single-branch --recursive https://github.com/gnuradio/gnuradio.git 2>&1 >> $log
cd gnuradio
git checkout v$gnuradio_version
git pull --recurse-submodules=on
git submodule update
cd ..
} else {
"gnuradio already present";
}
if (!(Test-Path $root/src-stage3/src/gnuradio/volk/CMakeLists.txt)) {
# volk submodule did not come across. This is likely due to a problem with our git repo getting
# out of sync with the volk tree. So we'll just download $volk_version release as a backup
cd $root/src-stage3/src/gnuradio
$count = 0
do {
Try
{
wget https://github.com/gnieboer/volk/archive/v$volk_version.zip -OutFile volk.zip
$count = 999
}
Catch [System.IO.IOException]
{
Write-Host -NoNewline "failed, retrying..."
$count ++
}
} while ($count -lt 5)
if ($count -ne 999) {
Write-Host ""
Write-Host -BackgroundColor Black -ForegroundColor Red "Error Downloading File, retries exceeded, aborting..."
Exit
}
$destination = "$root/$destdir"
[io.compression.zipfile]::ExtractToDirectory("$root/src-stage3/src/gnuradio/volk.zip", "$root/src-stage3/src/gnuradio") >> $Log
Remove-Item volk -Force -Recurse
Rename-Item volk-$volk_version volk -Force
Remove-Item volk.zip -Force
if (!(Test-Path $root/src-stage3/src/gnuradio/volk/CMakeLists.txt)) {
Write-Host -BackgroundColor Black -ForegroundColor Red "FATAL ERROR: Volk was not downloaded properly, GNURadio cannot build"
Exit
}
}
$ErrorActionPreference = "Stop"
"complete"
cd $root/scripts
""
"COMPLETED STEP 6: GNURadio and OOT package source code has been downloaded"
""