From 0fd0101432c1fed1004f50b035fcf74f75f004a8 Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Mon, 31 Jul 2017 22:22:40 +0700 Subject: [PATCH] Rename simple -> stub --- README.md | 2 +- examples/simple/README.md | 12 ------------ examples/{simple => stub}/.gitignore | 0 examples/stub/README.md | 11 +++++++++++ examples/{simple => stub}/nakefile.nim | 0 examples/{simple => stub}/project/default_env.tres | 0 .../project/fonts/Roboto/RobotoRegular.tres | 0 .../project/fonts/Roboto/ttf/LICENSE.txt | 0 .../project/fonts/Roboto/ttf/Roboto-Regular.ttf | Bin examples/{simple => stub}/project/fps_counter.tscn | 0 examples/{simple => stub}/project/icon.png | Bin examples/{simple => stub}/project/icon.png.import | 0 examples/{simple => stub}/project/main.tscn | 0 examples/{simple => stub}/project/nimlib.tres | 0 examples/{simple => stub}/project/project.godot | 2 +- examples/{simple => stub}/project/scene.tscn | 0 .../project/scripts/FPSCounter.gdns | 0 .../{simple => stub}/project/scripts/MainPanel.gdns | 0 .../project/scripts/NimRuntime.gdns | 0 examples/{simple => stub}/src/config.nims | 0 examples/{simple => stub}/src/fpscounter.nim | 0 examples/{simple => stub}/src/mainpanel.nim | 0 examples/{simple => stub}/src/nim.cfg | 2 -- .../{simple/src/simple.nim => stub/src/stub.nim} | 0 .../src/simple.nimble => stub/src/stub.nimble} | 12 ++++++------ 25 files changed, 19 insertions(+), 22 deletions(-) delete mode 100644 examples/simple/README.md rename examples/{simple => stub}/.gitignore (100%) create mode 100644 examples/stub/README.md rename examples/{simple => stub}/nakefile.nim (100%) rename examples/{simple => stub}/project/default_env.tres (100%) rename examples/{simple => stub}/project/fonts/Roboto/RobotoRegular.tres (100%) rename examples/{simple => stub}/project/fonts/Roboto/ttf/LICENSE.txt (100%) rename examples/{simple => stub}/project/fonts/Roboto/ttf/Roboto-Regular.ttf (100%) rename examples/{simple => stub}/project/fps_counter.tscn (100%) rename examples/{simple => stub}/project/icon.png (100%) rename examples/{simple => stub}/project/icon.png.import (100%) rename examples/{simple => stub}/project/main.tscn (100%) rename examples/{simple => stub}/project/nimlib.tres (100%) rename examples/{simple => stub}/project/project.godot (88%) rename examples/{simple => stub}/project/scene.tscn (100%) rename examples/{simple => stub}/project/scripts/FPSCounter.gdns (100%) rename examples/{simple => stub}/project/scripts/MainPanel.gdns (100%) rename examples/{simple => stub}/project/scripts/NimRuntime.gdns (100%) rename examples/{simple => stub}/src/config.nims (100%) rename examples/{simple => stub}/src/fpscounter.nim (100%) rename examples/{simple => stub}/src/mainpanel.nim (100%) rename examples/{simple => stub}/src/nim.cfg (78%) rename examples/{simple/src/simple.nim => stub/src/stub.nim} (100%) rename examples/{simple/src/simple.nimble => stub/src/stub.nimble} (69%) diff --git a/README.md b/README.md index 90a3e1b..6c7907e 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/examples/simple/README.md b/examples/simple/README.md deleted file mode 100644 index 9eb7cb4..0000000 --- a/examples/simple/README.md +++ /dev/null @@ -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. \ No newline at end of file diff --git a/examples/simple/.gitignore b/examples/stub/.gitignore similarity index 100% rename from examples/simple/.gitignore rename to examples/stub/.gitignore diff --git a/examples/stub/README.md b/examples/stub/README.md new file mode 100644 index 0000000..32fcd2d --- /dev/null +++ b/examples/stub/README.md @@ -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. diff --git a/examples/simple/nakefile.nim b/examples/stub/nakefile.nim similarity index 100% rename from examples/simple/nakefile.nim rename to examples/stub/nakefile.nim diff --git a/examples/simple/project/default_env.tres b/examples/stub/project/default_env.tres similarity index 100% rename from examples/simple/project/default_env.tres rename to examples/stub/project/default_env.tres diff --git a/examples/simple/project/fonts/Roboto/RobotoRegular.tres b/examples/stub/project/fonts/Roboto/RobotoRegular.tres similarity index 100% rename from examples/simple/project/fonts/Roboto/RobotoRegular.tres rename to examples/stub/project/fonts/Roboto/RobotoRegular.tres diff --git a/examples/simple/project/fonts/Roboto/ttf/LICENSE.txt b/examples/stub/project/fonts/Roboto/ttf/LICENSE.txt similarity index 100% rename from examples/simple/project/fonts/Roboto/ttf/LICENSE.txt rename to examples/stub/project/fonts/Roboto/ttf/LICENSE.txt diff --git a/examples/simple/project/fonts/Roboto/ttf/Roboto-Regular.ttf b/examples/stub/project/fonts/Roboto/ttf/Roboto-Regular.ttf similarity index 100% rename from examples/simple/project/fonts/Roboto/ttf/Roboto-Regular.ttf rename to examples/stub/project/fonts/Roboto/ttf/Roboto-Regular.ttf diff --git a/examples/simple/project/fps_counter.tscn b/examples/stub/project/fps_counter.tscn similarity index 100% rename from examples/simple/project/fps_counter.tscn rename to examples/stub/project/fps_counter.tscn diff --git a/examples/simple/project/icon.png b/examples/stub/project/icon.png similarity index 100% rename from examples/simple/project/icon.png rename to examples/stub/project/icon.png diff --git a/examples/simple/project/icon.png.import b/examples/stub/project/icon.png.import similarity index 100% rename from examples/simple/project/icon.png.import rename to examples/stub/project/icon.png.import diff --git a/examples/simple/project/main.tscn b/examples/stub/project/main.tscn similarity index 100% rename from examples/simple/project/main.tscn rename to examples/stub/project/main.tscn diff --git a/examples/simple/project/nimlib.tres b/examples/stub/project/nimlib.tres similarity index 100% rename from examples/simple/project/nimlib.tres rename to examples/stub/project/nimlib.tres diff --git a/examples/simple/project/project.godot b/examples/stub/project/project.godot similarity index 88% rename from examples/simple/project/project.godot rename to examples/stub/project/project.godot index 009f1e5..658204c 100644 --- a/examples/simple/project/project.godot +++ b/examples/stub/project/project.godot @@ -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" diff --git a/examples/simple/project/scene.tscn b/examples/stub/project/scene.tscn similarity index 100% rename from examples/simple/project/scene.tscn rename to examples/stub/project/scene.tscn diff --git a/examples/simple/project/scripts/FPSCounter.gdns b/examples/stub/project/scripts/FPSCounter.gdns similarity index 100% rename from examples/simple/project/scripts/FPSCounter.gdns rename to examples/stub/project/scripts/FPSCounter.gdns diff --git a/examples/simple/project/scripts/MainPanel.gdns b/examples/stub/project/scripts/MainPanel.gdns similarity index 100% rename from examples/simple/project/scripts/MainPanel.gdns rename to examples/stub/project/scripts/MainPanel.gdns diff --git a/examples/simple/project/scripts/NimRuntime.gdns b/examples/stub/project/scripts/NimRuntime.gdns similarity index 100% rename from examples/simple/project/scripts/NimRuntime.gdns rename to examples/stub/project/scripts/NimRuntime.gdns diff --git a/examples/simple/src/config.nims b/examples/stub/src/config.nims similarity index 100% rename from examples/simple/src/config.nims rename to examples/stub/src/config.nims diff --git a/examples/simple/src/fpscounter.nim b/examples/stub/src/fpscounter.nim similarity index 100% rename from examples/simple/src/fpscounter.nim rename to examples/stub/src/fpscounter.nim diff --git a/examples/simple/src/mainpanel.nim b/examples/stub/src/mainpanel.nim similarity index 100% rename from examples/simple/src/mainpanel.nim rename to examples/stub/src/mainpanel.nim diff --git a/examples/simple/src/nim.cfg b/examples/stub/src/nim.cfg similarity index 78% rename from examples/simple/src/nim.cfg rename to examples/stub/src/nim.cfg index a64088d..66b6618 100644 --- a/examples/simple/src/nim.cfg +++ b/examples/stub/src/nim.cfg @@ -1,8 +1,6 @@ --path:"$projectdir" --path:"$projectdir/../godotapi" ---experimental --app:lib ---stackTrace:on -d:useRealtimeGc --noMain --warning[LockLevel]:off \ No newline at end of file diff --git a/examples/simple/src/simple.nim b/examples/stub/src/stub.nim similarity index 100% rename from examples/simple/src/simple.nim rename to examples/stub/src/stub.nim diff --git a/examples/simple/src/simple.nimble b/examples/stub/src/stub.nimble similarity index 69% rename from examples/simple/src/simple.nimble rename to examples/stub/src/stub.nimble index 22c3f19..d9b81e3 100644 --- a/examples/simple/src/simple.nimble +++ b/examples/stub/src/stub.nimble @@ -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")