build_engine.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. # This Shell Script will build and use the latest jMonkeyEngine git version, so there might be some undiscovered engine bugs, watch out!
  3. # Also if you want to revert to releases and bintray builds, you need to uninstall them from your local maven repo...
  4. if [ ! -d "engine" ]; then
  5. echo "Downloading the Engine, this may take some time"
  6. if [ "x$TRAVIS" != "x" ] && [ "x$TRAVIS_TAG" != "x" ]; then
  7. # Extract the engine version from the sdk branch tag.
  8. git clone -b $(echo "$TRAVIS_TAG" | sed -n 's/\(v.\+\)-sdk.\+/\1/p') --single-branch --depth 10 https://github.com/jMonkeyEngine/jMonkeyEngine/ engine # single-branch requires git > 1.7.10, if you see an error, just leave it out.
  9. else
  10. #git clone -b master --single-branch --depth 10 https://github.com/jMonkeyEngine/jMonkeyEngine/ engine # single-branch requires git > 1.7.10, if you see an error, just leave it out.
  11. git clone -b v3.3 --single-branch --depth 10 https://github.com/jMonkeyEngine/jMonkeyEngine/ engine # single-branch requires git > 1.7.10, if you see an error, just leave it
  12. fi
  13. cd engine
  14. else
  15. echo "Engine already cloned, pulling updates."
  16. cd engine
  17. git pull
  18. fi
  19. # git checkout tags/v3.1.0-beta2 # To use this, leave out depth and change -b to a branch.
  20. #echo "Patching the Engine...."
  21. #patch -s -N -p 1 < ../patches/FixHWSkinningSerialization.diff
  22. # Remark: We don't build the engine from here anymore but instead use https://docs.gradle.org/current/userguide/composite_builds.html,
  23. # that way we don't have to care about versioning and don't spam the user's mavenLocal Repo. Also you only need this script really to
  24. # download the engine. Nothing a windows user couldn't do by hand.
  25. # Until https://github.com/jMonkeyEngine/jmonkeyengine/issues/1260 is solved, prebuild the engine manually
  26. echo "Prebuilding the engine to ensure native libraries are unzipped"
  27. ./gradlew -PbuildJavaDoc=true build assemble
  28. #echo "Building the Engine and installing them to your local maven repo...."
  29. # ./gradlew -PbuildJavaDoc=true install # Depends on jarJavadoc, jarSourcecode, assemble, dist etc.
  30. cd ../