diff options
author | Louie S <louie@example.com> | 2024-05-08 17:58:28 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2024-05-08 17:58:28 -0400 |
commit | dbcb9aa93028db869f46fe1ce3639840a4e8f07b (patch) | |
tree | d4cfbf27ae0f09b0392c4f3e5040b2abc6d06aea /nsis/find_dlls_wip.sh | |
parent | 6fbda841a690ad046a3005d43e349915cf8e0810 (diff) |
Script to help find dlls
Diffstat (limited to 'nsis/find_dlls_wip.sh')
-rwxr-xr-x | nsis/find_dlls_wip.sh | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/nsis/find_dlls_wip.sh b/nsis/find_dlls_wip.sh deleted file mode 100755 index dd6e927..0000000 --- a/nsis/find_dlls_wip.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env sh - -# Proof-of-concept to have a script determine dlls that need to be shipped with the installer - -help() { - echo "Usage: [OPTION]... $0 BINARY..." - echo "Determine dlls required by BINARY (an .exe or .dll file)" - echo - echo "Options:" - echo " -h display this help message and exit" - echo " -s PATH set a path to search for dlls on. Default is \$PATH" -} - -print_dlls() { - while [ -e "$1" ]; do - objdump -x "$1" | grep "DLL Name: " | sed 's/^[^D]*DLL Name: //' - shift - done -} - -SEARCHPATH="$PATH" -echo "$SEARCHPATH" - -# Check args -while getopts "hs:" flag; do - case "$flag" in - h) - help - exit - ;; - s) - SEARCHPATH="${OPTARG}" - ;; - *) - break - esac -done - -if [ -z "$1" ]; then - help - exit 1 -fi - -if [ ! -e "$1" ]; then - >&2 echo "Error: '$1' does not exist" > STDERR - exit 1 -fi - -print_dlls "$@" - |