Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and improve BuildLinux.sh #567

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 43 additions & 10 deletions BuildLinux.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,54 @@
#!/bin/bash
# ~/bin/build-polycode
set -euv
basedir=$(pwd)

mkdir -p Dependencies/Build/Debug Dependencies/Build/Release Build/Debug Build/Release Standalone/Build
cd Dependencies/Build/Debug
# NOTE: The build system does not install any files into CMAKE_INSTALL_PREFIX,
# but instead builds everything in the source tree.

# You can supply parameters to make by passing them as parameters to this
# script. For example -j<number of threads> may be useful.

# Build dependencies

mkdir -p "$basedir/Dependencies/Build/Debug"
cd "$basedir/Dependencies/Build/Debug"
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../..
make
cd ../Release
make $@

mkdir -p "$basedir/Dependencies/Build/Release"
cd "$basedir/Dependencies/Build/Release"
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../..
make
cd ../../../Build/Debug
make $@

# Build core

mkdir -p "$basedir/Build/Debug"
cd "$basedir/Build/Debug"
cmake -G "Unix Makefiles" -DPOLYCODE_BUILD_BINDINGS=ON -DPOLYCODE_BUILD_PLAYER=ON -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=/usr/bin/python2 ../..
make
make $@
make $@ PolycodeLua
make install
cd ../Release

mkdir -p "$basedir/Build/Release"
cd "$basedir/Build/Release"
cmake -G "Unix Makefiles" -DPOLYCODE_BUILD_BINDINGS=ON -DPOLYCODE_BUILD_PLAYER=ON -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python2 ../..
make
make $@
make $@ PolycodeLua
make install
cd ../../Standalone/Build

# Build standalone

mkdir -p "$basedir/Standalone/Build"
cd "$basedir/Standalone/Build"
cmake -G "Unix Makefiles" ..
make install

# Build IDE

mkdir -p "$basedir/IDE/Build/Linux"
cd "$basedir/IDE/Build/Linux"
make $@
# IDE executable is found in "$basedir/IDE/Build/Linux/Build"