GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - BNETDocs/bncsutil: The Classic Battle.net™ client library

BranchesTags
Open more actions menu

Latest commit

 

History

121 Commits
121 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
CMake
CMake
 
 
src/bncsutil
src/bncsutil
 
 
vb6_example
vb6_example
 
 
.clang-format.todo
.clang-format.todo
 
 
.clang-tidy
.clang-tidy
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
COPYING
COPYING
 
 
README.md
README.md
 
 
bncsutil.map
bncsutil.map
 
 
conanfile.py
conanfile.py
 
 

Repository files navigation

BNCSUtil

GitHub Workflow Status (branch) GitHub top language GitHub code size in bytes License Badge GitHub release (latest SemVer including pre-releases) GitHub All Releases

BNCSUtil is the Battle.Net Chat Service Utility which aids applications trying to logon to Classic Battle.net™ using the binary protocol. Specifically, BNCSUtil has functions that help with the cryptography of game versions, keys, and passwords.

BNCSUtil was originally written by Eric Naeseth (shadypalm88) and has since been maintained over the course of several years by the open source Battle.net community.

Usage

#include <bncsutil/bncsutil.h> and link against bncsutil.lib or libbncsutil.so.

For CMake add:

find_package(bncsutil REQUIRED)
target_link_libraries(mytarget PRIVATE bncsutil::bncsutil)

Building

To force a specific build (32bit or 64bit) add -DCMAKE_GENERATOR_PLATFORM=x86 or -DCMAKE_GENERATOR_PLATFORM=x64 to CMake flags.

Change BUILD_SHARED_LIBS to build the library as static or shared.

Windows Visual Studio 2022

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).

In cmd or Visual Studio dev console run:

amd64

"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat" x64
conan install . -of build -s build_type=Release -o *:shared=False --build=missing
cd build
.\conanbuild.bat
cmake .. -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DBUILD_SHARED_LIBS=1
cmake --build . --config Release

x86

"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat" x86
conan install . -of build -s build_type=Release -s:h arch=x86 -o *:shared=False --build=missing
cd build
.\conanbuild.bat
cmake .. -G "Visual Studio 17 2022" -DCMAKE_GENERATOR_PLATFORM=x86 -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DBUILD_SHARED_LIBS=1
cmake --build . --config Release

Alternatively open build/bncsutil.sln and build from Visual Studio.

Linux

Using system dependencies

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).

cmake -G "Unix Makefiles" -B./build
cd build
cmake --build . --target install --config Release

Using conan

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.

conan install . -of build -s build_type=Release --build=missing
cd build
bash conanbuild.sh
cmake .. -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_LIBS=0
cmake --build . --config Release

.deb and .rpm packages

After invoking CMake, cd to build folder and generate them with cpack -G "DEB" and cpack -G "RPM". 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.

Note that this is a "development" package which also includes header files.

Library installs to /usr/local/lib, include files in /usr/local/include/bncsutil.

Packages are also available for download from github releases built on Debian Bookworm and Fedora latest.

Development with CLion

  1. Run conan from cli as per build instructions above
  2. Open the project
  3. Tools -> CMake -> Change Project Root -> build
  4. Settings -> Build, Execution, Deployment -> CMake -> Add at least this cmake option: -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake

About

The Classic Battle.net™ client library

Topics

battle-netblizzardbncsutilbotcd-keyscryptographydiablokeyslibrarylinuxpasswordsstarcraftutilityversion-checkversioningwarcraftwindows

Resources

Readme
LGPL-2.1 license
Activity
Custom properties

Stars

27 stars

Watchers

13 watching

Forks

11 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.