Merge remote branch 'upstream/master'

This commit is contained in:
Pieter Wuille 2011-06-02 16:17:37 +02:00
commit 7c05877df2
5 changed files with 63 additions and 22 deletions

View file

@ -28,7 +28,7 @@ Libraries you need to download separately and build:
default path download default path download
wxWidgets \wxwidgets-2.9.1-mgw http://www.wxwidgets.org/downloads/ wxWidgets \wxwidgets-2.9.1-mgw http://www.wxwidgets.org/downloads/
OpenSSL \openssl-1.0.0c-mgw http://www.openssl.org/source/ OpenSSL \openssl-1.0.0d-mgw http://www.openssl.org/source/
Berkeley DB \db-4.7.25.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html Berkeley DB \db-4.7.25.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html
Boost \boost-1.43.0-mgw http://www.boost.org/users/download/ Boost \boost-1.43.0-mgw http://www.boost.org/users/download/
miniupnpc \upnpc-exe-win32-20110215 http://miniupnp.tuxfamily.org/files/ miniupnpc \upnpc-exe-win32-20110215 http://miniupnp.tuxfamily.org/files/
@ -42,7 +42,7 @@ miniupnpc New (3-clause) BSD license
Versions used in this release: Versions used in this release:
wxWidgets 2.9.1 wxWidgets 2.9.1
OpenSSL 1.0.0c OpenSSL 1.0.0d
Berkeley DB 4.7.25.NC Berkeley DB 4.7.25.NC
Boost 1.43.0 Boost 1.43.0
miniupnpc 1.5-20110215 miniupnpc 1.5-20110215
@ -66,15 +66,10 @@ MSYS shell:
un-tar sources with MSYS 'tar xfz' to avoid issue with symlinks (OpenSSL ticket 2377) un-tar sources with MSYS 'tar xfz' to avoid issue with symlinks (OpenSSL ticket 2377)
change 'MAKE' env. variable from 'C:\MinGW32\bin\mingw32-make.exe' to '/c/MinGW32/bin/mingw32-make.exe' change 'MAKE' env. variable from 'C:\MinGW32\bin\mingw32-make.exe' to '/c/MinGW32/bin/mingw32-make.exe'
cd /c/openssl-1.0.0c-mgw cd /c/openssl-1.0.0d-mgw
./config ./config
make make
perl util/mkdef.pl 32 libeay enable-static-engine > libeay32.def
dllwrap --dllname libeay32.dll --output-lib libeay32.a --def libeay32.def libcrypto.a -lws2_32 -lgdi32
after that openssl libeay is in main source dir (openssl-1.0.0c-mgw)
Berkeley DB Berkeley DB
----------- -----------
MSYS shell: MSYS shell:

View file

@ -60,7 +60,6 @@ Section -Main SEC0000
SetOutPath $INSTDIR SetOutPath $INSTDIR
SetOverwrite on SetOverwrite on
File ../src/bitcoin.exe File ../src/bitcoin.exe
File ../../openssl-1.0.0d/libeay32.dll
File /oname=license.txt ../COPYING File /oname=license.txt ../COPYING
File /oname=readme.txt ../doc/README_windows.txt File /oname=readme.txt ../doc/README_windows.txt
SetOutPath $INSTDIR\daemon SetOutPath $INSTDIR\daemon
@ -108,7 +107,6 @@ done${UNSECTION_ID}:
# Uninstaller sections # Uninstaller sections
Section /o -un.Main UNSEC0000 Section /o -un.Main UNSEC0000
Delete /REBOOTOK $INSTDIR\bitcoin.exe Delete /REBOOTOK $INSTDIR\bitcoin.exe
Delete /REBOOTOK $INSTDIR\libeay32.dll
Delete /REBOOTOK $INSTDIR\license.txt Delete /REBOOTOK $INSTDIR\license.txt
Delete /REBOOTOK $INSTDIR\readme.txt Delete /REBOOTOK $INSTDIR\readme.txt
RMDir /r /REBOOTOK $INSTDIR\daemon RMDir /r /REBOOTOK $INSTDIR\daemon

View file

@ -731,7 +731,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
} }
// Don't accept it if it can't get into a block // Don't accept it if it can't get into a block
if (nFees < GetMinFee(1000, false, true)) if (nFees < GetMinFee(1000, true, true))
return error("AcceptToMemoryPool() : not enough fees"); return error("AcceptToMemoryPool() : not enough fees");
// Continuously rate-limit free transactions // Continuously rate-limit free transactions

View file

