-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from zdenop/various
Various missing patches
- Loading branch information
Showing
7 changed files
with
73 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,67 @@ | ||
First, read the file PATENTS in the same directory as this file. | ||
# Building | ||
|
||
Fetch leptonica from its website (http://leptonica.com/) and build it. | ||
For this you will also need the standard libtiff, libpng and libjpeg. | ||
## Prerequisites | ||
|
||
If you're running a Unix-like OS, such as Linux, BSD, Mac OS X or msys | ||
just run: | ||
* installed [Leptonica](http://www.leptonica.org/) including development parts | ||
* installed [cmake](https://cmake.org/) or [autotools] (https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html) | ||
* installed C++ compiller (gcc, clang, MSVC) | ||
* installed [git](https://git-scm.com/) | ||
|
||
|
||
|
||
## Unix-like OS | ||
|
||
If you're running a Unix-like OS, such as Linux, BSD, Mac OS X or msys just run: | ||
|
||
``` | ||
./autogen.sh | ||
./configure | ||
make | ||
make install (or sudo make install) | ||
``` | ||
|
||
|
||
## CMake | ||
|
||
CMake requires CMake build installation of Leptonica | ||
|
||
|
||
### Windows | ||
|
||
|
||
*Note*: `cat`, `rm` and `dos2unix` tool are part of [git for windows](https://gitforwindows.org/). You can add them to your path with `set PATH=%PATH%;C:\Program Files\Git\usr\bin`. Adjust path `f:\win64` to your Leptonica installation. | ||
|
||
``` | ||
"c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" x64 | ||
set INSTALL_DIR=f:\win64 | ||
set INCLUDE_DIR=f:\win64\include | ||
set LIB_DIR=f:\win64\lib | ||
set PATH=%PATH%;%INSTALL_DIR%\bin | ||
``` | ||
|
||
### Configuration | ||
|
||
``` | ||
git clone --depth 1 https://github.com/agl/jbig2enc | ||
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_PREFIX_PATH=%INSTALL_DIR% | ||
cmake --build build --config Release | ||
``` | ||
|
||
### Install | ||
|
||
``` | ||
cmake --build build --config Release --target install | ||
``` | ||
|
||
### Uninstall | ||
|
||
VC++ 2008 Notes | ||
=============== | ||
``` | ||
cat build/install_manifest.txt | dos2unix | xargs rm | ||
|
||
Download leptonica-1.68-win32-lib-include-dirs.zip from | ||
http://leptonica.com/download.html and unpack it so 'include', 'lib' and | ||
'jbig2enc' directories are at the same directory (or adjust include path | ||
in VC++ project). | ||
``` | ||
|
||
Download stdint.h for Microsoft Visual Studio (part of package | ||
msinttypes-r26.zip from http://code.google.com/p/msinttypes/downloads/list) | ||
and place it to 'include' directory. | ||
### Clean | ||
|
||
Them open vs2008/jbig2enc.sln in Visual C++ 2008 and build solution. | ||
``` | ||
rm -r build/* | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters