Merge branch 'master' of git://github.com/AlericInglewood/SingularityViewer
This commit is contained in:
@@ -174,6 +174,8 @@ bool checkExceptionHandler()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool self_test = false;
|
||||||
|
|
||||||
// If this application on Windows platform is a console application, a console is always
|
// If this application on Windows platform is a console application, a console is always
|
||||||
// created which is bad. Making it a Windows "application" via CMake settings but not
|
// created which is bad. Making it a Windows "application" via CMake settings but not
|
||||||
// adding any code to explicitly create windows does the right thing.
|
// adding any code to explicitly create windows does the right thing.
|
||||||
@@ -220,22 +222,30 @@ int main(int argc, char **argv)
|
|||||||
LL_ERRS("slplugin") << "usage: " << argv[0] << " launcher_port" << LL_ENDL;
|
LL_ERRS("slplugin") << "usage: " << argv[0] << " launcher_port" << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 port = 0;
|
U32 port = 61916; // Test port.
|
||||||
if(!LLStringUtil::convertToU32(argv[1], port))
|
if (strcmp(argv[1], "TESTPLUGIN") == 0)
|
||||||
|
{
|
||||||
|
std::cout << "Running self test..." << std::endl;
|
||||||
|
self_test = true;
|
||||||
|
}
|
||||||
|
else if (!LLStringUtil::convertToU32(argv[1], port))
|
||||||
{
|
{
|
||||||
LL_ERRS("slplugin") << "port number must be numeric" << LL_ENDL;
|
LL_ERRS("slplugin") << "port number must be numeric" << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Catch signals that most kinds of crashes will generate, and exit cleanly so the system crash dialog isn't shown.
|
if (!self_test)
|
||||||
signal(SIGILL, &crash_handler); // illegal instruction
|
{
|
||||||
|
// Catch signals that most kinds of crashes will generate, and exit cleanly so the system crash dialog isn't shown.
|
||||||
|
signal(SIGILL, &crash_handler); // illegal instruction
|
||||||
# if LL_DARWIN
|
# if LL_DARWIN
|
||||||
signal(SIGEMT, &crash_handler); // emulate instruction executed
|
signal(SIGEMT, &crash_handler); // emulate instruction executed
|
||||||
# endif // LL_DARWIN
|
# endif // LL_DARWIN
|
||||||
signal(SIGFPE, &crash_handler); // floating-point exception
|
signal(SIGFPE, &crash_handler); // floating-point exception
|
||||||
signal(SIGBUS, &crash_handler); // bus error
|
signal(SIGBUS, &crash_handler); // bus error
|
||||||
signal(SIGSEGV, &crash_handler); // segmentation violation
|
signal(SIGSEGV, &crash_handler); // segmentation violation
|
||||||
signal(SIGSYS, &crash_handler); // non-existent system call invoked
|
signal(SIGSYS, &crash_handler); // non-existent system call invoked
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#if LL_DARWIN
|
#if LL_DARWIN
|
||||||
setupCocoa();
|
setupCocoa();
|
||||||
@@ -247,7 +257,7 @@ int main(int argc, char **argv)
|
|||||||
plugin->init(port);
|
plugin->init(port);
|
||||||
|
|
||||||
#if LL_DARWIN
|
#if LL_DARWIN
|
||||||
deleteAutoReleasePool();
|
deleteAutoReleasePool();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LLTimer timer;
|
LLTimer timer;
|
||||||
|
|||||||
@@ -148,7 +148,13 @@ else
|
|||||||
SL_ENV+='LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH"'
|
SL_ENV+='LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH"'
|
||||||
fi
|
fi
|
||||||
export SL_CMD='$LL_WRAPPER bin/$VIEWER_BINARY'
|
export SL_CMD='$LL_WRAPPER bin/$VIEWER_BINARY'
|
||||||
export SL_OPT="`cat gridargs.dat` $@"
|
|
||||||
|
if [ -n "$AITESTPLUGIN" ]; then
|
||||||
|
SL_CMD="$LL_WRAPPER bin/SLPlugin"
|
||||||
|
SL_OPT="TESTPLUGIN"
|
||||||
|
else
|
||||||
|
SL_OPT="`cat gridargs.dat` $@"
|
||||||
|
fi
|
||||||
|
|
||||||
# Run the program.
|
# Run the program.
|
||||||
eval ${SL_ENV} ${SL_CMD} ${SL_OPT} || LL_RUN_ERR=runerr
|
eval ${SL_ENV} ${SL_CMD} ${SL_OPT} || LL_RUN_ERR=runerr
|
||||||
|
|||||||
Reference in New Issue
Block a user