Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirdEyeSqueegee committed Sep 15, 2023
1 parent c016292 commit 175e39f
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 80 deletions.
13 changes: 2 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/version.rc
@ONLY)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Plugin.h.in
${CMAKE_CURRENT_SOURCE_DIR}/include/Plugin.h
@ONLY)

set(PUBLIC_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}")
set(headers
include/Plugin.h
include/Utility.h)

set(sources
Expand All @@ -55,12 +49,9 @@ source_group(
########################################################################################################################
find_package(CommonLibSF CONFIG REQUIRED)

add_library("${PROJECT_NAME}" SHARED ${sources})
add_library("${PROJECT_NAME}::${PROJECT_NAME}" ALIAS "${PROJECT_NAME}")
add_commonlibsf_plugin(${PROJECT_NAME} AUTHOR AuthorName SOURCES ${headers} ${sources})

target_link_libraries(${PROJECT_NAME}
PRIVATE
CommonLibSF::CommonLibSF)
add_library("${PROJECT_NAME}::${PROJECT_NAME}" ALIAS "${PROJECT_NAME}")

find_path(SIMPLEINI_INCLUDE_DIRS "SimpleIni.h")

Expand Down
27 changes: 0 additions & 27 deletions cmake/Plugin.h.in

This file was deleted.

2 changes: 1 addition & 1 deletion include/Hooks.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

// Define your hook structs here
// Define your hook classes here
namespace Hooks
{
void Install() noexcept;
Expand Down
27 changes: 0 additions & 27 deletions include/Plugin.h

This file was deleted.

13 changes: 1 addition & 12 deletions project_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,6 @@ def onexc(func, path, exc_info):
author = input("Enter author: ")
pattern = re.compile(r"(?<!^)(?=[A-Z])")

with open(
os.path.join(cwd, "cmake\\Plugin.h.in"), "r", encoding="utf-8"
) as pluginh_file:
pluginh = pluginh_file.read()

pluginh = pluginh.replace("AuthorName", author, 1)

with open(
os.path.join(cwd, "cmake\\Plugin.h.in"), "w", encoding="utf-8"
) as pluginh_file:
pluginh_file.write(pluginh)

with open(os.path.join(cwd, "vcpkg.json"), "r", encoding="utf-8") as vcpkg_json_file:
vcpkg_json = json.load(vcpkg_json_file)

Expand All @@ -69,6 +57,7 @@ def onexc(func, path, exc_info):
cmakelists = cmakelists_file.read()

cmakelists = cmakelists.replace("PluginName", project_name)
cmakelists = cmakelists.replace("AuthorName", author)
cmakelists = cmakelists.replace("0.0.1", "1.0.0")

with open(
Expand Down
4 changes: 3 additions & 1 deletion src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
#include "Settings.h"

// SFSE message listener, use this to do stuff at specific moments during runtime
// NOTE: Currently, only kPostPostLoad is available
void Listener(SFSE::MessagingInterface::Message* message) noexcept
{
if (message->type <=> SFSE::MessagingInterface::kPostLoad == 0)
{
}
if (message->type <=> SFSE::MessagingInterface::kPostPostLoad == 0)
{
Settings::LoadSettings();
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"kind": "git",
"repository": "https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg",
"baseline": "24784d22716d637e9b78e2de764044b00d1f5e83",
"baseline": "8d11ab6cff55b76a962eddcf5ccc999c80a8bc41",
"packages": ["commonlibsf"]
}
]
Expand Down

0 comments on commit 175e39f

Please sign in to comment.