godotengine / gdnative-demos

Demo projects for GDNative
MIT License
190 stars 74 forks source link

Refactor simple demo folder, SConstruct, and other project files #38

Closed aaronfranke closed 4 years ago

aaronfranke commented 4 years ago

The first commit moves the simple demo from SimpleDemo to simple. Using snake_case for project folders is more consistent with Godot's usual style and the Godot demo projects repo, and "demo" is redundant. This commit also fixes the godot_headers submodule having an outdated link, it now points to https://github.com/godotengine/godot_headers.

The second commit renames the folders inside of the simple demo, the project is now project instead of demo, and the GDNative files now go in gdnative instead of bin. These names better because they are more generic and more accurate. For users who want to copy the folder structure, their projects are likely not demos. The GDNative folder contains .gdnlib and .gdns which aren't binaries, so gdnative is a better name than bin.

Also, I renamed the project to "Simple GDNative Demo" and deleted the environment in the second commit.

The third commit refactors the SConstruct file. I changed the platform names to be future-proof names, formatted comments, reorganized code, and added a relative path for linking third-party libraries.

The fourth commit simplfies the demo by removing stdio.h and stdlib.h, and adds comments from the documentation article.

I plan to clean up the other demos later with a standardized structure, and that would solve #14.