From 85a4948c19a7a2e3879deb98106cada0b247a3f4 Mon Sep 17 00:00:00 2001 From: Angad <angadmisra28@gmail.com> Date: Thu, 7 Sep 2023 20:46:58 -0700 Subject: [PATCH] chore: update README.md, update update-registry.ps1 --- .github/update-registry.ps1 | 2 +- README.md | 68 ++++++++++++++++++++----------------- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/.github/update-registry.ps1 b/.github/update-registry.ps1 index 6bb24b5f..291010c4 100644 --- a/.github/update-registry.ps1 +++ b/.github/update-registry.ps1 @@ -22,7 +22,7 @@ $vcpkg = $vcpkg | ConvertTo-Json -Depth 9 | ForEach-Object { $_ -replace "(?m) # update readme $readme = [IO.File]::ReadAllLines("$PathIn/README.md") -$readme = $readme -replace "(?<=label=vcpkg&message=).+?(?=&color)", $version +$readme = $readme -replace "(?<=label=vcpkg%20registry&message=).+?(?=&color)", $version [IO.File]::WriteAllLines("$PathIn/README.md", $readme) # status diff --git a/README.md b/README.md index f16a23ea..cde23827 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,62 @@ # CommonLibSF -A collaborative reverse-engineered library for Starfield. +## A collaborative reverse-engineered library for Starfield. [![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)](#Get-started) -[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg&message=2023-09-08&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) +[![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) +[![Main CI](https://img.shields.io/github/actions/workflow/status/Starfield-Reverse-Engineering/CommonLibSF/main_ci.yml)][CI] ## Build Dependencies - [CMake 3.26+](https://cmake.org/) - Add this to your PATH -- [PowerShell](https://github.com/PowerShell/PowerShell/releases/tag/v7.3.6) -- [Vcpkg](https://github.com/microsoft/vcpkg) - - Add the environment variable VCPKG_ROOT with the value as the path to the folder containing vcpkg -- [Visual Studio Community 2022](https://visualstudio.microsoft.com/) - - Desktop development with C++ - * \*ClangCL toolset and build support if using clang-cl configuration +- [vcpkg](https://github.com/microsoft/vcpkg) + - Add the environment variable `VCPKG_ROOT` with the value as the path to the folder containing vcpkg +- [Visual Studio 2022](https://visualstudio.microsoft.com/) with "Desktop development with C++" + - clang-cl toolset and build support if using `clang-cl` configuration +- [PowerShell](https://github.com/PowerShell/PowerShell/releases) -## Get started +## Developing with CommonLibSF -### use example plugin template +### Using the example plugin (TODO) -### git submodule & linking in CMake - -```ps -git submodule add https://github.com/Starfield-Reverse-Engineering/CommonLibSF.git extern/CommonLibSF -git submodule update -f --init +### Including CommonLibSF in your project + +Add the following to your `vcpkg-configuration`: + +```json +"registries": [ + { + "kind": "git", + "repository": "https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg", + "baseline": "<SHA of latest commit to the above repository>", + "packages": [ + "commonlibsf" + ] + } +] ``` -TODO: vcpkg registry - -You should have the following in CMakeLists.txt to compile and link successfully: +And the following to your `CMakeLists.txt`: ```cmake -add_subdirectory(extern/CommonLibSF) -target_link_libraries( - ${PROJECT_NAME} - PRIVATE - CommonLibSF::CommonLibSF -) +find_package(CommonLibSF CONFIG REQUIRED) +target_link_libraries(${PROJECT_NAME} + PRIVATE + CommonLibSF::CommonLibSF) ``` -## End User Dependencies +## End-User Dependencies [Starfield Script Extender](https://www.nexusmods.com/starfield/mods/106) ## Notes -CommonLib is incompatible with SFSE and is intended to replace it as a static dependency. However, you will still need the runtime component. +CommonLibSF is incompatible with SFSE and is intended to replace it as a static dependency—the runtime component is still required. ## License @@ -63,10 +68,9 @@ For additional information on GPL licenses, see the [FSF FAQ](https://www.gnu.or ## Credits -This is based on [CommonLibSSE][CommonlibSSE] started by [Ryan-rsm-McKenzie](https://github.com/Ryan-rsm-McKenzie) under a [MIT License][Commonlib_MIT]. Without him putting that together, much of the joint Bethesda RE scene would be drastically different. The MIT License is kept for historical purposes only and the [GPL](#license) controls. To the extent you want the [MIT licensed code][Commonlib_MIT], please reference [CommonlibSSE and forks][CommonlibSSE]. - ---- +This work is based on [CommonLibSSE][CommonlibSSE] created by [Ryan-rsm-McKenzie](https://github.com/Ryan-rsm-McKenzie) under an [MIT License][CommonLib_MIT]. Without him putting that together, much of the joint Bethesda RE scene would be drastically different. The MIT License is kept for historical purposes only and the [GPL](#License) governs this work. To the extent that you want the [MIT licensed code][CommonLib_MIT], please reference [CommonlibSSE and its forks][CommonlibSSE]. -[Commonlib_MIT]: /CommonLibSF/LICENSES/COMMONLIB +[CommonLib_MIT]: /CommonLibSF/LICENSES/COMMONLIB [LICENSE]: COPYING [CommonlibSSE]: https://github.com/Ryan-rsm-McKenzie/CommonLibSSE +[CI]: /CommonLibSF/actions/workflows/main_ci.yml