From 2a5c2668f8a7fdec28a1ed8072db4b12c651b4c8 Mon Sep 17 00:00:00 2001 From: maintenance Date: Sat, 9 Sep 2023 11:26:12 +0000 Subject: [PATCH 1/4] ci: maintenance `2023-09-09` --- CommonLibSF/vcpkg.json | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonLibSF/vcpkg.json b/CommonLibSF/vcpkg.json index 760bb482..c4ee53c2 100644 --- a/CommonLibSF/vcpkg.json +++ b/CommonLibSF/vcpkg.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "commonlibsf", - "version-date": "2023-09-08", + "version-date": "2023-09-09", "port-version": 0, "description": "A collaborative reverse-engineered library for Starfield.", "homepage": "https://github.com/Starfield-Reverse-Engineering/CommonLibSF", diff --git a/README.md b/README.md index 732902b2..1c92fdff 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![C++23](https://img.shields.io/static/v1?label=standard&message=c%2B%2B23&color=blue&logo=c%2B%2B&&logoColor=red&style=flat)](https://en.cppreference.com/w/cpp/compiler_support) ![Platform](https://img.shields.io/static/v1?label=platform&message=windows&color=dimgray&style=flat&logo=windows) [![Game version](https://img.shields.io/badge/game%20version-1.7.23-orange)](#Developing-with-CommonLibSF) -[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-09-08&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) +[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-09-09&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) [![Main CI](https://img.shields.io/github/actions/workflow/status/Starfield-Reverse-Engineering/CommonLibSF/main_ci.yml)](https://github.com/Starfield-Reverse-Engineering/CommonLibSF/actions/workflows/main_ci.yml) ## Build Dependencies From a0e9bb5b1b9314500b855caa5c2a7d99e51b88f5 Mon Sep 17 00:00:00 2001 From: vcpkg-action Date: Sat, 9 Sep 2023 19:28:28 +0800 Subject: [PATCH 2/4] fix: remove `/FI` directive (#22) --- CommonLibSF/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CommonLibSF/CMakeLists.txt b/CommonLibSF/CMakeLists.txt index 89e470cb..d2fab40c 100644 --- a/CommonLibSF/CMakeLists.txt +++ b/CommonLibSF/CMakeLists.txt @@ -99,7 +99,6 @@ if (MSVC) /wd5053 # support for 'explicit()' in C++17 and earlier is a vendor extension /wd5204 # 'type-name': class has virtual functions, but its trivial destructor is not virtual; instances of objects derived from this class may not be destructed correctly /wd5220 # 'member': a non-static data member with a volatile qualified type no longer implies that compiler generated copy / move constructors and copy / move assignment operators are not trivial - /FI${CMAKE_CURRENT_SOURCE_DIR}/include/SFSE/Impl/PCH.h ) endif() From 3ee4ce6bc1082a095bcdd1aef2e4aa9f54bc9528 Mon Sep 17 00:00:00 2001 From: vcpkg-action Date: Sat, 9 Sep 2023 19:28:56 +0800 Subject: [PATCH 3/4] fix: revert and fix some changes in (#19) --- CommonLibSF/CMakePresets.json | 90 +++++++++++++++++++++-------------- README.md | 10 ++-- build-clang-cl.bat | 2 +- build-msvc.bat | 2 +- make-sln-clang-cl.bat | 2 +- make-sln-msvc.bat | 2 +- 6 files changed, 65 insertions(+), 43 deletions(-) diff --git a/CommonLibSF/CMakePresets.json b/CommonLibSF/CMakePresets.json index 343f754c..0fa6dfed 100644 --- a/CommonLibSF/CMakePresets.json +++ b/CommonLibSF/CMakePresets.json @@ -1,5 +1,5 @@ { - "version": 6, + "version": 3, "cmakeMinimumRequired": { "major": 3, "minor": 26, @@ -10,7 +10,6 @@ "name": "common", "hidden": true, "cacheVariables": { - "CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$:Debug>DLL", "CMAKE_CXX_FLAGS": "$env{PROJECT_PLATFORM_FLAGS} $env{PROJECT_TEXT_FLAGS} $env{PROJECT_COMPILER_FLAGS} $penv{CXXFLAGS}" }, "vendor": { @@ -25,47 +24,35 @@ "name": "packaging-vcpkg", "hidden": true, "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", + "CMAKE_TOOLCHAIN_FILE": { + "type": "STRING", + "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + }, "VCPKG_TARGET_TRIPLET": "x64-windows-static-md" } }, { - "name": "buildtype-debug-clang", + "name": "buildtype-debug", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } }, { - "name": "buildtype-release-clang", + "name": "buildtype-release", "hidden": true, "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } }, { - "name": "buildtype-debug-msvc", - "hidden": true, - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_CXX_FLAGS_DEBUG": "/Od /MDd", - "CMAKE_SHARED_LINKER_FLAGS_DEBUG": "/DEBUG:FULL /LTCG:INCREMENTAL /DEBUGTYPE:FIXUP" - } - }, - { - "name": "buildtype-release-msvc", + "name": "x64", "hidden": true, + "architecture": "x64", "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_CXX_FLAGS_RELEASE": "/fp:fast /GL /GR- /Gw /O2 /Ob3 /Qpar", - "CMAKE_SHARED_LINKER_FLAGS_RELEASE": "/OPT:REF,ICF=4" + "CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$:Debug>DLL" } }, - { - "name": "x64", - "hidden": true, - "architecture": "x64" - }, { "name": "generator-msvc", "hidden": true, @@ -81,9 +68,8 @@ "name": "compiler-msvc", "hidden": true, "environment": { - "PROJECT_COMPILER": "msvc", - "PROJECT_COMPILER_FLAGS": "/cgthreads8 /diagnostics:caret /EHsc /fp:contract /fp:except- /guard:cf- /MP /permissive- /sdl /W4 /Zc:__cplusplus /Zc:enumTypes /Zc:lambda /Zc:preprocessor /Zc:referenceBinding /Zc:rvalueCast /Zc:templateScope /Zc:ternary /bigobj", - "CMAKE_SHARED_LINKER_FLAGS": "/CGTHREADS:8 /MACHINE:x64 /LTCG:INCREMENTAL" + "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": "msvc" } }, { @@ -122,7 +108,7 @@ "inherits": [ "common", "packaging-vcpkg", - "buildtype-debug-msvc", + "buildtype-debug", "generator-msvc", "compiler-msvc" ] @@ -132,27 +118,38 @@ "inherits": [ "common", "packaging-vcpkg", - "buildtype-debug-msvc", + "buildtype-debug", "generator-ninja", "compiler-msvc" ] }, { - "name": "build-debug-clang-cl-ninja", + "name": "build-debug-clang-cl-msvc", + "toolset": "ClangCL", "inherits": [ "common", "packaging-vcpkg", - "buildtype-debug-clang", + "buildtype-debug", "generator-msvc", "compiler-clang-cl" ] }, + { + "name": "build-debug-clang-cl-ninja", + "inherits": [ + "common", + "packaging-vcpkg", + "buildtype-debug", + "generator-ninja", + "compiler-clang-cl" + ] + }, { "name": "build-release-msvc-msvc", "inherits": [ "common", "packaging-vcpkg", - "buildtype-release-msvc", + "buildtype-release", "generator-msvc", "compiler-msvc" ] @@ -162,17 +159,28 @@ "inherits": [ "common", "packaging-vcpkg", - "buildtype-release-msvc", + "buildtype-release", "generator-ninja", "compiler-msvc" ] }, + { + "name": "build-release-clang-cl-msvc", + "toolset": "ClangCL", + "inherits": [ + "common", + "packaging-vcpkg", + "buildtype-release", + "generator-msvc", + "compiler-clang-cl" + ] + }, { "name": "build-release-clang-cl-ninja", "inherits": [ "common", "packaging-vcpkg", - "buildtype-release-clang", + "buildtype-release", "generator-ninja", "compiler-clang-cl" ] @@ -200,14 +208,24 @@ "displayName": "4. (Release) MSVC - MSVC" }, { - "name": "debug-clang-cl", + "name": "debug-clang-cl-ninja", "configurePreset": "build-debug-clang-cl-ninja", "displayName": "5. (Debug) Clang - Ninja" }, { - "name": "release-clang-cl", + "name": "release-clang-cl-ninja", "configurePreset": "build-release-clang-cl-ninja", "displayName": "6. (Release) Clang - Ninja" + }, + { + "name": "debug-clang-cl-msvc", + "configurePreset": "build-debug-clang-cl-msvc", + "displayName": "7. (Debug) Clang - MSVC" + }, + { + "name": "release-clang-cl-msvc", + "configurePreset": "build-release-clang-cl-msvc", + "displayName": "8. (Release) Clang - MSVC" } ] -} +} \ No newline at end of file diff --git a/README.md b/README.md index 1c92fdff..2a103402 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ [See how to use CommonLibSF with vcpkg in your project.](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg) +--- + #### git submodule `cd` into your project directory and run: @@ -39,9 +41,11 @@ Then add the following to your `CMakeLists.txt`: ```cmake add_subdirectory(extern/CommonLibSF) -target_link_libraries(${PROJECT_NAME} - PRIVATE - CommonLibSF::CommonLibSF) +target_link_libraries( + ${PROJECT_NAME} + PRIVATE + CommonLibSF::CommonLibSF +) ``` ## End-User Dependencies diff --git a/build-clang-cl.bat b/build-clang-cl.bat index bc72704b..72eece17 100644 --- a/build-clang-cl.bat +++ b/build-clang-cl.bat @@ -1,4 +1,4 @@ echo off rd /s /q "build" -cmake -B "%cd%/build" -S "%cd%/CommonLibSF" --preset=build-release-clang-cl +cmake -B "%cd%/build" -S "%cd%/CommonLibSF" --preset=build-release-clang-cl-ninja cmake --build "%cd%/build" --config Release diff --git a/build-msvc.bat b/build-msvc.bat index dd6eb25c..8aced5f8 100644 --- a/build-msvc.bat +++ b/build-msvc.bat @@ -1,4 +1,4 @@ echo off rd /s /q "build" -cmake -B "%cd%/build" -S "%cd%/CommonLibSF" --preset=build-release-msvc +cmake -B "%cd%/build" -S "%cd%/CommonLibSF" --preset=build-release-msvc-ninja cmake --build "%cd%/build" --config Release diff --git a/make-sln-clang-cl.bat b/make-sln-clang-cl.bat index 2b7fd39f..52c34c08 100644 --- a/make-sln-clang-cl.bat +++ b/make-sln-clang-cl.bat @@ -1,3 +1,3 @@ echo off rd /s /q "build" -cmake -B "%cd%/build" -S "%cd%/CommonLibSF" --preset=solution-clang-cl +cmake -B "%cd%/build" -S "%cd%/CommonLibSF" --preset=build-debug-clang-cl-msvc diff --git a/make-sln-msvc.bat b/make-sln-msvc.bat index 8c64818f..20169bb0 100644 --- a/make-sln-msvc.bat +++ b/make-sln-msvc.bat @@ -1,3 +1,3 @@ echo off rd /s /q "build" -cmake -B "%cd%/build" -S "%cd%/CommonLibSF" --preset=solution-msvc +cmake -B "%cd%/build" -S "%cd%/CommonLibSF" --preset=build-debug-msvc-msvc From ac4df653ad755121708b7b38ec341b26bcc461cc Mon Sep 17 00:00:00 2001 From: vcpkg-action Date: Sat, 9 Sep 2023 23:14:27 +0800 Subject: [PATCH 4/4] fix: accidental revert --- CommonLibSF/CMakePresets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CommonLibSF/CMakePresets.json b/CommonLibSF/CMakePresets.json index 0fa6dfed..cea01875 100644 --- a/CommonLibSF/CMakePresets.json +++ b/CommonLibSF/CMakePresets.json @@ -1,5 +1,5 @@ { - "version": 3, + "version": 6, "cmakeMinimumRequired": { "major": 3, "minor": 26,