diff --git a/.gitea/workflows/build-windows.yml b/.gitea/workflows/build-windows.yml
index 6661fed..f7c9bda 100644
--- a/.gitea/workflows/build-windows.yml
+++ b/.gitea/workflows/build-windows.yml
@@ -63,6 +63,15 @@ jobs:
echo "SHORT_SHA=${SHORT_SHA}" >> $GITHUB_ENV
mv Argyll_V*_win64_exe.zip "Argyll_${TAG}_${SHORT_SHA}_win64_exe.zip"
+ - name: Verify Package Contents
+ run: |
+ ZIP_FILE=$(ls Argyll_*_win64_exe.zip)
+ echo "Verifying contents of ${ZIP_FILE}..."
+ unzip -l "${ZIP_FILE}" | grep "usb/ArgyllCMS.inf"
+ unzip -l "${ZIP_FILE}" | grep "usb/bin/amd64/libusb0.sys"
+ unzip -l "${ZIP_FILE}" | grep "doc/ArgyllDoc.html"
+ unzip -l "${ZIP_FILE}" | grep "ReadMe.txt"
+
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml
index 90495b5..711785b 100644
--- a/.github/workflows/build-windows.yml
+++ b/.github/workflows/build-windows.yml
@@ -65,6 +65,15 @@ jobs:
echo "SHORT_SHA=${SHORT_SHA}" >> $GITHUB_ENV
mv Argyll_V*_win64_exe.zip "Argyll_${TAG}_${SHORT_SHA}_win64_exe.zip"
+ - name: Verify Package Contents
+ run: |
+ ZIP_FILE=$(ls Argyll_*_win64_exe.zip)
+ echo "Verifying contents of ${ZIP_FILE}..."
+ unzip -l "${ZIP_FILE}" | grep "usb/ArgyllCMS.inf"
+ unzip -l "${ZIP_FILE}" | grep "usb/bin/amd64/libusb0.sys"
+ unzip -l "${ZIP_FILE}" | grep "doc/ArgyllDoc.html"
+ unzip -l "${ZIP_FILE}" | grep "ReadMe.txt"
+
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
diff --git a/doc/ChangesSummary.html b/doc/ChangesSummary.html
index 9881860..806db14 100755
--- a/doc/ChangesSummary.html
+++ b/doc/ChangesSummary.html
@@ -19,6 +19,7 @@
[V3.4.1 -> V3.5.0] 4th February 2026
+ - Added -d switch to printtarg to allow custom chart label strings or omit labelling entirely.
- Added MSWindows ARM release.
- Added Mac ARM release.
- Removed Mac PowerPC build from release.
diff --git a/doc/printtarg.html b/doc/printtarg.html
index 2df4c8f..992a962 100755
--- a/doc/printtarg.html
+++ b/doc/printtarg.html
@@ -264,6 +264,7 @@ channels
Dither 8 bit TIFF values down from 16 bit
+ -d "string" Custom target label string, or "" to omit labelling
-Q nbits
Quantize
test
@@ -758,6 +759,12 @@ A3
to use it to verify the overall operation of the printing system), then you
can use the -U flag to disable this.
+ The -d parameter allows specifying a custom
+ chart description/label string to be printed along the page/strip borders on
+ generated test target files (TIFF, PostScript, EPS), replacing the default
+ generated chart identifier. If an empty string is provided (-d ""),
+ chart labelling along the page borders is suppressed entirely.
+
The -p parameter specifies the paper size. The size
can either be one of the default sizes, or can be
specified in millimeters. Limitations of the instrument may limit the
diff --git a/makepackagebin.sh b/makepackagebin.sh
index 30da71e..f7beac1 100755
--- a/makepackagebin.sh
+++ b/makepackagebin.sh
@@ -167,13 +167,21 @@ fi
rm -rf $TOPDIR
mkdir $TOPDIR
+# Ensure catalog copies exist if needed for Windows packaging
+if [ -d usb ] ; then
+ if [ -f usb/ArgyllCMS.cat ] ; then
+ [ ! -f usb/ArgyllCMS_x64.cat ] && cp usb/ArgyllCMS.cat usb/ArgyllCMS_x64.cat
+ [ ! -f usb/ArgyllCMS_arm64.cat ] && cp usb/ArgyllCMS.cat usb/ArgyllCMS_arm64.cat
+ fi
+fi
+
# Collect the names of all the files that we're going to package
-unset topfiles; for i in `cat binfiles`; do topfiles="$topfiles ${i}"; done
-unset docfiles; for i in `cat doc/afiles`; do docfiles="$docfiles doc/${i}"; done
+unset topfiles; for i in `tr -d '\r' < binfiles`; do topfiles="$topfiles ${i}"; done
+unset docfiles; for i in `tr -d '\r' < doc/afiles`; do docfiles="$docfiles doc/${i}"; done
unset usbfiles;
for j in ${USBDIRS}; do
if [ ${j} ]; then
- for i in `cat ${j}/${USBBINFILES}`; do usbfiles="$usbfiles ${j}/${i}"; done
+ for i in `tr -d '\r' < ${j}/${USBBINFILES}`; do usbfiles="$usbfiles ${j}/${i}"; done
fi
done
@@ -183,16 +191,16 @@ allfiles="${topfiles} bin/* ref/* ${docfiles} ${usbfiles}"
for i in ${allfiles}; do
path=${i%/*} # extract path without filename
file=${i##*/} # extract filename
- if [ $path = $i ] ; then
+ if [ "$path" = "$i" ] ; then
path=
fi
- if [ X$path != "X" ] ; then
- mkdir -p $TOPDIR/${path}
+ if [ X"$path" != "X" ] ; then
+ mkdir -p "$TOPDIR/${path}"
fi
- if [ X${file} = "Xafiles" ] ; then
+ if [ X"${file}" = "Xafiles" ] ; then
continue
fi
- cp $i $TOPDIR/$i
+ cp "$i" "$TOPDIR/$i" || { echo "Failed to copy $i to $TOPDIR/$i"; exit 1; }
done
# Create the package
diff --git a/target/printtarg.c b/target/printtarg.c
index c1cacd5..eb4622b 100644
--- a/target/printtarg.c
+++ b/target/printtarg.c
@@ -463,6 +463,29 @@ static void ps_hexagon(trend *ss,
fprintf(s->of,"%f %f %f %f hex\n",w,h,x,y);
}
+/* Helper to escape characters in PostScript string literals */
+static void ps_escape_str(char *dst, int maxdst, const char *src) {
+ int di = 0;
+ if (dst == NULL || maxdst <= 0) return;
+ if (src == NULL) { dst[0] = '\0'; return; }
+ while (*src != '\0' && di < maxdst - 2) {
+ if (*src == '(' || *src == ')' || *src == '\\') {
+ if (di < maxdst - 3) {
+ dst[di++] = '\\';
+ dst[di++] = *src++;
+ } else {
+ break;
+ }
+ } else if (*src == '\r' || *src == '\n') {
+ dst[di++] = ' ';
+ src++;
+ } else {
+ dst[di++] = *src++;
+ }
+ }
+ dst[di] = '\0';
+}
+
/* A centered string */
static void ps_string(trend *ss,
double x, double y, /* Bot Left Corner of rectangle in mm from origin */
@@ -470,15 +493,17 @@ static void ps_string(trend *ss,
char *str /* String */
) {
ps_trend *s = (ps_trend *)ss;
+ char esc_str[2048];
- if (fabs(w) < 1e-6 || fabs(h) < 1e-6)
- return; /* Skip zero sized string */
+ if (fabs(w) < 1e-6 || fabs(h) < 1e-6 || str == NULL || str[0] == '\000')
+ return; /* Skip zero sized or empty string */
+ ps_escape_str(esc_str, sizeof(esc_str), str);
x = mm2pnt(x);
y = mm2pnt(y);
w = mm2pnt(w);
h = mm2pnt(h);
fprintf(s->of,"%f scaleTimes\n",h * 0.75);
- fprintf(s->of,"(%s) %f %f centerShow\n",str,x+w/2.0,y+h/2.0);
+ fprintf(s->of,"(%s) %f %f centerShow\n",esc_str,x+w/2.0,y+h/2.0);
}
/* A vertically centered string */
@@ -488,15 +513,17 @@ static void ps_vstring(trend *ss,
char *str /* String */
) {
ps_trend *s = (ps_trend *)ss;
+ char esc_str[2048];
- if (fabs(w) < 1e-6 || fabs(h) < 1e-6)
- return; /* Skip zero sized string */
+ if (fabs(w) < 1e-6 || fabs(h) < 1e-6 || str == NULL || str[0] == '\000')
+ return; /* Skip zero sized or empty string */
+ ps_escape_str(esc_str, sizeof(esc_str), str);
x = mm2pnt(x);
y = mm2pnt(y);
w = mm2pnt(w);
h = mm2pnt(h);
fprintf(s->of,"%f scaleTimes\n",w * 0.75);
- fprintf(s->of,"(%s) %f %f vcenterShow\n",str,x-w/2.0,y+h/2.0);
+ fprintf(s->of,"(%s) %f %f vcenterShow\n",esc_str,x-w/2.0,y+h/2.0);
}
/* A dotted line */
@@ -872,6 +899,8 @@ static void tiff_string(trend *ss,
tiff_trend *s = (tiff_trend *)ss;
double sw = 0.0, sh = 0.0;
+ if (fabs(w) < 1e-6 || fabs(h) < 1e-6 || str == NULL || str[0] == '\000')
+ return; /* Skip zero sized or empty string */
sh = h * 0.57;
meas_string2d(s->r,&sw,NULL,timesr_b,str,sh,0);
/* Center the string within the recangle */
@@ -889,6 +918,8 @@ static void tiff_vstring(trend *ss,
tiff_trend *s = (tiff_trend *)ss;
double sw = 0.0, sh = 0.0;
+ if (fabs(w) < 1e-6 || fabs(h) < 1e-6 || str == NULL || str[0] == '\000')
+ return; /* Skip zero sized or empty string */
x -= w; /* Make it bot left corner */
sw = w * 0.57;
meas_string2d(s->r,NULL, &sh,timesr_b,str,sw,3);
@@ -2265,6 +2296,9 @@ int *p_npat /* Return number of patches including padding */
if (scanc & 2) /* Scan compatiblity */
sxwi = pwid/2.0; /* First row patches extra width */
+ if (label == NULL || label[0] == '\000')
+ dopglabel = 0; /* Omit per-page labelling */
+
/* Compute limits for this page size */
/* Figure the available space for patches */
mints = bord + txhisl + lcar; /* Minimum top space due to border, text and clear area */
@@ -3009,6 +3043,7 @@ void usage(char *diag, ...) {
fprintf(stderr," -C Don't use TIFF compression\n");
fprintf(stderr," -N Use TIFF alpha N channels more than 4\n");
fprintf(stderr," -D Dither 8 bit TIFF values down from 16 bit\n");
+ fprintf(stderr," -d label Custom chart description/label string, or \"\" to omit labelling\n");
fprintf(stderr," -Q nbits Quantize test values to fit in nbits\n");
fprintf(stderr," -R rsnum Use given random start number\n");
fprintf(stderr," -K file.cal Apply printer calibration to patch values and include in .ti2\n");
@@ -3070,7 +3105,9 @@ int main(int argc, char *argv[]) {
int nchan = 0; /* Number of device chanels */
int i;
int si, fi, wi; /* Sample id index, field index, keyWord index */
- char label[400]; /* Space for chart label */
+ char *custom_label = NULL; /* Custom chart label string */
+ int custom_label_set = 0; /* Flag, custom label was specified */
+ char label[1024]; /* Space for chart label */
double marg = DEF_MARGINE; /* Margin from paper edge in mm */
int nosubmarg = 0; /* Don't subtract it from raster */
int nolpcbord = 0; /* NZ to suppress left paper clip border */
@@ -3302,6 +3339,13 @@ int main(int argc, char *argv[]) {
else if (argv[fa][1] == 'D') {
tiffdith = 1;
}
+ /* Custom chart label string */
+ else if (argv[fa][1] == 'd') {
+ fa = nfa;
+ if (na == NULL) usage("Expected argument to -d");
+ custom_label = na;
+ custom_label_set = 1;
+ }
/* Don't use TIFF compression */
else if (argv[fa][1] == 'C') {
tiffcomp = 0;
@@ -3789,8 +3833,18 @@ int main(int argc, char *argv[]) {
pcol = pcold; /* Density spacer alues */
- sprintf(label, "ArgyllCMS - Chart \"%s\" (%s %d) %s",
- psname, rand ? "Random Start" : "Chart ID", rstart, atm);
+ if (custom_label_set) {
+ if (custom_label[0] != '\000') {
+ strncpy(label, custom_label, sizeof(label) - 1);
+ label[sizeof(label) - 1] = '\000';
+ ocg->add_kword(ocg, 0, "CHART_LABEL", custom_label, NULL);
+ } else {
+ label[0] = '\000';
+ }
+ } else {
+ sprintf(label, "ArgyllCMS - Chart \"%s\" (%s %d) %s",
+ psname, rand ? "Random Start" : "Chart ID", rstart, atm);
+ }
generate_file(itype, itype_mod, psname, cols, npat, applycal ? cal : NULL, label,
pap != NULL ? pap->w : cwidth, pap != NULL ? pap->h : cheight,
marg, nosubmarg, nollimit, nolpcbord, rand, rstart, saix, paix, ixord,
diff --git a/usb/ArgyllCMS_arm64.cat b/usb/ArgyllCMS_arm64.cat
new file mode 100644
index 0000000..a1c607c
Binary files /dev/null and b/usb/ArgyllCMS_arm64.cat differ
diff --git a/usb/ArgyllCMS_x64.cat b/usb/ArgyllCMS_x64.cat
new file mode 100644
index 0000000..a1c607c
Binary files /dev/null and b/usb/ArgyllCMS_x64.cat differ