Skip to content

Commit

Permalink
Inital native code for verified mod auto-downloading (#545)
Browse files Browse the repository at this point in the history
Allows client to download a mod archive from the Thunderstore API, and extract included mods in the remote mods folder of the current game profile.

Not all mods can be automatically downloaded, as it would cause some security issues, and Thunderstore mod name cannot be deduced from actual mod name: to be eligible to auto-downloading, a mod must appear in the list of verified mods.

Said list and complete mod verification procedure are described here: https://github.com/R2Northstar/VerifiedMods

Exposes two commands to test the feature:
- `fetch_verified_mods` retrieves verified mods list from the GitHub organization, and stores it locally;
- `download_mod` does the actual mod downloading/extraction job.
  • Loading branch information
Alystrasz authored Nov 3, 2023
1 parent 6e32a58 commit 13f2fac
Show file tree
Hide file tree
Showing 6 changed files with 711 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
path = thirdparty/minhook
url = https://github.com/TsudaKageyu/minhook
ignore = untracked
[submodule "thirdparty/minizip"]
path = thirdparty/minizip
url = https://github.com/zlib-ng/minizip-ng.git
4 changes: 4 additions & 0 deletions NorthstarDLL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

find_package(minhook REQUIRED)
find_package(libcurl REQUIRED)
find_package(minizip REQUIRED)

add_library(NorthstarDLL SHARED
"resources.rc"
Expand Down Expand Up @@ -73,6 +74,8 @@ add_library(NorthstarDLL SHARED
"logging/sourceconsole.h"
"masterserver/masterserver.cpp"
"masterserver/masterserver.h"
"mods/autodownload/moddownloader.h"
"mods/autodownload/moddownloader.cpp"
"mods/compiled/kb_act.cpp"
"mods/compiled/modkeyvalues.cpp"
"mods/compiled/modpdef.cpp"
Expand Down Expand Up @@ -156,6 +159,7 @@ add_library(NorthstarDLL SHARED
target_link_libraries(NorthstarDLL PRIVATE
minhook
libcurl
minizip
WS2_32.lib
Crypt32.lib
Cryptui.lib
Expand Down
Loading

0 comments on commit 13f2fac

Please sign in to comment.