]> gitweb.factorcode.org Git - factor.git/commitdiff
build-from-source.windows: build grpc dlls/exe
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 31 May 2023 06:40:28 +0000 (01:40 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 31 May 2023 06:54:42 +0000 (01:54 -0500)
extra/build-from-source/windows/windows.factor

index 0d11252688d2f1540502318735fcec7d00478f15..539dabd1d9d500c93d61efc554a98d56bd192675 100644 (file)
@@ -168,6 +168,39 @@ IN: build-from-source.windows
         ] with-build-directory
     ] with-updated-github-repo ;
 
+: build-grpc-dll ( -- )
+    "grpc" "grpc" [
+        qw{ git submodule init } try-process
+        qw{ git submodule update } try-process
+        qw{ rm -rf third_party\boringssl-with-bazel } try-process
+        ! grpc has a file called BUILD so use build2
+        "build2" [
+            32-bit? [
+                {
+                    "cmake"
+                    "-G" "Visual Studio 17 2022"
+                    "-A" "Win32"
+                    "-DCMAKE_BUILD_TYPE=Release"
+                    "-DBUILD_SHARED_LIBS=ON" ".."
+                } try-process
+                qw{ msbuild grpc.sln /property:Configuration=Release /p:Platform=Win32 } try-process
+            ] [
+                {
+                    "cmake"
+                    "-G" "Visual Studio 17 2022"
+                    "-DCMAKE_BUILD_TYPE=Release"
+                    "-DBUILD_SHARED_LIBS=ON" ".."
+                } try-process
+                qw{ msbuild grpc.sln /property:Configuration=Release } try-process
+            ] if
+            "bin/Release/libprotobuf-lite.dll" copy-output-file
+            "bin/Release/libprotobuf.dll" copy-output-file
+            "bin/Release/libprotoc.dll" copy-output-file
+            "bin/Release/abseil_dll.dll" copy-output-file
+            "bin/Release/protoc.exe" copy-output-file
+        ] with-build-directory-as
+    ] with-updated-github-repo ;
+
 : latest-pcre-tar-gz ( -- path )
     "https://ftp.exim.org/pub/pcre/" [
         http-get nip parse-html find-links concat