檢視原始碼 rel

發行資源檔

描述

發行資源檔 指定在基於 Erlang/OTP 的發行版本(系統)中包含哪些應用程式。

此檔案由 systools 中的函式在生成啟動腳本(.script.boot)和發行版本升級檔案(relup)時使用。

檔案語法

發行資源檔應命名為 Name.rel

.rel 檔案包含一個單一的 Erlang 項,稱為發行版本規格。該檔案具有以下語法

{release, {RelName,Vsn}, {erts, EVsn},
  [{Application, AppVsn} |
   {Application, AppVsn, Type} |
   {Application, AppVsn, IncApps} |
   {Application, AppVsn, Type, IncApps}]}.
  • RelName = string() - 發行版本名稱。

  • Vsn = string() - 發行版本版本。

  • EVsn = string() - 該發行版本預期的 ERTS 版本。

  • Application = atom() - 發行版本中包含的應用程式名稱。

  • AppVsn = string() - 發行版本中包含的應用程式版本。

  • Type = permanent | transient | temporary | load | none - 發行版本中包含的應用程式的啟動類型。

    如果 Type = permanent | transient | temporary,則會以相應的方式載入和啟動應用程式,請參閱 application

    如果 Type = load,則只會載入應用程式。

    如果 Type = none,則不會載入也不會啟動應用程式,儘管其模組的程式碼已載入。

    預設值為 permanent

  • IncApps = [atom()] - 由發行版本中包含的應用程式所包含的應用程式列表。該列表必須是應用程式資源檔(Application.app)中指定的包含應用程式的子集,並覆蓋此值。預設值與應用程式資源檔中的值相同。

注意

應用程式列表必須包含 Kernel 和 STDLIB 應用程式。

另請參閱

application, relup(4), systools