我有一个像这样的项目结构:
ROOT/
apps/
common_lib_1/
src/*.erl
include/*.hrl
common_lib_2/
src/*.erl
include/*.hrl
common_lib_3/
src/*.erl
include/*.hrl
login_server/
src/*.erl
game_server
src/*.erl
rel/
我想分发game_server
和login_server
,game_server
取决于common_lib_1
和common_lib_2
,login_server
取决于common_lib_1
和common_lib_3
。
如果在rebar create-node nodeid=xxx
和rel/game_server
中执行rel/login_server
,当我使用rebar generate
创建分发时,会生成许多重复的文件。
我想发布像这样干净的结构:
my_game/
bin/
game_server_region_1 # startup script of game server with region 1
game_server_region_2 # startup script of game server with region 2
login_server # startup script of login server
... # other common files
erts-5.10.3/
bin/
lib/
stdlib-1.19.3/
sasl-2.3.3/
common_lib_1-1.0.0/
common_lib_2-1.0.0/
common_lib_3-1.0.0/
game_server-1.0.0/
login_server-1.0.0/
... # other shared libraries
releases/
1.0.0/
game_server.boot
game_server.rel
game_server.script
login_server.boot
login_server.rel
login_server.script
game_server_region_1_vm.args
game_server_region_1_sys.config
game_server_region_1_vm.args
game_server_region_1_sys.config
login_server_vm.args
login_server_sys.config
RELEASES
start_erl.data
我希望所有应用程序共享库,它们都有自己的启动脚本,vm和sys config。
如何编写干净的reltool.config来执行此操作?