mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-21 20:07:06 +00:00
GS1 syntax engine for TCL backend:
- make option available without backend - add MSVC build system
This commit is contained in:
@@ -11,13 +11,20 @@ Build:
|
|||||||
The header files of a Tcl and Tk build are required for the build.
|
The header files of a Tcl and Tk build are required for the build.
|
||||||
They are included in a Tcl/Tk source tree or in an installed Tcl/Tk.
|
They are included in a Tcl/Tk source tree or in an installed Tcl/Tk.
|
||||||
|
|
||||||
There are 3 build environments available:
|
There are the standard TCL build environments available:
|
||||||
|
|
||||||
- configure based build system for Linux/macOS and MSYS/Cygwin/MSYS2 (Windows)
|
- configure based build system for Linux/macOS and MSYS/Cygwin/MSYS2 (Windows)
|
||||||
(contributed by Christian Werner) - see "docs/manual.txt" Annex C for details
|
(contributed by Christian Werner) - see "docs/manual.txt" Annex C for details
|
||||||
- "win\makefile.vc" for Microsoft Visual Studio command prompt (nmake) - see
|
- "win\makefile.vc" for Microsoft Visual Studio command prompt (nmake) - see
|
||||||
"win\README.txt" for details
|
"win\README.txt" for details
|
||||||
- "zint_tcl.vcxproj" for Microsoft Visual C++ 2022 interactive build
|
|
||||||
|
The GS1 syntax engine may be added optionally.
|
||||||
|
https://github.com/gs1/gs1-syntax-engine
|
||||||
|
Please look to the top of makefile.vc to activate it.
|
||||||
|
|
||||||
|
The GS1 syntax engine project currently only allows to build a dll and an import lib.
|
||||||
|
This hopefully changes in future.
|
||||||
|
Remark, that the syntax engine dll may not be included in a starkit or zipkit.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,17 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Activate GS1 syntax engine support (option "-gs1strict")
|
||||||
|
# https://github.com/gs1/gs1-syntax-engine
|
||||||
|
# Build the library gs1encoders.dll
|
||||||
|
ZINT_HAVE_GS1SE = 0
|
||||||
|
|
||||||
|
# folder of the include file gs1encoders.h (in src/c-lib folder of the syntax engine)
|
||||||
|
SYNTAX_ENGINE_INCLUDE = $(ROOT)\..\..\gs1-syntax-engine-main\src\c-lib
|
||||||
|
|
||||||
|
# folder of the library gs1encoders.lib of the syntax engine
|
||||||
|
SYNTAX_ENGINE_LIB = $(ROOT)\..\..\gs1-syntax-engine-main\src\c-lib\build\library\x64\Release
|
||||||
|
|
||||||
# The name of the package
|
# The name of the package
|
||||||
PROJECT = zint
|
PROJECT = zint
|
||||||
PROJECT_REQUIRES_TK = 1
|
PROJECT_REQUIRES_TK = 1
|
||||||
@@ -94,11 +105,14 @@ PRJ_OBJS = \
|
|||||||
PRJ_DEFINES = -D_CRT_SECURE_NO_DEPRECATE
|
PRJ_DEFINES = -D_CRT_SECURE_NO_DEPRECATE
|
||||||
PRJ_DEFINES = $(PRJ_DEFINES) -DZINT_NO_PNG=1
|
PRJ_DEFINES = $(PRJ_DEFINES) -DZINT_NO_PNG=1
|
||||||
# PRJ_DEFINES = $(PRJ_DEFINES) -DZINT_VERSION=PACKAGE_VERSION
|
# PRJ_DEFINES = $(PRJ_DEFINES) -DZINT_VERSION=PACKAGE_VERSION
|
||||||
PRJ_DEFINES = $(PRJ_DEFINES) -I$(TMP_DIR)
|
PRJ_INCLUDES = -I$(TMP_DIR)
|
||||||
PRJ_DEFINES = $(PRJ_DEFINES) -I$(BACKEND_DIR)
|
PRJ_INCLUDES = $(PRJ_INCLUDES) -I$(BACKEND_DIR)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
!if $(ZINT_HAVE_GS1SE)
|
||||||
|
PRJ_DEFINES = $(PRJ_DEFINES) -DZINT_HAVE_GS1SE=1
|
||||||
|
PRJ_INCLUDES = $(PRJ_INCLUDES) -I$(SYNTAX_ENGINE_INCLUDE)
|
||||||
|
PRJ_LIBS = $(SYNTAX_ENGINE_LIB)\gs1encoders.lib
|
||||||
|
!endif
|
||||||
|
|
||||||
# Define the standard targets
|
# Define the standard targets
|
||||||
!include "$(_RULESDIR)\targets.vc"
|
!include "$(_RULESDIR)\targets.vc"
|
||||||
|
|||||||
@@ -577,7 +577,9 @@ static const char help_message[] = "zint tcl(stub,obj) dll\n"
|
|||||||
" -gs1nocheck bool: for gs1, do not check validity of data (allows non-standard symbols)\n"
|
" -gs1nocheck bool: for gs1, do not check validity of data (allows non-standard symbols)\n"
|
||||||
" -gs1parens bool: for gs1, AIs enclosed in parentheses instead of square brackets\n"
|
" -gs1parens bool: for gs1, AIs enclosed in parentheses instead of square brackets\n"
|
||||||
#ifdef ZINT_HAVE_GS1SE
|
#ifdef ZINT_HAVE_GS1SE
|
||||||
" -gs1strict bool: Use GS1 Syntax Engine to strictly validate GS1 data\n"
|
" -gs1strict bool: use GS1 Syntax Engine to strictly validate GS1 data\n"
|
||||||
|
#else
|
||||||
|
" -gs1strict 0: GS1 syntax engine not compiled in, may not be activated.\n"
|
||||||
#endif
|
#endif
|
||||||
" -gssep bool: for gs1, use gs as separator instead fnc1 (Datamatrix only)\n"
|
" -gssep bool: for gs1, use gs as separator instead fnc1 (Datamatrix only)\n"
|
||||||
" -guarddescent double: Height of guard bar descent in modules (EAN/UPC only)\n"
|
" -guarddescent double: Height of guard bar descent in modules (EAN/UPC only)\n"
|
||||||
@@ -904,9 +906,7 @@ static int Encode(Tcl_Interp *interp, int objc,
|
|||||||
"-cols", "-compliantheight", "-dmiso144", "-dmre", "-dotsize", "-dotty",
|
"-cols", "-compliantheight", "-dmiso144", "-dmre", "-dotsize", "-dotty",
|
||||||
"-eci", "-esc", "-extraesc", "-fast", "-fg", "-format", "-fullmultibyte",
|
"-eci", "-esc", "-extraesc", "-fast", "-fg", "-format", "-fullmultibyte",
|
||||||
"-gs1nocheck", "-gs1parens",
|
"-gs1nocheck", "-gs1parens",
|
||||||
#ifdef ZINT_HAVE_GS1SE
|
|
||||||
"-gs1strict",
|
"-gs1strict",
|
||||||
#endif
|
|
||||||
"-gssep", "-guarddescent",
|
"-gssep", "-guarddescent",
|
||||||
"-guardwhitespace", "-height", "-heightperrow", "-init", "-mask", "-mode",
|
"-guardwhitespace", "-height", "-heightperrow", "-init", "-mask", "-mode",
|
||||||
"-nobackground", "-noquietzones", "-notext", "-primary", "-quietzones",
|
"-nobackground", "-noquietzones", "-notext", "-primary", "-quietzones",
|
||||||
@@ -920,9 +920,7 @@ static int Encode(Tcl_Interp *interp, int objc,
|
|||||||
iCols, iCompliantHeight, iDMISO144, iDMRE, iDotSize, iDotty,
|
iCols, iCompliantHeight, iDMISO144, iDMRE, iDotSize, iDotty,
|
||||||
iECI, iEsc, iExtraEsc, iFast, iFG, iFormat, iFullMultiByte,
|
iECI, iEsc, iExtraEsc, iFast, iFG, iFormat, iFullMultiByte,
|
||||||
iGS1NoCheck, iGS1Parens,
|
iGS1NoCheck, iGS1Parens,
|
||||||
#ifdef ZINT_HAVE_GS1SE
|
|
||||||
iGS1Strict,
|
iGS1Strict,
|
||||||
#endif
|
|
||||||
iGSSep, iGuardDescent,
|
iGSSep, iGuardDescent,
|
||||||
iGuardWhitespace, iHeight, iHeightPerRow, iInit, iMask, iMode,
|
iGuardWhitespace, iHeight, iHeightPerRow, iInit, iMask, iMode,
|
||||||
iNoBackground, iNoQuietZones, iNoText, iPrimary, iQuietZones,
|
iNoBackground, iNoQuietZones, iNoText, iPrimary, iQuietZones,
|
||||||
@@ -959,9 +957,7 @@ static int Encode(Tcl_Interp *interp, int objc,
|
|||||||
case iFast:
|
case iFast:
|
||||||
case iGS1NoCheck:
|
case iGS1NoCheck:
|
||||||
case iGS1Parens:
|
case iGS1Parens:
|
||||||
#ifdef ZINT_HAVE_GS1SE
|
|
||||||
case iGS1Strict:
|
case iGS1Strict:
|
||||||
#endif
|
|
||||||
case iGSSep:
|
case iGSSep:
|
||||||
case iGuardWhitespace:
|
case iGuardWhitespace:
|
||||||
case iHeightPerRow:
|
case iHeightPerRow:
|
||||||
@@ -1170,16 +1166,20 @@ static int Encode(Tcl_Interp *interp, int objc,
|
|||||||
my_symbol->input_mode &= ~GS1PARENS_MODE;
|
my_symbol->input_mode &= ~GS1PARENS_MODE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef ZINT_HAVE_GS1SE
|
|
||||||
case iGS1Strict:
|
case iGS1Strict:
|
||||||
if (intValue) {
|
if (intValue) {
|
||||||
|
#ifdef ZINT_HAVE_GS1SE
|
||||||
my_symbol->input_mode |= GS1SYNTAXENGINE_MODE;
|
my_symbol->input_mode |= GS1SYNTAXENGINE_MODE;
|
||||||
my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | GS1_MODE; /* Now sets GS1_MODE also */
|
my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | GS1_MODE; /* Now sets GS1_MODE also */
|
||||||
|
#else
|
||||||
|
Tcl_SetObjResult(interp,
|
||||||
|
Tcl_NewStringObj("GS1 syntax engine not compiled in", -1));
|
||||||
|
fError = 1;
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
my_symbol->input_mode &= ~GS1SYNTAXENGINE_MODE;
|
my_symbol->input_mode &= ~GS1SYNTAXENGINE_MODE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case iGSSep:
|
case iGSSep:
|
||||||
if (intValue) {
|
if (intValue) {
|
||||||
my_symbol->output_options |= GS1_GS_SEPARATOR;
|
my_symbol->output_options |= GS1_GS_SEPARATOR;
|
||||||
|
|||||||
Reference in New Issue
Block a user