2016-06-17 15:25:28 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include "Daemon.h"
|
2014-02-05 00:28:18 +00:00
|
|
|
|
2016-06-17 15:25:28 +00:00
|
|
|
#if defined(QT_GUI_LIB)
|
|
|
|
|
|
|
|
namespace i2p
|
|
|
|
{
|
|
|
|
namespace qt
|
|
|
|
{
|
|
|
|
int RunQT (int argc, char* argv[]);
|
|
|
|
}
|
|
|
|
}
|
2014-01-30 00:56:48 +00:00
|
|
|
int main( int argc, char* argv[] )
|
2013-12-10 13:05:42 +00:00
|
|
|
{
|
2016-06-17 15:25:28 +00:00
|
|
|
return i2p::qt::RunQT (argc, argv);
|
|
|
|
}
|
|
|
|
|
2016-06-17 13:49:49 +00:00
|
|
|
#else
|
2016-06-17 15:25:28 +00:00
|
|
|
int main( int argc, char* argv[] )
|
|
|
|
{
|
2016-06-17 13:49:49 +00:00
|
|
|
if (Daemon.init(argc, argv))
|
2016-03-10 06:12:46 +00:00
|
|
|
{
|
|
|
|
if (Daemon.start())
|
|
|
|
Daemon.run ();
|
|
|
|
Daemon.stop();
|
|
|
|
}
|
2014-12-10 17:10:07 +00:00
|
|
|
return EXIT_SUCCESS;
|
2013-12-10 13:05:42 +00:00
|
|
|
}
|
2016-06-17 15:25:28 +00:00
|
|
|
#endif
|
2015-11-03 14:15:49 +00:00
|
|
|
|
2016-03-10 06:12:46 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
int CALLBACK WinMain(
|
|
|
|
_In_ HINSTANCE hInstance,
|
|
|
|
_In_ HINSTANCE hPrevInstance,
|
|
|
|
_In_ LPSTR lpCmdLine,
|
|
|
|
_In_ int nCmdShow
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return main(__argc, __argv);
|
|
|
|
}
|
|
|
|
#endif
|