-
-
Notifications
You must be signed in to change notification settings - Fork 80
EmbeddingNPLRuntime
Li, Xizhi edited this page Nov 23, 2016
·
6 revisions
NPLRuntime comes with a general purpose executable for launching NPL based applications. This is the standard usage of NPLRuntime.
However, some client application may prefer embedding NPLRuntime in their own executable file, or even as child window of their own application. This is possible via NPLRuntime dll or (paraengineclient.dll
) under windows platform.
Please see https://github.com/LiXizhi/ParaCraftSDK/blob/master/samples/MyAppExe/MyApp.cpp for details.
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR lpCmdLine, INT)
{
std::string sAppCmdLine;
if (lpCmdLine)
sAppCmdLine = lpCmdLine;
// TODO: add your custom command line here
sAppCmdLine += " mc=true noupdate=true";
CMyApp myApp(hInst);
return myApp.Run(0, sAppCmdLine.c_str());
}
To build the application, you must download NPLRuntime source code (for header files) and set CMAKE include directory properly.
- Download the sample at https://github.com/LiXizhi/ParaCraftSDK/blob/master/samples/MyAppExe
Download Paracraft | ParacraftSDK | copyright by tatfook 2016 | upload image