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