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

Adding some build scripts to the repository #67

Merged
merged 7 commits into from Oct 4, 2019

Conversation

@tannergooding
Copy link
Contributor

commented Oct 4, 2019

This adds some basic build scripts to the repository.

The current requirements are that a user first:

  1. Install the C++ Toolset
  2. Install Vcpkg
  3. Use Vcpkg to install freetype glad glm lua sdl2 sdl2-image

After that, they need to run:
4) ./generate.sh -DCMAKE_TOOLCHAIN_FILE=$VcpkgDir/scripts/buildsystems/vcpkg.cmake
5) ./build.sh

This should produce the necessary build files, etc.

Users can also optionally run just ./build.sh --ci (or ./scripts/cibuild.sh) which will automatically do steps 2 thru 5 (inclusive).

@CLAassistant

This comment has been minimized.

Copy link

commented Oct 4, 2019

CLA assistant check
All committers have signed the CLA.

@tannergooding

This comment has been minimized.

Copy link
Contributor Author

commented Oct 4, 2019

On Ubuntu 16.04, this looks to be the minimal command line to get all required tools that CI won't auto-download.

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates gnupg software-properties-common wget -y

wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main'

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add -
sudo apt-add-repository 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main'

sudo apt-get update
sudo apt-get install clang cmake curl g++ tar unzip -y

Later Ubuntu versions would be similar, but with the respective distro repos (such as bionic, rather than xenial, for 18.04).

@tannergooding

This comment has been minimized.

Copy link
Contributor Author

commented Oct 4, 2019

Windows requires the C++ Toolchain (generally acquired from Visual Studio) and CMake installed.

@@ -0,0 +1,5 @@
trigger:

This comment has been minimized.

Copy link
@tannergooding

tannergooding Oct 4, 2019

Author Contributor

These yml files are what we can point AzDO towards.

Then, ideally we would enable them only for feature/ci (or some branch) while I get dependencies for the hosted pools worked out. Then, one that PR is merged, we can enable CI globally.

Param(
[switch] $build,
[switch] $ci,
[ValidateSet("Debug", "MinSizeRel", "Release", "RelWithDebInfo")][string] $configuration = "Debug",

This comment has been minimized.

Copy link
@tannergooding

tannergooding Oct 4, 2019

Author Contributor

Lets you choose debug vs release, etc

}

function Generate {
if [ -z "$remaining" ]; then

This comment has been minimized.

Copy link
@tannergooding

tannergooding Oct 4, 2019

Author Contributor

I was having trouble getting bash to do what I wanted here; so I just manually expanded everything out. It's not pretty, but it works for now.

}
}

& $VcpkgExe install freetype glad glm lua sdl2 sdl2-image --triplet x64-windows

This comment has been minimized.

Copy link
@tannergooding

tannergooding Oct 4, 2019

Author Contributor

I hardcoded this to x64 for now. 32-bit should still work for non-CI, but I didn't want to try to figure this out right now. Will log a bug.

Copy link
Member

left a comment

works wonderfully on my machine! 👍

@RubyNova RubyNova merged commit 1516999 into novelrt:master Oct 4, 2019
1 check passed
1 check passed
license/cla Contributor License Agreement is signed.
Details
@RubyNova RubyNova referenced this pull request Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.