### Project Setup Commands Source: https://github.com/starfield-reverse-engineering/clibsfplugintemplate/blob/main/README.md Commands to clone the repository, navigate into the project directory, and run the Python setup script. Requires Python 3.12+. ```bash git clone cd CLibSFPluginTemplate py project_setup.py ``` -------------------------------- ### CMake Build Process Source: https://github.com/starfield-reverse-engineering/clibsfplugintemplate/blob/main/README.md Instructions for building the project using CMake presets. The output DLL and PDB files are placed in specific directories based on the build configuration (release or debug). ```cmake # Select a CMake preset (e.g., 'Release' or 'Debug') # Configure and build the project. # Output files (.dll, .pdb) will be in contrib\PluginRelease or contrib\PluginDebug. ``` -------------------------------- ### CMake Configuration for C++ Plugin Build Source: https://github.com/starfield-reverse-engineering/clibsfplugintemplate/blob/main/CMakeLists.txt This CMake script sets up the build environment for a C++ plugin. It defines project properties, manages source files, finds external libraries, configures compiler flags, and specifies post-build actions for deploying the plugin and its associated files. ```cmake cmake_minimum_required(VERSION 3.30) message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.") # -------------------------------------------------- Setup project ---------------------------------------------------- project( PluginName VERSION 0.0.1 LANGUAGES CXX ) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_OPTIMIZE_DEPENDENCIES ON) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY ) # -------------------------------------------------- Add sources ------------------------------------------------------ file( GLOB_RECURSE sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp ${CMAKE_CURRENT_BINARY_DIR}/version.rc ) list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/include/PCH.h) source_group( TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources} ) # -------------------------------------------------- Add dependencies ------------------------------------------------- find_package(CommonLibSF CONFIG REQUIRED) find_path(SIMPLEINI_INCLUDE_DIRS SimpleIni.h) # -------------------------------------------------- Setup DLL -------------------------------------------------------- add_commonlibsf_plugin( ${PROJECT_NAME} AUTHOR AuthorName SOURCES ${sources} ) add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) target_include_directories( ${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ${SIMPLEINI_INCLUDE_DIRS} ) target_precompile_headers( ${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/PCH.h ${SIMPLEINI_INCLUDE_DIRS}/SimpleIni.h ) target_compile_options( ${PROJECT_NAME} PRIVATE /cgthreads8 /diagnostics:caret /jumptablerdata /MP /W4 /Zc:__cplusplus /Zc:enumTypes /Zc:inline /Zc:templateScope ) if(CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) target_compile_options( ${PROJECT_NAME} PRIVATE /fp:fast /Ob3 /GL /GR- /Gw /Qpar ) target_link_options( ${PROJECT_NAME} PRIVATE /CGTHREADS:8 /INCREMENTAL:NO /OPT:REF,ICF=4 ) endif() # -------------------------------------------------- Post-build ------------------------------------------------------- if(CMAKE_BUILD_TYPE STREQUAL Debug) set(BUILD_NAME Debug) else() set(BUILD_NAME Release) endif() add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Plugin${BUILD_NAME}/sfse/plugins COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Plugin${BUILD_NAME}/sfse/plugins COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Plugin${BUILD_NAME}/sfse/plugins COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Config/${PROJECT_NAME}.ini ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Plugin${BUILD_NAME}/sfse/plugins ) file(GLOB_RECURSE OUTPUT_DLLS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/*.dll) file(GLOB_RECURSE OUTPUT_PDBS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/*.pdb) set_property( TARGET ${PROJECT_NAME} APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${OUTPUT_DLLS} ${OUTPUT_PDBS} ) ``` -------------------------------- ### vcpkg Baseline Update Source: https://github.com/starfield-reverse-engineering/clibsfplugintemplate/blob/main/README.md Command to update the vcpkg baseline, ensuring the latest versions of CommonLibSF and other dependencies are fetched. Should be run frequently. ```bash vcpkg x-update-baseline ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.