Skip to content

Commit 19fd35c

Browse files
committed
MMVII: missing DLLs in windows packaging (github)
1 parent 344696c commit 19fd35c

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.github/workflows/build_mmvii.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
cd /C/Miniconda/envs/test/Library/bin/
161161
162162
# dll for PROJ, GDAL
163-
cp -a archive.dll blosc.dll charset.dll deflate.dll freexl.dll gdal.dll geos.dll geos_c.dll iconv.dll jpeg8.dll ${MMVII_BINDIR}/
163+
cp -a archive.dll blosc.dll charset.dll deflate.dll freexl.dll gdal.dll geos.dll geos_c.dll iconv.dll icudt75.dll icuuc75.dll jpeg8.dll ${MMVII_BINDIR}/
164164
cp -a brotlicommon.dll brotlidec.dll brotlienc.dll hwy.dll jxl.dll jxl_cms.dll jxl_threads.dll muparser.dll ${MMVII_BINDIR}/
165165
cp -a Lerc.dll libbz2.dll libcrypto-3-x64.dll libcurl.dll libexpat.dll liblzma.dll libminizip.dll libpng16.dll libsharpyuv.dll ${MMVII_BINDIR}/
166166
cp -a libssh2.dll libssl-3-x64.dll libwebp.dll libxml2.dll lz4.dll pcre2-8.dll proj_9.dll snappy.dll spatialite.dll ${MMVII_BINDIR}/

MMVII/tools/find_missing_dlls.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
# PATH to 'dumpbin.exe', included in Microsoft Visual Studio
3+
DB='/d/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/dumpbin.exe'
4+
5+
6+
# Extract first level DLLs used by program or dll in $1
7+
db(){
8+
"$DB" -DEPENDENTS $1 | awk 'BEGIN {doit=0} /^ *Image/ {doit=2} /^ *Summary/ {doit=0} { if (doit==1&& NF == 1 ) print $1; if (doit==2) doit=1 }'
9+
}
10+
11+
12+
missing=
13+
seen=
14+
# fill "list" with all DLLs used by $1 (recurse)
15+
get_missing(){
16+
dlls=$(db $1)
17+
for dll in $dlls
18+
do
19+
if [[ "$seen" == *"$dll"* ]] ; then # already processed
20+
continue
21+
fi
22+
seen="$seen $dll"
23+
if [ -f $dll ] ; then
24+
get_missing $dll # if DLL file exist, recurse in it
25+
else
26+
if ! type $dll >/dev/null 2>&1 ; then
27+
missing="$missing $dll" # else, and if not in the path, add it to missing list
28+
fi
29+
fi
30+
done
31+
}
32+
33+
get_missing $1
34+
35+
# print missing DLLs,
36+
for dll in "$missing"
37+
do
38+
echo "'$dll' is missing"
39+
done

0 commit comments

Comments
 (0)