diff --git a/build-windows.sh b/build-windows.sh index e328ed5..3f80e38 100755 --- a/build-windows.sh +++ b/build-windows.sh @@ -2,22 +2,20 @@ if cmake.exe --version; then echo "cmake already in path..." else echo "cmake not available, installing." - ROOT="$(cygpath -m /)" - echo "cygwin root: $ROOT" - LOCAL_PACKAGE_DIR="$(cygpath -w /var/cache/setup)" + c://ProgramData/Chocolatey/bin/choco.exe install cmake --installargs 'ADD_CMAKE_TO_PATH=User' - $ROOT/setup-x86_64.exe --root $ROOT -q --packages=cmake --local-package-dir $LOCAL_PACKAGE_DIR --site=http://cygwin.mirror.constant.com/ --no-desktop --no-startmenu --no-shortcuts --verbose - - CMAKE_FOLDER="$(find /usr/share -maxdepth 1 -name cmake-*)" + CMAKE_FOLDER="C:\Program Files\CMake\bin" CMAKE_DIRNAME="$(basename $CMAKE_FOLDER)" echo "folder: $CMAKE_FOLDER" echo "dirname: $CMAKE_DIRNAME" echo "Copying to $cur__bin/cmake.exe" - cp /usr/bin/cmake.exe $cur__bin/cmake.exe - cp /usr/bin/cygarchive-13.dll $cur__bin/cygarchive-13.dll + cp "$CMAKE_FOLDER"/cmake.exe $cur__bin/cmake.exe - echo "Copying to $cur__share/$CMAKE_DIRNAME" - cp -r $CMAKE_FOLDER $cur__share/$CMAKE_DIRNAME + echo "Copying to $cur__share/cmake" + cp -r $CMAKE_FOLDER $cur__share/cmake + + OUTPUT="$($cur__bin/cmake.exe --version)" + echo "cmake version is: $OUTPUT" fi