-
Notifications
You must be signed in to change notification settings - Fork 26
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
0.20, stub, windows -> cannot open file: engine #44
Comments
You could try the version described here; #42 which is located at: https://github.com/bluenote10/godot-nim/tree/attempt_fixes_for_0.19 Or indeed use 0.18 with choosenim, which works on Windows 10(I can tell because I'm currently using choosenim on a 64bit laptop). |
@DwanaG if I use your branch with: # stub.nimble
requires "https://github.com/DwanaG/godot-nim#attempt_fixes_for_0.19" I get the same error as with my patch:
@zetashift when I use: # stub.nimble
requires "https://github.com/bluenote10/godot-nim#attempt_fixes_for_0.19" I get:
|
It seems that Nim cannot find the _godotapi/engine.nim file. Does the _godotapi folder is generated when you compile the project? |
Yes, I see the _godotapi folder (godot-nim-stub\_godotapi) with only one file in it, api.json. |
Could you start from a clean project? Delete the _godotapi and .nimcache folders and also nakefile.exe and try again. |
That worked, generating all of the .nim files in the _godotapi folder. Now there is an error:
gdobj FPSCounter of Label:
var lastFPS: float32
method ready*() =
setProcess(true) #<<< here |
Previous versions of the bindings used the this:self pragma, which made things easier. Now, that is deprecated and methods must be called explicitly with self. Please check the comment on my PR #45 to see how it's working now. I can't find a way to make it work the way it used to. self.setProcess(true) |
I was able to get it to build by using # fpscounter.nim
gdobj FPSCounter of Label:
var lastFPS: float32
method ready*() =
self.setProcess(true)
#mainpanel.nim
gdobj MainPanel of Panel:
method ready*() =
self.setProcessInput(true)
method input*(event: InputEvent) =
if event of InputEventMouseButton:
let ev = event as InputEventMouseButton
if ev.buttonIndex == BUTTON_LEFT:
self.getTree().setInputAsHandled()
let scene = load("res://scene.tscn") as PackedScene
self.getTree().root.addChild(scene.instance())
self.queueFree() |
It works! Thank you so much for your help. Now, being a godot newb, I just need to understand how to actually make use this from godot... |
Actually, nevermind... just launching godot from the godot-nim-stub folder brings the game right up... |
Should I make a PR for godot-nim-stub with these changes? |
Would be nice. But that's the way it should be done if using my branch. Otherwise the way it is now is cleaner. If you make a PR, probably will be merged only if my PR is merged. |
@travisstaloch you can try using: https://github.com/zetashift/godotnim-samples this as a guideline, |
Ok, I made a PR in case it ever gets merged. Thanks again for your help. |
I installed godot 3.0 and followed the godot-nim Getting Started docs. I have an existing nim 0.20.0 and nimble. Trying to build the stub, there were errors. Using
nimble install https://github.com/aguspiza/godot-nim#head
andrequires "https://github.com/aguspiza/godot-nim#head"
in stub.nimble fixed many of the errors.I forked that repo and got through the remaining error and even got rid of warnings which were mostly caused by changes to NimNode after 0.18. The remaining error involved removing the
{.immediate.}
pragma from the macro gdobj in godotmacros.nim(630). I also forked the stub with my change.I'm now getting the error:
Any ideas or suggestions? Do I just need to be on 0.18? I saw a comment above godotmacros.nim(630)
Could this be causing the error I'm seeing? I don't need to have the godot_headers somewhere and pass/include to nim compiler do I? Hoping there is someway to use 0.20 as choosenim is broken on windows afaik.
The text was updated successfully, but these errors were encountered: