https://github.com/philr/bzip2-windows
Patches and a PowerShell script to build bzip2 with Visual Studio 2013 using a dynamic library (libbz2.dll).
https://github.com/philr/bzip2-windows
Last synced: 11 months ago
JSON representation
Patches and a PowerShell script to build bzip2 with Visual Studio 2013 using a dynamic library (libbz2.dll).
- Host: GitHub
- URL: https://github.com/philr/bzip2-windows
- Owner: philr
- License: mit
- Created: 2015-02-01T22:29:54.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-12-02T21:03:03.000Z (over 6 years ago)
- Last Synced: 2023-08-27T15:15:51.984Z (almost 3 years ago)
- Language: PowerShell
- Size: 17.6 KB
- Stars: 55
- Watchers: 4
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# Bzip2 – Visual Studio libbz2.dll Build #
Patches and a PowerShell script to build [bzip2](https://www.sourceware.org/bzip2/) with Visual Studio using a dynamic library (libbz2.dll).
## Patches ##
Patches are included in this repository that modify the `makefile.msc` file in the bzip2 distribution to:
- Build cleanly with Visual Studio 2013 and later (replacing deprecated command line options).
- Build libbz2 as a DLL (`libbz2.dll`).
- Dynamically link the executable outputs with `libbz2.dll` (by default the executables are statically linked).
- Add a version resource to the executables and DLL.
- Fix a 'not a normal file' error when using `bzip2.exe` to compress large files.
## PowerShell Script ##
The PowerShell script, `Build-Bzip2.ps1`, performs the following actions:
1. Downloads the bzip2 source from [https://www.sourceware.org/bzip2/](https://www.sourceware.org/bzip2/).
2. Extracts and verifies the source.
3. Applies the patches (see above).
4. For the x86 and x64 architectures:
1. Executes `nmake` to build bzip2.
2. Copies build outputs to a directory named `outputs`.
3. Creates zipped packages containing build outputs in a directory named `packages`.
`Build-Bzip2.ps1` requires:
- 64-bit Windows.
- Microsoft Visual Studio 2013 or later (set `$VisualStudioDir` accordingly).
- [PowerShell Community Extensions](https://pscx.codeplex.com/).
- Git (used to apply patches).
## Binaries ##
32-bit and 64-bit Windows binaries can be [downloaded from the releases page](https://github.com/philr/bzip2-windows/releases).
The binary releases depend on the Visual Studio C Runtime Library (please refer to the release notes for details).