scripts: not hardcode MSYSTEM (#1739)
This commit is contained in:
+12
-8
@@ -213,14 +213,18 @@ main() {
|
||||
if [[ $platform == "windows" ]]; then
|
||||
exe_file="${exe_file}.exe"
|
||||
stripcmd="strip --strip-all"
|
||||
# Copy MinGW libraries dependencies.
|
||||
# MSYS2 ldd command seems to be only 64bit, so use ntldd
|
||||
# see https://github.com/msys2/MINGW-packages/issues/4164
|
||||
ntldd -R "${exe_file}" \
|
||||
| grep mingw \
|
||||
| awk '{print $3}' \
|
||||
| sed 's#\\#/#g' \
|
||||
| xargs -I '{}' cp -v '{}' "$(pwd)/${dest_dir}/"
|
||||
if command -v ntldd >/dev/null 2>&1; then
|
||||
# Copy MinGW libraries dependencies.
|
||||
# MSYS2 ldd command seems to be only 64bit, so use ntldd
|
||||
# see https://github.com/msys2/MINGW-packages/issues/4164
|
||||
ntldd -R "${exe_file}" \
|
||||
| grep mingw \
|
||||
| awk '{print $3}' \
|
||||
| sed 's#\\#/#g' \
|
||||
| xargs -I '{}' cp -v '{}' "$(pwd)/${dest_dir}/"
|
||||
else
|
||||
echo "WARNING: ntldd not found; assuming program is static"
|
||||
fi
|
||||
else
|
||||
# Windows archive is always portable
|
||||
package_name+="-portable"
|
||||
|
||||
Reference in New Issue
Block a user