-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.bat
2135 lines (1602 loc) · 95 KB
/
build.bat
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
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@echo on
@setlocal
@set BUILD_TYPE=%1%
@if "%BUILD_TYPE%" == "" set BUILD_TYPE=debug
@if /I "%BUILD_TYPE%" == "debug" set CMAKE_BUILD_TYPE=Debug
@if /I "%BUILD_TYPE%" == "debug" set MESON_BUILD_TYPE=debug
@if /I "%BUILD_TYPE%" == "release" set CMAKE_BUILD_TYPE=Release
@if /I "%BUILD_TYPE%" == "release" set MESON_BUILD_TYPE=release
@set DOWNLOADS_PATH=c:\data\projects\strawberry\msvc_\downloads
@set BUILD_PATH=c:\data\projects\strawberry\msvc_\build_%BUILD_TYPE%
@set PREFIX_PATH=c:\strawberry_msvc_x86_64_%BUILD_TYPE%
@set PREFIX_PATH_FORWARD=%PREFIX_PATH:\=/%
@set PREFIX_PATH_ESCAPE=%PREFIX_PATH:\=\\%
@set QT_DEV=OFF
@set GST_DEV=OFF
@call versions.bat
@echo Strawberry MSVC dependencies build script
@echo.
@echo Downloads path: %DOWNLOADS_PATH%
@echo Build path: %BUILD_PATH%
@echo Build type: %BUILD_TYPE%
@echo CMake Build type: %CMAKE_BUILD_TYPE%
@echo Meson Build type: %MESON_BUILD_TYPE%
@echo Prefix path: %PREFIX_PATH%
@echo Prefix path forward: %PREFIX_PATH_FORWARD%
@echo Prefix path escape: %PREFIX_PATH_ESCAPE%
@echo.
:create_directories
@echo Creating directories
@if not exist "%DOWNLOADS_PATH%" MKDIR "%DOWNLOADS_PATH%" || goto end
@if not exist "%BUILD_PATH%" MKDIR "%BUILD_PATH%" || goto end
@if not exist "%PREFIX_PATH%" MKDIR "%PREFIX_PATH%" || goto end
@if not exist "%PREFIX_PATH%\bin" MKDIR "%PREFIX_PATH%\bin" || goto end
@if not exist "%PREFIX_PATH%\lib" MKDIR "%PREFIX_PATH%\lib" || goto end
@if not exist "%PREFIX_PATH%\include" MKDIR "%PREFIX_PATH%\include" || goto end
:install
@if not exist "%PREFIX_PATH%\bin\sed.exe" goto sed
goto setup
:sed
copy /y "%DOWNLOADS_PATH%\sed.exe" "%PREFIX_PATH%\bin\" || goto end
@goto install
:setup
@echo Setting environment variables
@set PKG_CONFIG_EXECUTABLE=%PREFIX_PATH%\bin\pkgconf.exe
@set PKG_CONFIG_PATH=%PREFIX_PATH%\lib\pkgconfig
@set CL=-MP
@set PATH=%PREFIX_PATH%\bin;%PATH%
@set YASMPATH=%PREFIX_PATH%\bin\
@goto check
:check
echo Checking requirements...
@patch --version >NUL 2>&1 || set PATH=%PATH%;C:\Program Files\Git\usr\bin
@patch --version >NUL 2>&1 || (
@echo "Missing patch."
@goto end
)
@sed --version >NUL 2>&1 || set PATH=%PATH%;C:\Program Files\Git\usr\bin
@sed --version >NUL 2>&1 || (
@echo "Missing sed."
@goto end
)
@nasm --version >NUL 2>&1 || set PATH=%PATH%;c:\Program Files\nasm
@nasm --version >NUL 2>&1 || (
@echo "Missing nasm. Download nasm from https://www.nasm.us/"
@goto end
)
@win_flex --version >NUL 2>&1 || set PATH=%PATH%;c:\win_flex_bison
@win_flex --version >NUL 2>&1 || (
@echo "Missing win_flex. Download win_flex from https://sourceforge.net/projects/winflexbison/"
@goto end
)
@win_bison --version >NUL 2>&1 || set PATH=%PATH%;c:\win_flex_bison
@win_bison --version >NUL 2>&1 || (
@echo "Missing win_bison. Download win_bison from https://sourceforge.net/projects/winflexbison/"
@goto end
)
@perl --version >NUL 2>&1 || set PATH=%PATH%;C:\Strawberry\perl\bin
@perl --version >NUL 2>&1 || (
@echo "Missing perl. Download Strawberry Perl from https://strawberryperl.com/"
@goto end
)
@python --version >NUL 2>&1 || set PATH=%PATH%;C:\Program Files\Python310
@python --version >NUL 2>&1 || (
@echo "Missing python. Download Python from https://www.python.org/"
@goto end
)
@tar --version >NUL 2>&1 || set PATH=%PATH%;C:\Program Files\Git\usr\bin
@tar --version >NUL 2>&1 || (
@echo "Missing tar."
@goto end
)
@bzip2 --help >NUL 2>&1 || set PATH=%PATH%;C:\Program Files\Git\usr\bin
@bzip2 --help >NUL 2>&1 || (
@echo "Missing bzip2."
@goto end
)
@7z --version >NUL 2>&1 || set PATH=%PATH%;C:\Program Files\7-Zip
@7z i >NUL 2>&1 || (
@echo "Missing 7z. Download 7-Zip from https://www.7-zip.org/download.html"
@goto end
)
@cmake --version >NUL 2>&1 || set PATH=%PATH%;C:\Program Files\CMake\bin
@cmake --version >NUL 2>&1 || (
@echo "Missing cmake. Download CMake from https://cmake.org/"
@goto end
)
@meson --version >NUL 2>&1 || set PATH=%PATH%;C:\Program Files\Meson
@meson --version >NUL 2>&1 || (
@echo "Missing meson. Download Meson from https://mesonbuild.com/"
@goto end
)
@nmake /help >NUL 2>&1 || (
@echo "Missing nmake. Install Visual Studio 2022"
@goto end
)
goto continue
:continue
@if not exist "%PREFIX_PATH%\bin\yasm.exe" goto yasm
@if not exist "%PREFIX_PATH%\bin\pkgconf.exe" goto pkgconf
@rem @if not exist "%PREFIX_PATH%\lib\pkgconfig\mimalloc.pc" goto mimalloc
@if not exist "%PREFIX_PATH%\lib\getopt.lib" goto getopt-win
@if not exist "%PREFIX_PATH%\lib\zlib*.lib" goto zlib
@if not exist "%PREFIX_PATH%\lib\pkgconfig\openssl.pc" goto openssl
@if not exist "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc" goto gnutls
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libpng.pc" goto libpng
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libjpeg.pc" goto libjpeg
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libpcre2-16.pc" goto pcre2
@if not exist "%PREFIX_PATH%\lib\pkgconfig\bzip2.pc" goto bzip2
@if not exist "%PREFIX_PATH%\lib\pkgconfig\liblzma.pc" goto xz
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libbrotlicommon.pc" goto brotli
@if not exist "%PREFIX_PATH%\lib\libiconv*.lib" goto libiconv
@if not exist "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc" goto icu4c
@if not exist "%PREFIX_PATH%\lib\pkgconfig\pixman-1.pc" goto pixman
@if not exist "%PREFIX_PATH%\lib\pkgconfig\expat.pc" goto expat
@if not exist "%PREFIX_PATH%\include\boost\config.hpp" goto boost
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libxml-2.0.pc" goto libxml2
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libnghttp2.pc" goto nghttp2
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libffi.pc" goto libffi
@rem @if not exist "%PREFIX_PATH%\lib\intl.lib" goto libintl
@if not exist "%PREFIX_PATH%\include\dlfcn.h" goto dlfcn-win32
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libpsl.pc" goto libpsl
@if not exist "%PREFIX_PATH%\lib\pkgconfig\orc-0.4.pc" goto orc
@rem @if not exist "%PREFIX_PATH%\lib\pkgconfig\libcurl.pc" goto curl
@if not exist "%PREFIX_PATH%\lib\pkgconfig\sqlite3.pc" goto sqlite
@if not exist "%PREFIX_PATH%\lib\pkgconfig\glib-2.0.pc" goto glib
@rem @if not exist "%PREFIX_PATH%\lib\libproxy.lib" goto libproxy
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libsoup-3.0.pc" goto libsoup
@if not exist "%PREFIX_PATH%\lib\gio\modules\gioopenssl.lib" goto glib-networking
@if not exist "%PREFIX_PATH%\lib\pkgconfig\freetype2.pc" goto freetype
@rem @if not exist "%PREFIX_PATH%\lib\pkgconfig\cairo.pc" goto cairo
@if not exist "%PREFIX_PATH%\lib\harfbuzz*.lib" goto harfbuzz
@if not exist "%PREFIX_PATH%\lib\pkgconfig\ogg.pc" goto libogg
@if not exist "%PREFIX_PATH%\lib\pkgconfig\vorbis.pc" goto libvorbis
@if not exist "%PREFIX_PATH%\lib\pkgconfig\flac.pc" goto flac
@if not exist "%PREFIX_PATH%\lib\pkgconfig\wavpack.pc" goto wavpack
@if not exist "%PREFIX_PATH%\lib\pkgconfig\opus.pc" goto opus
@if not exist "%PREFIX_PATH%\bin\opusfile.dll" goto opusfile
@if not exist "%PREFIX_PATH%\lib\pkgconfig\speex.pc" goto speex
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libmpg123.pc" goto mpg123
@if not exist "%PREFIX_PATH%\lib\pkgconfig\mp3lame.pc" goto lame
@if not exist "%PREFIX_PATH%\lib\libtwolame_dll.lib" goto twolame
@if not exist "%PREFIX_PATH%\lib\pkgconfig\fftw3.pc" goto fftw3
@if not exist "%PREFIX_PATH%\lib\pkgconfig\mpcdec.pc" goto musepack
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libopenmpt.pc" goto libopenmpt
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libgme.pc" goto libgme
@if not exist "%PREFIX_PATH%\lib\pkgconfig\fdk-aac.pc" goto fdk-aac
@if not exist "%PREFIX_PATH%\lib\pkgconfig\faad2.pc" goto faad2
@if not exist "%PREFIX_PATH%\lib\pkgconfig\faac.pc" goto faac
@if not exist "%PREFIX_PATH%\include\utf8cpp\utf8.h" goto utfcpp
@if not exist "%PREFIX_PATH%\lib\pkgconfig\taglib.pc" goto taglib
@if not exist "%PREFIX_PATH%\lib\libbs2b.lib" goto libbs2b
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libebur128.pc" goto libebur128
@if not exist "%PREFIX_PATH%\lib\avutil.lib" goto ffmpeg
@if not exist "%PREFIX_PATH%\lib\pkgconfig\libchromaprint.pc" goto chromaprint
@if not exist "%PREFIX_PATH%\share\asiosdk_%ASIOSDK_VERSION%\readme.txt" goto asiosdk
@if not exist "%PREFIX_PATH%\lib\pkgconfig\gstreamer-1.0.pc" goto gstreamer
@if not exist "%PREFIX_PATH%\lib\pkgconfig\gstreamer-plugins-base-1.0.pc" goto gst-plugins-base
@if not exist "%PREFIX_PATH%\lib\gstreamer-1.0\gstdirectsound.lib" goto gst-plugins-good
@if not exist "%PREFIX_PATH%\lib\pkgconfig\gstreamer-plugins-bad-1.0.pc" goto gst-plugins-bad
@if not exist "%PREFIX_PATH%\lib\gstreamer-1.0\gstasf.lib" goto gst-plugins-ugly
@if not exist "%PREFIX_PATH%\lib\gstreamer-1.0\gstlibav.lib" goto gst-libav
@if not exist "%PREFIX_PATH%\lib\pkgconfig\gstspotify.pc" goto gst-plugins-rs
@if not exist "%PREFIX_PATH%\lib\pkgconfig\absl_any.pc" goto abseil-cpp
@if not exist "%PREFIX_PATH%\lib\pkgconfig\protobuf.pc" goto protobuf
@if not exist "%PREFIX_PATH%\bin\qt-configure-module.bat" goto qtbase
@if not exist "%PREFIX_PATH%\bin\linguist.exe" goto qttools
@if not exist "%PREFIX_PATH%\lib\cmake\Qt6\FindWrapProtobuf.cmake" goto qtgrpc
@if not exist "%PREFIX_PATH%\lib\pkgconfig\qtsparkle-qt6.pc" goto qtsparkle
@if not exist "%PREFIX_PATH%\lib\kdsingleapplication-qt6.lib" goto kdsingleapplication
@rem @if not exist "%PREFIX_PATH%\lib\pkgconfig\glew.pc" goto glew
@rem @if not exist "%PREFIX_PATH%\lib\cmake\projectM4\projectM4Config.cmake" goto libprojectm
@if not exist "%PREFIX_PATH%\bin\gettext.exe" goto gettext
@if not exist "%PREFIX_PATH%\lib\pkgconfig\tinysvcmdns.pc" goto tinysvcmdns
@if not exist "%BUILD_PATH%\strawberry\build\strawberrysetup*.exe" goto strawberry
@goto end
:pkgconf
@echo Building pkgconf
cd "%BUILD_PATH%" || goto end
if not exist "pkgconf-pkgconf-%PKGCONF_VERSION%" tar -xvf "%DOWNLOADS_PATH%\pkgconf-%PKGCONF_VERSION%.tar.gz" || goto end
cd "pkgconf-pkgconf-%PKGCONF_VERSION%" || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" --wrap-mode=nodownload -Dtests=disabled build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
copy /y "%PREFIX_PATH%\bin\pkgconf.exe" "%PREFIX_PATH%\bin\pkg-config.exe" || goto end
@goto continue
:mimalloc
@echo Building mimalloc
cd "%BUILD_PATH%" || goto end
if not exist "mimalloc-%MIMALLOC_VERSION%" tar -xvf "%DOWNLOADS_PATH%\v%MIMALLOC_VERSION%.tar.gz" || goto end
cd "mimalloc-%MIMALLOC_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DMI_BUILD_SHARED=ON -DMI_BUILD_STATIC=OFF -DMI_BUILD_TESTS=OFF -DMI_CHECK_FULL=OFF -DMI_DEBUG_FULL=OFF -DMI_DEBUG_TSAN=OFF -DMI_DEBUG_UBSAN=OFF -DMI_OVERRIDE=ON -DMI_USE_CXX=ON -DMI_WIN_REDIRECT=ON || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
move "%PREFIX_PATH%\lib\mimalloc*.dll" "%PREFIX_PATH%\bin\" || goto end
@goto continue
:yasm
@echo Building yasm
cd "%BUILD_PATH%" || goto end
if not exist "yasm-%YASM_VERSION%" tar -xvf "%DOWNLOADS_PATH%\yasm-%YASM_VERSION%.tar.gz" || goto end
cd "yasm-%YASM_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:getopt-win
@echo Building getopt-win
cd "%BUILD_PATH%" || goto end
if not exist "getopt-win" @(
mkdir getopt-win || goto end
cd getopt-win || goto end
xcopy /s /y /h "%DOWNLOADS_PATH%\getopt-win" . || goto end
cd ..
) || goto end
cd "getopt-win" || goto end
patch -p1 -N < "%DOWNLOADS_PATH%/getopt-win-cmake.patch"
if not exist build mkdir build
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:zlib
@echo Building zlib
cd "%BUILD_PATH%" || goto end
if not exist "zlib-%ZLIB_VERSION%" tar -xvf "%DOWNLOADS_PATH%\zlib-%ZLIB_VERSION%.tar.gz" || goto end
cd "zlib-%ZLIB_VERSION%" || goto end
if not exist build mkdir build
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@if "%BUILD_TYPE%" == "release" copy /y "%PREFIX_PATH%\lib\zlib.lib" "%PREFIX_PATH%\lib\z.lib" || goto end
@if "%BUILD_TYPE%" == "debug" copy /y "%PREFIX_PATH%\lib\zlibd.lib" "%PREFIX_PATH%\lib\z.lib" || goto end
@goto continue
:openssl
@echo Building openssl
cd "%BUILD_PATH%" || goto end
if not exist "openssl-%OPENSSL_VERSION%" tar -xvf "%DOWNLOADS_PATH%\openssl-%OPENSSL_VERSION%.tar.gz" || goto end
cd openssl-%OPENSSL_VERSION% || goto end
if "%BUILD_TYPE%" == "debug" perl Configure VC-WIN64A shared zlib no-capieng no-tests --prefix="%PREFIX_PATH%" --libdir=lib --openssldir=%PREFIX_PATH%\ssl --debug --with-zlib-include=%PREFIX_PATH%\include --with-zlib-lib=%PREFIX_PATH%\lib\zlibd.lib || goto end
if "%BUILD_TYPE%" == "release" perl Configure VC-WIN64A shared zlib no-capieng no-tests --prefix="%PREFIX_PATH%" --libdir=lib --openssldir="%PREFIX_PATH%\ssl" --release --with-zlib-include="%PREFIX_PATH%\include" --with-zlib-lib="%PREFIX_PATH%\lib\zlib.lib" || goto end
nmake || goto end
nmake install_sw || goto end
copy %PREFIX_PATH%\lib\libssl.lib %PREFIX_PATH%\lib\ssl.lib
copy %PREFIX_PATH%\lib\libcrypto.lib %PREFIX_PATH%\lib\crypto.lib
@echo prefix=%PREFIX_PATH_FORWARD%> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo exec_prefix=${prefix}>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo libdir=${exec_prefix}/lib>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo includedir=${prefix}/include>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo enginesdir=${libdir}/engines-3>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo modulesdir=${libdir}/ossl-modules>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo.>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo Name: OpenSSL-libcrypto>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo Description: OpenSSL cryptography library>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo Version: %OPENSSL_VERSION%>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo Libs: -L${libdir} -lcrypto>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo Libs.private: -lz -ldl -pthread>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo Cflags: -DOPENSSL_LOAD_CONF -I${includedir}>> "%PREFIX_PATH%\lib\pkgconfig\libcrypto.pc"
@echo prefix=%PREFIX_PATH_FORWARD%> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo exec_prefix=${prefix}>> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo libdir=${exec_prefix}/lib>> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo includedir=${prefix}/include>> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo.>> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo Name: OpenSSL-libssl>> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo Description: Secure Sockets Layer and cryptography libraries>> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo Version: %OPENSSL_VERSION%>> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo Requires.private: libcrypto>> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo Libs: -L${libdir} -lssl>> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo Cflags: -DOPENSSL_LOAD_CONF -I${includedir}>> "%PREFIX_PATH%\lib\pkgconfig\libssl.pc"
@echo prefix=%PREFIX_PATH_FORWARD%> "%PREFIX_PATH%\lib\pkgconfig\openssl.pc"
@echo exec_prefix=${prefix}>> "%PREFIX_PATH%\lib\pkgconfig\openssl.pc"
@echo libdir=${exec_prefix}/lib>> "%PREFIX_PATH%\lib\pkgconfig\openssl.pc"
@echo includedir=${prefix}/include>> "%PREFIX_PATH%\lib\pkgconfig\openssl.pc"
@echo.>> "%PREFIX_PATH%\lib\pkgconfig\openssl.pc"
@echo Name: OpenSSL>> "%PREFIX_PATH%\lib\pkgconfig\openssl.pc"
@echo Description: Secure Sockets Layer and cryptography libraries and tools>> "%PREFIX_PATH%\lib\pkgconfig\openssl.pc"
@echo Version: %OPENSSL_VERSION%>> "%PREFIX_PATH%\lib\pkgconfig\openssl.pc"
@echo Requires: libssl libcrypto>> "%PREFIX_PATH%\lib\pkgconfig\openssl.pc"
@goto continue
:gnutls
@echo Installing gnutls
cd "%BUILD_PATH%" || goto end
if not exist gnutls mkdir gnutls || goto end
cd gnutls || goto end
7z x -aoa "%DOWNLOADS_PATH%\libgnutls_%GNUTLS_VERSION%_msvc17.zip" || goto end
xcopy /s /y "bin\x64\*.*" "%PREFIX_PATH%\bin\" || goto end
xcopy /s /y "lib\x64\gnutls.*" "%PREFIX_PATH%\lib\" || goto end
if not exist "%PREFIX_PATH%\include\gnutls" mkdir "%PREFIX_PATH%\include\gnutls" || goto end
xcopy /s /y "include\gnutls\*.h" "%PREFIX_PATH%\include\gnutls\" || goto end
@echo prefix=%PREFIX_PATH_FORWARD%> "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@echo exec_prefix=%PREFIX_PATH_FORWARD%>> "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@echo libdir=%PREFIX_PATH_FORWARD%/lib>> "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@echo includedir=%PREFIX_PATH_FORWARD%/include>> "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@echo.>> "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@echo Name: gnutls>> "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@echo Description: gnutls>> "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@echo URL: https://www.gnutls.org/>> %PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@echo Version: %GNUTLS_VERSION%>> "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@echo Libs: -L${libdir} -lgnutls>> "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@echo Cflags: -I${includedir}>> "%PREFIX_PATH%\lib\pkgconfig\gnutls.pc"
@goto continue
:libpng
@echo Building libpng
cd "%BUILD_PATH%" || goto end
if not exist "libpng-%LIBPNG_VERSION%" tar -xvf "%DOWNLOADS_PATH%\libpng-%LIBPNG_VERSION%.tar.gz" || goto end
cd "libpng-%LIBPNG_VERSION%" || goto end
patch -p1 -N < "%DOWNLOADS_PATH%/libpng-pkgconf.patch"
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@if "%BUILD_TYPE%" == "debug" copy /y "%PREFIX_PATH%\lib\libpng16d.lib" "%PREFIX_PATH%\lib\png16.lib" || goto end
@goto continue
:libjpeg
@echo Building libjpeg
cd "%BUILD_PATH%" || goto end
if not exist "libjpeg-turbo-%LIBJPEG_VERSION%" tar -xvf "%DOWNLOADS_PATH%\libjpeg-turbo-%LIBJPEG_VERSION%.tar.gz" || goto end
cd "libjpeg-turbo-%LIBJPEG_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DENABLE_SHARED=ON || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:pcre2
@echo Building pcre2
cd "%BUILD_PATH%" || goto end
if not exist "pcre2-%PCRE2_VERSION%" tar -xvf "%DOWNLOADS_PATH%\pcre2-%PCRE2_VERSION%.tar.bz2" || goto end
cd "pcre2-%PCRE2_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_BUILD_PCRE2_8=ON -DPCRE2_BUILD_TESTS=OFF -DPCRE2_SUPPORT_UNICODE=ON || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:bzip2
@echo Building bzip2
cd "%BUILD_PATH%" || goto end
if not exist "bzip2-%BZIP2_VERSION%" tar -xvf "%DOWNLOADS_PATH%\bzip2-%BZIP2_VERSION%.tar.gz" || goto end
cd bzip2-%BZIP2_VERSION% || goto end
patch -p1 -N < "%DOWNLOADS_PATH%/bzip2-cmake.patch"
if not exist build2 mkdir build2 || goto end
cmake --log-level="DEBUG" -S . -B build2 -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" || goto end
cd build2 || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:xz
@echo Building xz
cd "%BUILD_PATH%" || goto end
if not exist "xz-%XZ_VERSION%" tar -xvf "%DOWNLOADS_PATH%\xz-%XZ_VERSION%.tar.gz" || goto end
cd "xz-%XZ_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DBUILD_TESTING=OFF || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:brotli
@echo Building brotli
cd "%BUILD_PATH%" || goto end
if not exist "brotli-%BROTLI_VERSION%" tar -xvf "%DOWNLOADS_PATH%\v%BROTLI_VERSION%.tar.gz" || goto end
cd "brotli-%BROTLI_VERSION%" || goto end
if not exist build2 mkdir build2 || goto end
cmake --log-level="DEBUG" -S . -B build2 -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_TESTING=OFF || goto end
cd build2 || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:libiconv
@echo Building libiconv
cd "%BUILD_PATH%" || goto end
if not exist "libiconv-for-Windows" @(
mkdir libiconv-for-Windows || goto end
cd libiconv-for-Windows || goto end
xcopy /s /y /h "%DOWNLOADS_PATH%\libiconv-for-Windows" . || goto end
cd ..
) || goto end
cd libiconv-for-Windows || goto end
msbuild libiconv.sln /property:Configuration=%BUILD_TYPE% || goto end
copy /y "output\x64\%BUILD_TYPE%\*.lib" "%PREFIX_PATH%\lib\" || goto end
copy /y "output\x64\%BUILD_TYPE%\*.dll" "%PREFIX_PATH%\bin\" || goto end
copy /y "include\*.h" "%PREFIX_PATH%\include\" || goto end
@if "%BUILD_TYPE%" == "debug" copy /y "%PREFIX_PATH%\lib\libiconvD.lib" "%PREFIX_PATH%\lib\libiconv.lib"
@goto continue
:icu4c
@echo Building icu4c
cd "%BUILD_PATH%" || goto end
if not exist "icu" 7z x "%DOWNLOADS_PATH%\icu4c-%ICU4C_VERSION_UNDERSCORE%-src.zip" || goto end
cd "icu\source\allinone" || goto end
@rem start /w devenv.exe allinone.sln /upgrade
msbuild allinone.sln /property:Configuration="%BUILD_TYPE%" /p:Platform="x64" /p:SkipUWP=true || goto end
cd ..\..\ || goto end
if not exist "%PREFIX_PATH%\include\unicode" mkdir "%PREFIX_PATH%\include\unicode" || goto end
copy /y "include\unicode\*.h" "%PREFIX_PATH%\include\unicode\" || goto end
copy /y "lib64\*.*" "%PREFIX_PATH%\lib\" || goto end
copy /y "bin64\*.*" "%PREFIX_PATH%\bin\" || goto end
@echo prefix=%PREFIX_PATH_FORWARD%> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@echo exec_prefix=${prefix}>> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@echo libdir=${exec_prefix}/lib>> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@echo includedir=${prefix}/include>> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@echo.>> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@echo Name: icu-uc>> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@echo Description: International Components for Unicode: Common and Data libraries>> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@echo Version: %ICU4C_VERSION%>> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@if "%BUILD_TYPE%" == "debug" @echo Libs: -L${libdir} -licuucd -licudt>> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@if "%BUILD_TYPE%" == "release" @echo Libs: -L${libdir} -licuuc -licudt>> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@echo Libs.private: -lpthread -lm>> "%PREFIX_PATH%\lib\pkgconfig\icu-uc.pc"
@echo prefix=%PREFIX_PATH_FORWARD%> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@echo exec_prefix=${prefix}>> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@echo libdir=${exec_prefix}/lib>> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@echo includedir=${prefix}/include>> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@echo.>> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@echo Name: icu-i18n>> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@echo Description: International Components for Unicode: Stream and I/O Library>> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@echo Version: %ICU4C_VERSION%>> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@if "%BUILD_TYPE%" == "debug" @echo Libs: -licuind>> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@if "%BUILD_TYPE%" == "release" @echo Libs: -licuin>> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@echo Requires: icu-uc>> "%PREFIX_PATH%\lib\pkgconfig\icu-i18n.pc"
@echo prefix=%PREFIX_PATH_FORWARD%> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@echo exec_prefix=${prefix}>> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@echo libdir=${exec_prefix}/lib>> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@echo includedir=${prefix}/include>> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@echo.>> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@echo Name: icu-io>> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@echo Description: International Components for Unicode: Stream and I/O Library>> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@echo Version: %ICU4C_VERSION%>> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@if "%BUILD_TYPE%" == "debug" @echo Libs: -licuiod>> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@if "%BUILD_TYPE%" == "release" @echo Libs: -licuio>> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@echo Requires: icu-i18n>> "%PREFIX_PATH%\lib\pkgconfig\icu-io.pc"
@goto continue
:pixman
@echo Building pixman
cd "%BUILD_PATH%" || goto end
if not exist "pixman-%PIXMAN_VERSION%" tar -xvf "%DOWNLOADS_PATH%\pixman-%PIXMAN_VERSION%.tar.gz"
cd "pixman-%PIXMAN_VERSION%" || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" --pkg-config-path="%PREFIX_PATH%\lib\pkgconfig" --wrap-mode=nodownload -Dgtk=disabled -Dlibpng=enabled build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
@goto continue
:expat
@echo Building expat
cd "%BUILD_PATH%" || goto end
if not exist "expat-%EXPAT_VERSION%" tar -xvf "%DOWNLOADS_PATH%\expat-%EXPAT_VERSION%.tar.bz2" || goto end
cd "expat-%EXPAT_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DEXPAT_SHARED_LIBS=ON -DEXPAT_BUILD_DOCS=OFF -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_FUZZERS=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_BUILD_PKGCONFIG=ON || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:boost
@echo Building boost
cd "%BUILD_PATH%" || goto end
if not exist "boost_%BOOST_VERSION_UNDERSCORE%" tar -xvf "%DOWNLOADS_PATH%\boost_%BOOST_VERSION_UNDERSCORE%.tar.bz2" || goto end
cd "%BUILD_PATH%\boost_%BOOST_VERSION_UNDERSCORE%" || goto end
if exist b2.exe del b2.exe
if exist bjam.exe del bjam.exe
if exist stage rmdir /s /q stage
@echo Running bootstrap.bat
call .\bootstrap.bat || goto end
@echo Running b2.exe
.\b2.exe -a -q -j 4 -d1 --ignore-site-config --stagedir="stage" --layout="tagged" --prefix="%PREFIX_PATH%" --exec-prefix="%PREFIX_PATH%\bin" --libdir="%PREFIX_PATH%\lib" --includedir="%PREFIX_PATH%\include" --with-headers toolset=msvc architecture=x86 address-model=64 link=shared runtime-link=shared threadapi=win32 threading=multi variant=%BUILD_TYPE% install
@goto continue
:libxml2
@echo Building libxml2
cd "%BUILD_PATH%" || goto end
if not exist "libxml2-v%LIBXML2_VERSION%" tar -xvf "%DOWNLOADS_PATH%\libxml2-v%LIBXML2_VERSION%.tar.bz2"
cd "libxml2-v%LIBXML2_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_ZLIB=ON -DLIBXML2_WITH_LZMA=ON -DLIBXML2_WITH_ICONV=ON -DLIBXML2_WITH_ICU=ON -DICU_ROOT="%PREFIX_PATH_FORWARD%" || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@if "%BUILD_TYPE%" == "debug" copy /y "%PREFIX_PATH%\lib\libxml2d.lib" "%PREFIX_PATH%/lib/libxml2.lib"
@goto continue
:nghttp2
@echo Building nghttp2
cd "%BUILD_PATH%" || goto end
if not exist "nghttp2-%NGHTTP2_VERSION%" tar -xvf "%DOWNLOADS_PATH%\nghttp2-%NGHTTP2_VERSION%.tar.bz2" || goto end
cd "nghttp2-%NGHTTP2_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:libffi
@echo Building libffi
cd "%BUILD_PATH%" || goto end
if not exist "libffi" @(
mkdir "libffi" || goto end
cd "libffi" || goto end
xcopy /s /y /h "%DOWNLOADS_PATH%\libffi" . || goto end
cd ..
) || goto end
cd libffi || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" -Dpkg_config_path="%PREFIX_PATH%\lib\pkgconfig" --wrap-mode=nodownload build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
@goto continue
:libintl
@echo Building libintl
cd "%BUILD_PATH%" || goto end
if not exist "proxy-libintl" @(
mkdir "proxy-libintl" || goto end
cd "proxy-libintl" || goto end
xcopy /s /y /h "%DOWNLOADS_PATH%\proxy-libintl" . || goto end
cd ..
) || goto end
cd proxy-libintl || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" -Dpkg_config_path="%PREFIX_PATH%\lib\pkgconfig" --wrap-mode=nodownload build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
@goto continue
:dlfcn-win32
@echo Building dlfcn-win32
cd "%BUILD_PATH%" || goto end
if not exist "dlfcn-win32-%DLFCN_VERSION%" tar -xvf "%DOWNLOADS_PATH%\v%DLFCN_VERSION%.tar.gz" || goto end
cd "dlfcn-win32-%DLFCN_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:libpsl
@echo Building libpsl
@set CFLAGS=-I%PREFIX_PATH_FORWARD%/include
@set LDFLAGS=-L%PREFIX_PATH%\lib
cd "%BUILD_PATH%" || goto end
if not exist "libpsl-%LIBPSL_VERSION%" tar -xvf "%DOWNLOADS_PATH%\libpsl-%LIBPSL_VERSION%.tar.gz" || goto end
cd "libpsl-%LIBPSL_VERSION%" || goto end
patch -p1 -N < "%DOWNLOADS_PATH%\libpsl-time.patch"
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" --pkg-config-path="%PREFIX_PATH%\lib\pkgconfig" --wrap-mode=nodownload build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
@set CFLAGS=
@set LDFLAGS=
@goto continue
:orc
@echo Building orc
cd "%BUILD_PATH%" || goto end
if not exist "orc-%ORC_VERSION%" 7z x "%DOWNLOADS_PATH%\orc-%ORC_VERSION%.tar.xz" -so | 7z x -aoa -si"orc-%ORC_VERSION%.tar" || goto end
@rem if not exist "orc-%ORC_VERSION%" tar -xvf "%DOWNLOADS_PATH%\orc-%ORC_VERSION%.tar.xz" || goto end
cd "orc-%ORC_VERSION%" || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" --pkg-config-path="%PREFIX_PATH%\lib\pkgconfig" --wrap-mode=nodownload build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
@goto continue
:curl
@echo Building curl
cd "%BUILD_PATH%" || goto end
if not exist "curl-%CURL_VERSION%" tar -xvf "%DOWNLOADS_PATH%\curl-%CURL_VERSION%.tar.gz" || goto end
cd "curl-%CURL_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:sqlite
@echo Building sqlite
cd "%BUILD_PATH%" || goto end
if not exist "sqlite-autoconf-%SQLITE_VERSION%" tar -xvf "%DOWNLOADS_PATH%\sqlite-autoconf-%SQLITE_VERSION%.tar.gz" || goto end
cd "sqlite-autoconf-%SQLITE_VERSION%" || goto end
cl -DSQLITE_API="__declspec(dllexport)" -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_COLUMN_METADATA sqlite3.c -link -dll -out:sqlite3.dll || goto end
cl shell.c sqlite3.c -Fe:sqlite3.exe || goto end
copy /y "*.h" "%PREFIX_PATH%\include\" || goto end
copy /y "*.lib" "%PREFIX_PATH%\lib\" || goto end
copy /y "*.dll" "%PREFIX_PATH%\bin\" || goto end
copy /y "*.exe" "%PREFIX_PATH%\bin\" || goto end
echo prefix=%PREFIX_PATH_FORWARD%> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo exec_prefix=%PREFIX_PATH_FORWARD%>> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo libdir=%PREFIX_PATH_FORWARD%/lib>> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo includedir=%PREFIX_PATH_FORWARD%/include>> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo.>>"%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo Name: SQLite>> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo Description: SQL database engine>> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo URL: https://www.sqlite.org/>> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo Version: 3.38.1>> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo Libs: -L${libdir} -lsqlite3>> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo Libs.private: -lz -ldl>> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
echo Cflags: -I${includedir}>> "%PREFIX_PATH%/lib/pkgconfig/sqlite3.pc"
@goto continue
:glib
@echo Building glib
@set CFLAGS=-I%PREFIX_PATH_FORWARD%/include
@set LDFLAGS=-L%PREFIX_PATH%\lib
cd "%BUILD_PATH%" || goto end
if not exist "glib-%GLIB_VERSION%" 7z x "%DOWNLOADS_PATH%\glib-%GLIB_VERSION%.tar.xz" -so | 7z x -aoa -si"glib-%GLIB_VERSION%.tar"
@rem if not exist "glib-%GLIB_VERSION%" tar -xvf "%DOWNLOADS_PATH%\glib-%GLIB_VERSION%.tar.xz" || goto end
cd "glib-%GLIB_VERSION%" || goto end
@rem sed -i "s/libintl = dependency('intl', required: false)/libintl = cc.find_library('intl', dirs: '%PREFIX_PATH_ESCAPE%\\lib', required: true)/g" meson.build || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" --includedir="%PREFIX_PATH%\include" --libdir="%PREFIX_PATH%\lib" -Dpkg_config_path="%PREFIX_PATH%\lib\pkgconfig" build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
@set CFLAGS=
@set LDFLAGS=
@goto continue
:libproxy
@echo Building libproxy
cd "%BUILD_PATH%" || goto end
if not exist "libproxy-%LIBPROXY_VERSION%" tar -xvf "%DOWNLOADS_PATH%\%LIBPROXY_VERSION%.tar.gz" || goto end
cd "libproxy-%LIBPROXY_VERSION%" || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" -Dpkg_config_path="%PREFIX_PATH%\lib\pkgconfig" --wrap-mode=nodownload -Ddocs=false -Dtests=false -Dconfig-gnome=false -Dpacrunner-duktape=false -Dintrospection=false build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
move /y "%PREFIX_PATH%\lib\libproxy.dll" "%PREFIX_PATH%\bin\libproxy.dll" || goto end
@goto continue
:libsoup
@echo Building libsoup
cd "%BUILD_PATH%" || goto end
if not exist "libsoup-%LIBSOUP_VERSION%" 7z x "%DOWNLOADS_PATH%\libsoup-%LIBSOUP_VERSION%.tar.xz" -so | 7z x -aoa -si"libsoup-%LIBSOUP_VERSION%.tar" || goto end
@rem if not exist "libsoup-%LIBSOUP_VERSION%" tar -xvf "%DOWNLOADS_PATH%\libsoup-%LIBSOUP_VERSION%.tar.xz" || goto end
cd "libsoup-%LIBSOUP_VERSION%" || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" --pkg-config-path="%PREFIX_PATH%\lib\pkgconfig" --wrap-mode=nodownload -Dtests=false -Dvapi=disabled -Dgssapi=disabled -Dintrospection=disabled -Dtests=false -Dsysprof=disabled -Dtls_check=false build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
@goto continue
:glib-networking
@echo Building glib-networking
cd "%BUILD_PATH%" || goto end
if not exist "glib-networking-%GLIB_NETWORKING_VERSION%" 7z x "%DOWNLOADS_PATH%\glib-networking-%GLIB_NETWORKING_VERSION%.tar.xz" -so | 7z x -aoa -si"glib-networking-%GLIB_NETWORKING_VERSION%.tar" || goto end
@rem if not exist "glib-networking-%GLIB_NETWORKING_VERSION%" tar -xvf "%DOWNLOADS_PATH%\glib-networking-%GLIB_NETWORKING_VERSION%.tar.xz" || goto end
cd "glib-networking-%GLIB_NETWORKING_VERSION%" || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" --pkg-config-path="%PREFIX_PATH%\lib\pkgconfig" --wrap-mode=nodownload -Dgnutls=enabled -Dopenssl=enabled -Dgnome_proxy=disabled -Dlibproxy=disabled build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
@goto continue
:freetype
@echo Building freetype without harfbuzz
cd "%BUILD_PATH%" || goto end
if not exist "freetype-%FREETYPE_VERSION%" tar -xvf "%DOWNLOADS_PATH%\freetype-%FREETYPE_VERSION%.tar.gz" || goto end
cd "freetype-%FREETYPE_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DFT_DISABLE_HARFBUZZ=ON || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
copy /y "%PREFIX_PATH%\lib\freetyped.lib" "%PREFIX_PATH%\lib\freetype.lib"
@goto continue
:cairo
@echo Building cairo
cd "%BUILD_PATH%" || goto end
if not exist "cairo-%CAIRO_VERSION%" 7z x "%DOWNLOADS_PATH%\cairo-%CAIRO_VERSION%.tar.xz" -so | 7z x -aoa -si"cairo-%CAIRO_VERSION%.tar" || goto end
@rem if not exist "cairo-%CAIRO_VERSION%" tar -xvf "%DOWNLOADS_PATH%\cairo-%CAIRO_VERSION%.tar.xz" || goto end
cd "cairo-%CAIRO_VERSION%" || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" --pkg-config-path="%PREFIX_PATH%\lib\pkgconfig" --wrap-mode=nodownload -Dfontconfig=disabled -Dfreetype=enabled -Dzlib=enabled -Dpng=enabled -Dtests=disabled -Dgtk_doc=false build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
@goto continue
:harfbuzz
@echo Building harfbuzz
@set CFLAGS=-I%PREFIX_PATH_FORWARD%/include
@set CXXFLAGS=-I%PREFIX_PATH_FORWARD%/include
@set LDFLAGS=-L%PREFIX_PATH%\lib
cd "%BUILD_PATH%" || goto end
if not exist "harfbuzz-%HARFBUZZ_VERSION%" 7z x "%DOWNLOADS_PATH%\harfbuzz-%HARFBUZZ_VERSION%.tar.xz" -so | 7z x -aoa -si"harfbuzz-%HARFBUZZ_VERSION%.tar"
@rem if not exist "harfbuzz-%HARFBUZZ_VERSION%" tar -xvf "%DOWNLOADS_PATH%\harfbuzz-%HARFBUZZ_VERSION%.tar.xz" || goto end
cd "harfbuzz-%HARFBUZZ_VERSION%" || goto end
if not exist "build\build.ninja" meson setup --buildtype="%MESON_BUILD_TYPE%" --default-library=shared --prefix="%PREFIX_PATH%" --wrap-mode=nodownload -Dcpp_std=c++17 -Dtests=disabled -Ddocs=disabled -Dicu=enabled -Dfreetype=enabled -Dcairo=disabled build || goto end
cd build || goto end
ninja || goto end
ninja install || goto end
@rem if not exist build mkdir build || goto end
@rem cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DHB_HAVE_GLIB=ON -DHB_HAVE_ICU=ON -DHB_HAVE_FREETYPE=ON -DICU_ROOT="%PREFIX_PATH_FORWARD%" || goto end
@rem cd build || goto end
@rem cmake --build . || goto end
@rem cmake --install . || goto end
@echo Building freetype with harfbuzz
cd "%BUILD_PATH%" || goto end
if not exist "freetype-%FREETYPE_VERSION%" tar -xvf "%DOWNLOADS_PATH%\freetype-%FREETYPE_VERSION%.tar.gz" || goto end
cd "freetype-%FREETYPE_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DFT_DISABLE_HARFBUZZ=OFF || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
copy /y "%PREFIX_PATH%\lib\freetyped.lib" "%PREFIX_PATH%\lib\freetype.lib"
@set CFLAGS=
@set CXXFLAGS=
@set LDFLAGS=
@goto continue
:libogg
@echo Building libogg
cd "%BUILD_PATH%" || goto end
if not exist "libogg-%LIBOGG_VERSION%" tar -xvf "%DOWNLOADS_PATH%\libogg-%LIBOGG_VERSION%.tar.gz" || goto end
cd "libogg-%LIBOGG_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DINSTALL_DOCS=OFF || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end
@goto continue
:libvorbis
@echo Building libvorbis
cd "%BUILD_PATH%" || goto end
if not exist "libvorbis-%LIBVORBIS_VERSION%" tar -xvf "%DOWNLOADS_PATH%\libvorbis-%LIBVORBIS_VERSION%.tar.gz" || goto end
cd "libvorbis-%LIBVORBIS_VERSION%" || goto end
if not exist build mkdir build || goto end
cmake --log-level="DEBUG" -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX="%PREFIX_PATH_FORWARD%" -DBUILD_SHARED_LIBS=ON -DINSTALL_DOCS=OFF || goto end
cd build || goto end
cmake --build . || goto end
cmake --install . || goto end