Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial native code for verified mod auto-downloading #545

Merged
merged 84 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
54a4ddc
feat: add ModDownloader API declaration
Alystrasz Aug 21, 2023
0207d0d
docs: add documentation to header
Alystrasz Aug 21, 2023
7a87357
refactor: declare header as .hpp file
Alystrasz Aug 21, 2023
8a40845
feat: add basic FetchModsListFromAPI implementation
Alystrasz Aug 21, 2023
e5f84ee
feat: add global ModDownloader instance
Alystrasz Aug 21, 2023
8a16ec5
feat: add command to call FetchModsListFromAPI from in-game console
Alystrasz Aug 21, 2023
f4e0a99
fix: adjust header file extension
Alystrasz Aug 21, 2023
053fa83
feat: complete FetchModsListFromAPI implementation
Alystrasz Aug 22, 2023
35afd31
style: format
Alystrasz Aug 22, 2023
180b432
style: format
Alystrasz Aug 22, 2023
5dfda30
feat: add IsModAuthorized implementation
Alystrasz Aug 23, 2023
b4584e7
feat: add a ConCommand to invoke IsModAuthorized
Alystrasz Aug 23, 2023
61f47dd
fix: use std::string instead of char* in VerifiedModVersion struct
Alystrasz Aug 23, 2023
f7e9dd8
feat: add DownloadMod skeleton
Alystrasz Aug 23, 2023
d30fa9f
feat: add a ConCommand to invoke DownloadMod
Alystrasz Aug 23, 2023
2dde906
fix: use std::string instead of char* in VerifiedModDetails struct
Alystrasz Aug 23, 2023
9b041d7
feat: add FetchModFromDistantStore implementation
Alystrasz Aug 23, 2023
5a1a54c
fix: DownloadMod uses a thread to avoid UI freezing
Alystrasz Aug 23, 2023
c4af53d
refactor: use a map to store mod version information to ease their re…
Alystrasz Aug 23, 2023
7ed2f43
feat: bypass checksum verification for now
Alystrasz Aug 23, 2023
29a7351
style: apply clang formatting
Alystrasz Aug 23, 2023
840771d
docs: add archive download destination log
Alystrasz Aug 24, 2023
edc656b
refactor: replace all char pointers with std::string
Alystrasz Aug 24, 2023
5b957f6
build: add minizip dependency
Alystrasz Aug 25, 2023
16bedc6
feat: list files in downloaded mod archive
Alystrasz Aug 25, 2023
af92411
feat: compute mod files extraction destination
Alystrasz Aug 25, 2023
8a2e3ec
feat: create directories while extracting mod archive
Alystrasz Aug 25, 2023
85f416a
fix: do not stop mod archive extraction when trying to create an alre…
Alystrasz Aug 25, 2023
07e4c40
build: disable LZMA compression in minizip
Alystrasz Aug 26, 2023
b22b06f
feat: ensure files are present in zip archive
Alystrasz Aug 26, 2023
b631df8
feat: add file creation skeleton
Alystrasz Aug 29, 2023
1e5878a
feat: open zip file to prepare its extraction
Alystrasz Aug 29, 2023
b3b6ca4
style: apply clang format
Alystrasz Aug 29, 2023
53e33ef
refactor: reorganize debug prints
Alystrasz Aug 30, 2023
8e0a766
feat: enforce Thunderstore format for remote mods
Alystrasz Aug 30, 2023
9b68db0
style: apply clang format
Alystrasz Aug 31, 2023
0c75bfc
style: use camelCase everywhere
Alystrasz Aug 31, 2023
741c9f5
style: apply clang format
Alystrasz Aug 31, 2023
79d0812
refactor: set IsModAuthorized function as private and remove associat…
Alystrasz Aug 31, 2023
ff40df5
feat: add a flag to bypass mod verification process
Alystrasz Sep 4, 2023
efb3d89
fix: rename flag in header
Alystrasz Sep 4, 2023
3b0c502
feat: remove mod archive after download
Alystrasz Sep 4, 2023
a3d87f2
fix: remove mod archive when archive checksum verification fails
Alystrasz Sep 4, 2023
e737d38
feat: add a clean subroutine to the ExtractMod function
Alystrasz Sep 4, 2023
c64aaab
fix: disable curl verbose mode
Alystrasz Sep 4, 2023
6f5c2f2
style: apply clang format
Alystrasz Sep 4, 2023
24bb06e
fix: fail mod fetching HTTP request if status >= 400
Alystrasz Sep 5, 2023
ea3a10a
fix: mod archive fetching failure is now tolerated
Alystrasz Sep 7, 2023
82427b8
feat: add IsModLegit function skeleton
Alystrasz Sep 7, 2023
c4c9c41
style: apply clang format
Alystrasz Sep 7, 2023
3452aa3
Merge branch 'feat/auto-dl' of github.com:Alystrasz/NorthstarLauncher…
Alystrasz Sep 8, 2023
61efbc2
fix: do not try to always read bufferSize bytes
Alystrasz Sep 10, 2023
1e6c04e
fix: convert hash to string using bytes raw values
Alystrasz Sep 10, 2023
15043b6
style: move files in CMakeLists.txt
Alystrasz Sep 10, 2023
5576aa9
refactor: pass string views to FetchModFromDistantStore
Alystrasz Sep 11, 2023
471baf7
refactor: pass string views to IsModAuthorized
Alystrasz Sep 11, 2023
d6d2630
refactor: pass string view to IsModLegit
Alystrasz Sep 11, 2023
e8bbfe8
style: update NorthstarDLL/CMakeLists.txt
Alystrasz Sep 14, 2023
6d094c1
style: replace tabs with spaces in NorthstarDLL/CMakeLists.txt
Alystrasz Sep 14, 2023
1196fe1
Merge branch 'main' into feat/auto-dl
Alystrasz Sep 14, 2023
1f35a65
Merge branch 'main' into feat/auto-dl
Alystrasz Sep 14, 2023
b915456
Merge branch 'main' into feat/auto-dl
Alystrasz Sep 24, 2023
1f3d954
style: remove typo
Alystrasz Sep 24, 2023
377ca2c
style: rewrite else case
Alystrasz Sep 24, 2023
7b38a4b
style: use PascalCase for function names
Alystrasz Sep 24, 2023
99127c1
refactor: initialize bufferSize on declaration
Alystrasz Sep 24, 2023
915583d
refactor: bufferSize is const
Alystrasz Sep 24, 2023
4f2394e
refactor: move modState initialization to header
Alystrasz Sep 25, 2023
9cebe1d
Merge branch 'R2Northstar:main' into feat/auto-dl
Alystrasz Oct 6, 2023
2626848
Merge branch 'R2Northstar:main' into feat/auto-dl
Alystrasz Oct 11, 2023
6a2af4b
Merge branch 'main' into feat/auto-dl
Alystrasz Oct 12, 2023
8480576
fix: check archive information status
Alystrasz Oct 13, 2023
059bb6e
fix: abort mod extraction if information cannot be retrieved from
Alystrasz Oct 13, 2023
fbb6af4
Merge branch 'main' into feat/auto-dl
Alystrasz Oct 15, 2023
4dbaa47
refactor: use GetArray method to read mod versions
Alystrasz Oct 15, 2023
16edd06
Merge branch 'main' into feat/auto-dl
Alystrasz Oct 15, 2023
7548c47
fix: use mod name as dependency prefix with bypass flag
Alystrasz Oct 15, 2023
8a1792c
feat: add a command line arg to specify verified mods list URL
Alystrasz Oct 16, 2023
b281073
Merge branch 'main' into feat/auto-dl
Alystrasz Oct 16, 2023
bd350b5
refactor: remove useless GetModInstallProgress method signature
Alystrasz Oct 16, 2023
ee3d3ff
refactor: CancelDownload method takes no input argument
Alystrasz Oct 16, 2023
606d752
Merge branch 'R2Northstar:main' into feat/auto-dl
Alystrasz Oct 23, 2023
1990e7f
Merge branch 'main' into feat/auto-dl
Alystrasz Oct 23, 2023
e6cc083
Merge branch 'main' into feat/auto-dl
GeckoEidechse Nov 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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