@ -7,14 +7,14 @@ USE_UPNP:=0
INCLUDEPATHS= \ INCLUDEPATHS= \
-I"C:\boost-1.43.0-mgw" \ -I"C:\boost-1.43.0-mgw" \
-I"C:\db-4.7.25.NC-mgw\build_unix" \ -I"C:\db-4.7.25.NC-mgw\build_unix" \
-I"C:\openssl-1.0.0c-mgw\include" \ -I"C:\openssl-1.0.0d-mgw\include" \
-I"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib\mswud" \ -I"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib\mswud" \
-I"C:\wxWidgets-2.9.1-mgw\include" -I"C:\wxWidgets-2.9.1-mgw\include"
LIBPATHS= \ LIBPATHS= \
-L"C:\boost-1.43.0-mgw\stage\lib" \ -L"C:\boost-1.43.0-mgw\stage\lib" \
-L"C:\db-4.7.25.NC-mgw\build_unix" \ -L"C:\db-4.7.25.NC-mgw\build_unix" \
-L"C:\openssl-1.0.0c-mgw" \ -L"C:\openssl-1.0.0d-mgw" \
-L"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib" -L"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib"
WXLIBS= \ WXLIBS= \
@ -26,9 +26,10 @@ LIBS= \
-l boost_program_options-mgw45-mt-s-1_43 \ -l boost_program_options-mgw45-mt-s-1_43 \
-l boost_thread-mgw45-mt-s-1_43 \ -l boost_thread-mgw45-mt-s-1_43 \
-l db_cxx \ -l db_cxx \
-l eay32 -l ssl \
-l crypto
DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL
DEBUGFLAGS=-g -D__WXDEBUG__ DEBUGFLAGS=-g -D__WXDEBUG__
CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \

View file

