mirror of
https://git.code.sf.net/p/zint/code
synced 2026-05-01 11:45:29 +00:00
GS1 Syntax Engine: update Windows README and various project files
to get working using nmake "makefile.vcwin32", added to fork at https://github.com/gitlost/gs1-syntax-engine; small updates to Linux, macOS READMEs GUI: change "chkGS1Strict" to be hidden instead of manually adding pandoc: latest version
This commit is contained in:
@@ -4,10 +4,10 @@ DEPENDPATH += . debug release
|
||||
INCLUDEPATH += .
|
||||
INCLUDEPATH += ../backend
|
||||
INCLUDEPATH += ../backend_qt
|
||||
!contains(DEFINES, ZINT_NO_PNG) {
|
||||
INCLUDEPATH += ../../lpng
|
||||
INCLUDEPATH += ../../zlib
|
||||
}
|
||||
INCLUDEPATH += ../../lpng
|
||||
INCLUDEPATH += ../../zlib
|
||||
INCLUDEPATH += ../../gs1-syntax-engine/src/c-lib
|
||||
|
||||
QT += uitools
|
||||
QT += widgets
|
||||
QT += svg
|
||||
@@ -89,11 +89,9 @@ QMAKE_LIBDIR += ../backend_qt/release
|
||||
LIBS += -lQt5Core
|
||||
QMAKE_LIBDIR += C:/qt/5.15.16static/lib
|
||||
|
||||
!contains(DEFINES, ZINT_NO_PNG) {
|
||||
# Win
|
||||
win32:LIBS += -llibpng -lzlib
|
||||
win32:QMAKE_LIBDIR+=../../lpng/ ../../zlib
|
||||
win32:LIBS += -llibpng -lzlib -lgs1encoders
|
||||
win32:QMAKE_LIBDIR+=../../lpng/ ../../zlib ../../gs1-syntax-engine/src/c-lib
|
||||
# Unix
|
||||
#unix:LIBS += -lpng -zlib
|
||||
#unix:LIBS += -lpng -zlib -lgs1encoders
|
||||
#unix:QMAKE_LIBDIR += /usr/local/lib /usr/lib/x86_64-linux-gnu/
|
||||
}
|
||||
|
||||
@@ -71,6 +71,6 @@ RC_FILE += res/qtZint.rc
|
||||
|
||||
INCLUDEPATH += ../backend_qt ../backend
|
||||
|
||||
LIBS += -lQtZintDLL -lzint
|
||||
LIBS += -lQtZintDLL -L"../win32/Release" -L"../win32/vs2019/Release" -L"../win32/vs2017/Release" -L"../win32/vs2015/Release" -lzint
|
||||
QMAKE_LIBDIR += ../backend_qt/release
|
||||
QMAKE_LIBDIR += ../win32/Release
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Harald Oehlmann
|
||||
2025-02-04
|
||||
2025-09-16
|
||||
|
||||
How to build qzint.exe using:
|
||||
- QT 5.15.16 source package
|
||||
@@ -17,6 +17,11 @@ Build static Qt:
|
||||
Visual Studio 2015\Visual Studio Tools\Windows Desktop Command Prompts\VS2015 x86 Native Tools-Eingabeaufforderung
|
||||
- ("Eingabeaufforderung" = "Command Prompt")
|
||||
|
||||
- WARNING: MS Visual Studio 2015 will only work with up to Windows Kit 10.0.20348.0, which was removed in a recent update
|
||||
(see https://developercommunity.visualstudio.com/t/Visual-Studio-update-171411-removed-th/10953401?sort=newest)
|
||||
It can be reinstalled at https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/index-legacy
|
||||
You may need to manually reset the environment variables INCLUDE, LIB, UCRTVersion, WindowsSDKLibVersion and WindowsSDKVersion.
|
||||
|
||||
- Note: if "rc.exe" not available, install a Windows Kit and update PATH (e.g.):
|
||||
set "PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\x86;%PATH%"
|
||||
|
||||
@@ -45,6 +50,9 @@ Zint Folder structure:
|
||||
git clone https://github.com/madler/zlib.git "%ZH%\..\zlib"
|
||||
-> %ZH%\..\zlib\zlib.h exists
|
||||
|
||||
- gs1-syntax-engine source files in %ZH%\..\gs1-syntax-engine
|
||||
git clone https://github.com/gitlost/gs1-syntax-engine "%ZH%\..\gs1-syntax-engine"
|
||||
|
||||
Build libpng:
|
||||
-------------
|
||||
cd "%ZH%\..\zlib"
|
||||
@@ -54,6 +62,12 @@ Build libpng:
|
||||
nmake -f scripts\makefile.vcwin32 clean
|
||||
nmake -f scripts\makefile.vcwin32
|
||||
|
||||
Build gs1-syntax-engine:
|
||||
------------------------
|
||||
cd "%ZH%\..\gs1-syntax-engine\src\c-lib"
|
||||
nmake -f makefile.vcwin32 clean
|
||||
nmake -f makefile.vcwin32
|
||||
|
||||
Build zint:
|
||||
-----------
|
||||
set QTDIR=C:\Qt\5.15.16static
|
||||
|
||||
@@ -1623,6 +1623,25 @@ checks necessary for encodation are still performed)
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkGS1Strict">
|
||||
<property name="toolTip">
|
||||
<string>Use GS1 Syntax Engine to
|
||||
strictly verify GS1 data,
|
||||
including GS1 Digital Link URIs
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GS1 St&rict</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="hidden">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -229,7 +229,7 @@ void MainWindow::mac_hack_statusBars(QWidget *win, const char* name)
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
|
||||
: QWidget(parent, fl), m_previewBgColor(0xF4, 0xF4, 0xF4), m_optionWidget(nullptr), m_symbology(0),
|
||||
m_menu(nullptr), m_chkGS1SyntaxEngine(nullptr),
|
||||
m_menu(nullptr),
|
||||
m_lblHeightPerRow(nullptr), m_spnHeightPerRow(nullptr),
|
||||
m_btnHeightPerRowDisable(nullptr), m_btnHeightPerRowDefault(nullptr),
|
||||
m_scaleWindow(nullptr)
|
||||
@@ -355,12 +355,10 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
|
||||
connect(chkGS1Parens, SIGNAL(toggled(bool)), SLOT(update_preview()));
|
||||
connect(chkGS1NoCheck, SIGNAL(toggled(bool)), SLOT(update_preview()));
|
||||
if (m_bc.bc.haveGS1SyntaxEngine()) {
|
||||
m_chkGS1SyntaxEngine = new QCheckBox(tr("GS1 St&rict"));
|
||||
m_chkGS1SyntaxEngine->setToolTip(tr("Use GS1 Syntax Engine to\n"
|
||||
"strictly verify GS1 data\n"
|
||||
"(ignored if disabled)"));
|
||||
hLayoutChks->insertWidget(-1, m_chkGS1SyntaxEngine);
|
||||
connect(m_chkGS1SyntaxEngine, SIGNAL(toggled(bool)), SLOT(update_preview()));
|
||||
chkGS1Strict->show();
|
||||
connect(chkGS1Strict, SIGNAL(toggled(bool)), SLOT(update_preview()));
|
||||
} else {
|
||||
chkGS1Strict->hide();
|
||||
}
|
||||
connect(spnWhitespace, SIGNAL(valueChanged(int)), SLOT(update_preview()));
|
||||
connect(spnVWhitespace, SIGNAL(valueChanged(int)), SLOT(update_preview()));
|
||||
@@ -470,8 +468,8 @@ MainWindow::~MainWindow()
|
||||
settings.setValue(QSL("studio/chk_rinit"), chkRInit->isChecked() ? 1 : 0);
|
||||
settings.setValue(QSL("studio/chk_gs1parens"), chkGS1Parens->isChecked() ? 1 : 0);
|
||||
settings.setValue(QSL("studio/chk_gs1nocheck"), chkGS1NoCheck->isChecked() ? 1 : 0);
|
||||
if (m_chkGS1SyntaxEngine) {
|
||||
settings.setValue(QSL("studio/chk_gs1syntax"), m_chkGS1SyntaxEngine->isChecked() ? 1 : 0);
|
||||
if (chkGS1Strict->isVisible()) {
|
||||
settings.setValue(QSL("studio/chk_gs1strict"), chkGS1Strict->isChecked() ? 1 : 0);
|
||||
}
|
||||
settings.setValue(QSL("studio/appearance/autoheight"), chkAutoHeight->isChecked() ? 1 : 0);
|
||||
settings.setValue(QSL("studio/appearance/compliantheight"), chkCompliantHeight->isChecked() ? 1 : 0);
|
||||
@@ -544,8 +542,8 @@ void MainWindow::load_settings(QSettings &settings)
|
||||
chkRInit->setChecked(settings.value(QSL("studio/chk_rinit")).toInt() ? true : false);
|
||||
chkGS1Parens->setChecked(settings.value(QSL("studio/chk_gs1parens")).toInt() ? true : false);
|
||||
chkGS1NoCheck->setChecked(settings.value(QSL("studio/chk_gs1nocheck")).toInt() ? true : false);
|
||||
if (m_chkGS1SyntaxEngine) {
|
||||
m_chkGS1SyntaxEngine->setChecked(settings.value(QSL("studio/chk_gs1syntax")).toInt() ? true : false);
|
||||
if (chkGS1Strict->isVisible()) {
|
||||
chkGS1Strict->setChecked(settings.value(QSL("studio/chk_gs1strict")).toInt() ? true : false);
|
||||
}
|
||||
chkAutoHeight->setChecked(settings.value(QSL("studio/appearance/autoheight"), 1).toInt() ? true : false);
|
||||
chkCompliantHeight->setChecked(
|
||||
@@ -3362,8 +3360,8 @@ void MainWindow::update_preview()
|
||||
btnClearData->setEnabled(!txtData->text().isEmpty());
|
||||
chkGS1Parens->setEnabled(m_bc.bc.takesGS1AIData(m_symbology) || (m_bc.bc.inputMode() & 0x07) == GS1_MODE);
|
||||
chkGS1NoCheck->setEnabled(chkGS1Parens->isEnabled());
|
||||
if (m_chkGS1SyntaxEngine) {
|
||||
m_chkGS1SyntaxEngine->setEnabled(chkGS1Parens->isEnabled() && !chkGS1NoCheck->isChecked());
|
||||
if (chkGS1Strict->isVisible()) {
|
||||
chkGS1Strict->setEnabled(chkGS1Parens->isEnabled() && !chkGS1NoCheck->isChecked());
|
||||
}
|
||||
chkRInit->setEnabled(m_bc.bc.supportsReaderInit() && (m_bc.bc.inputMode() & 0x07) != GS1_MODE);
|
||||
chkCompliantHeight->setEnabled(m_bc.bc.hasCompliantHeight());
|
||||
@@ -3386,8 +3384,8 @@ void MainWindow::update_preview()
|
||||
m_bc.bc.setECI(cmbECI->isEnabled() ? cmbECI->currentIndex() : 0);
|
||||
m_bc.bc.setGS1Parens(chkGS1Parens->isEnabled() && chkGS1Parens->isChecked());
|
||||
m_bc.bc.setGS1NoCheck(chkGS1NoCheck->isEnabled() && chkGS1NoCheck->isChecked());
|
||||
if (m_chkGS1SyntaxEngine) {
|
||||
m_bc.bc.setGS1SyntaxEngine(m_chkGS1SyntaxEngine->isEnabled() && m_chkGS1SyntaxEngine->isChecked());
|
||||
if (chkGS1Strict->isVisible()) {
|
||||
m_bc.bc.setGS1SyntaxEngine(chkGS1Strict->isEnabled() && chkGS1Strict->isChecked());
|
||||
}
|
||||
m_bc.bc.setReaderInit(chkRInit->isEnabled() && chkRInit->isChecked());
|
||||
m_bc.bc.setShowText(chkHRTShow->isEnabled() && chkHRTShow->isChecked());
|
||||
|
||||
@@ -216,7 +216,6 @@ private:
|
||||
QGraphicsScene *scene;
|
||||
int m_symbology;
|
||||
QMenu *m_menu;
|
||||
QCheckBox *m_chkGS1SyntaxEngine;
|
||||
QShortcut *m_saveAsShortcut;
|
||||
QShortcut *m_factoryResetShortcut;
|
||||
QShortcut *m_openCLIShortcut;
|
||||
|
||||
Reference in New Issue
Block a user