Access Blizzard MPQ
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Ladislav Zezula b41cda40f9
Merged. Thanks for the contribution 👍
1 month ago
.github/workflows - modernize CMake by adding target_ where missing, split add_library and sources (target_sources), some reordering 2 months ago
.vscode Fixed bug in test program that caused bad cosmetic effects during log print 2 months ago
StormLib.xcodeproj Added the necessary files to the Xcode project, and targets, that are required to be linkable and function 10 years ago
doc Fixed building of DLL 9 months ago
src Win: Only define NOMINMAX if it's not already defined 1 month ago
storm_dll Cosmetics 9 months ago
test Cosmetics 2 months ago
.gitignore - modernize CMake by adding target_ where missing, split add_library and sources (target_sources), some reordering 2 months ago
CMakeLists.txt - modernize CMake by adding target_ where missing, split add_library and sources (target_sources), some reordering 2 months ago
Info.plist Initial creation 13 years ago
LICENSE + Fixed bug in SFileReadFile 10 years ago
Premake5.lua + Reverted include directories 9 years ago
README.md - modernize CMake by adding target_ where missing, split add_library and sources (target_sources), some reordering 2 months ago
StormLib.sln Fixed loading of corrupt MPQ version 2 2 years ago
StormLib.vcxproj Updated build settings 8 months ago
StormLib.vcxproj.filters Added functions for conversions between MPQ file name <-> Safe file name 9 months ago
StormLib_dll.vcxproj Updated build settings 8 months ago
StormLib_dll.vcxproj.filters Added functions for conversions between MPQ file name <-> Safe file name 9 months ago
StormLib_test.vcxproj Full support of printing UTF-8 characters to Windows console 8 months ago
StormLib_test.vcxproj.filters Added functions for conversions between MPQ file name <-> Safe file name 9 months ago
StormLib_vs08.sln + Updated VS 2008 workspace files 8 years ago
StormLib_vs08.vcproj Added functions for conversions between MPQ file name <-> Safe file name 9 months ago
StormLib_vs08_dll.vcproj Updated build settings 8 months ago
StormLib_vs08_test.vcproj Added functions for conversions between MPQ file name <-> Safe file name 9 months ago
make-msvc.bat Updated build settings 8 months ago
make.bat Updated build settings 8 months ago
sources Added WDK build 5 years ago

README.md

StormLib

This is official repository for the StormLib library, an open-source project that can work with Blizzard MPQ archives.

Installation and basic usage

Windows (Visual Studio 2022)

  1. Make sure you have the toolset for Visual Studio 2017 - Windows XP installed
  2. Download the latest release of StormLib
  3. Open the solution file StormLib.sln in Visual Studio 2017/2019/2022
  4. Choose "Build / Batch Build" and select every build of "StormLib"
  5. Choose "Rebuild"
  6. The result libraries are in .\bin\Win32 and .\bin\x64

Note that you can also build the library using newer toolset, such as v143. To do that, you need to retarget the projects. Right-click on the solution, then choose "Retarget solution" and pick your desired toolset version.

Windows (Visual Studio 2008)

  1. Download the latest release of StormLib
  2. Open the solution file StormLib_vs08.sln in Visual Studio 2008
  3. Choose "Build / Batch Build" and select every build of "StormLib"
  4. Choose "Rebuild"
  5. The result libraries are in .\bin\Win32 and .\bin\x64

Windows (any Visual Studio version with CMake)

You can open the appropriate Visual Studio cmd prompt or launch regular cmd and load the necessary environment as specified below.
Change your VS version as needed.

amd64

"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat" x64
cmake -G "Visual Studio 17 2022" -B build_amd64 -D BUILD_SHARED_LIBS=ON
cmake --build build --config Release

x86

"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat" x86
cmake -G "Visual Studio 17 2022" -B build_x86 -D BUILD_SHARED_LIBS=ON

Windows (Test Project)

  1. Include the main StormLib header: #include <StormLib.h>
  2. Set the correct library directory for StormLibXYZ.lib:
    • X: D = Debug, R = Release
    • Y: A = ANSI build, U = Unicode build
    • Z: S = Using static CRT library, D = Using Dynamic CRT library
  3. Rebuild

Linux

git clone https://github.com/ladislav-zezula/StormLib.git
cd StormLib && git checkout <latest-release-tag>
cmake -B build -D BUILD_SHARED_LIBS=ON
cmake --build build --config Release
sudo cmake --install build

Include StormLib in your project: #include <StormLib.h>
Make sure you compile your project with -lstorm -lz -lbz2

To produce deb/rpm packages:

cd build
cpack -G "DEB" -D CPACK_PACKAGE_FILE_NAME=libstorm-dev_v9.30_amd64
cpack -G "RPM" -D CPACK_PACKAGE_FILE_NAME=libstorm-devel-v9.30.x86_64

List of all CMake options

Option Name Description Default
BUILD_SHARED_LIBS Compile shared libraries OFF
STORM_UNICODE Unicode or ANSI support OFF
STORM_SKIP_INSTALL Skip installing files OFF
STORM_USE_BUNDLED_LIBRARIES Force use of bundled dependencies instead of system libraries OFF
WITH_LIBTOMCRYPT Use system LibTomCrypt library (non-Windows only) OFF
STORM_BUILD_TESTS Compile StormLib test application OFF
STORMTEST_USE_OLD_PATHS Uses hardcoded paths for test files, OFF uses build_folder/work ON