webui-dev / nim-webui

Use any web browser as GUI, with Nim in the backend and HTML5 in the frontend.
https://webui.me
MIT License
130 stars 9 forks source link

Can't build examples if cloning nonrecursive #2

Closed AlbertShown closed 1 year ago

AlbertShown commented 1 year ago

When I tried to test the examples, I manually cloned this repo, but because of nim.cfg, the compiling failed.

C:\Users\...\webui-main\examples>nim c -d:useWebviewStaticLib call_nim_from_js.nim
Hint: used config file 'C:\Nim\config\nim.cfg' [Conf]
Hint: used config file 'C:\Nim\config\config.nims' [Conf]
Hint: used config file 'C:\Users\...\webui-main\examples\nim.cfg' [Conf]
............................................................................................
C:\Users\...\webui-main\webui\bindings.nim(76, 12) Error: cannot find: ./webui/src/mongoose.c

Copying the example folder outside of the repo folder will work. Also, just removing nim.cfg works too.

Regular cloning (nonrecursive) tries to rebuild webui.c instead of using the already installed one.

neroist commented 1 year ago

This is because of the --path:".." line in nim.cfg. I don't think I'll fix this, its not that hard to put --recursive when cloning. I'll put a note in the readme to clone recursively though when trying to run examples.