From 6d6b2a2b1b889f74f4561afbbca592af7cffb44f Mon Sep 17 00:00:00 2001 From: shad0wshayd3 Date: Thu, 9 May 2024 00:51:07 -0600 Subject: [PATCH] update project for release --- LICENSE => COPYING | 0 EXCEPTIONS | 15 +++++++++++++++ Plugin/CMakeLists.txt | 20 ++++++++++---------- Plugin/CMakePresets.json | 16 +++++++--------- Plugin/cmake/common.cmake | 1 - Plugin/cmake/version.rc.in | 2 +- Plugin/src/PCH.h | 2 +- Plugin/vcpkg.json | 31 ++++++++++++------------------- build-clang-cl.bat | 4 ---- build-msvc.bat | 2 +- extern/CommonLibF4 | 2 +- make-sln-clang-cl.bat | 3 --- make-sln-msvc.bat | 2 +- 13 files changed, 49 insertions(+), 51 deletions(-) rename LICENSE => COPYING (100%) create mode 100644 EXCEPTIONS delete mode 100644 build-clang-cl.bat delete mode 100644 make-sln-clang-cl.bat diff --git a/LICENSE b/COPYING similarity index 100% rename from LICENSE rename to COPYING diff --git a/EXCEPTIONS b/EXCEPTIONS new file mode 100644 index 0000000..9ee5875 --- /dev/null +++ b/EXCEPTIONS @@ -0,0 +1,15 @@ +This Program is intended to be used with and modify existing code (the "Modded Code") and to build a robust modding community with open source principles. The purpose of this exception is to address issues when an open source modding community interacts with potentially proprietary code. In addition, the modding community often uses libraries (the "Modding Libraries") under licenses that may be incompatible with the GPL ("Modding Library Licenses"). + +=== + +Modding Exception + +In addition, as a special exception, the authors gives You the additional right to link the code of this Program with the existing code that this Program is intended to be used with or modify and to distribute linked combinations including the two, subject to the limitations in this paragraph. Modded Code permitted under this exception may link to the code of this Program without causing the Modded Code and portion of the combined work corresponding to the Modded Code to be covered by the GNU General Public License. You must obey the GNU General Public License in all respects for all of the Program code and other code used in conjunction with the Program except the Modded Code covered by this exception. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to provide this exception without modification, you must delete this exception statement from your version and license this file solely under the GPL without exception. + +=== + +GPL-3.0 Linking Exception (with Corresponding Source) + +Additional permission under GNU GPL version 3 section 7 + +If you modify this Program, or any covered work, by linking or combining it with Modding Libraries (or a modified version thereof), containing parts covered by the terms of Modding Library Licenses, the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of Modding Libraries used as well as that of the covered work. diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt index 3b40b46..427397c 100644 --- a/Plugin/CMakeLists.txt +++ b/Plugin/CMakeLists.txt @@ -64,7 +64,7 @@ target_include_directories( # linkage target_link_libraries( - ${PROJECT_NAME} + ${PROJECT_NAME} PRIVATE DKUtil::DKUtil CommonLibF4::CommonLibF4 @@ -116,17 +116,17 @@ target_precompile_headers( ) set_property( - TARGET + TARGET ${PROJECT_NAME} - PROPERTY VS_USER_PROPS + PROPERTY VS_USER_PROPS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/build_stl_modules.props" ) # update deployments - add_custom_command( - TARGET - ${PROJECT_NAME} - POST_BUILD - COMMAND powershell -NoProfile -ExecutionPolicy Bypass -File - "${CMAKE_CURRENT_SOURCE_DIR}/!update.ps1" "DISTRIBUTE" "${PROJECT_VERSION}" "${CMAKE_CURRENT_BINARY_DIR}/$(ConfigurationName)" "${PROJECT_NAME}" - ) +add_custom_command( + TARGET + ${PROJECT_NAME} + POST_BUILD + COMMAND powershell -NoProfile -ExecutionPolicy Bypass -File + "${CMAKE_CURRENT_SOURCE_DIR}/!update.ps1" "DISTRIBUTE" "${PROJECT_VERSION}" "${CMAKE_CURRENT_BINARY_DIR}/$(ConfigurationName)" "${PROJECT_NAME}" +) diff --git a/Plugin/CMakePresets.json b/Plugin/CMakePresets.json index 4333c1a..5ee5366 100644 --- a/Plugin/CMakePresets.json +++ b/Plugin/CMakePresets.json @@ -11,8 +11,7 @@ "hidden": true, "cacheVariables": { "CMAKE_CXX_FLAGS": "$env{PROJECT_PLATFORM_FLAGS} $env{PROJECT_TEXT_FLAGS} $env{PROJECT_COMPILER_FLAGS} $penv{CXXFLAGS}", - "F4SE_SUPPORT_XBYAK": "ON", - "USING_VCPKG": true + "F4SE_SUPPORT_XBYAK": "ON" }, "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { @@ -26,10 +25,9 @@ "name": "packaging-vcpkg", "hidden": true, "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": { - "type": "STRING", - "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" - }, + "USING_VCPKG": "ON", + "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", + "VCPKG_HOST_TRIPLET": "x64-windows-static-md", "VCPKG_TARGET_TRIPLET": "x64-windows-static-md" } }, @@ -70,7 +68,7 @@ "name": "compiler-msvc", "hidden": true, "environment": { - "PROJECT_COMPILER_FLAGS": "/cgthreads8 /diagnostics:caret /fp:contract /fp:except- /guard:cf- /permissive- /Zc:__cplusplus /Zc:enumTypes /Zc:lambda /Zc:preprocessor /Zc:referenceBinding /Zc:rvalueCast /Zc:templateScope /Zc:ternary /Zc:preprocessor /EHsc /MP /W4 /WX /external:anglebrackets /external:W0", + "PROJECT_COMPILER_FLAGS": "/cgthreads8 /diagnostics:caret /fp:contract /fp:except- /guard:cf- /permissive- /Zc:__cplusplus /Zc:lambda /Zc:preprocessor /Zc:referenceBinding /Zc:rvalueCast /Zc:templateScope /Zc:ternary /Zc:preprocessor /EHsc /MP /W4 /external:anglebrackets /external:W0", "PROJECT_COMPILER": "msvc" } }, @@ -102,7 +100,7 @@ "environment": { "CC": "clang-cl", "CXX": "clang-cl", - "PROJECT_COMPILER_FLAGS": "/permissive- /EHsc /W4 /WX -Wno-overloaded-virtual -Wno-delete-non-abstract-non-virtual-dtor -Wno-inconsistent-missing-override -Wno-reinterpret-base-class -D__cpp_consteval" + "PROJECT_COMPILER_FLAGS": "/permissive- /EHsc /W4 -Wno-overloaded-virtual -Wno-delete-non-abstract-non-virtual-dtor -Wno-inconsistent-missing-override -Wno-reinterpret-base-class -D__cpp_consteval" } }, { @@ -230,4 +228,4 @@ "displayName": "8. (Release) Clang - MSVC" } ] -} +} \ No newline at end of file diff --git a/Plugin/cmake/common.cmake b/Plugin/cmake/common.cmake index 22ece50..7f6b4e8 100644 --- a/Plugin/cmake/common.cmake +++ b/Plugin/cmake/common.cmake @@ -35,7 +35,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF) set_property(GLOBAL PROPERTY USE_FOLDERS ON) -set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE FILEPATH "") # out-of-source builds only diff --git a/Plugin/cmake/version.rc.in b/Plugin/cmake/version.rc.in index b285c31..6f85af3 100644 --- a/Plugin/cmake/version.rc.in +++ b/Plugin/cmake/version.rc.in @@ -20,7 +20,7 @@ BEGIN VALUE "FileDescription", "@PROJECT_NAME@" VALUE "FileVersion", "@PROJECT_VERSION@.0" VALUE "InternalName", "@PROJECT_NAME@" - VALUE "LegalCopyright", "GPLv3 License" + VALUE "LegalCopyright", "GPL-3.0 or later WITH Modding Exception AND GPL-3.0 Linking Exception(with Corresponding Source)" VALUE "ProductName", "@PROJECT_NAME@" VALUE "ProductVersion", "@PROJECT_VERSION@.0" END diff --git a/Plugin/src/PCH.h b/Plugin/src/PCH.h index 58701ac..31ab368 100644 --- a/Plugin/src/PCH.h +++ b/Plugin/src/PCH.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once // c #include diff --git a/Plugin/vcpkg.json b/Plugin/vcpkg.json index 9cfbcf5..2172584 100644 --- a/Plugin/vcpkg.json +++ b/Plugin/vcpkg.json @@ -1,21 +1,14 @@ { - "name": "bakamaxpapyrusops", - "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", - "dependencies": [ - "boost-stl-interfaces", - "fmt", - "nlohmann-json", - "rsm-mmio", - "simpleini", - "spdlog", - "tomlplusplus", - "xbyak" - ], - "builtin-baseline": "a42af01b72c28a8e1d7b48107b33e4f286a55ef6", - "overrides": [ - { - "name": "tomlplusplus", - "version": "3.1.0" - } - ] + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "bakamaxpapyrusops", + "homepage": "https://github.com/shad0wshayd3-FO4/BakaMaxPapyrusOps", + "dependencies": [ + "boost-stl-interfaces", + "nlohmann-json", + "rsm-mmio", + "simpleini", + "spdlog", + "tomlplusplus", + "xbyak" + ] } diff --git a/build-clang-cl.bat b/build-clang-cl.bat deleted file mode 100644 index 03b2c01..0000000 --- a/build-clang-cl.bat +++ /dev/null @@ -1,4 +0,0 @@ -echo off -rd /s /q "build" -cmake -B "%~dp0/build" -S "%~dp0/Plugin" --preset=build-release-clang-cl-ninja -cmake --build "%~dp0/build" diff --git a/build-msvc.bat b/build-msvc.bat index f15a7a6..038f880 100644 --- a/build-msvc.bat +++ b/build-msvc.bat @@ -1,4 +1,4 @@ echo off -rd /s /q "build" +rd /s /q "%~dp0/build" cmake -B "%~dp0/build" -S "%~dp0/Plugin" --preset=build-release-msvc-msvc cmake --build "%~dp0/build" diff --git a/extern/CommonLibF4 b/extern/CommonLibF4 index 0cb3d92..662ca0b 160000 --- a/extern/CommonLibF4 +++ b/extern/CommonLibF4 @@ -1 +1 @@ -Subproject commit 0cb3d9211f49b138a212e45e16d5caa97cb694ee +Subproject commit 662ca0bc551d38ae149176cf0cc5ff199d62f4a6 diff --git a/make-sln-clang-cl.bat b/make-sln-clang-cl.bat deleted file mode 100644 index fa22ad2..0000000 --- a/make-sln-clang-cl.bat +++ /dev/null @@ -1,3 +0,0 @@ -echo off -rd /s /q "build" -cmake -B "%~dp0/build" -S "%~dp0/Plugin" --preset=build-debug-clang-cl-msvc diff --git a/make-sln-msvc.bat b/make-sln-msvc.bat index 1bb9d73..4fad248 100644 --- a/make-sln-msvc.bat +++ b/make-sln-msvc.bat @@ -1,3 +1,3 @@ echo off -rd /s /q "build" +rd /s /q "%~dp0/build" cmake -B "%~dp0/build" -S "%~dp0/Plugin" --preset=build-debug-msvc-msvc