Skip to content

build: separate plugins build from core build#51

Merged
Miou-zora merged 12 commits intomainfrom
unlink_plugins_from_projects
Nov 12, 2024
Merged

build: separate plugins build from core build#51
Miou-zora merged 12 commits intomainfrom
unlink_plugins_from_projects

Conversation

@Miou-zora
Copy link
Contributor

@Miou-zora Miou-zora commented Nov 4, 2024

I've created EngineSquaredCore and Plugins separated build system.

EngineSquaredCore represents core engine that can be used without any dependencies and that can be used for anypurpose. It is contained inside src/engine folder

Each plugins are self contained inside there respertive folders inside src/plugin folder. Plugins have an xmake.lua to create their statics libraries. They also have their own unit tests management. Unit tests can be called recursively like before (xmake test at the root of the repository).

A typical plugin's folder should contains only 5 things:

  • xmake.lua: to build the plugin and allow to run tests
  • .gitignore: if you build only the wanted plugin inside its folder, it will create .xmake and build folders and we don't want to push them.
  • src folder: used to store only source files
  • tests folder (optional): used to store only tests files. It can be unnecessary when you create lib that can't be tested (Window plugin for example)
  • src/global_plugin_header.hpp (optional): You can add an header file that contains all header of the plugin. For example, Object plugin contains Object.hpp that include all headers of the plugins. It can unnecessary sometimes, for example Window plugin have only one useful header file named Window.hpp that declare a Window class.

For now, we use them for the EngineSquared library that contains all plugins and core features. If you add a new plugin, don't forget to include it inside REPO_ROOT/xmake.lua like includes("src/plugin/your-plugin/xmake.lua") and add it in EngineSquared target like add_deps("PluginYourPlugin").

@Miou-zora Miou-zora added the enhancement New feature or request label Nov 4, 2024
@Miou-zora Miou-zora self-assigned this Nov 4, 2024
@Miou-zora Miou-zora added build Everything related to the build system documentation Improvements or additions to documentation ci Everything related to continous integration and removed enhancement New feature or request labels Nov 5, 2024
@Miou-zora Miou-zora linked an issue Nov 6, 2024 that may be closed by this pull request
3 tasks
@Miou-zora Miou-zora marked this pull request as ready for review November 6, 2024 11:05
@Miou-zora Miou-zora requested a review from a team November 6, 2024 11:05
@Miou-zora
Copy link
Contributor Author

I tested it on VkWrapper-Test and SB-Test-Scene and it works!

@Miou-zora Miou-zora merged commit fabb4a0 into main Nov 12, 2024
@Miou-zora Miou-zora deleted the unlink_plugins_from_projects branch November 12, 2024 02:30
MasterLaplace pushed a commit that referenced this pull request Dec 6, 2024
I've created `EngineSquaredCore` and `Plugin`s separated build system.

`EngineSquaredCore` represents core engine that can be used without any
dependencies and that can be used for anypurpose. It is contained inside
`src/engine` folder

Each plugins are self contained inside there respertive folders inside
`src/plugin` folder. Plugins have an `xmake.lua` to create their statics
libraries. They also have their own unit tests management. Unit tests
can be called recursively like before (`xmake test` at the root of the
repository).

A typical plugin's folder should contains only 5 things:
- `xmake.lua`: to build the plugin and allow to run tests
- `.gitignore`: if you build only the wanted plugin inside its folder,
it will create `.xmake` and `build` folders and we don't want to push
them.
- `src` folder: used to store only source files
- `tests` folder (optional): used to store only tests files. It can be
unnecessary when you create lib that can't be tested (`Window` plugin
for example)
- `src/global_plugin_header.hpp` (optional): You can add an header file
that contains all header of the plugin. For example, `Object` plugin
contains `Object.hpp` that include all headers of the plugins. It can
unnecessary sometimes, for example `Window` plugin have only one useful
header file named `Window.hpp` that declare a `Window` class.

For now, we use them for the `EngineSquared` library that contains all
plugins and core features. If you add a new plugin, don't forget to
include it inside `REPO_ROOT/xmake.lua` like
`includes("src/plugin/your-plugin/xmake.lua")` and add it in
`EngineSquared` target like add_deps("PluginYourPlugin").

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
MasterLaplace pushed a commit that referenced this pull request Dec 6, 2024
I've created `EngineSquaredCore` and `Plugin`s separated build system.

`EngineSquaredCore` represents core engine that can be used without any
dependencies and that can be used for anypurpose. It is contained inside
`src/engine` folder

Each plugins are self contained inside there respertive folders inside
`src/plugin` folder. Plugins have an `xmake.lua` to create their statics
libraries. They also have their own unit tests management. Unit tests
can be called recursively like before (`xmake test` at the root of the
repository).

A typical plugin's folder should contains only 5 things:
- `xmake.lua`: to build the plugin and allow to run tests
- `.gitignore`: if you build only the wanted plugin inside its folder,
it will create `.xmake` and `build` folders and we don't want to push
them.
- `src` folder: used to store only source files
- `tests` folder (optional): used to store only tests files. It can be
unnecessary when you create lib that can't be tested (`Window` plugin
for example)
- `src/global_plugin_header.hpp` (optional): You can add an header file
that contains all header of the plugin. For example, `Object` plugin
contains `Object.hpp` that include all headers of the plugins. It can
unnecessary sometimes, for example `Window` plugin have only one useful
header file named `Window.hpp` that declare a `Window` class.

For now, we use them for the `EngineSquared` library that contains all
plugins and core features. If you add a new plugin, don't forget to
include it inside `REPO_ROOT/xmake.lua` like
`includes("src/plugin/your-plugin/xmake.lua")` and add it in
`EngineSquared` target like add_deps("PluginYourPlugin").

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
MasterLaplace pushed a commit that referenced this pull request Dec 6, 2024
I've created `EngineSquaredCore` and `Plugin`s separated build system.

`EngineSquaredCore` represents core engine that can be used without any
dependencies and that can be used for anypurpose. It is contained inside
`src/engine` folder

Each plugins are self contained inside there respertive folders inside
`src/plugin` folder. Plugins have an `xmake.lua` to create their statics
libraries. They also have their own unit tests management. Unit tests
can be called recursively like before (`xmake test` at the root of the
repository).

A typical plugin's folder should contains only 5 things:
- `xmake.lua`: to build the plugin and allow to run tests
- `.gitignore`: if you build only the wanted plugin inside its folder,
it will create `.xmake` and `build` folders and we don't want to push
them.
- `src` folder: used to store only source files
- `tests` folder (optional): used to store only tests files. It can be
unnecessary when you create lib that can't be tested (`Window` plugin
for example)
- `src/global_plugin_header.hpp` (optional): You can add an header file
that contains all header of the plugin. For example, `Object` plugin
contains `Object.hpp` that include all headers of the plugins. It can
unnecessary sometimes, for example `Window` plugin have only one useful
header file named `Window.hpp` that declare a `Window` class.

For now, we use them for the `EngineSquared` library that contains all
plugins and core features. If you add a new plugin, don't forget to
include it inside `REPO_ROOT/xmake.lua` like
`includes("src/plugin/your-plugin/xmake.lua")` and add it in
`EngineSquared` target like add_deps("PluginYourPlugin").

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Everything related to the build system ci Everything related to continous integration documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prepare the repo for the big split

2 participants