mirror of
https://github.com/a-bad-dev/luanti-no-place-rep-limit.git
synced 2026-06-09 00:41:32 +00:00
add files for msys2 builds on windows
This commit is contained in:
parent
63b74b0879
commit
e36e89013c
2 changed files with 95 additions and 0 deletions
21
bundle_dlls.sh
Normal file
21
bundle_dlls.sh
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
# msys2-bundledlls - Copy DLLs linked against a Windows executable for bundling with a distribution
|
||||
|
||||
if [ "$#" -ne 2 ];
|
||||
then
|
||||
echo "Usage: ./bundledlls <executable> <directory>"
|
||||
exit
|
||||
fi
|
||||
|
||||
mkdir -p $2
|
||||
|
||||
# Get list of dynamic libraries, filter by ones that are found in the current MSYS2 prefix
|
||||
# and strip off everything but the full path. E.g.:
|
||||
# `lua51.dll => /ucrt64/bin/lua51.dll (0xdeadbeef)` => `/ucrt64/bin/lua51.dll`
|
||||
list=$(ldd $1 | grep $MINGW_PREFIX | sed 's/.* => //' | sed 's/ \(.*\)//')
|
||||
|
||||
for dll in $list;
|
||||
do
|
||||
echo $dll
|
||||
cp $dll $2/
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue