/CLibSFPluginTemplate

Plugin template for CommonLibSF

Primary LanguageC++GNU General Public License v3.0GPL-3.0

CommonLibSF Plugin Template

C++23 Platform Game version Test build

Setup

This template consumes CommonLibSF either as a vcpkg port or as a git submodule. When you run the project setup script, you will be prompted to choose between the two (the default is via vcpkg).

A python script, project_setup.py, is provided which automates several housekeeping steps required to get the template development-ready (requires Python). To run the script:

  1. Run cd .\CLibSFPluginTemplate\
  2. Run py .\project_setup.py
  3. Choose how to consume CommonLibSF
    1. Press Enter to use the default of consuming CommonLibSF via vcpkg
    2. Enter y to consume CommonLibSF as a git submodule instead
  4. Enter your project name (in CamelCase)

Building your project

  • Visual Studio should prompt you to generate a CMake cache. Click on Generate and wait
  • One the CMake cache is generated, build your project
  • The .dll and .pdb files will be placed in contrib\PluginRelease or contrib\PluginDebug depending on your build configuration

Build configs

  • Two build configs are provided:
    • Release: Optimized release build, produces small and fast DLLs with associated PDBs
    • Debug: Debug build, produces DLLs and PDBs with full debug info, allowing the use of an interactive debugger

Plugin configuration using an .ini

Many CommonLib plugins expose settings through configuration files so that the user can control plugin behavior. This template includes simpleini which allows you to read settings from the ini file in contrib\config (see Settings.cpp).

Dependencies