Browse Source

Cleaned up Debug and Release build scripts

* Build scripts will now fail right after a command fails
* Added SFML build from source dependencies to readme
* Updated tracy
* Added note that Blender 2.8 is required
SFML_FromSource
Macoy Madson 11 months ago
parent
commit
b7bd05a21e
6 changed files with 59 additions and 35 deletions
  1. +0
    -14
      BuildDependencies.sh
  2. +20
    -14
      BuildDependencies_Debug.sh
  3. +25
    -0
      BuildDependencies_Release.sh
  4. +0
    -0
      Build_Release.sh
  5. +1
    -1
      Dependencies/tracy
  6. +13
    -6
      ReadMe.org

+ 0
- 14
BuildDependencies.sh View File

@ -1,14 +0,0 @@
#!/bin/sh
echo Building Bullet3...
./BuildBullet.sh
echo Finished building Bullet3!
echo
echo Building Base2.0...
# TODO: Fix this foolishness
cd Dependencies/base2.0 && ./BuildDependencies_Release.sh && jam -j4 && jam -j4 libBase20
echo Finished building Base2.0!
echo Building Horde3D...
cd Dependencies/Horde3D && mkdir build && cd build && cmake .. && make -j4
echo Finished building Horde3D!

+ 20
- 14
BuildDependencies_Debug.sh View File

@ -1,18 +1,24 @@
#!/bin/sh
echo Building Bullet3...
./BuildBullet_Debug.sh
echo Finished building Bullet3!
echo "Building Bullet3..."
./BuildBullet_Debug.sh || exit 1
echo "Finished building Bullet3!"
echo
echo Building Base2.0...
echo "Building Base2.0 (and by extension, SFML)..."
# TODO: Fix this foolishness
# TODO: Add debug build
cd Dependencies/base2.0 && ls && ./BuildDependencies_Debug.sh \
&& jam -j4 -sDEBUG_BUILD=true && jam -j4 -sDEBUG_BUILD=true libBase20
echo Finished building Base2.0!
cd Dependencies/base2.0
./BuildDependencies_Debug.sh || exit 1
jam -j4 -sDEBUG_BUILD=true && jam -j4 -sDEBUG_BUILD=true libBase20 || exit 1
cd ../../
echo "Finished building Base2.0!"
echo Building Horde3D...
cd ../Horde3D && mkdir build && cd build \
&& cmake .. -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-std=c++14 -stdlib=libstdc++" -DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libstdc++" -DOpenGL_GL_PREFERENCE="LEGACY" \
&& make # Note that -j4 etc. will break Horde make!
echo Finished building Horde3D!
echo "Building Horde3D..."
cd Dependencies/Horde3D
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE="Debug" \
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-std=c++14 -stdlib=libstdc++" -DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libstdc++" \
-DOpenGL_GL_PREFERENCE="LEGACY" || exit 1
# DOpenGL_GL_PREFERENCE="LEGACY": I am not sure what the implications of this are
# Note that -j4 etc. will break Horde make, because it doesn't like out of order execution!
make || exit 1
cd ../../
echo "Finished building Horde3D!"

+ 25
- 0
BuildDependencies_Release.sh View File

@ -0,0 +1,25 @@
#!/bin/sh
echo Building Bullet3...
./BuildBullet.sh || exit 1
echo Finished building Bullet3!
echo Building Base2.0...
# TODO: Fix this foolishness
cd Dependencies/base2.0
./BuildDependencies_Release.sh || exit 1
jam -j4 && jam -j4 libBase20 || exit 1
cd ../../
echo Finished building Base2.0!
echo Building Horde3D...
cd Dependencies/Horde3D
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_CXX_FLAGS="-std=c++14 -stdlib=libstdc++" -DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libstdc++" || exit 1
# I am not sure what the implications of this are
# -DOpenGL_GL_PREFERENCE="LEGACY" \
# Note that -j4 etc. will break Horde make, because it doesn't like out of order execution!
make || exit 1
cd ../../
echo Finished building Horde3D!

Build.sh → Build_Release.sh View File


+ 1
- 1
Dependencies/tracy

@ -1 +1 @@
Subproject commit 9b1fe23b03650a85f5d7c629f828d2ffbc416712
Subproject commit f945278959aed62d2758fd48fea348b3fca0c0eb

+ 13
- 6
ReadMe.org View File

@ -28,13 +28,20 @@ Jam is used to build the project. Install Jam:
sudo apt install jam
#+END_SRC
You will also need blender to build the 3D assets:
You will also need [[https://www.blender.org/download/][Blender 2.8]] to build the 3D assets. For Ubuntu, 2.8 is not yet in the repository, so you should download it directly.
If you have a system install of Blender which is ~<2.8~, you need to add ~sBLENDER=/path/to/blender2.8~ to ~Build.sh~ and ~Build_Debug.sh~ ~jam~ invocations.
*** Build dependencies
Spargus uses several libraries.
Currently, SFML relies on system installs for its dependencies:
#+BEGIN_SRC sh
sudo apt install blender
sudo apt install libopenal-dev libvorbis-dev libflac-dev libglew
#+END_SRC
*** Build dependencies
Spargus uses several libraries. Build them from source:
Build the rest of the dependencies from source:
#+BEGIN_SRC sh
cd spargus-vehicle-prototype
@ -65,10 +72,10 @@ Finally, build Spargus. This builds both code and data assets.
*** SFML Setup
SFML is used for graphics, window, and input. I used my old [[https://github.com/makuto/base2.0][base2.0]] library to wrap SFML if I ever want to switch to SDL.
Running ~BuildDependencies.sh~ will build base2.0. You will need to have [[https://www.sfml-dev.org/tutorials/2.5/start-linux.php][installed SFML 2]] already:
Running ~BuildDependencies.sh~ will build base2.0, which builds SFML from source. Currently, SFML relies on system installs for its dependencies:
#+BEGIN_SRC sh
sudo apt-get install libsfml-dev
sudo apt install libopenal-dev libvorbis-dev libflac-dev libglew
#+END_SRC
*** Bullet3 Setup


Loading…
Cancel
Save