Commit graph

510 commits

Author SHA1 Message Date
Jack
af1df846a3
Export Northstar version number in DLL (#542)
Export version number in `Northstar.dll`
2023-09-15 01:42:21 +02:00
F1F7Y
1979247175
Fix CSquirrelVM::Init hook in server.dll (#544)
Fix typo in offset
2023-09-15 00:36:25 +02:00
Rémy Raes
e51d345a20
feat: Enforce Thunderstore format for remote mods (#535)
* feat: enforce Thunderstore format for remote mods

* refactor: remove remote mods directory from "classic" mod loading

---------

Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
2023-09-15 00:31:37 +02:00
Cyn
a27368df36
Linux build instructions in BUILD.md (#531)
Adds Linux build instructions and corresponding Docker file.
2023-09-14 21:11:59 +02:00
Jan
07e76e3a8e
Support DLLs in Profile from wsock32 proxy (#527)
* Copy LoadNorthstar from NorthstarLauncher to wsock proxy
* add missing bits
2023-08-05 18:56:33 +02:00
Jan
300521638f
Turn VPKData into a opaque struct (#510) 2023-07-29 23:02:38 +02:00
Jan
0af8c500ae
Validate package pattern before checking for plugins (#525)
Adds missing validation check to ensure that the package folder the plugin is included in matches the `AUTHOR-MOD-VERSION` pattern.
2023-07-29 22:48:24 +02:00
Jan
e3f2c4c662
Warn about the package dir, not the mod dir (#526) 2023-07-29 22:17:18 +02:00
F1F7Y
82bff57d16
Remove pch.cpp and all #include "pch.h" occurrences (#519)
With the move to cmake there is no need for the `pch.cpp` files as it generates them automatically.
Also removes leftover `#include "pch.h"` occurrences
2023-07-28 23:26:13 +02:00
F1F7Y
24400184f3
Make sure packages dir exists when loading plugins (#523)
Create packages directory in `PluginManager::LoadPlugins()` to avoid crashing when trying to read non-existent directory
2023-07-28 22:28:59 +02:00
F1F7Y
e742eb35cc
Fix plugins not loading (#522)
Fixes a regression introduced in #513
2023-07-28 16:12:31 +02:00
Jan
a65cbeacfb
Add support for loading plugins from Thunderstore packages (#513)
Adds support for loading plugins from `packages` directory which was missing from the original PR that introduced the `packages` directory.
2023-07-27 22:55:42 +02:00
Jan
2e6c1cffab
Replace forward slashes with windows path separators (#514)
Replace forward slashes with backward slashes in some string constants to make things more consistent.
2023-07-25 16:33:05 +02:00
Jan
ddb4670354
Remove Vector3 Constructor (#494)
- Packing was enabled because the compiler may add padding which we don't want.
- Constructors were removed because they were either rather primitive or broken (the `pRawFloats` one).
- Use of constructor was replaced with a simple cast, which works just as well.
2023-07-25 16:31:02 +02:00
EladNLG
cf8b267d31
Safe I/O 2 - Electric Boogaloo! (#404)
* Safe I/O initial commit

* Formatting

* Formatting 2

* God help us all.

* fix diffs part 1

* fix diffs 2

* Fix invalid filter file

* Update NorthstarLauncher.vcxproj

* Remove newline at EOF

* fix the damn thing

* God help the diffs

* diff hate

* diff hate the 2nd

* Add comments since this code is unreadable

Now, this code may look readable, but I barely understand what I did here myself.

* Remove char limit and file definitions

* Fix build

* organization stuff

* Fix build

* More funcs, more stuff

* format fix

* oops, this is wrong.

* fix a thing

* Add max folder size (250MB) and add getallfiles

* Fix build also size cap

* reduce max folder size to 50MB

* he forgor

* i give up

* aync edition?????

* Fix max size bypass

* fix it

* Remove logs

* Add max folder size launch arg

* boop

* FUCK SHIT

* FUCKKKKKKKKKKK

* Fix build

* Fix crash

* Fix error FINAL!!!

* fix scriptjson.h not being found

* fix scriptjson.h not appearing correctly

* shit diffself

* format fix

* Fix indentation (thank you vscode)

* Fix indentation again

* adadasa

* shit diffself

adadasa

Fix indentation (thank you vscode)

Fix indentation again

* format fix

* Revert "shit diffself"

This reverts commit b49a62b5b3.

* Revert "Merge branch 'safe-io-rewrite' of https://github.com/EladNLG/NorthstarLauncher into safe-io-rewrite"

This reverts commit 761eb8a1cb, reversing
changes made to 65549b2f79.

* Fix the diff finally

* more diff fixes

* Fix more diffs

* Allow non-ascii characters that aren't NUL

* format fix :(

* this is untested and I don't wanna update the safe i/o test thing

* fix build :(

* fix mayhaps?

* fix build

* Fix lotsa stuff :D

* FIxed :D

* Rewrite error messages, rename CheckFileName to IsPathSafe

* Shout out to clang-format!

* oops, wrong error message :3

* SHOUT OUT TO CLANG-FORMAT!!!

* Revert "SHOUT OUT TO CLANG-FORMAT!!!"

This reverts commit c536384073.

* :(

* oop

* Add failure callback (launcher)

* unnecessary comment

* holy shit format fix
boooooo. BOOOOOO!

* restrict path to ASCII

* Fix ascii check I hate you all

* reformat

* Clang-format my beloved :)

* Move the thing

* Apply suggestions from code review

Co-authored-by: Rémy Raes <contact@remyraes.com>

* clang-format no like code suggestions :(

* name change

* doc'd

* - Replace the mutex map with a single mutex for all file actions
- Fix Load calls sometimes failing and not calling NSHandleLoadResult
- Add NSGetTotalSpaceRemaining which checks how much space a mod has, in KB
- Add contstant MAX_FOLDER_SIZE which holds the maximum save folder size, in KB

* add safe-io stuff to cmake

* surrounds IsPathSafe with a try/catch

---------

Co-authored-by: Rémy Raes <contact@remyraes.com>
Co-authored-by: uniboi <kami.0.katze@gmail.com>
2023-07-22 21:02:22 +01:00
Jan
d3fb76f889
Replace vendored libcurl and minhook with submodules (#500)
* Replace vendored libcurl and minhook with submodules
* Add cmake utility for checking submodules and initializing them
* Update build instructions to use Git
2023-07-22 02:22:26 +02:00
F1F7Y
9841d698f8
Search for Northstar.dll in profile directory (#451)
Looks for `Northstar.dll` in the specified profile directory using `-profile=<dir>`. If it doesn't exist it defaults to the `Northstar.dll` in the root directory.

This allows for having a separate DLL for each profile.
2023-07-17 20:26:59 +02:00
Jan
06825e3096
Add OS, Wine and Proton logging (#502)
Adds logging for OS, Wine, and Proton versions.
2023-07-16 22:05:37 +02:00
Jan
24248c7419
CMAKE: set build type if not previously set, turn bin dir message into status (#497) 2023-07-16 21:43:26 +02:00
GeckoEidechse
0309af134e
Add support for loading Thunderstore mods natively (#503)
Allows for loading Thunderstore mods directly from a separate directory called `packages`.
2023-07-16 21:23:50 +02:00
Jack
9f9e3a906f
Improve logging for mods (#445)
- Removes the log spam of "changing mod search path"
- Logs mods as they are loaded, alongside their ConVars, Scripts, ConCommands, etc.
- Warns in the console about errors in the mod.json instead of silently skipping things
2023-07-07 17:11:43 +02:00
F1F7Y
513705e33f
Memory class renaming (#469)
- Renames `MemoryAddress` to `CMemoryAddress`
- Renames `CMemoryAddress::As` to `CMemoryAddress::RCast`
2023-07-07 12:28:35 +02:00
GeckoEidechse
043fb83d8f
Improve ShouldLoadNorthstar() logic readability (#499) 2023-07-02 09:54:01 -04:00
F1F7Y
10cb6e53ac
Basic mods blacklisting (#474) 2023-07-02 13:24:41 +02:00
GeckoEidechse
e4de2f3145
Update gitattributes vendored code path (#496) 2023-07-01 20:06:37 -04:00
F1F7Y
71f0ee98cc
Reorganize third-party dependencies into thirdparty directory (#491)
* rename `include` to `thirdparty`
* remove duplicate minhook in wsock32
* move minhook into its own directory
* move openssl lib into separate directories
2023-06-29 21:10:24 -04:00
Jan
efd907105c
Code cleanup (#478)
* turn implicit type casts into standard compliant explicit type casts
* correct includes and library names
* correct implicit use of std-namespaced functions
* turn incomplete virtual implementations into pure virtuals (this also follows what the Source SDK tier0 header does)
* define SqRecurseArgs ahead of implementation to fix templating problems
* switch out removed getentity with getthisentity
* fix calls to curl_easy_escape with wrong types
* replace winapi-specific function with std starts_with function
* format squirrel header
2023-06-28 23:22:33 -04:00
Jan
b5c4e4e7ed
Replace dependent names with explicit template definition (#490) 2023-06-28 23:19:34 -04:00
F1F7Y
2bd882e9aa
Add RelWithDebInfo configuration (#483) 2023-06-28 23:16:30 -04:00
Jan
d7f8dd7612
Fix const pointer const (#488) 2023-06-28 23:12:19 -04:00
Jan
d50739ac01
Remove pragma once from source file (#487) 2023-06-28 23:11:46 -04:00
Jan
de970c559c
Use correctly typed values for variables (#486) 2023-06-28 23:11:30 -04:00
Jan
58a2324828
Cast types in MAKEHOOK macro to follow C++ Standard (#489) 2023-06-28 23:10:08 -04:00
F1F7Y
23594f24d3
Update release action to match push action (#476) 2023-06-22 21:56:40 +02:00
F1F7Y
89996405ee
Move to cmake (#467)
Moves the entire project to cmake as the build system
2023-06-22 11:47:46 +02:00
cat_or_not
9cf27a61fd
Restore -noplugins argument (#459) 2023-06-07 18:57:19 -04:00
F1F7Y
6fe1805914
Fix maps * command, expose to squirrel (#442) 2023-06-07 18:54:53 -04:00
cat_or_not
6857b93f62
Support loading plugins from subdirs (#460)
Support loading plugins from subdirs to allow for better organising plugins and easier mod-manager installation
2023-05-05 18:20:51 +02:00
uniboi
6fa48abd33
Use structs for the Script Server Browser (#453)
* fix vector garbage data

* use structs for script server browser

* use sq struct api wrappers

* use sqfloat return type for getvector

* use const references for access

* move fn to make the diff more readable (hopefully)
2023-04-27 14:55:06 +02:00
cat_or_not
c50441f67a
Fix initscript issue (#457)
Fix initscript issue that prevented Northstar from being run without any mods enabled/installed.
2023-04-23 13:10:50 +02:00
pg9182
7c2b56b1e9
Replace set-output in GitHub Actions workflows (#452)
`set-output` is being deprecated as per https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-04-22 02:34:48 +02:00
pg9182
10b6839d9c
Remove leftover LoadPlugins declaration (#449)
Doesn't exist since 450d0b1ed4 (#343).
2023-04-19 18:06:43 -04:00
pg9182
34af81a7d8
Fix parsing string ConVar/ConCommand.Flags from mod.json (#450)
Fix parsing string ConVar/ConCommand.Flags from mod.json

The ParseConVarFlagsString function introduced in 64100065b5 (#373)
is utterly broken. It only parses the first flag, logs misleading
warnings, has an undefined return value in some codepaths, and is
somewhat convoluted.

Luckily, this doesn't appear to affect most (if not all) existing mods,
as they all seem to be using integer values for Flags, which is
taken as-is.

https://github.com/search?q=path%3A**%2Fmod.json+ConVars+Flags&type=code
2023-04-19 18:05:59 -04:00
Glacir
e1dcf7a6b6
Fix incorrect script ConCommand argc (#446) 2023-04-19 09:43:46 -04:00
EladNLG
4e341f156b
Fix DecodeJSON fatalParseErrors param (#443)
Previously, DecodeJSON would log a warning and swallow the error silently, even if the second argument (fatalParseErrors) was true (default is false).
2023-04-18 19:28:07 -04:00
uniboi
ca45fcc4c5
Fix getvector returning garbage data (#448)
* fix vector garbage data
* change typedef to use IDA's types
2023-04-18 18:49:46 -04:00
pg9182
c173e8fad8 Set default server auth failure reason
Not all error paths set it.
2023-04-17 14:53:23 -04:00
pg9182
009482fcb8 Use detailed master server error messages when available
The error.msg field has always been around, but we never used it.
2023-04-17 14:53:23 -04:00
pg9182
b1aed577e4 Remove httplib 2023-04-17 14:50:10 -04:00
pg9182
87bd14cbe8 Replace HTTP auth server with Atlas connectionless packet 2023-04-17 14:50:10 -04:00