@@ -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,10 @@ 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_DATA_LIBRARY_RELEASE=%BuildRoot% \Library\icu-69.1\usr\lib\sicudt69.lib ^
301
+ -D ICU_UC_LIBRARY_RELEASE=%BuildRoot% \Library\icu-69.1\usr\lib\sicuuc69.lib ^
302
+ -D ICU_I18N_LIBRARY_RELEASE=%BuildRoot% \Library\icu-69.1\usr\lib\sicuin69.lib ^
286
303
-D LIBXML2_LIBRARY=%BuildRoot% \Library\libxml2-2.9.12\usr\lib\libxml2s.lib ^
287
304
-D LIBXML2_INCLUDE_DIR=%BuildRoot% \Library\libxml2-2.9.12\usr\include\libxml2 ^
288
305
-D LIBXML2_DEFINITIONS=" /DLIBXML_STATIC" ^
@@ -655,17 +672,6 @@ msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\runtime.wixproj ^
655
672
:: TODO(compnerd) actually perform the code-signing
656
673
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\runtime\runtime.msi
657
674
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
675
:: Package devtools.msi
670
676
msbuild %SourceRoot% \swift-installer-scripts\platforms\Windows\devtools.wixproj ^
671
677
-p:RunWixToolsOutOfProc=true ^
@@ -679,7 +685,6 @@ msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\devtools.wixproj
679
685
move %PackageRoot% \toolchain\toolchain.msi %PackageRoot% || (exit /b)
680
686
move %PackageRoot% \sdk\sdk.msi %PackageRoot% || (exit /b)
681
687
move %PackageRoot% \runtime\runtime.msi %PackageRoot% || (exit /b)
682
- move %PackageRoot% \icu\icu.msi %PackageRoot% || (exit /b)
683
688
move %PackageRoot% \devtools\devtools.msi %PackageRoot% || (exit /b)
684
689
685
690
:: Build Installer
@@ -693,8 +698,6 @@ msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\installer.wixproj
693
698
694
699
:: Stage Artifacts
695
700
md %BuildRoot% \artifacts
696
- :: ICU Dependency for runtime libraries
697
- move %PackageRoot% \icu.msi %BuildRoot% \artifacts || (exit /b)
698
701
:: Redistributable libraries for developers
699
702
move %PackageRoot% \runtime.msi %BuildRoot% \artifacts || (exit /b)
700
703
:: Toolchain
@@ -708,7 +711,7 @@ move %PackageRoot%\installer\installer.exe %BuildRoot%\artifacts || (exit /b)
708
711
709
712
:: Test Swift
710
713
:: 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
714
+ path %BuildRoot% \3;%BuildRoot% \1\bin;%PATH% ;%SystemDrive% \Program Files\Git\usr\bin
712
715
cmake --build %BuildRoot% \1 --target check-swift || (exit /b)
713
716
714
717
:: Test dispatch
@@ -735,9 +738,10 @@ cmake ^
735
738
-D CMAKE_INSTALL_PREFIX=%SDKInstallRoot% \usr ^
736
739
737
740
-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 ^
741
+ -D ICU_ROOT=%BuildRoot% \Library\icu-69.1\usr ^
742
+ -D ICU_DATA_LIBRARY_RELEASE=%BuildRoot% \Library\icu-69.1\usr\lib\sicudt69.lib ^
743
+ -D ICU_I18N_LIBRARY_RELEASE=%BuildRoot% \Library\icu-69.1\usr\lib\sicuin69.lib ^
744
+ -D ICU_UC_LIBRARY_RELEASE=%BuildRoot% \Library\icu-69.1\usr\lib\sicuuc69.lib ^
741
745
-D LIBXML2_LIBRARY=%BuildRoot% \Library\libxml2-2.9.12\usr\lib\libxml2s.lib ^
742
746
-D LIBXML2_INCLUDE_DIR=%BuildRoot% \Library\libxml2-2.9.12\usr\include\libxml2 ^
743
747
-D LIBXML2_DEFINITIONS=" /DLIBXML_STATIC" ^
@@ -832,7 +836,7 @@ rd /s /q zlib libxml2 sqlite icu curl
832
836
git clone --quiet --no-tags --depth 1 --branch v1.2.11 https://github.com/madler/zlib
833
837
git clone --quiet --no-tags --depth 1 --branch v2.9.12 https://github.com/gnome/libxml2
834
838
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
839
+ git clone --quiet --no-tags --depth 1 --branch maint/maint-69 https://github.com/unicode-org/icu
836
840
git clone --quiet --no-tags --depth 1 --branch curl-7_77_0 https://github.com/curl/curl
837
841
838
842
goto :eof
0 commit comments