diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index 0c194a13c..25f1fffe0 100644
--- a/.github/workflows/build-test.yml
+++ b/.github/workflows/build-test.yml
@@ -2,7 +2,9 @@ name: Build and test
on: [push, pull_request]
-concurrency: ${{ github.workflow }}-${{ github.ref }}
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
jobs:
build-ubuntu:
@@ -466,3 +468,5 @@ jobs:
nvc.exe -a test\regress\ieee1.vhd
nvc.exe -e ieee1
nvc.exe -r ieee1
+ 'package require msgcat; package require yaml' | Set-Content -Path test.tcl
+ nvc.exe --do .\test.tcl
diff --git a/NEWS.md b/NEWS.md
index bc4b3f529..fd6641ef6 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -5,6 +5,7 @@
element (#1137).
- Fixed a regression that caused some array aggregates to be incorrectly
reported as ambiguous (#1138).
+- The Windows installer now bundles the Tcllib library (#1136).
## Version 1.15.0 - 2025-01-11
- `--load` is now a global option and should be placed before the `-r`
diff --git a/contrib/msi/Makemodule.am b/contrib/msi/Makemodule.am
index a41ac4fa0..e3d12ec04 100644
--- a/contrib/msi/Makemodule.am
+++ b/contrib/msi/Makemodule.am
@@ -22,12 +22,31 @@ libs.wxs: $(srcdir)/contrib/msi/genlibs.py bin/nvc$(EXEEXT)
WIXOBJS = installer.wixobj libs.wixobj
-$(PACKAGE_NAME)-$(PACKAGE_VERSION).msi: $(WIXOBJS) $(srcdir)/contrib/msi/gpl-3.0.rtf
+$(PACKAGE_NAME)-$(PACKAGE_VERSION).msi: $(WIXOBJS) $(srcdir)/contrib/msi/gpl-3.0.rtf tcllib.install
light -ext WixUIExtension -cultures:en-us \
-dWixUILicenseRtf=$(srcdir)/contrib/msi/gpl-3.0.rtf -out $@ $(WIXOBJS)
msi-installer: $(PACKAGE_NAME)-$(PACKAGE_VERSION).msi
+tcllib-1.21.tar.gz:
+ wget https://core.tcl-lang.org/tcllib/uv/tcllib-1.21.tar.gz
+
+tcllib.extract: tcllib-1.21.tar.gz
+ tar zxf tcllib-1.21.tar.gz
+ touch tcllib.extract
+
+tcllib.configure: tcllib.extract
+ cd tcllib-1.21 && ./configure --prefix=$$(cygpath -u $(PREFIX))
+ touch tcllib.configure
+
+tcllib.install: tcllib.configure
+ cd tcllib-1.21 && make install-libraries
+ touch tcllib.install
+
+DISTCLEANFILES += tcllib-1.21.tar.gz
+
+CLEANFILES += tcllib.install tcllib.configure tcllib.extract
+
else
msi-installer:
diff --git a/contrib/msi/genlibs.py b/contrib/msi/genlibs.py
index 751484489..8abf1c766 100644
--- a/contrib/msi/genlibs.py
+++ b/contrib/msi/genlibs.py
@@ -15,6 +15,40 @@
prefix = subprocess.check_output(
["cygpath", "-u", wprefix]).decode("utf-8").strip()
+allrefs = []
+
+def get_ref(prefix, d):
+ suffix = os.path.basename(d).upper().replace("-", "_").replace("+", ".")
+ return f"{prefix}_{suffix}"
+
+
+def walk_dir(prefix, d):
+ if not os.path.isdir(d):
+ raise Exception(f"Non-existent directory {d}")
+
+ fs = glob(f"{d}\\*")
+ fs.sort()
+
+ for f in fs:
+ ref = get_ref(prefix, f)
+ base = os.path.basename(f)
+ if os.path.isdir(f):
+ print(f"")
+ walk_dir(ref, f)
+ print("")
+ else:
+ print(f"")
+ print(f" ")
+ print("")
+
+ allrefs.append(ref)
+
+
+################################################################################
+# DLLs
+
dlls = set()
ldd = subprocess.Popen(["ldd", sys.argv[1]], stdout=subprocess.PIPE)
for line in io.TextIOWrapper(ldd.stdout, encoding="utf-8"):
@@ -28,12 +62,6 @@
dlls = list(dlls)
dlls.sort()
-
-def get_ref(prefix, d):
- suffix = os.path.basename(d).upper().replace("-", "_").replace("+", "_")
- return f"{prefix}_{suffix}"
-
-
for d in dlls:
base = os.path.basename(d)
ref = get_ref("BIN", d)
@@ -42,29 +70,42 @@ def get_ref(prefix, d):
print(f" ")
print("")
+ allrefs.append(ref)
print("")
-print("")
-tcl = glob(wprefix + "\\lib\\tcl8.6\\*")
-tcl.sort()
+################################################################################
+# TCL core libraries
+
+print("")
+
+print("")
+walk_dir("TCL", f"{wprefix}\\lib\\tcl8.6")
+print("")
+
+print("")
+walk_dir("TCL8", f"{wprefix}\\lib\\tcl8")
+print("")
+
+print("")
-for t in tcl:
- if os.path.isdir(t):
- pass
- else:
- base = os.path.basename(t)
- ref = get_ref("LIB_TCL", t)
- print(f"")
- print(f" ")
- print("")
+
+################################################################################
+# TclLib
+
+print("")
+
+print(f"")
+walk_dir("TCLLIB", f"{sys.argv[2]}\\lib\\tcllib1.21")
+print("")
print("")
+################################################################################
+# Compiled VHDL libraries
+
libdirs = [
("LIB_NVC_NVC", "\\lib\\nvc\\nvc"),
("LIB_NVC_NVC.08", "\\lib\\nvc\\nvc.08"),
@@ -76,7 +117,6 @@ def get_ref(prefix, d):
("LIB_NVC_IEEE.08", "\\lib\\nvc\\ieee.08"),
("LIB_NVC_IEEE.19", "\\lib\\nvc\\ieee.19"),
]
-allrefs = []
for (prefix, folder) in libdirs:
print(f"")
@@ -102,16 +142,10 @@ def get_ref(prefix, d):
print("")
-print("")
-
-for d in dlls:
- print(f"")
+################################################################################
+# Emit component groups
-for t in tcl:
- if os.path.isdir(t):
- pass
- else:
- print(f"")
+print("")
for r in allrefs:
print(f"")
diff --git a/contrib/msi/installer.wxs.in b/contrib/msi/installer.wxs.in
index 0b3703175..54ee2f140 100644
--- a/contrib/msi/installer.wxs.in
+++ b/contrib/msi/installer.wxs.in
@@ -34,8 +34,6 @@
-
-
diff --git a/src/cov/cov-report.c b/src/cov/cov-report.c
index a9a207976..61b5f5dd0 100644
--- a/src/cov/cov-report.c
+++ b/src/cov/cov-report.c
@@ -551,7 +551,7 @@ static void cover_print_code_loc(FILE *f, cover_pair_t *pair)
continue;
}
else
- fprintf(f, "%lu:", loc.first_line + (curr_line - pair->line));
+ fprintf(f, "%zu:", loc.first_line + (curr_line - pair->line));
int curr_char = 0;
while (curr_char < curr_line->len) {