From 843f8f10c0f04c15090eaf298e81927193124422 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Wed, 30 Jan 2013 20:46:09 +0000 Subject: [PATCH] patches from forum: - (vcmibuilder) fix for space in path - (cmake) fix ffmpeg detection on Mac --- cmake_modules/FindFFmpeg.cmake | 5 +++++ vcmibuilder | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/cmake_modules/FindFFmpeg.cmake b/cmake_modules/FindFFmpeg.cmake index c80203a25..70347d039 100644 --- a/cmake_modules/FindFFmpeg.cmake +++ b/cmake_modules/FindFFmpeg.cmake @@ -144,5 +144,10 @@ foreach (_component ${FFmpeg_FIND_COMPONENTS}) list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS) endforeach () +# On OS X we ffmpeg libraries depend on VideoDecodeAcceleration and CoreVideo frameworks +IF (APPLE) + SET(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} "-framework VideoDecodeAcceleration -framework CoreVideo -lbz2") +ENDIF() + # Give a nice error message if some of the required vars are missing. find_package_handle_standard_args(FFmpeg DEFAULT_MSG ${_FFmpeg_REQUIRED_VARS}) diff --git a/vcmibuilder b/vcmibuilder index 9f24adb88..cfb211606 100755 --- a/vcmibuilder +++ b/vcmibuilder @@ -163,20 +163,20 @@ fi if [[ -n "$cd1_dir" ]] then data_dir="./cddir" - mkdir -p $data_dir - unshield -d $data_dir x $cd1_dir/_setup/data1.cab || fail "Error: failed to extract from Install Shield installer!" "rm -rf ./cddir" + mkdir -p "$data_dir" + unshield -d "$data_dir" x $cd1_dir/_setup/data1.cab || fail "Error: failed to extract from Install Shield installer!" "rm -rf ./cddir" # a bit tricky - different releases have different root directory. Move extracted files to data_dir - if [ -d $data_dir/"Heroes3" ] + if [ -d "$data_dir"/"Heroes3" ] then - mv $data_dir/Heroes3/* $data_dir - elif [ -d $data_dir"/Program_Files" ] + mv "$data_dir"/Heroes3/* "$data_dir" + elif [ -d "$data_dir""/Program_Files" ] then - mv $data_dir/Program_Files/* $data_dir + mv "$data_dir"/Program_Files/* "$data_dir" else echo "Error: failed to find extracted game files!" echo "Extracted directories are: " - ls -la $data_dir + ls -la "$data_dir" echo "Please report this on vcmi.eu" exit 1; fi @@ -198,16 +198,16 @@ fi if [[ -n "$data_dir" ]] then - cp -r $data_dir/Data $dest_dir - cp -r $data_dir/Maps $dest_dir + cp -r "$data_dir"/Data $dest_dir + cp -r "$data_dir"/Maps $dest_dir # this folder is named differently from time to time # vcmi can handle any case but script can't - if [ -d $data_dir/MP3 ] + if [ -d "$data_dir"/MP3 ] then - cp -r $data_dir/MP3 $dest_dir + cp -r "$data_dir"/MP3 $dest_dir else - cp -r $data_dir/Mp3 $dest_dir + cp -r "$data_dir"/Mp3 $dest_dir fi fi