planetis-m / naylib

Yet another raylib Nim wrapper
MIT License
225 stars 10 forks source link

'atlas' installation messes up files #146

Closed matkuki closed 1 week ago

matkuki commented 1 week ago

Hi,

Specs:

Running:

atlas init atlas use "https://github.com/planetis-m/naylib"

causes the git repo for naylib in the dependencies directory to get messed up. It looks like the after install hook does something wrong, but that is my guess.

planetis-m commented 1 week ago

What's exactly wrong with it? AFAIK with atlas it should run the branch:

after install: when defined(atlas): localInstallTask()

The localInstallTask is tested by the CI:

task test, "Runs the test suite": localInstallTask()

And the other branch is also taken by the examples CI which installs naylib as a dependency.

planetis-m commented 1 week ago

It could be an issue with path handling. It needs to use quoteShell somewhere.

Can you open raylib.nim in your installation and post the raylibDir constant in the 5th line?

planetis-m commented 1 week ago

I tried to install in a path that has spaces but atlas doesn't even run correctly. If your path is irregular report the issue to atlas.

matkuki commented 1 week ago

My project path: E:\Nim\naylib\text_editor

5th line in raylib.nim:

const raylibDir = Path(r"E:\Nim\naylib\text_editor\dependencies\naylib\src\raylib")
planetis-m commented 1 week ago

Seems ok? And what's the error?

(The after install task doesn't touch directories, it only overwrites this constant.)

matkuki commented 1 week ago

One thing is, the entire src/raylib subdirectory is missing. This is what is in the atlas installed src directory: image ... and this is what is in the nimble installed package: image And the git log of the atlas repo shows this (TortoiseGit): image I didn't do anything in any of the directories, this is just after atlas use ....

matkuki commented 1 week ago

Had the same thing happened when installing sdl2 with atlas. Reported this to atlas repo: https://github.com/nim-lang/atlas/issues/135