Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLABELS-QT on Windows 10 with lib ZINT or GNU-BARCODE - Code128 #177

Open
krebsi83 opened this issue May 5, 2022 · 4 comments
Open

GLABELS-QT on Windows 10 with lib ZINT or GNU-BARCODE - Code128 #177

krebsi83 opened this issue May 5, 2022 · 4 comments

Comments

@krebsi83
Copy link

krebsi83 commented May 5, 2022

Is there a way to compile GLABELS-QT on Windows 10 with lib ZINT or GNU-BARCODE (http://gnuwin32.sourceforge.net/packages/barcode.htm)? I need Code128, but unfortunately I can't get it to work. Best regards and many thanks. Krebsi83

@jmb26240
Copy link

I am also interested in learning how to compile GLABELS with the ZINT library.
Best regards.

jmb

@PakoTrist
Copy link

Have some problem with compiling in windows 10? anybody help ?

@innominate1
Copy link

innominate1 commented Sep 13, 2023

gLabels for Windows Build Instructions, a (very) rough guide


Install Software

Install;
Visual Studio 2022
CMake 3.27.0
qt-opensource-windows-x86-5.12.12.exe
NSIS 3.09
Git-2.42.0.2-64-bit.exe

Add to PATH;
c:\Program Files\CMake\bin
c:\Qt\Qt5.12.12\5.12.12\msvc2017_64\bin

Get Source

Open Git Bash terminal;

mkdir ~/workspace && cd ~/workspace
git clone https://github.com/jimevins/glabels-qt.git glabels-qt
git clone https://github.com/Microsoft/vcpkg.git vcpkg

Download https://master.dl.sourceforge.net/project/zint/zint/2.6.7/zint-2.6.7.tar.gz
Extract to workspace/zint

Install libqrencode

cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install libqrencode:x64-windows

Build libzint

Open workspace\zint\win32\zint.sln in Visual Studio 2022

Retarget Projects

  • Windows SDK Version: 10.0
  • Platform Toolset: Upgrade to v143
  • Check ..\win32\zint.vcxproj
  • Check ..\win32\libzint.vcxproj
  • Click OK

Select Release Configuration

Right click libzint project in Solution Explorer, open Properties

  • Configuration Properties, vcpkg, General,
    Use Vcpkg; Yes
  • Configuration Properties, vcpkg, General,
    Use Vcpkg Manifest; No
  • Linker, General,
    Output File; $(OutDir)libzint.dll
  • Linker, Input,
    Additional Dependencies; libpng16.lib;zlib.lib;%(AdditionalDependencies)

Right-click libzint project, and add ~/workspace/zint/backend/ultra.c

Build Solution

Build gLabels

Add following lines to ~/workspace/glabels-qt/CMakeLists.txt,
before line <find_package (ZLIB 1.2 QUIET)>;

set (ZLIB_LIBRARY "C:/Users/User/workspace/vcpkg/installed/x64-windows/lib/zlib.lib")
set (ZLIB_INCLUDE_DIR "C:/Users/User/workspace/vcpkg/installed/x64-windows/include/")

set (LIBQRENCODE_LIBRARY "C:/Users/User/workspace/vcpkg/installed/x64-windows/lib/qrencode.lib")
set (LIBQRENCODE_INCLUDE_DIR "C:/Users/User/workspace/vcpkg/installed/x64-windows/include/")

set (LIBZINT_LIBRARY "C:/Users/User/workspace/zint/win32/x64/Release/libzint.lib")
set (LIBZINT_INCLUDE_DIR "C:/Users/User/workspace/zint/backend/")
cd .\workspace\glabels-qt\
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -DCMAKE_PREFIX_PATH="C:\Qt\Qt5.12.12\5.12.12\msvc2017_64" ..
cmake --build . --config Release

Copy ~/workspace/zint/win32/x64/Release/libzint.dll,
to ~/workspace/glabels-qt/build/glabels/Release/ folder

Create installer

cd .\workspace\glabels-qt\build
cpack -C Release -G NSIS


CMake Configuration

-- Project name ............ glabels-qt
-- Project version ......... 3.99-master564 (2da9b2d 2021-02-06)
-- Installation prefix ..... C:/Program Files (x86)/glabels-qt
-- Source code location .... C:/Users/User/workspace/glabels-qt/glabels
-- CMake version ........... 3.27.0
-- C++ Compiler ............ MSVC C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe 19.33.31629.0
-- Qt version .............. 5.12.12
-- zlib (optional).......... 1.3.0
-- GNU Barcode (optional)... No.
-- qrencode (optional)......
-- libzint (optional)....... 2.6.7
-- QtTest (optional)........ 5.12.12
-- MSVC Qt location ........

TODO

Download BarCode for Windows from https://gnuwin32.sourceforge.net/packages/barcode.htm
Build GNU Barcode for x86-64
Add to ~/workspace/glabels-qt/CMakeLists.txt;

set (GNUBARCODE_LIBRARY "../barcode.lib")
set (GNUBARCODE_INCLUDE_DIR "../include/")

Also examine Ultracode Support

Notes

Installer quarantined by Windows Security/ Anti-Virus software due to false positive.

@schweini
Copy link

Does anyone have a Windows binary with these more extensive barcode libs available?
The binary in "releases" just supports one or two barcode types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants