diff --git a/ebin/gajumine.app b/ebin/gajumine.app index d968fe9..1d00c44 100644 --- a/ebin/gajumine.app +++ b/ebin/gajumine.app @@ -3,6 +3,6 @@ {registered,[]}, {included_applications,[]}, {applications,[stdlib,kernel]}, - {vsn,"0.1.0"}, - {modules,[gajumine,gmc_con,gmc_gui,gmc_sup]}, + {vsn,"0.1.2"}, + {modules,[gajumine,gmc_con,gmc_gui,gmc_setup,gmc_sup]}, {mod,{gajumine,[]}}]}. diff --git a/src/gajumine.erl b/src/gajumine.erl index 0571c64..eea96d4 100644 --- a/src/gajumine.erl +++ b/src/gajumine.erl @@ -3,7 +3,7 @@ %%% @end -module(gajumine). --vsn("0.1.0"). +-vsn("0.1.2"). -behavior(application). -author("Craig Everett "). -copyright("Craig Everett "). diff --git a/src/gmc_con.erl b/src/gmc_con.erl index 29019b2..91a76aa 100644 --- a/src/gmc_con.erl +++ b/src/gmc_con.erl @@ -3,7 +3,7 @@ %%% @end -module(gmc_con). --vsn("0.1.0"). +-vsn("0.1.2"). -author("Craig Everett "). -copyright("Craig Everett "). -license("GPL-3.0-or-later"). @@ -404,7 +404,7 @@ optimize_count() -> M = list_to_integer(string:strip(lists:nth(2, string:split(os:cmd("wmic computersystem get TotalPhysicalMemory"), "\r\r\n", all)))), {P, M} end, - MeanMaps = Memory div (1_073_741_824 * 4), + MeanMaps = Memory div 3550722201, Recommended = max(min(Procs, MeanMaps) - 1, 1), Notice = fun(F, A) -> gmc_gui:message({notice, io_lib:format(F, A)}) end, ok = Notice("Physical Processors: ~p", [Procs]), diff --git a/src/gmc_gui.erl b/src/gmc_gui.erl index 33c49e7..6519980 100644 --- a/src/gmc_gui.erl +++ b/src/gmc_gui.erl @@ -3,7 +3,7 @@ %%% @end -module(gmc_gui). --vsn("0.1.0"). +-vsn("0.1.2"). -author("Craig Everett "). -copyright("Craig Everett "). -license("GPL-3.0-or-later"). @@ -321,27 +321,39 @@ avg20(Now, LastTS, AvgDiff) -> do_message2(Entry, State = #s{mess = Mess, buff = Buff}) -> NewBuff = - case add_message(Entry, Buff) of - {flush, Updated} -> - String = unicode:characters_to_list(lists:reverse(element(5, Updated))), - ok = wxTextCtrl:changeValue(Mess, String), - ok = wxTextCtrl:setInsertionPointEnd(Mess), - Updated; - {append, Updated} -> - ok = wxTextCtrl:appendText(Mess, Entry), + case os:type() of + {unix, _} -> + add_message(Entry, Mess, Buff); + {win32, nt} -> + ok = wxTextCtrl:freeze(Mess), + Updated = add_message(Entry, Mess, Buff), + Last = wxTextCtrl:getLastPosition(Mess), + ok = wxTextCtrl:showPosition(Mess, Last), + ok = wxTextCtrl:thaw(Mess), Updated end, State#s{buff = NewBuff}. -add_message(Entry, {OMax, OMax, IMax, IMax, [H | T]}) -> +add_message(Entry, Mess, Buff) -> + case add_message2(Entry, Buff) of + {flush, Updated} -> + String = unicode:characters_to_list(lists:reverse(element(5, Updated))), + ok = wxTextCtrl:changeValue(Mess, String), + Updated; + {append, Updated} -> + ok = wxTextCtrl:appendText(Mess, Entry), + Updated + end. + +add_message2(Entry, {OMax, OMax, IMax, IMax, [H | T]}) -> {flush, {OMax, OMax, IMax, 1, [[Entry] , lists:reverse(H) | lists:droplast(T)]}}; -add_message(Entry, {OMax, OMax, IMax, ICur, [H | Buff]}) -> +add_message2(Entry, {OMax, OMax, IMax, ICur, [H | Buff]}) -> {append, {OMax, OMax, IMax, ICur + 1, [[Entry | H] | Buff]}}; -add_message(Entry, {OMax, OCur, IMax, IMax, [H | T]}) -> +add_message2(Entry, {OMax, OCur, IMax, IMax, [H | T]}) -> {append, {OMax, OCur + 1, IMax, 1, [[Entry], lists:reverse(H) | T]}}; -add_message(Entry, {OMax, OCur, IMax, ICur, [H | Buff]}) -> +add_message2(Entry, {OMax, OCur, IMax, ICur, [H | Buff]}) -> {append, {OMax, OCur, IMax, ICur + 1, [[Entry | H] | Buff]}}; -add_message(Entry, {OMax, 0, IMax, 0, []}) -> +add_message2(Entry, {OMax, 0, IMax, 0, []}) -> {append, {OMax, 1, IMax, 1, [[Entry]]}}. @@ -362,9 +374,8 @@ eureka(State = #s{frame = Frame, j = J}) -> eureka_url() -> case gmc_con:network() of - mainnet -> "https://gajumining.com"; - testnet -> "https://test.gajumining.com"; - none -> "https://gajumining.com" + <<"testnet">> -> "https://test.gajumining.com"; + _ -> "https://gajumining.com" end. @@ -380,9 +391,8 @@ explorer(State = #s{frame = Frame, j = J, id = ID}) -> explorer_url() -> case gmc_con:network() of - mainnet -> "https://groot.mainnet.gajumaru.io"; - testnet -> "https://groot.testnet.gajumaru.io"; - none -> "https://groot.mainnet.gajumaru.io" + none -> "https://groot.mainnet.gajumaru.io"; + Network -> unicode:characters_to_list(["https://groot.", Network, ".gajumaru.io"]) end. diff --git a/src/gmc_setup.erl b/src/gmc_setup.erl index 4b70d5c..d038255 100644 --- a/src/gmc_setup.erl +++ b/src/gmc_setup.erl @@ -12,7 +12,7 @@ %%% @end -module(gmc_setup). --vsn("0.1.0"). +-vsn("0.1.2"). -author("Craig Everett "). -copyright("Craig Everett "). -license("GPL-3.0-or-later"). diff --git a/src/gmc_sup.erl b/src/gmc_sup.erl index c61a56c..2956686 100644 --- a/src/gmc_sup.erl +++ b/src/gmc_sup.erl @@ -12,7 +12,7 @@ %%% @end -module(gmc_sup). --vsn("0.1.0"). +-vsn("0.1.2"). -behaviour(supervisor). -author("Craig Everett "). -copyright("Craig Everett "). diff --git a/zomp.meta b/zomp.meta index c8d56eb..e16c61a 100644 --- a/zomp.meta +++ b/zomp.meta @@ -2,18 +2,18 @@ {type,gui}. {modules,[]}. {prefix,"gmc"}. -{desc,"Mining client for the Gajumaru Root"}. {author,"Craig Everett"}. -{package_id,{"qpq","gajumine",{0,1,0}}}. -{deps,[{"qpq","cuckoo_cpu",{0,2,0}}, +{desc,"Mining client for the Gajumaru Root"}. +{package_id,{"qpq","gajumine",{0,1,2}}}. +{deps,[{"uwiger","gmconfig",{0,1,2}}, + {"uwiger","gproc",{1,0,1}}, + {"uwiger","gmhive_client",{0,2,1}}, + {"qpq","cuckoo_cpu",{0,2,0}}, {"uwiger","gmhive_worker",{0,1,1}}, {"uwiger","gmhive_protocol",{0,1,1}}, - {"uwiger","gmhive_client",{0,1,3}}, - {"uwiger","gproc",{1,0,0}}, {"uwiger","enoise",{1,3,0}}, {"uwiger","gmcuckoo",{1,1,0}}, {"uwiger","setup",{2,2,4}}, - {"uwiger","gmconfig",{0,1,1}}, {"otpr","hakuzaru",{0,6,1}}, {"otpr","gajudesk",{0,5,3}}, {"otpr","zxwidgets",{1,0,1}},