|
| 1 | +#! /bin/bash |
| 2 | +# This bash script has been tested under Windows with Git Bash |
| 3 | + |
| 4 | +# Make sure that QtIFW is on the path before running this script |
| 5 | +if ! [ -x "$(command -v repogen.exe)" ]; then |
| 6 | + echo 'Error: QtIFW is not in the PATH. Plese install it and add it to the path.' >&2 |
| 7 | + exit 1 |
| 8 | +fi |
| 9 | + |
| 10 | +# Add default CMake location to PATH, if you install CMake in a non-standard location change this line |
| 11 | +export PATH=$PATH:/c/Program\ Files/CMake/bin/ |
| 12 | + |
| 13 | +# Create a build directory and an artefacts directory |
| 14 | +rm -rf build |
| 15 | +mkdir build |
| 16 | + |
| 17 | +# Copy the appropriate version of vcpkg-cpack |
| 18 | +cd build |
| 19 | +git clone https://github.com/robotology-playground/vcpkg-cpack -b add-internal-vcpkg |
| 20 | +cd .. |
| 21 | + |
| 22 | +# Create x86-windows installers |
| 23 | +cd build |
| 24 | +rm -rf x86-windows |
| 25 | +mkdir x86-windows |
| 26 | +cd x86-windows |
| 27 | +cmake -A Win32 -C ../../config/x86-windows.cmake ../vcpkg-cpack |
| 28 | +cmake --build . --config Release --target PACKAGE |
| 29 | +cd ../.. |
| 30 | + |
| 31 | +# Create x64-windows installers |
| 32 | +cd build |
| 33 | +rm -rf x64-windows |
| 34 | +mkdir x64-windows |
| 35 | +cd x64-windows |
| 36 | +cmake -A x64 -C ../../config/x64-windows.cmake ../vcpkg-cpack |
| 37 | +cmake --build . --config Release --target PACKAGE |
| 38 | +cd ../.. |
| 39 | + |
| 40 | +# Copy installer in artifacts |
| 41 | +echo "Copying installers in artifacts directory" |
| 42 | +rm -rf artifacts |
| 43 | +mkdir artifacts |
| 44 | +RAD_VERSION="0.2.0" |
| 45 | +cp ./build/x86-windows/robotology-additional-dependencies-${RAD_VERSION}-x86.exe ./artifacts/robotology-additional-dependencies-${RAD_VERSION}-v141-x86.exe |
| 46 | +cp ./build/x86-windows/robotology-additional-dependencies-${RAD_VERSION}-x86.zip ./artifacts/robotology-additional-dependencies-${RAD_VERSION}-v141-x86.zip |
| 47 | +cp ./build/x64-windows/robotology-additional-dependencies-${RAD_VERSION}-x86_amd64.exe ./artifacts/robotology-additional-dependencies-${RAD_VERSION}-v141-x86_amd64.exe |
| 48 | +cp ./build/x64-windows/robotology-additional-dependencies-${RAD_VERSION}-x86_amd64.zip ./artifacts/robotology-additional-dependencies-${RAD_VERSION}-v141-x86_amd64.zip |
| 49 | + |
| 50 | +echo "robotology-additional-installers correctly generated and copies in artefacts" |
| 51 | +exit 0 |
| 52 | + |
0 commit comments