From cf547ecd2e5c50fdc6951fa2a9b367f189b372bb Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 4 Feb 2021 17:12:40 +0100 Subject: [PATCH] add a bash script for cygwin that collects all needed dlls to run the demo on Windows --- .../cgal_demo_copy_all_dlls_cygwin.sh | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Scripts/developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh diff --git a/Scripts/developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh b/Scripts/developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh new file mode 100644 index 00000000000..4d7040bee69 --- /dev/null +++ b/Scripts/developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +#use this script from inside the build directory of the Polyhedron demo + +declare config="Release" + +declare target_directory="CGAL_demo_with_dlls" +if [[ ! -d "$target_directory" ]] +then + mkdir $target_directory +fi + +copy_dll() +{ + local dll_full_path="`cygpath --unix --absolute $1`" + echo "copy " $dll_full_path " to " $2 + cp $dll_full_path $2 +} + + +files=($config/*.exe) +files+=($config/*.dll) +files+=(Plugins/*/$config/*.dll) + +for file in "${files[@]}"; do + + # copy exe or dll + copy_dll $file $target_directory + + # list and copy dependencies + cygcheck $file | while read -r dll ; do + + copy_dll $dll $target_directory + + done; #check dependencies + +done #loop over directories