From 12ec3654618887c773681e2eb9d615e2897e5a6a Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 13 Jan 2021 09:51:40 -0500 Subject: [PATCH] get this working on Windows --- Cargo.lock | 25 +++++++++++++++++++++++++ Cargo.toml | 2 +- README.md | 30 ++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index c74dbbb..21383e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,12 +12,27 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" +[[package]] +name = "cc" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" + [[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +[[package]] +name = "cmake" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb6210b637171dfba4cda12e579ac6dc73f5165ad56133e5d72ef3131f320855" +dependencies = [ + "cc", +] + [[package]] name = "error-chain" version = "0.10.0" @@ -70,6 +85,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4" +[[package]] +name = "zeromq-src" +version = "0.1.10+4.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9133d366817fcffe22e4356043ba187ae122ec5db63d7ce73d1e6a18efa2f1" +dependencies = [ + "cmake", +] + [[package]] name = "zmq" version = "0.9.2" @@ -90,4 +114,5 @@ checksum = "d33a2c51dde24d5b451a2ed4b488266df221a5eaee2ee519933dc46b9a9b3648" dependencies = [ "libc", "metadeps", + "zeromq-src", ] diff --git a/Cargo.toml b/Cargo.toml index 5be0015..da8193b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,5 +14,5 @@ path = "src/main.rs" [dependencies] bytes = "1.0.1" -zmq = "0.9" +zmq = { version = "0.9", features = ['vendored'] } #zeromq = "0.2.0" # Doesn't compile. Complains about Rust issue #54727 diff --git a/README.md b/README.md index e52d211..e34a629 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,33 @@ point-generator =============== Generate points to send over ZeroMQ to the Unreal Engine point cloud demo. + +Windows installation +-------------------- +The best solution is to depend on the provided vendored libs: + +```toml +zmq = { version = "0.9", features = ['vendored'] } +``` + +Trying to build our own zeromq is COMPLICATED. I don't understand the Windows ecosystem at all, +and I spent hours trying to get things working: + +* Install [Microsoft's vcpkg](https://github.com/Microsoft/vcpkg/) package manager. +* `PS C:\dev\vcpkg> .\vcpkg.exe install czmq` +* [Install CMake](https://cmake.org/download/) and add the bin directory (`C:\Program Files\CMake\bin`) + to the path (System properties > Advanced > Environment variables). + +* Build: + +``` +mkdir build +cd build +cmake .. +``` + +* Then open the `.sln` file in Visual Studio and build... +* which gives you `dll` and `lib` files... +* Add those to the windows Path... +* (Not working) +