2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-18 03:02:07 +00:00

chore: add ModMan args

This commit is contained in:
Jan Laupetin
2025-10-11 14:15:04 +01:00
parent 4911cfa4c6
commit 2037cf3258
3 changed files with 138 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
#include "Context/ModManContext.h"
#include "GitVersion.h"
#include "ModManArgs.h"
#include "Web/Binds/Binds.h"
#include "Web/Platform/AssetHandler.h"
#include "Web/UiCommunication.h"
@@ -94,9 +95,13 @@ namespace
} // namespace
#ifdef _WIN32
#define MODMAN_ARGC __argc
#define MODMAN_ARGV const_cast<const char**>(__argv)
int WINAPI WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpCmdLine*/, int /*nCmdShow*/)
#else
int main()
#define MODMAN_ARGC argc
#define MODMAN_ARGV argv
int main(int argc, const char** argv)
#endif
{
#ifdef _WIN32
@@ -114,6 +119,14 @@ int main()
}
#endif
ModManArgs args;
auto shouldContinue = true;
if (!args.ParseArgs(MODMAN_ARGC, MODMAN_ARGV, shouldContinue))
return false;
if (!shouldContinue)
return true;
con::info("Starting ModMan " GIT_VERSION);
ModManContext::Get().Startup();