@@ -45,13 +45,29 @@ call :CloneRepositories || (exit /b)
45
45
46
46
md " %BuildRoot% \Library"
47
47
48
- :: TODO(compnerd) build ICU from source
49
- curl.exe -sOL " https://github.com/unicode-org/icu/releases/download/release-67-1/icu4c-67_1-Win64-MSVC2017.zip" || (exit /b)
50
- " %SystemDrive% \Program Files\Git\usr\bin\unzip.exe" -o icu4c-67_1-Win64-MSVC2017.zip -d %BuildRoot% \Library\icu-67.1
51
- md %BuildRoot% \Library\icu-67.1\usr\bin
52
- copy %BuildRoot% \Library\icu-67.1\bin64\icudt67.dll %BuildRoot% \Library\icu-67.1\usr\bin || (exit /b)
53
- copy %BuildRoot% \Library\icu-67.1\bin64\icuin67.dll %BuildRoot% \Library\icu-67.1\usr\bin || (exit /b)
54
- copy %BuildRoot% \Library\icu-67.1\bin64\icuuc67.dll %BuildRoot% \Library\icu-67.1\usr\bin || (exit /b)
48
+ :: Build ICU
49
+ copy %SourceRoot% \swift-installer-scripts\shared\ICU\CMakeLists.txt %SourceRoot% \icu\icu4c\ || (exit /b)
50
+ cmake ^
51
+ -B %BuildRoot% \icu ^
52
+
53
+ -D BUILD_SHARED_LIBS=NO ^
54
+ -D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
55
+ -D CMAKE_C_COMPILER=cl ^
56
+ -D CMAKE_C_FLAGS=" /GS- /Oy /Gw /Gy" ^
57
+ -D CMAKE_CXX_COMPILER=cl ^
58
+ -D CMAKE_CXX_FLAGS=" /GS- /Oy /Gw /Gy" ^
59
+ -D CMAKE_MT=mt ^
60
+ -D CMAKE_EXE_LINKER_FLAGS=" /INCREMENTAL:NO" ^
61
+ -D CMAKE_SHARED_LINKER_FLAGS=" /INCREMENTAL:NO" ^
62
+
63
+ -D CMAKE_INSTALL_PREFIX=%BuildRoot% \Library\icu-69.1\usr ^
64
+
65
+ -D BUILD_TOOLS=YES ^
66
+
67
+ -G Ninja ^
68
+ -S %SourceRoot% \icu\icu4c || (exit /b)
69
+ cmake --build " %BuildRoot% \icu" || (exit /b)
70
+ cmake --build " %BuildRoot% \icu" --target install || (exit /b)
55
71
56
72
:: FIXME(compnerd) is there a way to build the sources without downloading the amalgamation?
57
73
curl.exe -sOL " https://sqlite.org/2021/sqlite-amalgamation-3360000.zip" || (exit /b)
@@ -280,9 +296,9 @@ cmake ^
280
296
-D CMAKE_INSTALL_PREFIX=%SDKInstallRoot% \usr ^
281
297
282
298
-D CURL_DIR=%BuildRoot% \Library\curl-7.77.0\usr\lib\cmake\CURL ^
283
- -D ICU_ROOT=%BuildRoot% \Library\icu-67.1 ^
284
- -D ICU_UC_LIBRARY=%BuildRoot% \Library\icu-67 .1\lib64\icuuc67 .lib ^
285
- -D ICU_I18N_LIBRARY=%BuildRoot% \Library\icu-67 .1\lib64\icuin67 .lib ^
299
+ -D ICU_ROOT=%BuildRoot% \Library\icu-69.1\usr ^
300
+ -D ICU_UC_LIBRARY=%BuildRoot% \Library\icu-69 .1\usr\lib\sicuuc69 .lib ^
301
+ -D ICU_I18N_LIBRARY=%BuildRoot% \Library\icu-69 .1\usr\lib\sicuin69 .lib ^
286
302
-D LIBXML2_LIBRARY=%BuildRoot% \Library\libxml2-2.9.12\usr\lib\libxml2s.lib ^
287
303
-D LIBXML2_INCLUDE_DIR=%BuildRoot% \Library\libxml2-2.9.12\usr\include\libxml2 ^
288
304
-D LIBXML2_DEFINITIONS=" /DLIBXML_STATIC" ^
@@ -655,17 +671,6 @@ msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\runtime.wixproj ^
655
671
:: TODO(compnerd) actually perform the code-signing
656
672
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\runtime\runtime.msi
657
673
658
- :: Package icu.msi
659
- msbuild %SourceRoot% \swift-installer-scripts\platforms\Windows\icu.wixproj ^
660
- -p:RunWixToolsOutOfProc=true ^
661
- -p:OutputPath=%PackageRoot% \icu\ ^
662
- -p:IntermediateOutputPath=%PackageRoot% \icu\ ^
663
- -p:ProductVersion=67.1 ^
664
- -p:ProductVersionMajor=67 ^
665
- -p:ICU_ROOT=%BuildRoot%
666
- :: TODO(compnerd) actually perform the code-signing
667
- :: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\icu\icu.msi
668
-
669
674
:: Package devtools.msi
670
675
msbuild %SourceRoot% \swift-installer-scripts\platforms\Windows\devtools.wixproj ^
671
676
-p:RunWixToolsOutOfProc=true ^
@@ -708,7 +713,7 @@ move %PackageRoot%\installer\installer.exe %BuildRoot%\artifacts || (exit /b)
708
713
709
714
:: Test Swift
710
715
:: TODO(compnerd) make lit adjust the path properly
711
- path %BuildRoot% \3;%BuildRoot% \1\bin;%BuildRoot% \Library\icu-67.1\usr\bin; % PATH% ;%SystemDrive% \Program Files\Git\usr\bin
716
+ path %BuildRoot% \3;%BuildRoot% \1\bin;%PATH% ;%SystemDrive% \Program Files\Git\usr\bin
712
717
cmake --build %BuildRoot% \1 --target check-swift || (exit /b)
713
718
714
719
:: Test dispatch
@@ -735,9 +740,9 @@ cmake ^
735
740
-D CMAKE_INSTALL_PREFIX=%SDKInstallRoot% \usr ^
736
741
737
742
-D CURL_DIR=%BuildRoot% \Library\curl-7.77.0\usr\lib\cmake\CURL ^
738
- -D ICU_ROOT=%BuildRoot% \Library\icu-67 .1 ^
739
- -D ICU_UC_LIBRARY=%BuildRoot% \Library\icu-67 .1\lib64\icuuc67 .lib ^
740
- -D ICU_I18N_LIBRARY=%BuildRoot% \Library\icu-67 .1\lib64\icuin67 .lib ^
743
+ -D ICU_ROOT=%BuildRoot% \Library\icu-69 .1 ^
744
+ -D ICU_UC_LIBRARY=%BuildRoot% \Library\icu-69 .1\lib\sicuuc69 .lib ^
745
+ -D ICU_I18N_LIBRARY=%BuildRoot% \Library\icu-69 .1\lib\sicuin69 .lib ^
741
746
-D LIBXML2_LIBRARY=%BuildRoot% \Library\libxml2-2.9.12\usr\lib\libxml2s.lib ^
742
747
-D LIBXML2_INCLUDE_DIR=%BuildRoot% \Library\libxml2-2.9.12\usr\include\libxml2 ^
743
748
-D LIBXML2_DEFINITIONS=" /DLIBXML_STATIC" ^
@@ -832,7 +837,7 @@ rd /s /q zlib libxml2 sqlite icu curl
832
837
git clone --quiet --no-tags --depth 1 --branch v1.2.11 https://github.com/madler/zlib
833
838
git clone --quiet --no-tags --depth 1 --branch v2.9.12 https://github.com/gnome/libxml2
834
839
git clone --quiet --no-tags --depth 1 --branch version-3.36.0 https://github.com/sqlite/sqlite
835
- git clone --quiet --no-tags --depth 1 --branch maint/maint-67 https://github.com/unicode-org/icu
840
+ git clone --quiet --no-tags --depth 1 --branch maint/maint-69 https://github.com/unicode-org/icu
836
841
git clone --quiet --no-tags --depth 1 --branch curl-7_77_0 https://github.com/curl/curl
837
842
838
843
goto :eof
0 commit comments