mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Han Xin: Add user options (Version and ECC level)
This commit is contained in:
parent
8eb5525c8c
commit
4ae120ab35
246
Makefile
246
Makefile
@ -1,18 +1,240 @@
|
||||
# Make libzint and zint together
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.2
|
||||
|
||||
zint:
|
||||
$(MAKE) -C backend/
|
||||
$(MAKE) -C frontend/
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
.PHONY : default_target
|
||||
|
||||
install:
|
||||
$(MAKE) install -C backend/
|
||||
$(MAKE) install -C frontend/
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
uninstall:
|
||||
$(MAKE) uninstall -C frontend/
|
||||
$(MAKE) uninstall -C backend/
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E remove -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /home/hooper/zint/zint-code
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /home/hooper/zint/zint-code
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip/fast: install/strip
|
||||
.PHONY : install/strip/fast
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
|
||||
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# Special rule for the target install
|
||||
install: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install
|
||||
|
||||
# Special rule for the target install
|
||||
install/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install/fast
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Devel\" \"Unspecified\""
|
||||
.PHONY : list_install_components
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components/fast: list_install_components
|
||||
.PHONY : list_install_components/fast
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local/fast: install/local
|
||||
.PHONY : install/local/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/hooper/zint/zint-code/CMakeFiles /home/hooper/zint/zint-code/CMakeFiles/progress.marks
|
||||
$(MAKE) -f CMakeFiles/Makefile2 all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/hooper/zint/zint-code/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
$(MAKE) clean -C backend/
|
||||
$(MAKE) clean -C frontend/
|
||||
$(MAKE) -f CMakeFiles/Makefile2 clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
$(MAKE) -f CMakeFiles/Makefile2 preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
$(MAKE) -f CMakeFiles/Makefile2 preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for targets named uninstall
|
||||
|
||||
# Build rule for target.
|
||||
uninstall: cmake_check_build_system
|
||||
$(MAKE) -f CMakeFiles/Makefile2 uninstall
|
||||
.PHONY : uninstall
|
||||
|
||||
# fast build rule for target.
|
||||
uninstall/fast:
|
||||
$(MAKE) -f CMakeFiles/uninstall.dir/build.make CMakeFiles/uninstall.dir/build
|
||||
.PHONY : uninstall/fast
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for targets named zint
|
||||
|
||||
# Build rule for target.
|
||||
zint: cmake_check_build_system
|
||||
$(MAKE) -f CMakeFiles/Makefile2 zint
|
||||
.PHONY : zint
|
||||
|
||||
# fast build rule for target.
|
||||
zint/fast:
|
||||
$(MAKE) -f backend/CMakeFiles/zint.dir/build.make backend/CMakeFiles/zint.dir/build
|
||||
.PHONY : zint/fast
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for targets named zint_frontend
|
||||
|
||||
# Build rule for target.
|
||||
zint_frontend: cmake_check_build_system
|
||||
$(MAKE) -f CMakeFiles/Makefile2 zint_frontend
|
||||
.PHONY : zint_frontend
|
||||
|
||||
# fast build rule for target.
|
||||
zint_frontend/fast:
|
||||
$(MAKE) -f frontend/CMakeFiles/zint_frontend.dir/build.make frontend/CMakeFiles/zint_frontend.dir/build
|
||||
.PHONY : zint_frontend/fast
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for targets named QZint
|
||||
|
||||
# Build rule for target.
|
||||
QZint: cmake_check_build_system
|
||||
$(MAKE) -f CMakeFiles/Makefile2 QZint
|
||||
.PHONY : QZint
|
||||
|
||||
# fast build rule for target.
|
||||
QZint/fast:
|
||||
$(MAKE) -f backend_qt4/CMakeFiles/QZint.dir/build.make backend_qt4/CMakeFiles/QZint.dir/build
|
||||
.PHONY : QZint/fast
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for targets named zint-qt
|
||||
|
||||
# Build rule for target.
|
||||
zint-qt: cmake_check_build_system
|
||||
$(MAKE) -f CMakeFiles/Makefile2 zint-qt
|
||||
.PHONY : zint-qt
|
||||
|
||||
# fast build rule for target.
|
||||
zint-qt/fast:
|
||||
$(MAKE) -f frontend_qt4/CMakeFiles/zint-qt.dir/build.make frontend_qt4/CMakeFiles/zint-qt.dir/build
|
||||
.PHONY : zint-qt/fast
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... install/strip"
|
||||
@echo "... uninstall"
|
||||
@echo "... edit_cache"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... install"
|
||||
@echo "... list_install_components"
|
||||
@echo "... install/local"
|
||||
@echo "... zint"
|
||||
@echo "... zint_frontend"
|
||||
@echo "... QZint"
|
||||
@echo "... zint-qt"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
|
1050
backend/Makefile
1050
backend/Makefile
File diff suppressed because it is too large
Load Diff
@ -947,7 +947,7 @@ int hx_apply_bitmask(unsigned char *grid, int size) {
|
||||
int han_xin(struct zint_symbol *symbol, const unsigned char source[], int length) {
|
||||
char mode[length + 1];
|
||||
int est_binlen;
|
||||
int ecc_level = 1;
|
||||
int ecc_level = symbol->option_1;
|
||||
int i, j, version;
|
||||
int data_codewords, size;
|
||||
int est_codewords;
|
||||
@ -971,6 +971,10 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], int length
|
||||
|
||||
binary[0] = '\0';
|
||||
|
||||
if ((ecc_level <= 0) || (ecc_level >= 5)) {
|
||||
ecc_level = 1;
|
||||
}
|
||||
|
||||
calculate_binary(binary, mode, source, length);
|
||||
|
||||
version = 85;
|
||||
@ -1008,6 +1012,35 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], int length
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
if ((symbol->option_2 < 0) || (symbol->option_2 > 84)) {
|
||||
symbol->option_2 = 0;
|
||||
}
|
||||
|
||||
if (symbol->option_2 > version) {
|
||||
version = symbol->option_2;
|
||||
}
|
||||
|
||||
/* If there is spare capacity, increase the level of ECC */
|
||||
switch (ecc_level) {
|
||||
case 1:
|
||||
if (est_codewords < hx_data_codewords_L2[version - 1]) {
|
||||
ecc_level = 2;
|
||||
data_codewords = hx_data_codewords_L2[version - 1];
|
||||
}
|
||||
case 2:
|
||||
if (est_codewords < hx_data_codewords_L3[version - 1]) {
|
||||
ecc_level = 3;
|
||||
data_codewords = hx_data_codewords_L3[version - 1];
|
||||
}
|
||||
case 3:
|
||||
if (est_codewords < hx_data_codewords_L4[version - 1]) {
|
||||
ecc_level = 4;
|
||||
data_codewords = hx_data_codewords_L4[version - 1];
|
||||
}
|
||||
}
|
||||
|
||||
printf("Version %d, ECC %d\n", version, ecc_level);
|
||||
|
||||
size = (version * 2) + 21;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
@ -1144,5 +1177,5 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], int length
|
||||
symbol->row_height[i] = 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
@ -1,40 +1,212 @@
|
||||
# Linux makefile for zint - requires libzint
|
||||
#
|
||||
# make compiles zint
|
||||
# make install copies binary to /usr/local/bin
|
||||
# make uninstall removes the binary
|
||||
# make clean cleans up a previous compilation and any object or editor files
|
||||
#
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.2
|
||||
|
||||
ZINT_VERSION:=-DZINT_VERSION=\"2.4.4\"
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
.PHONY : default_target
|
||||
|
||||
CC := gcc
|
||||
INCLUDE := -I/usr/include
|
||||
CFLAGS := -g
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
prefix := /usr
|
||||
bindir := $(prefix)/bin
|
||||
DESTDIR :=
|
||||
LIBS:= -lz -lm -lpng
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
all: zint zint-static
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
main.o: main.c
|
||||
$(CC) -c -Wall $(INCLUDE) $(CFLAGS) $(ZINT_VERSION) -I../backend main.c -o main.o
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
zint: main.o
|
||||
$(CC) -Wall $(INCLUDE) $(CFLAGS) $(ZINT_VERSION) -I../backend -L../backend main.o -o zint -lzint
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
zint-static: main.c
|
||||
$(CC) -Wall $(INCLUDE) $(CFLAGS) $(ZINT_VERSION) -I../backend main.o -o zint-static ../backend/libzint.a $(LIBS)
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
.PHONY: install uninstall clean dist
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E remove -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /home/hooper/zint/zint-code
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /home/hooper/zint/zint-code
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip/fast: install/strip
|
||||
.PHONY : install/strip/fast
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
|
||||
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# Special rule for the target install
|
||||
install: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install
|
||||
|
||||
# Special rule for the target install
|
||||
install/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install/fast
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Devel\" \"Unspecified\""
|
||||
.PHONY : list_install_components
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components/fast: list_install_components
|
||||
.PHONY : list_install_components/fast
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local/fast: install/local
|
||||
.PHONY : install/local/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
cd /home/hooper/zint/zint-code && $(CMAKE_COMMAND) -E cmake_progress_start /home/hooper/zint/zint-code/CMakeFiles /home/hooper/zint/zint-code/frontend/CMakeFiles/progress.marks
|
||||
cd /home/hooper/zint/zint-code && $(MAKE) -f CMakeFiles/Makefile2 frontend/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/hooper/zint/zint-code/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
rm -f zint zint-static *.o *.a *~ *.png *.eps *.svg *.log
|
||||
cd /home/hooper/zint/zint-code && $(MAKE) -f CMakeFiles/Makefile2 frontend/clean
|
||||
.PHONY : clean
|
||||
|
||||
install:
|
||||
install -D -p zint $(DESTDIR)$(bindir)/zint
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
cd /home/hooper/zint/zint-code && $(MAKE) -f CMakeFiles/Makefile2 frontend/preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
cd /home/hooper/zint/zint-code && $(MAKE) -f CMakeFiles/Makefile2 frontend/preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
cd /home/hooper/zint/zint-code && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
# Convenience name for target.
|
||||
frontend/CMakeFiles/zint_frontend.dir/rule:
|
||||
cd /home/hooper/zint/zint-code && $(MAKE) -f CMakeFiles/Makefile2 frontend/CMakeFiles/zint_frontend.dir/rule
|
||||
.PHONY : frontend/CMakeFiles/zint_frontend.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
zint_frontend: frontend/CMakeFiles/zint_frontend.dir/rule
|
||||
.PHONY : zint_frontend
|
||||
|
||||
# fast build rule for target.
|
||||
zint_frontend/fast:
|
||||
cd /home/hooper/zint/zint-code && $(MAKE) -f frontend/CMakeFiles/zint_frontend.dir/build.make frontend/CMakeFiles/zint_frontend.dir/build
|
||||
.PHONY : zint_frontend/fast
|
||||
|
||||
main.o: main.c.o
|
||||
.PHONY : main.o
|
||||
|
||||
# target to build an object file
|
||||
main.c.o:
|
||||
cd /home/hooper/zint/zint-code && $(MAKE) -f frontend/CMakeFiles/zint_frontend.dir/build.make frontend/CMakeFiles/zint_frontend.dir/main.c.o
|
||||
.PHONY : main.c.o
|
||||
|
||||
main.i: main.c.i
|
||||
.PHONY : main.i
|
||||
|
||||
# target to preprocess a source file
|
||||
main.c.i:
|
||||
cd /home/hooper/zint/zint-code && $(MAKE) -f frontend/CMakeFiles/zint_frontend.dir/build.make frontend/CMakeFiles/zint_frontend.dir/main.c.i
|
||||
.PHONY : main.c.i
|
||||
|
||||
main.s: main.c.s
|
||||
.PHONY : main.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
main.c.s:
|
||||
cd /home/hooper/zint/zint-code && $(MAKE) -f frontend/CMakeFiles/zint_frontend.dir/build.make frontend/CMakeFiles/zint_frontend.dir/main.c.s
|
||||
.PHONY : main.c.s
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... install/strip"
|
||||
@echo "... edit_cache"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... install"
|
||||
@echo "... zint_frontend"
|
||||
@echo "... list_install_components"
|
||||
@echo "... install/local"
|
||||
@echo "... main.o"
|
||||
@echo "... main.i"
|
||||
@echo "... main.s"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
cd /home/hooper/zint/zint-code && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
uninstall:
|
||||
rm $(DESTDIR)$(bindir)/zint
|
||||
|
@ -34,6 +34,7 @@ FORMS += extData.ui \
|
||||
grpMSICheck.ui \
|
||||
grpPDF417.ui \
|
||||
grpQR.ui \
|
||||
grpHX.ui \
|
||||
mainWindow.ui
|
||||
|
||||
SOURCES += barcodeitem.cpp \
|
||||
|
509
frontend_qt4/grpHX.ui
Normal file
509
frontend_qt4/grpHX.ui
Normal file
@ -0,0 +1,509 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>grpHX</class>
|
||||
<widget class="QWidget" name="grpHX">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>441</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>421</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="radHXAuto">
|
||||
<property name="text">
|
||||
<string>A&utomatic Resizing</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="radHXSize">
|
||||
<property name="text">
|
||||
<string>Adjust Si&ze To:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cmbHXSize">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>23 x 23 (Version 1)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>25 x 25 (Version 2)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>27 x 27 (Version 3)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>29 x 29 (Version 4)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>31 x 31 (Version 5)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>33 x 33 (Version 6)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>35 x 35 (Version 7)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>37 x 37 (Version 8)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>39 x 39 (Version 9)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>41 x 41 (Version 10)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>43 x 43 (Version 11)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>45 x 45 (Version 12)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>47 x 47 (Version 13)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>49 x 49 (Version 14)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>51 x 51 (Version 15)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>53 x 53 (Version 16)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>55 x 55 (Version 17)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>57 x 57 (Version 18)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>59 x 59 (Version 19)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>61 x 61 (Version 20)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>63 x 63 (Version 21)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>65 x 65 (Version 22)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>67 x 67 (Version 23)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>69 x 69 (Version 24)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>71 x 71 (Version 25)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>73 x 73 (Version 26)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>75 x 75 (Version 27)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>77 x 77 (Version 28)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>79 x 79 (Version 29)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>81 x 81 (Version 30)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>83 x 83 (Version 31)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>85 x 85 (Version 32)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>87 x 87 (Version 33)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>89 x 89 (Version 34)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>91 x 91 (Version 35)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>93 x 93 (Version 36)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>95 x 95 (Version 37)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>97 x 97 (Version 38)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>99 x 99 (Version 39)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>101 x 101 (Version 40)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>103 x 103 (Version 41)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>105 x 105 (Version 42)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>107 x 107 (Version 43)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>109 x 109 (Version 44)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>111 x 111 (Version 45)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>113 x 113 (Version 46)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>115 x 115 (Version 47)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>117 x 117 (Version 48)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>119 x 119 (Version 49)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>121 x 121 (Version 50)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>123 x 123 (Version 51)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>125 x 125 (Version 52)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>127 x 127 (Version 53)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>129 x 129 (Version 54)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>131 x 131 (Version 55)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>133 x 133 (Version 56)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>135 x 135 (Version 57)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>137 x 137 (Version 58)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>139 x 139 (Version 59)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>141 x 141 (Version 60)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>143 x 143 (Version 61)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>145 x 145 (Version 62)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>147 x 147 (Version 63)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>149 x 149 (Version 64)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>151 x 151 (Version 65)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>153 x 153 (Version 66)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>155 x 155 (Version 67)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>157 x 157 (Version 68)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>159 x 159 (Version 69)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>161 x 161 (Version 70)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>163 x 163 (Version 71)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>165 x 165 (Version 72)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>167 x 167 (Version 73)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>169 x 169 (Version 74)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>171 x 171 (Version 75)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>173 x 173 (Version 76)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>175 x 175 (Version 77)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>177 x 177 (Version 78)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>179 x 179 (Version 79)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>181 x 181 (Version 80)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>183 x 183 (Version 81)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>185 x 185 (Version 82)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>187 x 187 (Version 83)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>189 x 189 (Version 84)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QRadioButton" name="radHXECC">
|
||||
<property name="text">
|
||||
<string>Add &Error Correction:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cmbHXECC">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>~8% (Level L1)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>~15% (Level L2)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>~23% (Level L3)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>~30% (Level L4)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -277,7 +277,7 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="grpAztecMode">
|
||||
<widget class="QGroupBox" name="grpQRMode">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@ -329,8 +329,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<zorder>gridLayoutWidget</zorder>
|
||||
<zorder></zorder>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -68,7 +68,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
|
||||
"GS1 DataBar Omnidirectional",
|
||||
"GS1 DataBar Stacked",
|
||||
"GS1 DataBar Stacked Omnidirectional",
|
||||
"Han Xin Code",
|
||||
"Han Xin (Chinese Sensible) Code",
|
||||
"ITF-14",
|
||||
"International Standard Book Number (ISBN)",
|
||||
"Japanese Postal Barcode",
|
||||
@ -384,6 +384,21 @@ void MainWindow::change_options()
|
||||
connect(m_optionWidget->findChild<QObject*>("radQRHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_HANXIN)
|
||||
{
|
||||
QFile file (":/grpHX.ui");
|
||||
if (!file.open(QIODevice::ReadOnly))
|
||||
return;
|
||||
m_optionWidget=uiload.load(&file);
|
||||
file.close();
|
||||
tabMain->insertTab(1,m_optionWidget,tr("Han Xin Code"));
|
||||
connect(m_optionWidget->findChild<QObject*>("radHXAuto"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("radHXSize"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("radHXECC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbHXSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbHXECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MICROQR)
|
||||
{
|
||||
QFile file(":/grpMQR.ui");
|
||||
@ -793,10 +808,16 @@ void MainWindow::update_preview()
|
||||
if(m_optionWidget->findChild<QRadioButton*>("radC49GS1")->isChecked())
|
||||
m_bc.bc.setInputMode(GS1_MODE);
|
||||
break;
|
||||
|
||||
case BARCODE_HANXIN:
|
||||
m_bc.bc.setSymbol(BARCODE_HANXIN);
|
||||
// Space reserved for more options!
|
||||
if(m_optionWidget->findChild<QRadioButton*>("radHXSize")->isChecked())
|
||||
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbHXSize")->currentIndex() + 1);
|
||||
|
||||
if(m_optionWidget->findChild<QRadioButton*>("radHXECC")->isChecked())
|
||||
m_bc.bc.setSecurityLevel(m_optionWidget->findChild<QComboBox*>("cmbHXECC")->currentIndex() + 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex()));
|
||||
break;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/" >
|
||||
<qresource prefix="/">
|
||||
<file>images/zoomout.png</file>
|
||||
<file>images/rotateleft.png</file>
|
||||
<file>images/rotateright.png</file>
|
||||
@ -19,7 +19,8 @@
|
||||
<file>grpCodeOne.ui</file>
|
||||
<file>grpC49.ui</file>
|
||||
<file>grpGrid.ui</file>
|
||||
<file>grpDBExtend.ui</file>
|
||||
<file>grpDBExtend.ui</file>
|
||||
<file>images/zint.png</file>
|
||||
<file>grpHX.ui</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Loading…
Reference in New Issue
Block a user