diff options
author | Jeff Garzik <jgarzik@bitpay.com> | 2013-09-06 17:09:55 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@bitpay.com> | 2013-09-06 17:09:55 -0700 |
commit | 15fd245b9a4754485d1a272acce53bcf3290839f (patch) | |
tree | 95187b718dfe8cb7c4310fffb75f298637de1da5 /src/qt | |
parent | 495242c1adff8832d7d30b920aa71f31dd63a2a6 (diff) | |
parent | 35b8af92265ed74de63c3818e5290c27b3f35df2 (diff) |
Merge pull request #2943 from theuni/autotools-final
Autotools buildsystem
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/Makefile.am | 160 | ||||
-rw-r--r-- | src/qt/addressbookpage.cpp | 4 | ||||
-rw-r--r-- | src/qt/notificator.h | 4 | ||||
-rw-r--r-- | src/qt/optionsdialog.cpp | 4 | ||||
-rw-r--r-- | src/qt/optionsmodel.cpp | 4 | ||||
-rw-r--r-- | src/qt/res/bitcoin-qt-res.rc (renamed from src/qt/res/bitcoin-qt.rc) | 0 | ||||
-rw-r--r-- | src/qt/test/Makefile.am | 26 | ||||
-rw-r--r-- | src/qt/test/paymentservertests.cpp | 1 |
8 files changed, 203 insertions, 0 deletions
diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am new file mode 100644 index 0000000000..c6c4cb37a3 --- /dev/null +++ b/src/qt/Makefile.am @@ -0,0 +1,160 @@ +include $(top_srcdir)/src/Makefile.include + +AM_CPPFLAGS = $(INCLUDES) -I$(top_builddir)/src/obj \ + -I$(top_srcdir)/src/leveldb/include -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/leveldb/helpers -I$(top_builddir)/src/qt \ + -I$(top_builddir)/src/qt/forms $(BOOST_INCLUDES) $(PROTOBUF_CFLAGS) \ + $(QR_CFLAGS) +AM_LDFLAGS = $(PTHREAD_CFLAGS) +bin_PROGRAMS = bitcoin-qt +noinst_LIBRARIES = libbitcoinqt.a +SUBDIRS = $(BUILD_TEST_QT) +DIST_SUBDIRS = test + +# bitcoin qt core # +QT_TS = locale/bitcoin_ach.ts locale/bitcoin_af_ZA.ts locale/bitcoin_ar.ts \ + locale/bitcoin_be_BY.ts locale/bitcoin_bg.ts locale/bitcoin_bs.ts \ + locale/bitcoin_ca_ES.ts locale/bitcoin_ca.ts locale/bitcoin_cs.ts \ + locale/bitcoin_cy.ts locale/bitcoin_da.ts locale/bitcoin_de.ts \ + locale/bitcoin_el_GR.ts locale/bitcoin_en.ts locale/bitcoin_eo.ts \ + locale/bitcoin_es_CL.ts locale/bitcoin_es.ts locale/bitcoin_et.ts \ + locale/bitcoin_eu_ES.ts locale/bitcoin_fa_IR.ts locale/bitcoin_fa.ts \ + locale/bitcoin_fi.ts locale/bitcoin_fr_CA.ts locale/bitcoin_fr.ts \ + locale/bitcoin_gu_IN.ts locale/bitcoin_he.ts locale/bitcoin_hi_IN.ts \ + locale/bitcoin_hr.ts locale/bitcoin_hu.ts locale/bitcoin_id_ID.ts \ + locale/bitcoin_it.ts locale/bitcoin_ja.ts locale/bitcoin_kk_KZ.ts \ + locale/bitcoin_ko_KR.ts locale/bitcoin_la.ts locale/bitcoin_lt.ts \ + locale/bitcoin_lv_LV.ts locale/bitcoin_ms_MY.ts locale/bitcoin_nb.ts \ + locale/bitcoin_nl.ts locale/bitcoin_pl.ts locale/bitcoin_pt_BR.ts \ + locale/bitcoin_pt_PT.ts locale/bitcoin_ro_RO.ts locale/bitcoin_ru.ts \ + locale/bitcoin_sk.ts locale/bitcoin_sq.ts locale/bitcoin_sr.ts \ + locale/bitcoin_sv.ts locale/bitcoin_th_TH.ts locale/bitcoin_tr.ts \ + locale/bitcoin_uk.ts locale/bitcoin_vi.ts locale/bitcoin_vi_VN.ts \ + locale/bitcoin_zh_CN.ts locale/bitcoin_zh_TW.ts + +QT_FORMS_UI = forms/aboutdialog.ui forms/addressbookpage.ui \ + forms/askpassphrasedialog.ui forms/editaddressdialog.ui forms/intro.ui \ + forms/optionsdialog.ui forms/overviewpage.ui forms/qrcodedialog.ui \ + forms/rpcconsole.ui forms/sendcoinsdialog.ui forms/sendcoinsentry.ui \ + forms/signverifymessagedialog.ui forms/transactiondescdialog.ui + +QT_MOC_CPP = moc_aboutdialog.cpp moc_addressbookpage.cpp \ + moc_addresstablemodel.cpp moc_askpassphrasedialog.cpp \ + moc_bitcoinaddressvalidator.cpp moc_bitcoinamountfield.cpp \ + moc_bitcoingui.cpp moc_bitcoinunits.cpp moc_clientmodel.cpp \ + moc_csvmodelwriter.cpp moc_editaddressdialog.cpp moc_guiutil.cpp \ + moc_intro.cpp moc_macdockiconhandler.cpp moc_macnotificationhandler.cpp \ + moc_monitoreddatamapper.cpp moc_notificator.cpp moc_optionsdialog.cpp \ + moc_optionsmodel.cpp moc_overviewpage.cpp moc_paymentserver.cpp \ + moc_qrcodedialog.cpp moc_qvalidatedlineedit.cpp moc_qvaluecombobox.cpp \ + moc_rpcconsole.cpp moc_sendcoinsdialog.cpp moc_sendcoinsentry.cpp \ + moc_signverifymessagedialog.cpp moc_splashscreen.cpp moc_transactiondesc.cpp \ + moc_transactiondescdialog.cpp moc_transactionfilterproxy.cpp \ + moc_transactiontablemodel.cpp moc_transactionview.cpp moc_walletframe.cpp \ + moc_walletmodel.cpp moc_walletstack.cpp moc_walletview.cpp + +QT_MOC = intro.moc overviewpage.moc rpcconsole.moc + +QT_QRC_CPP = qrc_bitcoin.cpp +QT_QRC = bitcoin.qrc + +PROTOBUF_CC = paymentrequest.pb.cc +PROTOBUF_H = paymentrequest.pb.h +PROTOBUF_PROTO = paymentrequest.proto + +BITCOIN_QT_H = aboutdialog.h addressbookpage.h addresstablemodel.h \ + askpassphrasedialog.h bitcoinaddressvalidator.h bitcoinamountfield.h \ + bitcoingui.h bitcoinunits.h clientmodel.h csvmodelwriter.h \ + editaddressdialog.h guiconstants.h guiutil.h intro.h macdockiconhandler.h \ + macnotificationhandler.h monitoreddatamapper.h notificator.h optionsdialog.h \ + optionsmodel.h overviewpage.h paymentrequestplus.h paymentserver.h \ + qrcodedialog.h qvalidatedlineedit.h qvaluecombobox.h rpcconsole.h \ + sendcoinsdialog.h sendcoinsentry.h signverifymessagedialog.h splashscreen.h \ + transactiondescdialog.h transactiondesc.h transactionfilterproxy.h \ + transactionrecord.h transactiontablemodel.h transactionview.h walletframe.h \ + walletmodel.h walletmodeltransaction.h walletstack.h walletview.h + +RES_ICONS = res/icons/bitcoin.png res/icons/address-book.png \ + res/icons/quit.png res/icons/send.png res/icons/toolbar.png \ + res/icons/connect0_16.png res/icons/connect1_16.png \ + res/icons/connect2_16.png res/icons/connect3_16.png \ + res/icons/connect4_16.png res/icons/transaction0.png \ + res/icons/transaction2.png res/icons/clock1.png res/icons/clock2.png \ + res/icons/clock3.png res/icons/clock4.png res/icons/clock5.png \ + res/icons/configure.png res/icons/receive.png res/icons/editpaste.png \ + res/icons/editcopy.png res/icons/add.png res/icons/bitcoin_testnet.png \ + res/icons/toolbar_testnet.png res/icons/edit.png res/icons/history.png \ + res/icons/overview.png res/icons/export.png res/icons/synced.png \ + res/icons/remove.png res/icons/tx_mined.png res/icons/tx_input.png \ + res/icons/tx_output.png res/icons/tx_inout.png res/icons/lock_closed.png \ + res/icons/lock_open.png res/icons/key.png res/icons/filesave.png \ + res/icons/qrcode.png res/icons/debugwindow.png res/icons/bitcoin.ico \ + res/icons/bitcoin_testnet.ico + +RES_IMAGES = res/images/about.png res/images/splash.png \ + res/images/splash_testnet.png + +RES_MOVIES = res/movies/update_spinner.mng + +BITCOIN_RC = res/bitcoin-qt-res.rc + +libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \ + -I$(top_srcdir)/src/qt/forms $(QT_DBUS_INCLUDES) +libbitcoinqt_a_SOURCES = aboutdialog.cpp addressbookpage.cpp \ + addresstablemodel.cpp askpassphrasedialog.cpp bitcoinaddressvalidator.cpp \ + bitcoinamountfield.cpp bitcoin.cpp bitcoingui.cpp bitcoinstrings.cpp \ + bitcoinunits.cpp clientmodel.cpp csvmodelwriter.cpp editaddressdialog.cpp \ + guiutil.cpp intro.cpp monitoreddatamapper.cpp notificator.cpp \ + optionsdialog.cpp optionsmodel.cpp overviewpage.cpp paymentrequestplus.cpp \ + paymentserver.cpp qvalidatedlineedit.cpp qvaluecombobox.cpp \ + rpcconsole.cpp sendcoinsdialog.cpp sendcoinsentry.cpp \ + signverifymessagedialog.cpp splashscreen.cpp transactiondesc.cpp \ + transactiondescdialog.cpp transactionfilterproxy.cpp transactionrecord.cpp \ + transactiontablemodel.cpp transactionview.cpp walletframe.cpp \ + walletmodel.cpp walletmodeltransaction.cpp walletstack.cpp walletview.cpp \ + $(BITCOIN_QT_H) $(QT_FORMS_UI) $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) \ + $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) + +nodist_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \ + $(PROTOBUF_H) $(QT_QRC_CPP) + +BUILT_SOURCES = $(nodist_libbitcoinqt_a_SOURCES) + +#Generating these with a half-written protobuf header leads to wacky results. +#This makes sure it's done. +$(QT_MOC): $(PROTOBUF_H) +$(QT_MOC_CPP): $(PROTOBUF_H) + +if TARGET_DARWIN + libbitcoinqt_a_SOURCES += macdockiconhandler.mm macnotificationhandler.mm +endif +if TARGET_WINDOWS + libbitcoinqt_a_SOURCES += $(BITCOIN_RC) +endif +if USE_QRCODE + libbitcoinqt_a_SOURCES += qrcodedialog.cpp +endif +# + +# bitcoin-qt binary # +bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \ + -I$(top_srcdir)/src/qt/forms +bitcoin_qt_SOURCES = bitcoin.cpp +bitcoin_qt_LDADD = libbitcoinqt.a $(LIBBITCOIN) $(LIBLEVELDB) $(LIBMEMENV) \ + $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) + +# forms/foo.h -> forms/ui_foo.h +QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h)))) + +#locale/foo.ts -> locale/foo.qm +QT_QM=$(QT_TS:.ts=.qm) + +.SECONDARY: $(QT_QM) + +$(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H) + @cd $(abs_srcdir); test -f $(RCC) && $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \ + echo error: could not build $@ + $(SED) -i.bak -e '/^\*\*.*Created:/d' $@ && rm $@.bak + $(SED) -i.bak -e '/^\*\*.*by:/d' $@ && rm $@.bak + +CLEANFILES = $(BUILT_SOURCES) $(QT_QM) $(QT_FORMS_H) *.gcda *.gcno diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index 8906174d7d..5b8d44481e 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -1,3 +1,7 @@ +#if defined(HAVE_CONFIG_H) +#include "bitcoin-config.h" +#endif + #include "addressbookpage.h" #include "ui_addressbookpage.h" diff --git a/src/qt/notificator.h b/src/qt/notificator.h index d1fe37fea5..6c9a46bcf7 100644 --- a/src/qt/notificator.h +++ b/src/qt/notificator.h @@ -1,6 +1,10 @@ #ifndef NOTIFICATOR_H #define NOTIFICATOR_H +#if defined(HAVE_CONFIG_H) +#include "bitcoin-config.h" +#endif + #include <QObject> #include <QIcon> diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index b2451aea31..7ccda6cdd4 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -1,3 +1,7 @@ +#if defined(HAVE_CONFIG_H) +#include "bitcoin-config.h" +#endif + #include "optionsdialog.h" #include "ui_optionsdialog.h" diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index d93a60e1bc..95efc58320 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -1,3 +1,7 @@ +#if defined(HAVE_CONFIG_H) +#include "bitcoin-config.h" +#endif + #include "optionsmodel.h" #include "bitcoinunits.h" diff --git a/src/qt/res/bitcoin-qt.rc b/src/qt/res/bitcoin-qt-res.rc index 3e3672a835..3e3672a835 100644 --- a/src/qt/res/bitcoin-qt.rc +++ b/src/qt/res/bitcoin-qt-res.rc diff --git a/src/qt/test/Makefile.am b/src/qt/test/Makefile.am new file mode 100644 index 0000000000..f51ac9bd6d --- /dev/null +++ b/src/qt/test/Makefile.am @@ -0,0 +1,26 @@ +include $(top_srcdir)/src/Makefile.include + +AM_CPPFLAGS = $(INCLUDES) -I$(top_builddir)/src/obj \ + -I$(top_srcdir)/src/leveldb/include -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/leveldb/helpers -I$(top_srcdir)/src/qt \ + -I$(top_builddir)/src/qt $(BOOST_INCLUDES) $(PROTOBUF_CFLAGS) \ + $(QR_CFLAGS) +AM_LDFLAGS = $(PTHREAD_CFLAGS) +bin_PROGRAMS = test_bitcoin-qt +TESTS = test_bitcoin-qt + +TEST_QT_MOC_CPP = moc_uritests.cpp moc_paymentservertests.cpp + +TEST_QT_H = uritests.h paymentservertests.h paymentrequestdata.h + +BUILT_SOURCES = $(TEST_QT_MOC_CPP) + +test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES) +test_bitcoin_qt_SOURCES = test_main.cpp uritests.cpp paymentservertests.cpp $(TEST_QT_H) +nodist_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP) +test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN) $(LIBLEVELDB) \ + $(LIBMEMENV) $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) \ + $(QR_LIBS) $(PROTOBUF_LIBS) + +CLEANFILES = $(BUILT_SOURCES) *.gcda *.gcno + diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp index 6c8ad62b2b..34079e94ff 100644 --- a/src/qt/test/paymentservertests.cpp +++ b/src/qt/test/paymentservertests.cpp @@ -2,6 +2,7 @@ #include <QDebug> #include <QTemporaryFile> #include <QVariant> +#include <QFileOpenEvent> #include <openssl/x509.h> #include <openssl/x509_vfy.h> |