mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 03:09:13 +00:00
Using CCmdParser here is ridiculously excessive.
This commit is contained in:
@ -14,7 +14,6 @@ target_link_libraries(plCrashHandler CoreLib)
|
|||||||
target_link_libraries(plCrashHandler pfCrashHandler)
|
target_link_libraries(plCrashHandler pfCrashHandler)
|
||||||
target_link_libraries(plCrashHandler plFile)
|
target_link_libraries(plCrashHandler plFile)
|
||||||
target_link_libraries(plCrashHandler pnProduct)
|
target_link_libraries(plCrashHandler pnProduct)
|
||||||
target_link_libraries(plCrashHandler pnUtils)
|
|
||||||
|
|
||||||
# Platform specific libs
|
# Platform specific libs
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
@ -42,31 +42,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
|
|
||||||
#include "HeadSpin.h"
|
#include "HeadSpin.h"
|
||||||
#include "pfCrashHandler/plCrashSrv.h"
|
#include "pfCrashHandler/plCrashSrv.h"
|
||||||
#include "pnUtils/pnUtils.h"
|
|
||||||
|
|
||||||
enum
|
int main(int argc, const char* argv[])
|
||||||
{
|
|
||||||
kArgMemFile
|
|
||||||
};
|
|
||||||
|
|
||||||
static const CmdArgDef s_cmdLineArgs[] =
|
|
||||||
{
|
|
||||||
{ (kCmdArgRequired | kCmdTypeString), nil, kArgMemFile },
|
|
||||||
};
|
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
|
||||||
{
|
{
|
||||||
// Parse command line arguments. We MUST have the file argument
|
// Parse command line arguments. We MUST have the file argument
|
||||||
CCmdParser cmdParser(s_cmdLineArgs, arrsize(s_cmdLineArgs));
|
if (argc != 2)
|
||||||
if (!cmdParser.Parse())
|
|
||||||
{
|
{
|
||||||
hsMessageBox("You should never run this manually.", "Error", hsMessageBoxNormal, hsMessageBoxIconExclamation);
|
hsMessageBox("You should never run this manually.", "Error", hsMessageBoxNormal, hsMessageBoxIconExclamation);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* file = hsWStringToString(cmdParser.GetString(kArgMemFile));
|
plCrashSrv srv(argv[1]);
|
||||||
plCrashSrv srv(file);
|
|
||||||
delete[] file;
|
|
||||||
srv.HandleCrash();
|
srv.HandleCrash();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user