https://github.com/mathstuf/abagames-gunroar
Modernization of gunroar (http://www.asahi-net.or.jp/~cs8k-cyu/windows/gr_e.html)
https://github.com/mathstuf/abagames-gunroar
abagames games gunroar
Last synced: about 1 year ago
JSON representation
Modernization of gunroar (http://www.asahi-net.or.jp/~cs8k-cyu/windows/gr_e.html)
- Host: GitHub
- URL: https://github.com/mathstuf/abagames-gunroar
- Owner: mathstuf
- Created: 2014-03-23T18:48:07.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-03-25T03:56:59.000Z (over 6 years ago)
- Last Synced: 2025-03-05T01:45:02.665Z (over 1 year ago)
- Topics: abagames, games, gunroar
- Language: D
- Size: 5.38 MB
- Stars: 8
- Watchers: 5
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Gunroar
=======
A modernization of [gunroar][gunroar] so that it works with recent versions of
its dependencies (OpenGL, SDL). Instead of the custom code originally used, the
[Derelict][derelict] project is used instead.
Building
========
Building this port requires a patched CMake with D support. The branch I am
using is on [my Github fork of CMake][cmake-d].
First, I have only tested the project with the Ninja generator which requires
[a branch][ninja-dmd] of Ninja so that the dependencies generated by the
compiler are understood by Ninja.
Personally, I use CMake-ified versions of the dependencies (use the `cmake`
branch of each repository):
* [`DerelictUtil`][derelictutil-cmake]
* [`DerelictSDL2`][derelictsdl2-cmake] (requires `DerelictUtil`)
* [`DerelictGL3`][derelictgl3-cmake] (requires `DerelictUtil`)
* [`gl3n`][gl3n-cmake]
Once these have been built (and ideally placed into a single root), gunroar may
be built. You'll likely need to set the cache variables to the proper paths
since the Find modules are not the most sophisticated.
As for compilers, I've been using the 2.064.2 release of [gdc][gdc] based on
4.8. The 2.065 release should work as well, but has not been extensively
tested.
Running
=======
Currently, the binary must be run from the source directory (it is placed in
the `bin` directory of the build tree). Patches which address this limitation
are welcome (and should support an installed version as well).
Android
=======
Building for Android requires building a patched NDK toolchain with GDC
support. LDC support has not been attempted.
To build a custom toolchain, get a [patched GDC][gdc-android] (only 4.9
supported at the moment), the [Android NDK][ndk] (only r9d has been tested so
far), and an [NDK toolchain build environment][ndk-build].
Once the toolchain sources have been downloaded, patch the GCC using GDC's
`setup-gcc.sh` script to patch Android's GCC 4.9 sources. Then edit the NDK's
`build-gcc.sh` script to add `--enable-languages=d` to the configure flags.
Currently, `android-13` is the target for the Android build, so that should be
the targeted platform when building the toolchain.
One change that I've needed to make for D support is to change the `ld` linker
to point to `ld.bfd` instead of `ld.gold` due to `__data_start` being undefined
otherwise (it looks like a linker script is not executed when using `ld.gold`,
but only with GDC; GCC is fine).
Once the toolchain is built, build all of the required Derelict libraries
(Util, SDL2, and GLES) configure a CMake build using a `CMAKE_TOOLCHAIN_FILE`
argument pointing to a CMake script setting the compiler, linker, archiver,
etc. just built above. An example file is provided in the repository as
`src/android/toolchain.cmake` which just needs a few variables set. SDL and
SDL\_mixer will be downloaded and built using the NDK.
[gunroar]: http://www.asahi-net.or.jp/~cs8k-cyu/windows/gr_e.html
[derelict]: https://github.com/DerelictOrg
[cmake-d]: https://github.com/mathstuf/CMake/tree/d_support
[ninja-dmd]: https://github.com/mathstuf/ninja/tree/dev/ldc-depfile-support
[derelictutil-cmake]: https://github.com/mathstuf/DerelictUtil
[derelictsdl2-cmake]: https://github.com/mathstuf/DerelictSDL2
[derelictgl3-cmake]: https://github.com/mathstuf/DerelictGL3
[gl3n-cmake]: https://github.com/mathstuf/gl3n
[gdc]: http://gdcproject.org/downloads/
[gdc-android]: https://github.com/mathstuf/GDC/tree/android/gdc-4.9
[ndk]: https://developer.android.com/tools/sdk/ndk/index.html
[ndk-build]: http://recursify.com/blog/2013/08/08/building-an-android-ndk-toolchain