@ -18,6 +18,13 @@ CMyTaskBarIcon* ptaskbaricon = NULL;
bool fClosedToTray = false; bool fClosedToTray = false;
wxLocale g_locale; wxLocale g_locale;
#ifdef __WXMSW__
double nScaleX = 1.0;
double nScaleY = 1.0;
#else
static const double nScaleX = 1.0;
static const double nScaleY = 1.0;
#endif
@ -263,9 +270,10 @@ CMainFrame::CMainFrame(wxWindow* parent) : CMainFrameBase(parent)
fOnSetFocusAddress = false; fOnSetFocusAddress = false;
fRefresh = false; fRefresh = false;
m_choiceFilter->SetSelection(0); m_choiceFilter->SetSelection(0);
double dResize = 1.0; double dResize = nScaleX;
#ifdef __WXMSW__ #ifdef __WXMSW__
SetIcon(wxICON(bitcoin)); SetIcon(wxICON(bitcoin));
SetSize(dResize * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
#else #else
SetIcon(bitcoin80_xpm); SetIcon(bitcoin80_xpm);
SetBackgroundColour(m_toolBar->GetBackgroundColour()); SetBackgroundColour(m_toolBar->GetBackgroundColour());
@ -1219,6 +1227,9 @@ void CMainFrame::OnListItemActivated(wxListEvent& event)
CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetailsDialogBase(parent) CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetailsDialogBase(parent)
{ {
#ifdef __WXMSW__
SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
#endif
CRITICAL_BLOCK(cs_mapAddressBook) CRITICAL_BLOCK(cs_mapAddressBook)
{ {
string strHTML; string strHTML;
@ -1633,6 +1644,8 @@ COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent)
SelectPage(0); SelectPage(0);
#ifndef __WXMSW__ #ifndef __WXMSW__
SetSize(1.0 * GetSize().GetWidth(), 1.2 * GetSize().GetHeight()); SetSize(1.0 * GetSize().GetWidth(), 1.2 * GetSize().GetHeight());
#else
SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
#endif #endif
#if defined(__WXGTK__) || defined(__WXMAC_OSX__) #if defined(__WXGTK__) || defined(__WXMAC_OSX__)
m_checkBoxStartOnSystemStartup->SetLabel(_("&Start Bitcoin on window system startup")); m_checkBoxStartOnSystemStartup->SetLabel(_("&Start Bitcoin on window system startup"));
@ -1803,6 +1816,8 @@ CAboutDialog::CAboutDialog(wxWindow* parent) : CAboutDialogBase(parent)
fontTmp.SetPointSize(8); fontTmp.SetPointSize(8);
m_staticTextMain->SetFont(fontTmp); m_staticTextMain->SetFont(fontTmp);
SetSize(GetSize().GetWidth() + 44, GetSize().GetHeight() + 10); SetSize(GetSize().GetWidth() + 44, GetSize().GetHeight() + 10);
#else
SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
#endif #endif
} }
@ -1837,12 +1852,21 @@ CSendDialog::CSendDialog(wxWindow* parent, const wxString& strAddress) : CSendDi
fontTmp.SetPointSize(9); fontTmp.SetPointSize(9);
m_staticTextInstructions->SetFont(fontTmp); m_staticTextInstructions->SetFont(fontTmp);
SetSize(725, 180); SetSize(725, 180);
#else
SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
#endif #endif
// Set Icon // Set Icon
if (nScaleX == 1.0 && nScaleY == 1.0) // We don't have icons of the proper size otherwise
{
wxIcon iconSend; wxIcon iconSend;
iconSend.CopyFromBitmap(wxBitmap(send16noshadow_xpm)); iconSend.CopyFromBitmap(wxBitmap(send16noshadow_xpm));
SetIcon(iconSend); SetIcon(iconSend);
}
#ifdef __WXMSW__
else
SetIcon(wxICON(bitcoin));
#endif
// Fixup the tab order // Fixup the tab order
m_buttonPaste->MoveAfterInTabOrder(m_buttonCancel); m_buttonPaste->MoveAfterInTabOrder(m_buttonCancel);
@ -1992,6 +2016,8 @@ CSendingDialog::CSendingDialog(wxWindow* parent, const CAddress& addrIn, int64 n
fWorkDone = false; fWorkDone = false;
#ifndef __WXMSW__ #ifndef __WXMSW__
SetSize(1.2 * GetSize().GetWidth(), 1.08 * GetSize().GetHeight()); SetSize(1.2 * GetSize().GetWidth(), 1.08 * GetSize().GetHeight());
#else
SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
#endif #endif
SetTitle(strprintf(_("Sending %s to %s"), FormatMoney(nPrice).c_str(), wtx.mapValue["to"].c_str())); SetTitle(strprintf(_("Sending %s to %s"), FormatMoney(nPrice).c_str(), wtx.mapValue["to"].c_str()));
@ -2315,6 +2341,10 @@ void CSendingDialog::OnReply3(CDataStream& vRecv)
CAddressBookDialog::CAddressBookDialog(wxWindow* parent, const wxString& strInitSelected, int nPageIn, bool fDuringSendIn) : CAddressBookDialogBase(parent) CAddressBookDialog::CAddressBookDialog(wxWindow* parent, const wxString& strInitSelected, int nPageIn, bool fDuringSendIn) : CAddressBookDialogBase(parent)
{ {
#ifdef __WXMSW__
SetSize(nScaleX * GetSize().GetWidth(), nScaleY * GetSize().GetHeight());
#endif
// Set initially selected page // Set initially selected page
wxNotebookEvent event; wxNotebookEvent event;
event.SetSelection(nPageIn); event.SetSelection(nPageIn);
@ -2326,9 +2356,16 @@ CAddressBookDialog::CAddressBookDialog(wxWindow* parent, const wxString& strInit
m_buttonCancel->Show(false); m_buttonCancel->Show(false);
// Set Icon // Set Icon
if (nScaleX == 1.0 && nScaleY == 1.0) // We don't have icons of the proper size otherwise
{
wxIcon iconAddressBook; wxIcon iconAddressBook;
iconAddressBook.CopyFromBitmap(wxBitmap(addressbook16_xpm)); iconAddressBook.CopyFromBitmap(wxBitmap(addressbook16_xpm));
SetIcon(iconAddressBook); SetIcon(iconAddressBook);
}
#ifdef __WXMSW__
else
SetIcon(wxICON(bitcoin));
#endif
// Init column headers // Init column headers
m_listCtrlSending->InsertColumn(0, _("Name"), wxLIST_FORMAT_LEFT, 200); m_listCtrlSending->InsertColumn(0, _("Name"), wxLIST_FORMAT_LEFT, 200);
@ -2844,6 +2881,16 @@ bool CMyApp::OnInit()
g_locale.AddCatalog("wxstd"); // wxWidgets standard translations, if any g_locale.AddCatalog("wxstd"); // wxWidgets standard translations, if any
g_locale.AddCatalog("bitcoin"); g_locale.AddCatalog("bitcoin");
#ifdef __WXMSW__
HDC hdc = GetDC(NULL);
if (hdc)
{
nScaleX = GetDeviceCaps(hdc, LOGPIXELSX) / 96.0;
nScaleY = GetDeviceCaps(hdc, LOGPIXELSY) / 96.0;
ReleaseDC(NULL, hdc);
}
#endif
return AppInit(argc, argv); return AppInit(argc, argv);
} }