GUI-less build target bitcoind that links to wxBase and shouldn't need GTK,

split init and shutdown from ui.cpp into init.cpp,
support wxUSE_GUI=0
-- version 0.2.7
This commit is contained in:
s_nakamoto
2010-02-25 21:55:27 +00:00
parent 30158c77e9
commit 5eede9d4d9
13 changed files with 819 additions and 775 deletions

10
rpc.cpp
View File

@@ -676,18 +676,18 @@ int CommandLineRPC(int argc, char *argv[])
string strResult = (result.type() == str_type ? result.get_str() : write_string(result, true));
if (result.type() != null_type)
{
if (fWindows)
if (fWindows && fGUI)
// Windows GUI apps can't print to command line,
// so for now settle for a message box yuck
wxMessageBox(strResult.c_str(), "Bitcoin", wxOK);
// so settle for a message box yuck
MyMessageBox(strResult.c_str(), "Bitcoin", wxOK);
else
fprintf(stdout, "%s\n", strResult.c_str());
}
return 0;
}
catch (std::exception& e) {
if (fWindows)
wxMessageBox(strprintf("error: %s\n", e.what()).c_str(), "Bitcoin", wxOK);
if (fWindows && fGUI)
MyMessageBox(strprintf("error: %s\n", e.what()).c_str(), "Bitcoin", wxOK);
else
fprintf(stderr, "error: %s\n", e.what());
} catch (...) {