Trim MacOS os:cmd values
This commit is contained in:
parent
6a4eca125d
commit
2da7d039f5
@ -3,6 +3,6 @@
|
||||
{registered,[]},
|
||||
{included_applications,[]},
|
||||
{applications,[stdlib,kernel]},
|
||||
{vsn,"0.1.2"},
|
||||
{vsn,"0.1.3"},
|
||||
{modules,[gajumine,gmc_con,gmc_gui,gmc_setup,gmc_sup]},
|
||||
{mod,{gajumine,[]}}]}.
|
||||
|
@ -3,7 +3,7 @@
|
||||
%%% @end
|
||||
|
||||
-module(gajumine).
|
||||
-vsn("0.1.2").
|
||||
-vsn("0.1.3").
|
||||
-behavior(application).
|
||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
||||
|
@ -3,7 +3,7 @@
|
||||
%%% @end
|
||||
|
||||
-module(gmc_con).
|
||||
-vsn("0.1.2").
|
||||
-vsn("0.1.3").
|
||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
||||
-license("GPL-3.0-or-later").
|
||||
@ -396,8 +396,8 @@ optimize_count() ->
|
||||
M = list_to_integer(string:trim(os:cmd("cat /proc/meminfo | grep MemTotal | awk '{print $2}'"))) * 1024,
|
||||
{P, M};
|
||||
{unix, darwin} ->
|
||||
P = list_to_integer(os:cmd("sysctl -n hw.physicalcpu")),
|
||||
M = list_to_integer(os:cmd("sysctl -n hw.memsize")),
|
||||
P = list_to_integer(string:trim(os:cmd("sysctl -n hw.physicalcpu"))),
|
||||
M = list_to_integer(string:trim(os:cmd("sysctl -n hw.memsize"))),
|
||||
{P, M};
|
||||
{win32, nt} ->
|
||||
P = list_to_integer(os:getenv("NUMBER_OF_PROCESSORS")),
|
||||
|
@ -3,7 +3,7 @@
|
||||
%%% @end
|
||||
|
||||
-module(gmc_gui).
|
||||
-vsn("0.1.2").
|
||||
-vsn("0.1.3").
|
||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
||||
-license("GPL-3.0-or-later").
|
||||
@ -34,6 +34,7 @@
|
||||
candy = none :: none | wx:wx_object(),
|
||||
height = none :: none | wx:wx_object(),
|
||||
block = none :: none | wx:wx_object(),
|
||||
% solved = 0 :: non_neg_integer(), % Add a widget to show this. Maybe
|
||||
mess = none :: none | wx:wx_object(),
|
||||
buff = new_buff() :: buff(),
|
||||
buttons = [] :: [#w{}]}).
|
||||
@ -300,6 +301,9 @@ do_message({pool_notification, #{info := #{msg := MSG}}}, State = #s{height = He
|
||||
#{candidate := #{candidate := Candidate}} ->
|
||||
ok = wxStaticText:setLabel(CandT, Candidate),
|
||||
State;
|
||||
#{solution_accepted := #{seq := Seq}} ->
|
||||
Entry = io_lib:format("~nSolution Accepted! You solved one! Sequence: ~w", [Seq]),
|
||||
do_message2(Entry, State);
|
||||
Other ->
|
||||
Entry = io_lib:format("~nUnexpected 'pool_notification': ~tp", [Other]),
|
||||
do_message2(Entry, State)
|
||||
@ -339,6 +343,9 @@ add_message(Entry, Mess, Buff) ->
|
||||
{flush, Updated} ->
|
||||
String = unicode:characters_to_list(lists:reverse(element(5, Updated))),
|
||||
ok = wxTextCtrl:changeValue(Mess, String),
|
||||
Last = wxTextCtrl:getLastPosition(Mess),
|
||||
ok = wxTextCtrl:showPosition(Mess, Last),
|
||||
ok = wxTextCtrl:thaw(Mess),
|
||||
Updated;
|
||||
{append, Updated} ->
|
||||
ok = wxTextCtrl:appendText(Mess, Entry),
|
||||
|
@ -12,7 +12,7 @@
|
||||
%%% @end
|
||||
|
||||
-module(gmc_setup).
|
||||
-vsn("0.1.2").
|
||||
-vsn("0.1.3").
|
||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
||||
-license("GPL-3.0-or-later").
|
||||
|
@ -12,7 +12,7 @@
|
||||
%%% @end
|
||||
|
||||
-module(gmc_sup).
|
||||
-vsn("0.1.2").
|
||||
-vsn("0.1.3").
|
||||
-behaviour(supervisor).
|
||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||
-copyright("Craig Everett <craigeverett@qpq.swiss>").
|
||||
|
@ -4,7 +4,7 @@
|
||||
{prefix,"gmc"}.
|
||||
{author,"Craig Everett"}.
|
||||
{desc,"Mining client for the Gajumaru Root"}.
|
||||
{package_id,{"qpq","gajumine",{0,1,2}}}.
|
||||
{package_id,{"qpq","gajumine",{0,1,3}}}.
|
||||
{deps,[{"uwiger","gmconfig",{0,1,2}},
|
||||
{"uwiger","gproc",{1,0,1}},
|
||||
{"uwiger","gmhive_client",{0,2,1}},
|
||||
|
Loading…
x
Reference in New Issue
Block a user