Mercurial > minori
comparison scripts/win32/deploy_build.sh @ 243:ed5ab3896666
autotools: add `-mwindows` and windows deploy script
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Mon, 22 Jan 2024 19:54:41 -0800 |
parents | |
children | 3a4aa9b4814c |
comparison
equal
deleted
inserted
replaced
242:82470f83f0c2 | 243:ed5ab3896666 |
---|---|
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 ldd "$1" | while IFS="" read -r dependency; do | |
14 fields=($dependency) | |
15 lib="${fields[2]}" | |
16 if [[ "$lib" == /"${MSYSTEM,,}"/* ]]; then | |
17 echo "$lib" | |
18 fi | |
19 done | |
20 } | |
21 | |
22 if [ -d "$DIR" ]; then | |
23 rm -r "$DIR" | |
24 fi | |
25 | |
26 mkdir "$DIR" | |
27 | |
28 for lib in $(GetNeededLibraries ".libs/minori.exe"); do | |
29 cp "$lib" "$DIR/" | |
30 done | |
31 | |
32 cp ".libs/minori.exe" "$DIR/" | |
33 | |
34 windeployqt "$DIR/minori.exe" | |
35 | |
36 zip -r "$DIR.zip" "$DIR" |