Make Travis-CI create better standalone packages

While CPack, the component used for handling installation of files into
proper places, works fine for `install` make target, it does somewhat
poor job when it comes to generating stand-alone packages.

List of offending items include:
* Improper tar archive structure (directory entries missing)
* Package layout not suitable for running stand-alone
* Top level directory name keeps changing which hinders upcoming
  installer

Thic commit takes care of these problems by generating the package using
`make install` and then shuffling files around manually.

This also changes the hash blurb to be 7 characters instead of 8, to be
more compatible with git defaults.
This commit is contained in:
Michał Janiszewski 2016-01-25 09:28:40 +01:00
parent 233e3ff058
commit d076868f5a
1 changed files with 6 additions and 5 deletions

View File

@ -16,14 +16,15 @@ matrix:
include:
- os: linux
env:
- OPENRCT2_CMAKE_OPTS="-DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_BUILD_TYPE=RelWithDebInfo"
- OPENRCT2_CMAKE_OPTS="-DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=OpenRCT2"
- OPENRCT2_MAKE_OPTS="-j2"
- secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ="
after_success:
- cd build
- make package
- mv openrct2*.tar.gz openrct2-linux.tar.gz
- if [[ "z$OPENRCT2_ORG_TOKEN" != "z" ]] ; then curl -o - -v --form "key=$OPENRCT2_ORG_TOKEN" --form "fileName=openrct2-${OPENRCT2_VERSION}-linux-${TRAVIS_COMMIT:0:8}.tar.gz" --form "version=${OPENRCT2_VERSION}" --form "gitHash=$TRAVIS_COMMIT" --form "gitBranch=$TRAVIS_BRANCH" --form "flavourId=4" --form "file=@openrct2-linux.tar.gz" "https://openrct2.org/altapi/?command=push-build"; fi
- make install
- mv OpenRCT2/bin/openrct2 OpenRCT2/ && mv OpenRCT2/share/openrct2 OpenRCT2/data
- tar cvzf openrct2-linux.tar.gz OpenRCT2/
- if [[ "z$OPENRCT2_ORG_TOKEN" != "z" ]] ; then curl -o - -v --form "key=$OPENRCT2_ORG_TOKEN" --form "fileName=OpenRCT2-${OPENRCT2_VERSION}-linux-${TRAVIS_COMMIT:0:7}.tar.gz" --form "version=${OPENRCT2_VERSION}" --form "gitHash=$TRAVIS_COMMIT" --form "gitBranch=$TRAVIS_BRANCH" --form "flavourId=4" --form "file=@openrct2-linux.tar.gz" "https://openrct2.org/altapi/?command=push-build"; fi
- os: linux
env: OPENRCT2_CMAKE_OPTS="-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
- os: linux
@ -43,7 +44,7 @@ matrix:
after_success:
- cd build/Release
- zip -r openrct2-osx.zip OpenRCT2.app
- if [[ "z$OPENRCT2_ORG_TOKEN" != "z" ]] ; then curl -o - -v --form "key=$OPENRCT2_ORG_TOKEN" --form "fileName=openrct2-${OPENRCT2_VERSION}-osx-${TRAVIS_COMMIT:0:8}.zip" --form "version=${OPENRCT2_VERSION}" --form "gitHash=$TRAVIS_COMMIT" --form "gitBranch=$TRAVIS_BRANCH" --form "flavourId=3" --form "file=@openrct2-osx.zip" "https://openrct2.org/altapi/?command=push-build"; fi
- if [[ "z$OPENRCT2_ORG_TOKEN" != "z" ]] ; then curl -o - -v --form "key=$OPENRCT2_ORG_TOKEN" --form "fileName=OpenRCT2-${OPENRCT2_VERSION}-osx-${TRAVIS_COMMIT:0:7}.zip" --form "version=${OPENRCT2_VERSION}" --form "gitHash=$TRAVIS_COMMIT" --form "gitBranch=$TRAVIS_BRANCH" --form "flavourId=3" --form "file=@openrct2-osx.zip" "https://openrct2.org/altapi/?command=push-build"; fi
# Following entries used to be included in testing, but they only proved useful while changing things in CMake setup.
# They are meant to be used when there are changes to CMakeLists.txt
# - os: linux