You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-22Lines changed: 30 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,52 +13,60 @@ of game versions, keys, and passwords.
13
13
BNCSUtil was originally written by Eric Naeseth (shadypalm88) and has since
14
14
been maintained over the course of several years by the open source Battle.net community.
15
15
16
-
##Usage
16
+
# Usage
17
17
Add `bncsutil.h` to your include directory and link against `bncsutil.lib` or `libbncsutil.so`.
18
18
19
-
##Building
19
+
# Building
20
20
21
-
To force a specific build (32bit or 64bit) add `-DCMAKE_GENERATOR_PLATFORM=x86` or `-DCMAKE_GENERATOR_PLATFORM=x64` to CMake flags.
21
+
To force a specific build (32bit or 64bit) add `-DCMAKE_GENERATOR_PLATFORM=x86` or `-DCMAKE_GENERATOR_PLATFORM=x64` to CMake flags.
22
22
23
-
### Windows Visual Studio 2019
23
+
Change `BUILD_SHARED_LIBS` to build the library as static or shared.
24
24
25
-
Version 2019 has compiler version 16, 2015 has compiler version 14.
25
+
## Windows Visual Studio 2022
26
26
27
-
Change `-o *:shared`option if you want to link static or dynamic dependencies.
27
+
Conan is used to install dependencies. GMP can't be installed as a shared library due to a bug. Mpir dependency option will be re-introduced once it is uploaded to conan index v2 (MR pending).
28
28
29
-
Change `BUILD_SHARED_LIBS` to build the library as static or shared.
cmake .. -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DBUILD_SHARED_LIBS=1
37
+
cmake --build . --config Release
34
38
```
35
39
36
-
### Linux
40
+
Alternatively open `build/bncsutil.sln` and build from Visual Studio.
41
+
42
+
## Linux
37
43
38
-
####Using system dependencies
39
-
Instead of using conan you can link against system provided gmp. Install `libgmp-dev` on deb distros or `gmp-devel` on rpm distros. For 32bit builds, CMake will not warn you if you are missing 32bit glibc and GMP, you must install them manually first (CentOS/Fedora: `glibc-devel.i686` and `gmp-devel.i686`).
44
+
### Using system dependencies
45
+
Install `libgmp-dev` on deb distros or `gmp-devel` on rpm distros. For 32bit builds, CMake will not warn you if you are missing 32bit glibc and GMP, you must install them manually first (CentOS/Fedora: `glibc-devel.i686` and `gmp-devel.i686`).
40
46
41
47
```
42
48
cmake -G "Unix Makefiles" -B./build
43
-
cd build && make && make install
49
+
cd build
50
+
cmake --build . --target install --config Release
44
51
```
45
52
46
-
#### Using conan
47
-
If you are using pyenv or building python3 from source, make sure you have the following packages installed first:
48
-
```
49
-
sudo apt-get install libbz2-dev liblzma-dev
50
-
```
53
+
### Using conan
54
+
If you are using pyenv or building python3 from source, make sure you have `libbz2-dev` and `liblzma-dev` installed first or conan will fail to unpack dependencies.
After invoking CMake, cd to build folder and generate them with `cpack -G "DEB"` and `cpack -G "RPM"`.
60
66
You can then use `gdebi` to do a local install of .deb with automatic dependency resolution or `yum localinstall` on rpm distros. For dnf it's `dnf install <name>.rpm`.
61
67
62
68
Note that this is a "devel" package which also includes header files.
63
69
64
-
Library installs go to `/usr/lib`, include files in `/usr/include/bncsutil`.
70
+
Library installs to `/usr/lib`, include files in `/usr/include/bncsutil`.
71
+
72
+
Packages are also avaialble for download from github releases built on Debian Bookworm and Fedora latest.
0 commit comments