2013-07-05 84 views
4

我使用rebar generate處理釋放,但是當我開始 應用程序,我用DEPS不會found.`如何在使用鋼筋釋放時處理折彎?

我可以開始使用erl -pa ./ebin ./deps/*/ebin -s myapp手動應用。

我在想如何配置rebar.configreltool.config來處理 依賴關係?謝謝。

回答

7

爲了讓reltool生成包含依賴關係的版本,您需要將它們添加到reltool.config。我有一個名爲drill_instructor的應用程序,它具有以下reltool.config。像{app, stdlib, [{incl_cond, include}]},這樣的行告訴reltool在發佈中包含該應用程序。我還添加了the lib_dirs設置。

{sys, [ 
    {lib_dirs, ["../deps"]}, 
    {erts, [{mod_cond, derived}, {app_file, strip}]}, 
    {app_file, strip}, 
    {rel, "drill_instructor", "1", 
    [ 
    kernel, 
    stdlib, 
    sasl, 
    crypto, 
    ranch, 
    jiffy, 
    cowboy, 
    jiffy, 
    drill_instructor 
    ]}, 
    {rel, "start_clean", "", 
    [ 
    kernel, 
    stdlib 
    ]}, 
    {boot_rel, "drill_instructor"}, 
    {profile, embedded}, 
    {incl_cond, exclude}, 
    {excl_archive_filters, [".*"]}, %% Do not archive built libs 
    {excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)", 
         "^erts.*/(doc|info|include|lib|man|src)"]}, 
    {excl_app_filters, ["\.gitignore"]}, 
    {app, sasl, [{incl_cond, include}]}, 
    {app, crypto, [{incl_cond, include}]}, 
    {app, stdlib, [{incl_cond, include}]}, 
    {app, kernel, [{incl_cond, include}]}, 
    {app, cowboy, [{incl_cond, include}]}, 
    {app, ranch, [{incl_cond, include}]}, 
    {app, jiffy, [{incl_cond, include}]}, 
    {app, drill_armory, [{incl_cond, include}]}, 
    {app, drill_instructor, [{incl_cond, include}, {lib_dir, ".."}]} 
    ]}. 

{target_dir, "drill_instructor"}. 

{overlay, [ 
     {mkdir, "log/sasl"}, 
     {copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"}, 
     {copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"}, 
     {copy, "files/drill_instructor", "bin/drill_instructor"}, 
     {copy, "files/drill_instructor.cmd", "bin/drill_instructor.cmd"}, 
     {copy, "files/start_erl.cmd", "bin/start_erl.cmd"}, 
     {copy, "files/install_upgrade.escript", "bin/install_upgrade.escript"}, 
     {copy, "files/sys.config", "releases/\{\{rel_vsn\}\}/sys.config"}, 
     {copy, "files/vm.args", "releases/\{\{rel_vsn\}\}/vm.args"} 
     ]}. 

在rebar.config,我還添加了rel爲sub_dir

{sub_dirs, ["rel"]}. 
+2

謝謝,關鍵是'{lib_dirs,[ 「../ DEPS」]}' –

相關問題