From 5f48579cd38de226af54101e384912f057cd78ac Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 11 Sep 2016 20:30:45 +0200 Subject: [PATCH] List scripts in project file Maybe add install target for scripts later --- CMakeLists.txt | 6 +++++- scripts/wine.sh | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5da8d7a..9b4e59a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,9 +84,13 @@ set(CMAKE_TEMPLATE_FILES cmake/templates/doxygen.in cmake/templates/bash-completion.sh.in ) +set(SCRIPT_FILES) if(MINGW) list(APPEND CMAKE_TEMPLATE_FILES - cmake/templates/windows.rc.in + cmake/templates/windows.rc.in + ) + list(APPEND SCRIPT_FILES + scripts/wine.sh ) endif() diff --git a/scripts/wine.sh b/scripts/wine.sh index 95f9c28..5a19763 100755 --- a/scripts/wine.sh +++ b/scripts/wine.sh @@ -1,6 +1,11 @@ #!/bin/bash +if [[ $# -lt 1 ]]; then + echo "Starts the specified executable with wine." + echo "Usage: $0 executable [additional_dll_path(s)]" + exit -1 +fi for arg in "${@:2}"; do WINEPATH="${arg};${WINEPATH}" done export WINEPATH; -wine "${@:1:1}" +echo wine "${@:1:1}"