From 6ca1a1d6799474f8ca977b93ab630af7ace879c2 Mon Sep 17 00:00:00 2001 From: Victorio Nascimento <155357371+Vic-Nas@users.noreply.github.com> Date: Mon, 27 Jul 2026 16:45:28 -0400 Subject: Add Linux GUI installer via Wine (#3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add Linux GUI installer via Wine * Fix launcher creation and add BTF_RELAY env var support * Pool server, Linux GUI, unified binary, README update * Root Makefile: make linux / make windows, cleaner README * Remove headless.cpp * Fix XPM color count mismatch causing toolbar image errors on Linux * XPM icons: same code on Windows and Linux, no ifdefs around image loading * Fix GTK icon crash and Linux printf format * btfrv: 10s socket timeout on relay connects * Faster peer discovery: more dials per pass, shorter backoff and sleep * Parallel btf peer connections * Fix GetMyExternalIP - was disabled, now uses modern IP echo services * Fix tunnel disconnect on idle and restore external IP detection * Filter stale Nostr descriptors * Sort peers by freshness, fresh first * Pool: add .btf Stratum listener — miners connect via rendezvous, no port forwarding needed * btf pool: self-replacing listeners, one per relay, no queuing between miners * Mining modes: solo/operator/participant — pool server on-demand, participant Stratum client * Status bar: show external IP and .btf address * README: clean rewrite, concept-first, minimal * make linux produces AppImage * make linux produces AppImage * Pool dashboard: connect instructions, tabs, share bars * Perf fixes: GetMyExternalIP threaded, btf listener counted * Perf fixes: GetMyExternalIP threaded, btf listener counted * Fix pool payouts: defer until coinbase maturity * Pool: clean mode switching, IP warning * Pool: clean mode switching * Fix gPoolRunning: remove static * AppImage: use real icon from bitcoin.ico * Fix exit crash; Mining menu * Fix exit crash; Mining menu * Fix exit crash; Mining menu * Fix exit crash; Mining menu * Fix exit crash; Mining menu * Windows build: use mingw32-make * Windows build: simpler make invocation * Add deps-windows target * Windows build fixes * Windows build fixes * Windows makefile: fix obj dir * Windows: output to repo root * Windows: bundle DLLs into zip * Replace wxWidgets with ImGui+GLFW: same build on Linux and Windows * Fix %I64d that slipped back through rebase (main.h, net.h) * MinGW: add _mkdir shim for non-MSVC Windows; fix %I64d * Fix gPoolRunning extern outside ifndef _WIN32 * Remove -lboost_system: boost is header-only in this codebase * Status bar: copy buttons for IP and .btf address * Windows: add app icon via windres, strip wx stuff from rc file * Clean GUI: single Options menu item, bigger font, better spacing, cleaner options dialog; update README * GUI: embed Roboto font at 16px for clear readability on all platforms * Windows: windres depends on obj dir target * Fix balance hidden off-screen: put on own line below address bar * Windows: inline mkdir in every rule, remove dir target that confused make * Windows: move all target to top so it's the default rule * Fix pool server not starting: always start when operator selected, re-sync dialog state on open * Write debug.log to data directory (AppData/Roaming/Bitflash on Windows) * Participant miner: use wallet address as username so payouts go to wallet * Add .gitattributes to lock LF line endings, prevent CRLF drift * Refactor pool mining to btf-only transport * Persist pool settings and startup wiring * Prune stale peers and expose pool queries * Fix build regressions and add CLI mode/arg parity * Fix rpc miner stats declaration order * Centralize pool runtime extern declarations * Separate operator/participant dashboards and restore peer stats * Add live telemetry strip and clearer per-mode runtime metrics * Reduce mining dashboard clutter and remove manual pool entry * Count only authorized pool miners * Seed initial pool job on startup * Use a real share target for pool work * Switch pool accounting to round-based shares * Fix nostr pool announcer stats call sites * Fix pool stats definition order * Improve pool worker status display * Add mutex include for participant status * Replace ImClamp in dashboard layout * Clarify participant work status * Log participant status transitions * Reduce peer discovery log noise * Add participant status badge * Track participant auth acknowledgements * Log and validate pool job delivery --------- Co-authored-by: Bitflash Pool Dev --- src/ui.h | 417 --------------------------------------------------------------- 1 file changed, 417 deletions(-) delete mode 100644 src/ui.h (limited to 'src/ui.h') diff --git a/src/ui.h b/src/ui.h deleted file mode 100644 index 2efeace..0000000 --- a/src/ui.h +++ /dev/null @@ -1,417 +0,0 @@ -// Copyright (c) 2009 Satoshi Nakamoto -// Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. - - - - -DECLARE_EVENT_TYPE(wxEVT_CROSSTHREADCALL, -1) -DECLARE_EVENT_TYPE(wxEVT_REPLY1, -1) -DECLARE_EVENT_TYPE(wxEVT_REPLY2, -1) -DECLARE_EVENT_TYPE(wxEVT_REPLY3, -1) -DECLARE_EVENT_TYPE(wxEVT_TABLEADDED, -1) -DECLARE_EVENT_TYPE(wxEVT_TABLEUPDATED, -1) -DECLARE_EVENT_TYPE(wxEVT_TABLEDELETED, -1) - -enum -{ - UICALL_ADDORDER = 1, - UICALL_UPDATEORDER, -}; - - - -extern void HandleCtrlA(wxKeyEvent& event); -extern string DateTimeStr(int64 nTime); -extern string FormatTxStatus(const CWalletTx& wtx); -extern void CrossThreadCall(int nID, void* pdata); -extern void MainFrameRepaint(); - - - - - - -class CMainFrame : public CMainFrameBase -{ -protected: - // Event handlers - void OnClose(wxCloseEvent& event); - void OnMouseEvents(wxMouseEvent& event); - void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); } - void OnIdle(wxIdleEvent& event); - void OnPaint(wxPaintEvent& event); - void OnPaintListCtrl(wxPaintEvent& event); - void OnMenuFileExit(wxCommandEvent& event); - void OnMenuOptionsGenerate(wxCommandEvent& event); - void OnMenuOptionsOptions(wxCommandEvent& event); - void OnMenuHelpAbout(wxCommandEvent& event); - void OnButtonSend(wxCommandEvent& event); - void OnButtonAddressBook(wxCommandEvent& event); - void OnSetFocusAddress(wxFocusEvent& event); - void OnMouseEventsAddress(wxMouseEvent& event); - void OnButtonCopy(wxCommandEvent& event); - void OnButtonChange(wxCommandEvent& event); - void OnListColBeginDrag(wxListEvent& event); - void OnListItemActivatedAllTransactions(wxListEvent& event); - void OnListItemActivatedProductsSent(wxListEvent& event); - void OnListItemActivatedOrdersSent(wxListEvent& event); - void OnListItemActivatedOrdersReceived(wxListEvent& event); - -public: - /** Constructor */ - CMainFrame(wxWindow* parent); - ~CMainFrame(); - - // Custom - bool fRefreshListCtrl; - bool fRefreshListCtrlRunning; - bool fOnSetFocusAddress; - CBlockIndex* pindexBestLast; - set setUnmaturedDisplayed; - - void OnCrossThreadCall(wxCommandEvent& event); - void InsertLine(bool fNew, int nIndex, uint256 hashKey, string strSort, const wxString& str1, const wxString& str2, const wxString& str3, const wxString& str4, const wxString& str5); - void InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex=-1); - void RefreshListCtrl(); - void RefreshStatus(); -}; - - - - -class CTxDetailsDialog : public CTxDetailsDialogBase -{ -protected: - // Event handlers - void OnButtonOK(wxCommandEvent& event); - -public: - /** Constructor */ - CTxDetailsDialog(wxWindow* parent, CWalletTx wtx); - - // State - CWalletTx wtx; -}; - - - -class COptionsDialog : public COptionsDialogBase -{ -protected: - // Event handlers - void OnKillFocusTransactionFee(wxFocusEvent& event); - void OnButtonOK(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - -public: - /** Constructor */ - COptionsDialog(wxWindow* parent); -}; - - - -class CAboutDialog : public CAboutDialogBase -{ -protected: - // Event handlers - void OnButtonOK(wxCommandEvent& event); - -public: - /** Constructor */ - CAboutDialog(wxWindow* parent); -}; - - - -class CSendDialog : public CSendDialogBase -{ -protected: - // Event handlers - void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); } - void OnTextAddress(wxCommandEvent& event); - void OnKillFocusAmount(wxFocusEvent& event); - void OnButtonAddressBook(wxCommandEvent& event); - void OnButtonPaste(wxCommandEvent& event); - void OnButtonSend(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - -public: - /** Constructor */ - CSendDialog(wxWindow* parent, const wxString& strAddress=""); -}; - - - -class CSendingDialog : public CSendingDialogBase -{ -public: - // Event handlers - void OnClose(wxCloseEvent& event); - void OnButtonOK(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - void OnPaint(wxPaintEvent& event); - -public: - /** Constructor */ - CSendingDialog(wxWindow* parent, const CAddress& addrIn, int64 nPriceIn, const CWalletTx& wtxIn); - ~CSendingDialog(); - - // State - CAddress addr; - int64 nPrice; - CWalletTx wtx; - wxDateTime start; - string strStatus; - bool fCanCancel; - bool fAbort; - bool fSuccess; - bool fUIDone; - bool fWorkDone; - - void Close(); - void Repaint(); - bool Status(); - bool Status(const string& str); - bool Error(const string& str); - void StartTransfer(); - void OnReply2(CDataStream& vRecv); - void OnReply3(CDataStream& vRecv); -}; - -void SendingDialogStartTransfer(void* parg); -void SendingDialogOnReply2(void* parg, CDataStream& vRecv); -void SendingDialogOnReply3(void* parg, CDataStream& vRecv); - - - -class CYourAddressDialog : public CYourAddressDialogBase -{ -protected: - // Event handlers - void OnListEndLabelEdit(wxListEvent& event); - void OnListItemSelected(wxListEvent& event); - void OnListItemActivated(wxListEvent& event); - void OnButtonRename(wxCommandEvent& event); - void OnButtonNew(wxCommandEvent& event); - void OnButtonCopy(wxCommandEvent& event); - void OnButtonOK(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - void OnClose(wxCloseEvent& event); - -public: - /** Constructor */ - CYourAddressDialog(wxWindow* parent); - CYourAddressDialog(wxWindow* parent, const string& strInitSelected); - - // Custom - wxString GetAddress(); -}; - - - -class CAddressBookDialog : public CAddressBookDialogBase -{ -protected: - // Event handlers - void OnListEndLabelEdit(wxListEvent& event); - void OnListItemSelected(wxListEvent& event); - void OnListItemActivated(wxListEvent& event); - void OnButtonEdit(wxCommandEvent& event); - void OnButtonDelete(wxCommandEvent& event); - void OnButtonNew(wxCommandEvent& event); - void OnButtonCopy(wxCommandEvent& event); - void OnButtonOK(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - void OnClose(wxCloseEvent& event); - -public: - /** Constructor */ - CAddressBookDialog(wxWindow* parent, const wxString& strInitSelected, bool fSendingIn); - - // Custom - bool fSending; - wxString GetAddress(); -}; - - - -class CProductsDialog : public CProductsDialogBase -{ -protected: - // Event handlers - void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); } - void OnCombobox(wxCommandEvent& event); - void OnButtonSearch(wxCommandEvent& event); - void OnListItemActivated(wxListEvent& event); - -public: - /** Constructor */ - CProductsDialog(wxWindow* parent); - - // Custom - vector m_vProduct; -}; - - - -class CEditProductDialog : public CEditProductDialogBase -{ -protected: - // Event handlers - void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); } - void OnButtonDel0(wxCommandEvent& event); - void OnButtonDel1(wxCommandEvent& event); - void OnButtonDel2(wxCommandEvent& event); - void OnButtonDel3(wxCommandEvent& event); - void OnButtonDel4(wxCommandEvent& event); - void OnButtonDel5(wxCommandEvent& event); - void OnButtonDel6(wxCommandEvent& event); - void OnButtonDel7(wxCommandEvent& event); - void OnButtonDel8(wxCommandEvent& event); - void OnButtonDel9(wxCommandEvent& event); - void OnButtonDel10(wxCommandEvent& event); - void OnButtonDel11(wxCommandEvent& event); - void OnButtonDel12(wxCommandEvent& event); - void OnButtonDel13(wxCommandEvent& event); - void OnButtonDel14(wxCommandEvent& event); - void OnButtonDel15(wxCommandEvent& event); - void OnButtonDel16(wxCommandEvent& event); - void OnButtonDel17(wxCommandEvent& event); - void OnButtonDel18(wxCommandEvent& event); - void OnButtonDel19(wxCommandEvent& event); - void OnButtonAddField(wxCommandEvent& event); - void OnButtonSend(wxCommandEvent& event); - void OnButtonPreview(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - -public: - /** Constructor */ - CEditProductDialog(wxWindow* parent); - - // Custom - enum { FIELDS_MAX = 20 }; - wxTextCtrl* m_textCtrlLabel[FIELDS_MAX]; - wxTextCtrl* m_textCtrlField[FIELDS_MAX]; - wxButton* m_buttonDel[FIELDS_MAX]; - - void LayoutAll(); - void ShowLine(int i, bool fShow=true); - void OnButtonDel(wxCommandEvent& event, int n); - void SetProduct(const CProduct& productIn); - void GetProduct(CProduct& product); - -}; - - - -class CViewProductDialog : public CViewProductDialogBase -{ -protected: - // Event handlers - void OnButtonSubmitForm(wxCommandEvent& event); - void OnButtonCancelForm(wxCommandEvent& event); - void OnButtonBack(wxCommandEvent& event); - void OnButtonNext(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - -public: - /** Constructor */ - CViewProductDialog(wxWindow* parent, const CProduct& productIn); - ~CViewProductDialog(); - - // Custom - CProduct product; - enum { FIELDS_MAX = 20 }; - wxStaticText* m_staticTextLabel[FIELDS_MAX]; - wxTextCtrl* m_textCtrlField[FIELDS_MAX]; - wxChoice* m_choiceField[FIELDS_MAX]; - - void GetOrder(CWalletTx& order); - void UpdateProductDisplay(bool fDetails); - void OnReply1(wxCommandEvent& event); -}; - - - -class CViewOrderDialog : public CViewOrderDialogBase -{ -protected: - // Event handlers - void OnButtonOK(wxCommandEvent& event); - -public: - /** Constructor */ - CViewOrderDialog(wxWindow* parent, CWalletTx order, bool fReceived); - - // Custom - bool fReceived; -}; - - - -class CEditReviewDialog : public CEditReviewDialogBase -{ -protected: - // Event handlers - void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); } - void OnButtonSubmit(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - -public: - /** Constructor */ - CEditReviewDialog(wxWindow* parent); - - // Custom - void GetReview(CReview& review); -}; - - - -class CGetTextFromUserDialog : public CGetTextFromUserDialogBase -{ -protected: - // Event handlers - void OnButtonOK(wxCommandEvent& event) { EndModal(true); } - void OnButtonCancel(wxCommandEvent& event) { EndModal(false); } - void OnClose(wxCloseEvent& event) { EndModal(false); } - - void OnKeyDown(wxKeyEvent& event) - { - if (event.GetKeyCode() == '\r' || event.GetKeyCode() == WXK_NUMPAD_ENTER) - EndModal(true); - else - HandleCtrlA(event); - } - -public: - /** Constructor */ - CGetTextFromUserDialog(wxWindow* parent, - const string& strCaption, - const string& strMessage1, - const string& strValue1="", - const string& strMessage2="", - const string& strValue2="") : CGetTextFromUserDialogBase(parent, wxID_ANY, strCaption) - { - m_staticTextMessage1->SetLabel(strMessage1); - m_textCtrl1->SetValue(strValue1); - if (!strMessage2.empty()) - { - m_staticTextMessage2->Show(true); - m_staticTextMessage2->SetLabel(strMessage2); - m_textCtrl2->Show(true); - m_textCtrl2->SetValue(strValue2); - SetSize(wxDefaultCoord, 180); - } - } - - // Custom - string GetValue() { return (string)m_textCtrl1->GetValue(); } - string GetValue1() { return (string)m_textCtrl1->GetValue(); } - string GetValue2() { return (string)m_textCtrl2->GetValue(); } -}; - - - - - -- cgit v1.2.3