From 0a37d51b4eac72f96ae1ab9df4eb70d33d2af9a8 Mon Sep 17 00:00:00 2001 From: Balletie Date: Sat, 23 Aug 2014 21:38:11 +0200 Subject: [PATCH] Set the correct permissions after extracting. --- CMakeLists_mingw.txt | 2 +- install.sh | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CMakeLists_mingw.txt b/CMakeLists_mingw.txt index 1bca99bfeb..5808593b04 100644 --- a/CMakeLists_mingw.txt +++ b/CMakeLists_mingw.txt @@ -19,7 +19,7 @@ PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2) INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS}) # here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/local/mingw-w32-bin_i686-darwin_20130531/i686-w64-mingw32) +SET(CMAKE_FIND_ROOT_PATH /usr/local/mingw-w32-bin_i686-darwin/i686-w64-mingw32) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search diff --git a/install.sh b/install.sh index 5a9071e566..73c1a9ea97 100755 --- a/install.sh +++ b/install.sh @@ -49,17 +49,27 @@ if [[ `uname` == "Darwin" ]]; then sudo ln -s $wine_path /usr/include fi - mingw_name=mingw-w32-bin_i686-darwin_20130531 - mingw_tar=$mingw_name.tar.bz2 - mingw_path=/usr/local/mingw_w32-bin_i686-darwin + mingw_name=mingw-w32-bin_i686-darwin + mingw_tar=$mingw_name"_20130531".tar.bz2 + mingw_path=/usr/local/$mingw_name if [[ ! -f $cachedir/$mingw_tar ]]; then wget "https://downloads.sourceforge.net/project/mingw-w64/Toolchains targetting Win32/Automated Builds/$mingw_tar" --output-document $cachedir/$mingw_tar fi if [[ ! -d $ming_path ]]; then - mkdir -p $mingw_path + pushd /usr/local/ + sudo mkdir $mingw_name + popd + echo "Extracting contents of $mingw_tar to $mingw_path" echo "Don't forget to add $mingw_path to your PATH variable!" - sudo tar -xyfp $cachedir/$mingw_tar -C $mingw_path + sudo tar -xyf $cachedir/$mingw_tar -C $mingw_path + #sudo gnutar -xjf $cachedir/$mingw_tar -C $mingw_path --no-same-permissions + pushd /usr/local + sudo chmod 755 $mingw_name + pushd $mingw_name + sudo find . -type d -exec chmod 755 {} \; + popd + popd fi elif [[ `uname` == "Linux" ]]; then sudo apt-get install -y --force-yes binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686