Don't install tesseract.exe twice in Tesseract installer for Windows

The pattern for the training tools *.exe also includes tesseract.exe,
so it must be excluded explicitly.

Add also a macro BINDIR which simplifies the NSIS rules.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2024-11-04 19:19:04 +01:00
parent 914a9589aa
commit 3ec34f1755

View File

@ -75,7 +75,7 @@ OutFile ${OUTFILE}
!ifndef PREFIX
!define PREFIX "../mingw64"
!endif
!define TRAININGDIR "${PREFIX}/bin"
!define BINDIR "${PREFIX}/bin"
# General Definitions
Name "${PRODUCT_NAME}"
@ -202,8 +202,8 @@ Section -Main SEC0000
SectionIn RO
SetOutPath "$INSTDIR"
# files included in distribution
File ${PREFIX}/bin/tesseract.exe
File ${PREFIX}/bin/libtesseract-*.dll
File ${BINDIR}/tesseract.exe
File ${BINDIR}/libtesseract-*.dll
!ifdef CROSSBUILD
File ../dll/*.dll
!endif
@ -236,7 +236,7 @@ SectionEnd
Section "Training Tools" SecTr
SectionIn 1
SetOutPath "$INSTDIR"
File ${TRAININGDIR}\*.exe
File /x tesseract.exe ${BINDIR}/*.exe
SectionEnd
!define UNINST_EXE "$INSTDIR\tesseract-uninstall.exe"