Mercurial > minori
view scripts/win32/deploy_build.sh @ 347:a0aa8c8c4307
dep/anitomy: port to use UCS-4 rather than wide strings
rationale: wide strings are not the same on every platform, and
might not even be Unicode. (while they usually are, its possible
that they are not)
I was *going* to change StringToInt to use a string stream, but
outputting to an integer doesn't seem to work at all with UCS-4,
even though it ought to, so I just rolled my own that uses the
arabic digits only.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 23 Jun 2024 10:32:09 -0400 |
parents | 1faa72660932 |
children |
line wrap: on
line source
#!/bin/sh # # deploys needed libraries for minori on win32 # # this also runs windeployqt to deploy qt crap # as well # # note: ldd is NOT a standard ldd; it's mingw-ldd # from pypi which works much well when cross # compiling using something like quasi-msys2 # you can override the paths to these at runtime DIR="${DIR:-minori}" LDD="${LDD:-mingw-ldd}" GetNeededLibraries() { # do not run this on untrusted executables. # see: ldd(1) system="$(echo "$MSYSTEM" | tr "[:upper:]" "[:lower:]")" "$LDD" --output-format ldd-like --dll-lookup-dirs "/$system/bin" "$PWD" -- "$1" | while IFS="" read -r dependency; do # trim whitespace, then get the value; mingw-ldd's "ldd-like" output doesn't use tabs like regular ldd lib="$(printf -- "%s" "$dependency" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | cut -d' ' -f3)" if test "x$lib" != "xnot"; then printf -- "$lib\n" fi done } if test -d "$DIR"; then rm -r "$DIR" fi mkdir "$DIR" for lib in $(GetNeededLibraries "minori.exe"); do echo "copying '$lib' to $DIR" cp "$lib" "$DIR/" done cp "minori.exe" "$DIR/" windeployqt "$DIR/minori.exe" zip -r "$DIR.zip" "$DIR"