Rename simple -> stub

This commit is contained in:
Ruslan Mustakov 2017-07-31 22:22:40 +07:00
commit 0fd0101432
25 changed files with 19 additions and 22 deletions

View file

@ -2,7 +2,7 @@
Nim bindings for Godot 3.0 based on [GDNative](https://godotengine.org/article/dlscript-here).
Documentation is coming. You can learn from the [sample project](examples/simple) in the meantime.
Documentation is coming. You can learn from the [project stub](examples/stub) in the meantime.
## Links

View file

@ -1,12 +0,0 @@
Simple project just to demonstrate usage of the library.
Prerequisites:
1. Install [nake](https://github.com/fowlmouth/nake): `nimble install nake -n`.
2. Ensure `~/.nimble/bin` is in your PATH.
3. Set `GODOT_BIN` environment varible to point to Godot executable (currently requires Godot fork - see below).
4. Install godot-nim: `nimble install https://github.com/pragmagic/godot-nim.git` (needed for nakefile)
Run `nake build` in this directory to compile for the current platform.
**NOTE:** Currently this only works with `kingdom` branch of Godot fork: https://github.com/endragor/godot. However, there are pending PRs to make this work with Godot mainline version.

11
examples/stub/README.md Normal file
View file

@ -0,0 +1,11 @@
Stub project to demonstrate usage of the godot-nim library.
Prerequisites:
1. Install [nake](https://github.com/fowlmouth/nake): `nimble install nake -n`.
2. Ensure `~/.nimble/bin` is in your PATH.
3. Set `GODOT_BIN` environment varible to point to Godot executable (requires Godot 3.0 changeset [d28e9c3](https://github.com/godotengine/godot/commit/d28e9c3c0813e729195357dbb9ccd337494bc6d7) or newer).
4. (Windows only) Set `GODOT_LIB` to point to Godot's .lib file. It should be in the `bin` folder after you build Godot.
5. Install godot-nim: `nimble install godot`
Run `nake build` in any directory within the project to compile for the current platform.

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

View file

@ -1,7 +1,7 @@
config_version=3
[application]
config/name="Simple Sample"
config/name="Godot-Nim Stub"
run/main_scene="res://main.tscn"
config/icon="res://icon.png"

View file

@ -1,8 +1,6 @@
--path:"$projectdir"
--path:"$projectdir/../godotapi"
--experimental
--app:lib
--stackTrace:on
-d:useRealtimeGc
--noMain
--warning[LockLevel]:off

View file

@ -1,16 +1,16 @@
version = "0.1.0"
author = "Xored Software, Inc."
description = "Simple Sample"
description = "Godot-Nim Project Stub"
license = "MIT"
bin = @["simple"]
bin = @["stub"]
requires "https://github.com/pragmagic/godot-nim.git >= 0.3.0 & < 0.4.0"
requires "godot >= 0.3.0 & < 0.4.0"
task make, "build":
const archPostfix = when sizeof(int) == 8: "_64" else: "_32"
const bitsPostfix = when sizeof(int) == 8: "_64" else: "_32"
const libFile =
when defined(windows):
"nim" & archPostfix & ".dll"
"nim" & bitsPostfix & ".dll"
elif defined(ios):
"nim_ios.dylib"
elif defined(macosx):
@ -18,7 +18,7 @@ task make, "build":
elif defined(android):
"nim_android.so"
elif defined(linux):
"nim_linux" & archPostfix & ".so"
"nim_linux" & bitsPostfix & ".so"
else: nil
if libFile.isNil:
raise newException(OSError, "Unsupported platform")