A project started to stop being stuck at starting projects.
|
|
5 lat temu | |
|---|---|---|
| prelude | 5 lat temu | |
| .gitignore | 5 lat temu | |
| README.md | 5 lat temu | |
| premake5.sample.lua | 5 lat temu |
An attempt at making a project starter to stop being stuck at this step.
I'm currently being stuck at this step in many of my current projects. By trying to make a proper starter kit, I'm trying to unblock myself from this blank sheet block.
You will need premake5, your favorite toolchain and eventually download the libraries you'll want to use.
The base structure is composed of two projects : core and main. Most of the projects I have seen have a base library for common operations and algorithm. The name will vary on them but for personal reasons, I'm going to stick with "core".
Ultimately, when you're not going to make plenty of libraries to split the codebase into reusable parts, core can act like a common ground between multiple libraries or executables in the same workspace. That's how I envision its usage.
Somes libraries are vaguely ready-to-use by including the proper module file from the prelude folder and using them as dependencies in your project configuration.
This structure is currently optimized for source-based libraries. Already built libraries aren't supported yet nor are system libraries.
Here's a minimal example of how a library can be easily included once it has its own module.
-- ...
local prelude = require "prelude"
local portaudio = require "prelude.libraries.portaudio"
-- ...
workspace "yourproject"
-- ...
portaduio:use "SharedLib"
-- ...
project "Main project"
-- ...
prelude.link_against_modules {portaudio}
-- ...
The current module format allows not only to pass to depending projects the public include folders but also pass along defines or platform-specific configuration when needed. It required a bit of repetitive boilerplate, but that'd be an excellent candidate for magic-based refactoring.
external/portaudioexternal/physfsexternal/glmexternal/libxmp-liteexternal/eastl and last EABase's
version in external/eabaseObviously, more are going to come.