Add Kyber to algorithm strings.
[qpwmc.git] / contrib / copy-qpwmc-deps.sh
blob09f99911ec70aabea7212c7d7c08d2214370712e
1 #!/bin/sh
3 # The known dependencies are found in mxe-win32.deps and can be piped to this
4 # script.
6 QPWMC_PREFIX="`pwd`/qpwmc-win32"
7 MXE_ROOT=
9 usage () {
10 echo "Copy known needed dependencies for qpwmc."
11 echo "Usage: $0 --mxe-root=<path> [<file> ...]"
12 exit $1
15 TEMP=$(getopt -o 'hr:' --long 'help,mxe-root:' -n "$0" -- "$@")
17 if [ $? -ne 0 ]; then
18 usage 1
21 eval set -- "$TEMP"
22 unset TEMP
24 while true; do
25 case "$1" in
26 '-p'|'--mxe-root')
27 MXE_ROOT="$2"
28 shift 2
29 continue
31 '-h'|'--help')
32 usage 0
34 '--')
35 shift
36 break
39 usage 1
40 esac
41 done
43 if [ -z $MXE_ROOT ]; then
44 usage 1
47 MXE_PREFIX="$MXE_ROOT/usr/i686-w64-mingw32.shared"
48 echo "Using MXE prefix \"$MXE_PREFIX\""
50 copy_file () {
51 if [ -d "$MXE_PREFIX/bin/$1" ]; then
52 mkdir -p $QPWMC_PREFIX/$1 || exit 1
53 return
54 elif [ -d "$MXE_PREFIX/qt5/bin/$1" ]; then
55 mkdir -p $QPWMC_PREFIX/$1 || exit 1
56 return
57 elif [ -d "$MXE_PREFIX/qt5/plugins/$1" ]; then
58 mkdir -p $QPWMC_PREFIX/$1 || exit 1
59 return
62 if [ -f "$MXE_PREFIX/bin/$1" ]; then
63 echo "Copying file $MXE_PREFIX/bin/$1"
64 cp -f "$MXE_PREFIX/bin/$1" "$QPWMC_PREFIX/$1" || exit 1
65 elif [ -f "$MXE_PREFIX/qt5/bin/$1" ]; then
66 echo "Copying file $MXE_PREFIX/qt5/bin/$1"
67 cp -f "$MXE_PREFIX/qt5/bin/$1" "$QPWMC_PREFIX/$1" || exit 1
68 elif [ -f "$MXE_PREFIX/qt5/plugins/$1" ]; then
69 echo "Copying file $MXE_PREFIX/qt5/plugins/$1"
70 cp -f "$MXE_PREFIX/qt5/plugins/$1" "$QPWMC_PREFIX/$1" || exit 1
74 mkdir -p "$QPWMC_PREFIX" || exit 1
76 if [ $# -eq 0 ]; then
77 while read f; do
78 copy_file "$f"
79 done
82 for arg; do
83 copy_file $arg
84 done
86 for f in *.xml COPYING.rtf mkmsi.bat qpwmc.wxl; do
87 cp -f "$f" "$QPWMC_PREFIX"
88 done