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
CMake support, VS 2015 build fix, support for mpir instead of gmp, removed vc8 build, removed makefile, fixed stdint conflicts with modern compilers, changed README to reflect the changes
Copy file name to clipboardExpand all lines: README.md
+19-46Lines changed: 19 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,56 +6,29 @@ protocol. Specifically, BNCSUtil has functions that help with the cryptography
6
6
of game versions, keys, and passwords.
7
7
8
8
BNCSUtil was originally written by Eric Naeseth (shadypalm88) and has since
9
-
been maintained over the course of several years by the Battle.net community.
9
+
been maintained over the course of several years by the open source Battle.net community.
10
10
11
-
## Installing
12
-
Simply place the `.so` or `.dll` file in the same directory as the application
13
-
that wishes to use it. If this does not work, install the file into the system
14
-
library directory.
15
-
16
-
### Windows
17
-
Copy the file to:
18
-
19
-
```
20
-
C:\Windows\System32
21
-
```
22
-
23
-
### Linux
24
-
If you just have the `.so` file, copy it to:
25
-
26
-
```
27
-
/usr/lib/
28
-
```
29
-
30
-
And run:
31
-
32
-
```
33
-
sudo ldconfig
34
-
```
35
-
36
-
If you have just compiled from source, run this instead:
37
-
38
-
```
39
-
sudo make install
40
-
```
11
+
## Usage
12
+
Add `bncsutil.h` to your include directory and link against `bncsutil.lib` or `libbncsutil.so`.
41
13
42
14
## Building
43
-
### Windows
44
-
The official build of BNCSUtil for Windows is produced using Visual Studio 2005
45
-
using the solution file in the `vc8_build` folder.
15
+
CMake is used to generate platform specific build files. The only external dependency is GMP (The GNU Multiple Precision Arithmetic Library ).
16
+
It can be installed with a package manager from any major Linux distro. Debian example: `sudo apt-get install libgmp10`.
46
17
47
-
BNCSUtil requires GMP.
18
+
### Windows
48
19
49
-
### Linux
50
-
To build:
51
-
```
52
-
cd src/bncsutil
53
-
make clean
54
-
make
55
-
```
20
+
#### GMP
21
+
If you are suing an older toolchain like VS 2005 or 2008, the GMP lib and header file is already included for you in `depends/include` and `depends/lib`. You can skip this step.
22
+
For newer versions of Visual Studio we recommend to use MPIR library instead which is a drop-in replacement for GMP with better Windows support.
23
+
1. Go to http://mpir.org/ and download the latest source archive.
24
+
2. Open the VS solution file depending on which version you use, for example build.vc14 for VS 2015.
25
+
3. Make a Release build of `lib_mpir_gc` project. This produces `mpir.lib` and `mpir.h` in `build.vc14\lib_mpir_gc\Win32\Release`. Copy the header file to `depends/include` and library to `depends/lib`.
56
26
57
-
If you are having build related issues, ensure that:
27
+
#### VS build
28
+
1. In root bncsutil folder run `cmake -G "Visual Studio 14 2015" -B./build -H./` if you used GMP or `cmake -G "Visual Studio 14 2015" -B./build -H./ -DUSE_MPIR=1` if you used MPIR in previous step. Change the Visual Studio version as needed.
29
+
2. CMake will generate sln file in ./build. Open it and build the library.
58
30
59
-
- You have the `gcc` package installed.
60
-
- You have the `glibc` development package installed.
61
-
- You have the `gmp` development package installed.
31
+
### Linux
32
+
1. Install GMP with the package manager. Also install all the necessary deveklopment tools (gcc, make or build-essential package on Debian).
33
+
2. Run `cmake -G "Unix Makefiles" -B./build -H./`.
0 commit comments