From 9fe0f21d44179356398c6f0708cbaaec71a63895 Mon Sep 17 00:00:00 2001 From: dl5rcw Date: Sun, 7 Feb 2016 22:21:03 +0100 Subject: Rename copydlldeps.txt to copydlldeps.md --- tools/copydlldeps.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ tools/copydlldeps.txt | 58 --------------------------------------------------- 2 files changed, 58 insertions(+), 58 deletions(-) create mode 100644 tools/copydlldeps.md delete mode 100644 tools/copydlldeps.txt diff --git a/tools/copydlldeps.md b/tools/copydlldeps.md new file mode 100644 index 0000000..dc07f4d --- /dev/null +++ b/tools/copydlldeps.md @@ -0,0 +1,58 @@ +== README of copydlldeps.sh == +This document was created 2016-02-05. It belongs to copydlldeps.sh + +I call it on the command line like: + +/share/mxe/tools/copydlldeps.sh --infile /home/mxeuser/test/i686-w64-mingw32.shared/Application.exe \ + --destdir /home/mxeuser/testdlls/ \ + --recursivesrcdir /home/mxeuser/mxe/usr/i686-w64-mingw32.shared/ \ + --srcdir /home/mxeuser/test/ \ + --copy \ + --enforce /home/mxeuser/mxe/usr/i686-w64-mingw32.shared/qt5/plugins/platforms/ \ + --objdump /home/mxeuser/mxe/usr/bin/i686-w64-mingw32.shared-objdump + +It got embedded in a build script like: + + +MXEPATH=/path/to/mxe +compiler=i686-w64-mingw32.shared +orgDir=/path/to/my/nsis/dll #nsis is then copying all dlls in there to the place where the exe is located + +if [ ! $( echo $compiler | grep -q "shared" ) ]; then + echo "\$compiler=$compiler and contains the word 'shared'" | tee -a $CURLOG + + echo "#===============================================# " | tee -a $CURLOG + echo "| Starting new MXE copydlldeps.sh by LHE DL5RCW | " | tee -a $CURLOG + echo "#===============================================# " | tee -a $CURLOG + echo "currently working in $( pwd ) " | tee -a $CURLOG + executable=$( find . -name "*.exe" | tail -n 1 ) +if [ -e $MXEPATH/usr/bin/$compiler-objdump ]; then + echo "now populating dir=${orgDir}/nsis/sharedLibs with dll dependencies of executable=$executable" | tee -a $CURLOG + $MXEPATH/tools/copydlldeps.sh --infile $executable \ + --destdir ${orgDir}/nsis/sharedLibs \ + --recursivesrcdir $MXEPATH/usr/$compiler/ \ + --enforce $MXEPATH/usr/$compiler/qt5/plugins/platforms/ \ + --copy \ + --objdump $MXEPATH/usr/bin/$compiler-objdump | tee -a $CURLOG +else + echo "now populating dir=${orgDir}/nsis/sharedLibs with dll dependencies of executable=$executable" | tee -a $CURLOG + $MXEPATH/tools/copydlldeps.sh --infile $executable \ + --destdir ${orgDir}/nsis/sharedLibs \ + --recursivesrcdir $MXEPATH/usr/$compiler/ \ + --enforce $MXEPATH/usr/$compiler/qt5/plugins/platforms/ \ + --copy | tee -a $CURLOG +fi + + + +== Additional hints == +=== objdump === +I checked if there is a mxe objdump. If not, I took the native one on my server. I actually do not know the difference but decided to include it in the script in case it is important to someone +=== enforce === +My application is using Qt5 and objdump did not return the needed qwindows.dll - so I enforce the platform folder. You may add multiple --enforce directories using --enforce /path/folder1 --enforce /path/folder2 --enforce /path/folder3 +They are NOT recursively copied, only flat. See: + string=$( find $enforcedDirectory -maxdepth 1 -iregex '.*\(dll\|exe\)' | tr '\n' ' ' ) + +If you would remove the -maxdepth 1, it would become recoursive. Does anyone need that? + + diff --git a/tools/copydlldeps.txt b/tools/copydlldeps.txt deleted file mode 100644 index dc07f4d..0000000 --- a/tools/copydlldeps.txt +++ /dev/null @@ -1,58 +0,0 @@ -== README of copydlldeps.sh == -This document was created 2016-02-05. It belongs to copydlldeps.sh - -I call it on the command line like: - -/share/mxe/tools/copydlldeps.sh --infile /home/mxeuser/test/i686-w64-mingw32.shared/Application.exe \ - --destdir /home/mxeuser/testdlls/ \ - --recursivesrcdir /home/mxeuser/mxe/usr/i686-w64-mingw32.shared/ \ - --srcdir /home/mxeuser/test/ \ - --copy \ - --enforce /home/mxeuser/mxe/usr/i686-w64-mingw32.shared/qt5/plugins/platforms/ \ - --objdump /home/mxeuser/mxe/usr/bin/i686-w64-mingw32.shared-objdump - -It got embedded in a build script like: - - -MXEPATH=/path/to/mxe -compiler=i686-w64-mingw32.shared -orgDir=/path/to/my/nsis/dll #nsis is then copying all dlls in there to the place where the exe is located - -if [ ! $( echo $compiler | grep -q "shared" ) ]; then - echo "\$compiler=$compiler and contains the word 'shared'" | tee -a $CURLOG - - echo "#===============================================# " | tee -a $CURLOG - echo "| Starting new MXE copydlldeps.sh by LHE DL5RCW | " | tee -a $CURLOG - echo "#===============================================# " | tee -a $CURLOG - echo "currently working in $( pwd ) " | tee -a $CURLOG - executable=$( find . -name "*.exe" | tail -n 1 ) -if [ -e $MXEPATH/usr/bin/$compiler-objdump ]; then - echo "now populating dir=${orgDir}/nsis/sharedLibs with dll dependencies of executable=$executable" | tee -a $CURLOG - $MXEPATH/tools/copydlldeps.sh --infile $executable \ - --destdir ${orgDir}/nsis/sharedLibs \ - --recursivesrcdir $MXEPATH/usr/$compiler/ \ - --enforce $MXEPATH/usr/$compiler/qt5/plugins/platforms/ \ - --copy \ - --objdump $MXEPATH/usr/bin/$compiler-objdump | tee -a $CURLOG -else - echo "now populating dir=${orgDir}/nsis/sharedLibs with dll dependencies of executable=$executable" | tee -a $CURLOG - $MXEPATH/tools/copydlldeps.sh --infile $executable \ - --destdir ${orgDir}/nsis/sharedLibs \ - --recursivesrcdir $MXEPATH/usr/$compiler/ \ - --enforce $MXEPATH/usr/$compiler/qt5/plugins/platforms/ \ - --copy | tee -a $CURLOG -fi - - - -== Additional hints == -=== objdump === -I checked if there is a mxe objdump. If not, I took the native one on my server. I actually do not know the difference but decided to include it in the script in case it is important to someone -=== enforce === -My application is using Qt5 and objdump did not return the needed qwindows.dll - so I enforce the platform folder. You may add multiple --enforce directories using --enforce /path/folder1 --enforce /path/folder2 --enforce /path/folder3 -They are NOT recursively copied, only flat. See: - string=$( find $enforcedDirectory -maxdepth 1 -iregex '.*\(dll\|exe\)' | tr '\n' ' ' ) - -If you would remove the -maxdepth 1, it would become recoursive. Does anyone need that? - - -- cgit v0.12