123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- #pragma once
- #include <AzCore/PlatformDef.h>
- #include <AzCore/Debug/Trace.h>
- #include <AzCore/IO/SystemFile.h>
- #include <AzCore/Memory/Memory.h>
- #include <CryCommon/platform.h>
- struct IOutputPrintSink;
- #define COMMAND_LINE_ARG_COUNT_LIMIT (AZ_COMMAND_LINE_LEN+1) / 2
-
- namespace O3DELauncher
- {
- struct PlatformMainInfo
- {
- typedef bool (*ResourceLimitUpdater)();
- typedef void (*OnPostApplicationStart)();
- PlatformMainInfo() = default;
-
-
-
-
- bool CopyCommandLine(int argc, char** argv);
- bool AddArgument(const char* arg);
- char m_commandLine[AZ_COMMAND_LINE_LEN] = { 0 };
- size_t m_commandLineLen = 0;
-
- char m_commandLineArgBuffer[AZ_COMMAND_LINE_LEN] = { 0 };
- size_t m_nextCommandLineArgInsertPoint = 0;
- int m_argC = 0;
- char* m_argV[COMMAND_LINE_ARG_COUNT_LIMIT] = { nullptr };
- ResourceLimitUpdater m_updateResourceLimits = nullptr;
- OnPostApplicationStart m_onPostAppStart = nullptr;
- const char* m_appResourcesPath = ".";
- const char* m_appWriteStoragePath = nullptr;
- const char* m_additionalVfsResolution = nullptr;
- void* m_window = nullptr;
- void* m_instance = nullptr;
- IOutputPrintSink* m_printSink = nullptr;
- };
- enum class ReturnCode : unsigned char
- {
- Success = 0,
- ErrExePath,
- ErrCommandLine,
- ErrValidation,
- ErrResourceLimit,
- ErrAppDescriptor,
- ErrCrySystemLib,
- ErrCrySystemInterface,
- ErrCryEnvironment,
- ErrAssetProccessor,
- ErrUnitTestFailure,
- ErrUnitTestNotSupported,
- };
- const char* GetReturnCodeString(ReturnCode code);
-
- ReturnCode Run(const PlatformMainInfo& mainInfo = PlatformMainInfo());
-
-
-
-
- AZStd::string_view GetProjectName();
-
- AZStd::string_view GetProjectPath();
-
- AZStd::string_view GetBuildTargetName();
-
- bool IsGenericLauncher();
-
-
-
-
- bool WaitForAssetProcessorConnect();
-
- bool IsDedicatedServer();
-
- const char* GetLogFilename();
-
-
- const char* GetLauncherTypeSpecialization();
- }
|