Skip to content
The Castle Client for desktop and mobile.
C++ C Shell HTML Objective-C Makefile Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
base
cef
ci
common
desktop
ghost-extensions
love
macosx
megasource
mobile
node
openssl
shared-assets
web
win
.clang-format
.gitattributes
.gitignore
README.md
azure-pipelines-win.yml
build.nix
format.sh
license.txt

README.md

Castle

Project Structure

  |-- base              # Lua source for the Ghost engine
  |-- cef               # CEF lib for macOS and Windows
  |-- ci                # continuous integration for automatic Castle builds and releases
  |-- common            # crossplatform native code
  |-- desktop           # Castle's React UI source code
  |-- ghost-extensions  # supporting libraries for the Ghost engine
  |-- love              # Love2d source
  |-- macosx            # macOS-specific native code
  |-- megasource        # windows build stuff
  |-- mobile            # mobile source
  |-- node              # Embedded node server for running some cross-platform operations
  |-- openssl           # openssl lib for Ghost engine
  |-- shared-assets     # static assets that need to be included crossplatform
  |-- web               # built JS bundles for Castle's React UI
  |-- win               # Windows-specific native code

Code Style

  • Run format.sh after making changes to native code.
  • For JS code in the desktop UI, see desktop/README.md.

Run on macOS

See macosx/README.md.

Run on mobile

See mobile/README.md.

Run on Windows

Prereqs

Build and run

Use either Git Bash or WSL to run commands in.

  • Make sure Git LFS is initialized.
  • Go into the 'megasource/' directory.
  • Run sh configure_cmake.sh. You don't need to do this every time, but you need to do it at least on the first build.
  • Run cmake.exe --build build --config Debug. If the build succeeds but is unable to write 'Castle.exe', make sure any existing Castle processes are terminated and try again. On WSL, sh kill_castle.sh under 'megasource/' works for terminating Castle processes.
  • Run ./build/Debug/Castle.exe to launch the Castle binary that was built.

Run on Linux

  • You will need the following library dependencies, however they are distributed in your distribution of Linux: SDL2, libGLU, openal, luajit, libdevil, freetype, physfs, libmodplug, mpg123, libogg, libvorbis, libtheora, openssl.
  • You will also need CMake and the usual gcc commands.
  • In the 'love/' directory, run cmake -H. -Bbuild.
  • Then go into the 'build/' directory that created, and run make (tip: add -j5 as an argument to use more CPU and less time).
  • This results in a 'love' binary in that directory.
  • Now from the 'base/' directory at the root of your checkout of this repository, run ../love/build/love ..
You can’t perform that action at this time.