diff --git a/otpr-zx-0.9.2.zsp b/otpr-zx-0.9.2.zsp new file mode 100644 index 0000000..dd42b09 Binary files /dev/null and b/otpr-zx-0.9.2.zsp differ diff --git a/zomp/lib/otpr/zx/0.9.2/src/zx.erl b/zomp/lib/otpr/zx/0.9.2/src/zx.erl index ec6fdf1..d6e6f2e 100644 --- a/zomp/lib/otpr/zx/0.9.2/src/zx.erl +++ b/zomp/lib/otpr/zx/0.9.2/src/zx.erl @@ -33,6 +33,7 @@ -export([do/0]). -export([run/2, not_done/1, done/1, + get_home/0, subscribe/1, unsubscribe/0, list/0, list/1, list/2, list/3, latest/1, list_type/2, list_type_ar/1, describe/1, describe_plural/1, integrate/1, @@ -490,6 +491,17 @@ stop(_) -> %%% Daemon Controls +-spec get_home() -> file:filename(). +%% @doc +%% A program launched by ZX can call this function to query the zx_daemon for its +%% current code home. This is necessary for programs that have extra static data +%% included in their project (translation files, icons, images, texture maps, etc.) +%% and need to be able to locate it relative to the project root directory. + +get_home() -> + zx_daemon:get_home(). + + -spec subscribe(package()) -> ok | {error, Reason :: term()}. %% @doc %% Initiates the zx_daemon and instructs it to subscribe to a package. diff --git a/zomp/lib/otpr/zx/0.9.2/src/zx_daemon.erl b/zomp/lib/otpr/zx/0.9.2/src/zx_daemon.erl index 1375d28..bdadfe7 100644 --- a/zomp/lib/otpr/zx/0.9.2/src/zx_daemon.erl +++ b/zomp/lib/otpr/zx/0.9.2/src/zx_daemon.erl @@ -327,6 +327,9 @@ %%% Public Interface + +-spec get_home() -> file:filename(). + get_home() -> gen_server:call(?MODULE, get_home). @@ -1922,7 +1925,6 @@ do_abdicate(Realm, State = #s{conf = C = #conf{managed = Managed}}) -> ok = log(info, "No longer managing realm: ~160tp", [Realm]), State#s{conf = NewC}; false -> - ok = tell(error, "Cannot abdicate an unmanaged realm."), State end.