Skip to content

Commit

Permalink
Use vendor RocksDb dll on Windows. (#2341)
Browse files Browse the repository at this point in the history
* Bump rocksdb version and update Makefile.

* Update readme.
  • Loading branch information
web3-developer committed Jun 13, 2024
1 parent 5f44be1 commit 060c759
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ libbacktrace:

ifneq ($(USE_SYSTEM_ROCKSDB), 0)
ifeq ($(OS), Windows_NT)
rocksdb: fetch-dlls
rocksdb:
+ vendor/nim-rocksdb/scripts/build_dlls_windows.bat && \
cp -a vendor/nim-rocksdb/build/librocksdb.dll build
else
rocksdb:
+ vendor/nim-rocksdb/scripts/build_static_deps.sh
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,26 @@ installation directory to "C:\mingw-w64" and add it to your system PATH in "My
Computer"/"This PC" -> Properties -> Advanced system settings -> Environment
Variables -> Path -> Edit -> New -> C:\mingw-w64\mingw64\bin (it's "C:\mingw-w64\mingw32\bin" on 32-bit)

Install [Git for Windows](https://gitforwindows.org/) and use a "Git Bash" shell to clone and build Nimbus.
Install [Git for Windows](https://gitforwindows.org/) and use it to clone Nimbus.

Install [cmake](https://cmake.org/).

If you don't want to compile RocksDB and SQLite separately, you can fetch pre-compiled DLLs with:
After adding the Git bin directory to your path open a "Git Bash" shell:
```bash
mingw32-make fetch-dlls # this will place the right DLLs for your architecture in the "build/" directory
bash
```

You can now follow those instructions in the previous section by replacing `make` with `mingw32-make` (regardless of your 32-bit or 64-bit architecture):
After installing Mingw-w64 and adding it to your path you should have the `mingw32-make` tool available. Next create a link from `make` to `mingw32-make`:

```bash
mingw32-make nimbus # build the Nimbus binary
mingw32-make test # run the test suite
ln -s mingw32-make.exe make.exe
```

You can now follow those instructions in the previous section. For example:

```bash
make nimbus # build the Nimbus binary
make test # run the test suite
# etc.
```

Expand Down

0 comments on commit 060c759

Please sign in to comment.