Add Mac arch detection (relatively naive)
This commit is contained in:
parent
6795c187c3
commit
35842b8ac7
@ -3,6 +3,6 @@
|
|||||||
{registered,[]},
|
{registered,[]},
|
||||||
{included_applications,[]},
|
{included_applications,[]},
|
||||||
{applications,[stdlib,kernel]},
|
{applications,[stdlib,kernel]},
|
||||||
{vsn,"0.2.5"},
|
{vsn,"0.2.6"},
|
||||||
{modules,[gajumine,gmc_con,gmc_conf,gmc_gui,gmc_sup]},
|
{modules,[gajumine,gmc_con,gmc_conf,gmc_gui,gmc_sup]},
|
||||||
{mod,{gajumine,[]}}]}.
|
{mod,{gajumine,[]}}]}.
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gajumine).
|
-module(gajumine).
|
||||||
-vsn("0.2.5").
|
-vsn("0.2.6").
|
||||||
-behavior(application).
|
-behavior(application).
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <craigeverett@qpq.swiss>").
|
-copyright("QPQ AG <craigeverett@qpq.swiss>").
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_con).
|
-module(gmc_con).
|
||||||
-vsn("0.2.5").
|
-vsn("0.2.6").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <craigeverett@qpq.swiss>").
|
-copyright("QPQ AG <craigeverett@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
@ -270,8 +270,13 @@ platform_dir() ->
|
|||||||
{unix, linux} ->
|
{unix, linux} ->
|
||||||
"linux_x86_64";
|
"linux_x86_64";
|
||||||
{unix, darwin} ->
|
{unix, darwin} ->
|
||||||
% TODO: Check M2 vs x86
|
case erlang:system_info(system_architecture) of
|
||||||
|
"aarch64-" ++ _ ->
|
||||||
"mac_m2";
|
"mac_m2";
|
||||||
|
Other ->
|
||||||
|
ok = log(info, "system_architecture: ~p", [Other]),
|
||||||
|
"mac_x86_64"
|
||||||
|
end;
|
||||||
{win32, nt} ->
|
{win32, nt} ->
|
||||||
"win_x86_64"
|
"win_x86_64"
|
||||||
end,
|
end,
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_conf).
|
-module(gmc_conf).
|
||||||
-vsn("0.2.5").
|
-vsn("0.2.6").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <craigeverett@qpq.swiss>").
|
-copyright("QPQ AG <craigeverett@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
@ -25,8 +25,8 @@
|
|||||||
net = none :: none | wx:wx_object(),
|
net = none :: none | wx:wx_object(),
|
||||||
acc = none :: none | wx:wx_object(),
|
acc = none :: none | wx:wx_object(),
|
||||||
keys = none :: none | wx:wx_object(),
|
keys = none :: none | wx:wx_object(),
|
||||||
cores = none :: none | wx:wx_object(),
|
cores = 2 :: pos_integer(),
|
||||||
memory = none :: none | wx:wx_object()}).
|
memory = 3550722201 :: pos_integer()}).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -213,16 +213,16 @@ done(State = #s{net = Network, acc = AccTx, keys = KeysTx, cores = CoresTx, memo
|
|||||||
buh_bye(State).
|
buh_bye(State).
|
||||||
|
|
||||||
cores("") ->
|
cores("") ->
|
||||||
none;
|
2;
|
||||||
cores(CoreS) ->
|
cores(CoreS) ->
|
||||||
try
|
try
|
||||||
list_to_integer(CoreS)
|
list_to_integer(CoreS)
|
||||||
catch
|
catch
|
||||||
_:_ -> none
|
_:_ -> 2
|
||||||
end.
|
end.
|
||||||
|
|
||||||
bytes("") ->
|
bytes("") ->
|
||||||
none;
|
3550722201;
|
||||||
bytes(GigsS) ->
|
bytes(GigsS) ->
|
||||||
try
|
try
|
||||||
list_to_integer(GigsS) * gig()
|
list_to_integer(GigsS) * gig()
|
||||||
@ -231,7 +231,7 @@ bytes(GigsS) ->
|
|||||||
try
|
try
|
||||||
trunc(list_to_float(GigsS) * gig())
|
trunc(list_to_float(GigsS) * gig())
|
||||||
catch
|
catch
|
||||||
_:_ -> none
|
_:_ -> 3550722201
|
||||||
end
|
end
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gmc_gui).
|
-module(gmc_gui).
|
||||||
-vsn("0.2.5").
|
-vsn("0.2.6").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <craigeverett@qpq.swiss>").
|
-copyright("QPQ AG <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.2.5").
|
-vsn("0.2.6").
|
||||||
-behaviour(supervisor).
|
-behaviour(supervisor).
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <craigeverett@qpq.swiss>").
|
-copyright("QPQ AG <craigeverett@qpq.swiss>").
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
{type,gui}.
|
{type,gui}.
|
||||||
{modules,[]}.
|
{modules,[]}.
|
||||||
{prefix,"gmc"}.
|
{prefix,"gmc"}.
|
||||||
{author,"Craig Everett"}.
|
|
||||||
{desc,"Mining client for the Gajumaru Root"}.
|
{desc,"Mining client for the Gajumaru Root"}.
|
||||||
{package_id,{"qpq","gajumine",{0,2,5}}}.
|
{author,"Craig Everett"}.
|
||||||
|
{package_id,{"qpq","gajumine",{0,2,6}}}.
|
||||||
{deps,[{"uwiger","gmhive_client",{0,4,4}},
|
{deps,[{"uwiger","gmhive_client",{0,4,4}},
|
||||||
{"uwiger","gmcuckoo",{1,2,3}},
|
{"uwiger","gmcuckoo",{1,2,3}},
|
||||||
{"qpq","cuckoo_cpu",{0,3,0}},
|
{"qpq","cuckoo_cpu",{0,3,0}},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user