mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
7a5146ea74
Signed-off-by: R4SAS <r4sas@i2pmail.org>
45 lines
625 B
C++
45 lines
625 B
C++
#include <stdlib.h>
|
|
#include "Daemon.h"
|
|
|
|
#if defined(QT_GUI_LIB)
|
|
namespace i2p
|
|
{
|
|
namespace qt
|
|
{
|
|
int RunQT (int argc, char* argv[]);
|
|
}
|
|
}
|
|
|
|
int main( int argc, char* argv[] )
|
|
{
|
|
return i2p::qt::RunQT (argc, argv);
|
|
}
|
|
#else
|
|
int main( int argc, char* argv[] )
|
|
{
|
|
if (Daemon.init(argc, argv))
|
|
{
|
|
if (Daemon.start())
|
|
Daemon.run ();
|
|
else
|
|
return EXIT_FAILURE;
|
|
Daemon.stop();
|
|
}
|
|
return EXIT_SUCCESS;
|
|
}
|
|
#endif
|
|
|
|
#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
|