Mercurial > minori
annotate scripts/win32/deploy_build.sh @ 298:dec4d3c9a909
scripts/win32/deploy_build: be more verbose with libs
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Mon, 13 May 2024 03:28:42 -0400 |
parents | b2a4358da16c |
children | 8eb0cfe59992 |
rev | line source |
---|---|
296 | 1 #!/bin/sh |
2 # | |
3 # deploys needed libraries for minori on win32 | |
4 # | |
5 # this also runs windeployqt to deploy qt crap | |
6 # as well | |
7 | |
8 DIR="${DIR:-minori}" | |
9 | |
10 GetNeededLibraries() { | |
11 # do not run this on untrusted executables. | |
12 # see: ldd(1) | |
13 system="$(echo "$MSYSTEM" | tr "[:upper:]" "[:lower:]")" | |
14 ldd "$1" | while IFS="" read -r dependency; do | |
15 lib="$(printf -- "$dependency" | cut -d' ' -f3)" | |
16 case $lib in | |
17 "/$system/"*) | |
18 printf -- "$lib\n" | |
19 ;; | |
20 *) | |
21 ;; | |
22 esac | |
23 done | |
24 } | |
25 | |
26 | |
27 if [ -d "$DIR" ]; then | |
28 rm -r "$DIR" | |
29 fi | |
30 | |
31 mkdir "$DIR" | |
32 | |
33 for lib in $(GetNeededLibraries ".libs/minori.exe"); do | |
298
dec4d3c9a909
scripts/win32/deploy_build: be more verbose with libs
Paper <paper@paper.us.eu.org>
parents:
296
diff
changeset
|
34 echo "copying '$lib' to $DIR" |
296 | 35 cp "$lib" "$DIR/" |
36 done | |
37 | |
38 cp ".libs/minori.exe" "$DIR/" | |
39 | |
40 windeployqt "$DIR/minori.exe" | |
41 | |
42 zip -r "$DIR.zip" "$DIR" |