main.cpp

Go to the documentation of this file.
00001 #include "lugre_prefix.h"
00002 #include "lugre_robstring.h"
00003 #include "lugre_main.h"
00004 #ifdef WIN32
00005 #define WIN32_LEAN_AND_MEAN
00006 #include "windows.h"
00007 #endif
00008 
00009 using namespace Lugre;
00010 
00011 void    SFZ_RegisterLuaPlugin   ();
00012 
00013 // #define USE_WINMAIN
00014 
00015 #ifdef USE_WINMAIN
00016 INT WINAPI  WinMain     (HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR strCmdLine,int nCmdShow) { // nCmdShow : show state of window
00017 #else
00018 int         main        (int argc, char* argv[]) {
00019 #endif
00020     
00021     
00022     
00023     printf("MAIN_WORKING_DIR=%s\n",(const char*)MAIN_WORKING_DIR);
00024     
00025     std::string s;
00026     s += "If this error remains after running the updater and you think this is a bug\n";
00027     s += "please check the BugTracker at http://sfz.schattenkind.net/\n";
00028     s += "and report it if it is not already known.\n";
00029     s += "Please also append the logfile in stacktrace.log to your bugreport.";
00030     Lugre_SetCrashText(s.c_str());
00031     
00032     // create a unix-like commandline and show console in win
00033     #ifdef USE_WINMAIN
00034     int argc = 0;
00035     char **argv = Lugre_ParseWinCommandLine(argc);
00036     Lugre_ShowWin32Console();
00037     #endif
00038     
00039     // register plugins
00040     
00041     SFZ_RegisterLuaPlugin();
00042     
00043     // start mainloop
00044     
00045     Lugre_Run(argc,argv);
00046     
00047     return 0;
00048 }

Generated on Wed May 23 06:00:15 2012 for cpp by  doxygen 1.5.6