1<?xml version="1.0" encoding="utf-8" ?> 2<!DOCTYPE chapter SYSTEM "chapter.dtd"> 3 4<chapter> 5 <header> 6 <copyright> 7 <year>2009</year> 8 <year>2018</year> 9 <holder>Ericsson AB, All Rights Reserved</holder> 10 </copyright> 11 <legalnotice> 12 Licensed under the Apache License, Version 2.0 (the "License"); 13 you may not use this file except in compliance with the License. 14 You may obtain a copy of the License at 15 16 http://www.apache.org/licenses/LICENSE-2.0 17 18 Unless required by applicable law or agreed to in writing, software 19 distributed under the License is distributed on an "AS IS" BASIS, 20 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 See the License for the specific language governing permissions and 22 limitations under the License. 23 24 The Initial Developer of the Original Code is Ericsson AB. 25 </legalnotice> 26 27 <title>Examples</title> 28 <prepared>Håkan Mattsson</prepared> 29 <responsible>Håkan Mattsson</responsible> 30 <docno></docno> 31 <approved>Håkan Mattsson</approved> 32 <checked></checked> 33 <date></date> 34 <rev>%VSN%</rev> 35 <file>reltool_examples.xml</file> 36 </header> 37 38 <section> 39 <title>Start and stop windows and servers</title> 40 41 <p>The main process in Reltool is the server. It can be used as it 42 is or be used via the GUI frontend process. When the GUI is 43 started, a server process will automatically be started. The GUI 44 process is started with 45 <seemfa marker="reltool#start/0"><c>reltool:start/0</c></seemfa>, 46 <seemfa marker="reltool#start/1"><c>reltool:start/1</c></seemfa> or 47 <seemfa marker="reltool#start_link/1"><c>reltool:start_link/1</c></seemfa>. 48 The pid of its server can be obtained with 49 <seemfa marker="reltool#start_link/1"><c>reltool:get_server/1</c></seemfa> 50 </p> 51 52 <pre> 53Erlang/OTP 20 [erts-9.0] [source-c13b302] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] 54[hipe] [kernel-poll:false] 55Eshell V9.0 (abort with ^G) 561> 571> {ok, Win} = reltool:start([]). 58{ok,<0.36.01>} 592> {ok, Server} = reltool:get_server(Win). 60{ok,<0.37.01>} 613> reltool:get_config(Server). 62{ok,{sys,[]}} 634> 644> {ok, Server2} = reltool:start_server([]). 65{ok,<0.6535.01>} 665> reltool:get_config(Server2). 67{ok,{sys,[]}} 686> reltool:stop(Server2). 69ok 70 </pre> 71 72 </section> 73 74 <section> 75 <title>Inspecting the configuration</title> 76 77 <pre> 78Erlang/OTP 20 [erts-9.0] [source-c13b302] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] 79[hipe] [kernel-poll:false] 80Eshell V9.0 (abort with ^G) 811> 821> Config = {sys, [{escript, "examples/display_args", [{incl_cond, include}]}, 83 {app, inets, [{incl_cond, include}]}, 84 {app, mnesia, [{incl_cond, exclude}]}, 85 {app, ssl, [{incl_cond, exclude}]}, 86 {app, runtime_tools, [{incl_cond, exclude}]}, 87 {app, syntax_tools, [{incl_cond, exclude}]}]}. 88{sys,[{escript,"examples/display_args",[{incl_cond,include}]}, 89 {app,inets,[{incl_cond,include}]}, 90 {app,mnesia,[{incl_cond,exclude}]}, 91 {app,ssl,[{incl_cond,exclude}]}, 92 {app,runtime_tools,[{incl_cond,exclude}]}, 93 {app,syntax_tools,[{incl_cond,exclude}]}]} 942> 952> {ok, Server} = reltool:start_server([Config]). 96{ok,<0.66.0>} 973> 983> reltool:get_config(Server). 99{ok,{sys,[{escript,"/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args", 100 [{incl_cond,include}]}, 101 {app,inets,[{incl_cond,include}]}, 102 {app,mnesia,[{incl_cond,exclude}]}, 103 {app,runtime_tools,[{incl_cond,exclude}]}, 104 {app,ssl,[{incl_cond,exclude}]}, 105 {app,syntax_tools,[{incl_cond,exclude}]}]}} 1064> 1074> reltool:get_config(Server, false, false). 108{ok,{sys,[{escript,"/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args", 109 [{incl_cond,include}]}, 110 {app,inets,[{incl_cond,include}]}, 111 {app,mnesia,[{incl_cond,exclude}]}, 112 {app,runtime_tools,[{incl_cond,exclude}]}, 113 {app,ssl,[{incl_cond,exclude}]}, 114 {app,syntax_tools,[{incl_cond,exclude}]}]}} 1155> 1165> reltool:get_config(Server, true, false). 117{ok,{sys,[{root_dir,"/usr/local/lib/erlang"}, 118 {lib_dirs,[]}, 119 {escript,"/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args", 120 [{incl_cond,include}]}, 121 {mod_cond,all}, 122 {incl_cond,derived}, 123 {app,inets, 124 [{incl_cond,include},{vsn,undefined},{lib_dir,undefined}]}, 125 {app,mnesia,[{incl_cond,exclude}]}, 126 {app,runtime_tools,[{incl_cond,exclude}]}, 127 {app,ssl,[{incl_cond,exclude}]}, 128 {app,syntax_tools,[{incl_cond,exclude}]}, 129 {boot_rel,"start_clean"}, 130 {rel,"start_clean","1.0",[]}, 131 {rel,"start_sasl","1.0",[sasl]}, 132 {emu_name,"beam"}, 133 {relocatable,true}, 134 {profile,development}, 135 {incl_sys_filters,[".*"]}, 136 {excl_sys_filters,[]}, 137 {incl_app_filters,[".*"]}, 138 {excl_app_filters,[]}, 139 {incl_archive_filters,[".*"]}, 140 {excl_archive_filters,[[...]|...]}, 141 {archive_opts,[]}, 142 {rel_app_type,...}, 143 {...}|...]}} 1446> 1456> reltool:get_config(Server, true, true). 146{ok,{sys,[{root_dir,"/usr/local/lib/erlang"}, 147 {lib_dirs,[]}, 148 {escript,"/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args", 149 [{incl_cond,include}]}, 150 {mod_cond,all}, 151 {incl_cond,derived}, 152 {erts,[{app,erts, 153 [{vsn,"10.0"}, 154 {lib_dir,"/usr/local/lib/erlang/lib/erts-10.0"}, 155 {mod,erl_prim_loader,[]}, 156 {mod,erl_tracer,[]}, 157 {mod,erlang,[]}, 158 {mod,erts_code_purger,[]}, 159 {mod,erts_dirty_process_signal_handler,[]}, 160 {mod,erts_internal,[]}, 161 {mod,erts_literal_area_collector,[]}, 162 {mod,init,[]}, 163 {mod,erl_init,...}, 164 {mod,...}, 165 {...}|...]}]}, 166 {app,compiler, 167 [{vsn,"7.0.4"}, 168 {lib_dir,"/usr/local/lib/erlang/lib/compiler-7.0.4"}, 169 {mod,beam_a,[]}, 170 {mod,beam_asm,[]}, 171 {mod,beam_block,[]}, 172 {mod,beam_bs,[]}, 173 {mod,beam_bsm,[]}, 174 {mod,beam_clean,[]}, 175 {mod,beam_dead,[]}, 176 {mod,beam_dict,[]}, 177 {mod,beam_disasm,[]}, 178 {mod,beam_except,[]}, 179 {mod,beam_flatten,...}, 180 {mod,...}, 181 {...}|...]}, 182 {app,crypto, 183 [{vsn,"3.7.4"}, 184 {lib_dir,"/usr/local/lib/erlang/lib/crypto-3.7.4"}, 185 {mod,crypto,[]}, 186 {mod,crypto_ec_curves,[]}]}, 187 {app,hipe, 188 [{vsn,"3.15.4"}, 189 {lib_dir,"/usr/local/lib/erlang/lib/hipe-3.15.4"}, 190 {mod,cerl_cconv,[]}, 191 {mod,cerl_closurean,[]}, 192 {mod,cerl_hipeify,[]}, 193 {mod,cerl_lib,[]}, 194 {mod,cerl_messagean,[]}, 195 {mod,cerl_pmatch,[]}, 196 {mod,cerl_prettypr,[]}, 197 {mod,cerl_to_icode,[]}, 198 {mod,cerl_typean,...}, 199 {mod,...}, 200 {...}|...]}, 201 {app,inets, 202 [{incl_cond,include}, 203 {vsn,"6.3.9"}, 204 {lib_dir,"/usr/local/lib/erlang/lib/inets-6.3.9"}, 205 {mod,ftp,[]}, 206 {mod,ftp_progress,[]}, 207 {mod,ftp_response,[]}, 208 {mod,ftp_sup,[]}, 209 {mod,http_chunk,[]}, 210 {mod,http_request,[]}, 211 {mod,http_response,...}, 212 {mod,...}, 213 {...}|...]}, 214 {app,kernel, 215 [{vsn,"5.2"}, 216 {lib_dir,"/usr/local/lib/erlang/lib/kernel-5.2"}, 217 {mod,application,[]}, 218 {mod,application_controller,[]}, 219 {mod,application_master,[]}, 220 {mod,application_starter,[]}, 221 {mod,auth,[]}, 222 {mod,code,[]}, 223 {mod,code_server,...}, 224 {mod,...}, 225 {...}|...]}, 226 {app,mnesia,[{incl_cond,exclude}]}, 227 {app,runtime_tools,[{incl_cond,exclude}]}, 228 {app,sasl, 229 [{vsn,"3.0.3"}, 230 {lib_dir,"/usr/local/lib/erlang/lib/sasl-3.0.3"}, 231 {mod,alarm_handler,[]}, 232 {mod,erlsrv,[]}, 233 {mod,format_lib_supp,[]}, 234 {mod,misc_supp,...}, 235 {mod,...}, 236 {...}|...]}, 237 {app,ssl,[{incl_cond,exclude}]}, 238 {app,stdlib, 239 [{vsn,"3.3"}, 240 {lib_dir,"/usr/local/lib/erlang/lib/stdlib-3.3"}, 241 {mod,array,[]}, 242 {mod,base64,...}, 243 {mod,...}, 244 {...}|...]}, 245 {app,syntax_tools,[{incl_cond,exclude}]}, 246 {app,tools, 247 [{vsn,"2.9.1"},{lib_dir,[...]},{mod,...},{...}|...]}, 248 {boot_rel,"start_clean"}, 249 {rel,"start_clean","1.0",[]}, 250 {rel,"start_sasl","1.0",[...]}, 251 {emu_name,"beam"}, 252 {relocatable,true}, 253 {profile,...}, 254 {...}|...]}} 2557> 2567> reltool:get_config([{sys, [{profile, embedded}]}], true, false). 257{ok,{sys,[{root_dir,"/usr/local/lib/erlang"}, 258 {lib_dirs,[]}, 259 {mod_cond,all}, 260 {incl_cond,derived}, 261 {boot_rel,"start_clean"}, 262 {rel,"start_clean","1.0",[]}, 263 {rel,"start_sasl","1.0",[sasl]}, 264 {emu_name,"beam"}, 265 {relocatable,true}, 266 {profile,embedded}, 267 {incl_sys_filters,["^bin","^erts","^lib","^releases"]}, 268 {excl_sys_filters,["^bin/(erlc|dialyzer|typer)(|\\.exe)$", 269 "^erts.*/bin/(erlc|dialyzer|typer)(|\\.exe)$", 270 "^erts.*/bin/.*(debug|pdb)"]}, 271 {incl_app_filters,["^ebin","^include","^priv"]}, 272 {excl_app_filters,[]}, 273 {incl_archive_filters,[".*"]}, 274 {excl_archive_filters,["^include$","^priv$"]}, 275 {archive_opts,[]}, 276 {rel_app_type,permanent}, 277 {embedded_app_type,load}, 278 {app_file,keep}, 279 {debug_info,keep}]}} 2808> 2818> reltool:get_config([{sys, [{profile, standalone}]}], true, false). 282{ok,{sys,[{root_dir,"/usr/local/lib/erlang"}, 283 {lib_dirs,[]}, 284 {mod_cond,all}, 285 {incl_cond,derived}, 286 {boot_rel,"start_clean"}, 287 {rel,"start_clean","1.0",[]}, 288 {rel,"start_sasl","1.0",[sasl]}, 289 {emu_name,"beam"}, 290 {relocatable,true}, 291 {profile,standalone}, 292 {incl_sys_filters,["^bin/(erl|epmd)(|\\.exe|\\.ini)$", 293 "^bin/start(|_clean).boot$","^erts.*/bin","^lib$"]}, 294 {excl_sys_filters,["^erts.*/bin/(erlc|dialyzer|typer)(|\\.exe)$", 295 "^erts.*/bin/(start|escript|to_erl|run_erl)(|\\.exe)$", 296 "^erts.*/bin/.*(debug|pdb)"]}, 297 {incl_app_filters,["^ebin","^priv"]}, 298 {excl_app_filters,["^ebin/.*\\.appup$"]}, 299 {incl_archive_filters,[".*"]}, 300 {excl_archive_filters,["^include$","^priv$"]}, 301 {archive_opts,[]}, 302 {rel_app_type,permanent}, 303 {app_file,keep}, 304 {debug_info,keep}]}} 305 </pre> 306 307 </section> 308 309 <section> 310 <title>Generate release and script files</title> 311 <pre> 312Erlang/OTP 20 [erts-10.0] [source-c13b302] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] 313[hipe] [kernel-poll:false] 314Eshell V10.0 (abort with ^G) 3151> 3161> {ok, Server} = reltool:start_server([{config, 317 {sys, 318 [{boot_rel, "NAME"}, 319 {rel, "NAME", "VSN", 320 [sasl], 321 [{load_dot_erlang, false}]}]}}]). 322{ok,<0.1288.0>} 3232> 3242> reltool:get_config(Server). 325{ok,{sys,[{boot_rel,"NAME"}, 326 {rel,"NAME","VSN",[sasl]}]}} 3273> 3283> reltool:get_rel(Server, "NAME"). 329{ok,{release,{"NAME","VSN"}, 330 {erts,"10.0"}, 331 [{kernel,"5.2"},{stdlib,"3.3"},{sasl,"3.0.3"}]}} 3324> 3334> reltool:get_script(Server, "NAME"). 334{ok,{script,{"NAME","VSN"}, 335 [{preLoaded,[erl_prim_loader,erl_tracer,erlang, 336 erts_code_purger,erts_dirty_process_signal_handler, 337 erts_internal,erts_literal_area_collector,init,erl_init, 338 prim_eval,prim_file,prim_inet,prim_zip,zlib]}, 339 {progress,preloaded}, 340 {path,["$ROOT/lib/kernel-5.2/ebin", 341 "$ROOT/lib/stdlib-3.3/ebin"]}, 342 {primLoad,[error_handler]}, 343 {kernel_load_completed}, 344 {progress,kernel_load_completed}, 345 {path,["$ROOT/lib/kernel-5.2/ebin"]}, 346 {primLoad,[application,application_controller, 347 application_master,application_starter,auth,code, 348 code_server,disk_log,disk_log_1,disk_log_server, 349 disk_log_sup,dist_ac,dist_util,erl_boot_server|...]}, 350 {path,["$ROOT/lib/stdlib-3.3/ebin"]}, 351 {primLoad,[array,base64,beam_lib,binary,c,calendar,dets, 352 dets_server,dets_sup,dets_utils,dets_v9,dict|...]}, 353 {path,["$ROOT/lib/sasl-3.0.3/ebin"]}, 354 {primLoad,[alarm_handler,erlsrv,format_lib_supp,misc_supp, 355 rb,rb_format_supp,release_handler,release_handler_1,sasl, 356 sasl_report|...]}, 357 {progress,modules_loaded}, 358 {path,["$ROOT/lib/kernel-5.2/ebin", 359 "$ROOT/lib/stdlib-3.3/ebin","$ROOT/lib/sasl-3.0.3/ebin"]}, 360 {kernelProcess,heart,{heart,start,[]}}, 361 {kernelProcess,error_logger,{error_logger,start_link,[]}}, 362 {kernelProcess,application_controller, 363 {application_controller,start,[{...}]}}, 364 {progress,init_kernel_started}, 365 {apply,{application,load,[...]}}, 366 {apply,{application,load,...}}, 367 {progress,applications_loaded}, 368 {apply,{...}}, 369 {apply,...}, 370 {...}|...]}} 3715> 3725> reltool:stop(Server). 373ok 374 </pre> 375 </section> 376 377 <section> 378 <title>Create a target system</title> 379 <pre> 380Erlang/OTP 20 [erts-10.0] [source-c13b302] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] 381[hipe] [kernel-poll:false] 382Eshell V10.0 (abort with ^G) 3831> 3841> Config = {sys, [{escript, "examples/display_args", [{incl_cond, include}]}, 385 {app, inets, [{incl_cond, include}]}, 386 {app, mnesia, [{incl_cond, exclude}]}, 387 {app, ssl, [{incl_cond, exclude}]}, 388 {app, runtime_tools, [{incl_cond, exclude}]}, 389 {app, syntax_tools, [{incl_cond, exclude}]}]}. 390{sys,[{escript,"examples/display_args",[{incl_cond,include}]}, 391 {app,inets,[{incl_cond,include}]}, 392 {app,mnesia,[{incl_cond,exclude}]}, 393 {app,ssl,[{incl_cond,exclude}]}, 394 {app,runtime_tools,[{incl_cond,exclude}]}, 395 {app,syntax_tools,[{incl_cond,exclude}]}]} 3962> 3972> {ok, Spec} = reltool:get_target_spec([Config]). 398{ok,[{create_dir,"releases", 399 [{write_file,"start_erl.data","10.0 1.0\n"}, 400 {create_dir,"1.0", 401 [{write_file,"start_clean.rel", 402 [37,37,32,114,101,108,32,103,101,110,101,114,97,116|...]}, 403 {write_file,"start_clean.script", 404 [37,37,32,115,99,114,105,112,116,32,103,101,110|...]}, 405 {write_file,"start_clean.boot", 406 <<131,104,3,119,6,115,99,114,105,112,116,104,...>>}, 407 {write_file,"start_sasl.rel", 408 [37,37,32,114,101,108,32,103,101,110,101|...]}, 409 {write_file,"start_sasl.script", 410 [37,37,32,115,99,114,105,112,116,32|...]}, 411 {write_file,"start_sasl.boot", 412 <<131,104,3,119,6,115,99,114,105,...>>}]}]}, 413 {create_dir,"bin", 414 [{copy_file,"display_args.escript", 415 "/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args"}, 416 {copy_file,"display_args","erts-10.0/bin/escript"}, 417 {copy_file,"start","erts-10.0/bin/start"}, 418 {copy_file,"ct_run","erts-10.0/bin/ct_run"}, 419 {copy_file,"dialyzer","erts-10.0/bin/dialyzer"}, 420 {copy_file,"run_erl","erts-10.0/bin/run_erl"}, 421 {copy_file,"erl","erts-10.0/bin/dyn_erl"}, 422 {copy_file,"to_erl","erts-10.0/bin/to_erl"}, 423 {copy_file,"epmd","erts-10.0/bin/epmd"}, 424 {copy_file,"erlc","erts-10.0/bin/erlc"}, 425 {copy_file,"typer","erts-10.0/bin/typer"}, 426 {copy_file,"escript","erts-10.0/bin/escript"}, 427 {write_file,"start_clean.boot",<<131,104,3,119,6,115,...>>}, 428 {write_file,"start_sasl.boot",<<131,104,3,119,6,...>>}, 429 {write_file,"start.boot",<<131,104,3,119,...>>}]}, 430 {copy_file,"Install"}, 431 {create_dir,"misc", 432 [{copy_file,"makewhatis"},{copy_file,"format_man_pages"}]}, 433 {create_dir,"usr", 434 [{create_dir,"lib", 435 [{copy_file,"liberts.a"}, 436 {copy_file,"liberl_interface_st.a"}, 437 {copy_file,"liberts_r.a"}, 438 {copy_file,"libic.a"}, 439 {copy_file,"liberl_interface.a"}, 440 {copy_file,"libei_st.a"}, 441 {copy_file,"libei.a"}]}, 442 {create_dir,"include", 443 [{copy_file,"erl_memory_trace_parser.h"}, 444 {copy_file,"driver_int.h"}, 445 {copy_file,"ei_connect.h"}, 446 {copy_file,"ei.h"}, 447 {copy_file,"erl_nif_api_funcs.h"}, 448 {copy_file,"erl_fixed_size_int_types.h"}, 449 {copy_file,"erl_int_sizes_config.h"}, 450 {copy_file,"erl_interface.h"}, 451 {copy_file,"eicode.h"}, 452 {copy_file,"erl_driver.h"}, 453 {copy_file,"erlang.idl"}, 454 {copy_file,[...]}, 455 {copy_file,...}, 456 {...}]}]}, 457 {create_dir,"erts-10.0", 458 [{create_dir,"bin", 459 [{copy_file,"start"}, 460 {copy_file,"ct_run"}, 461 {copy_file,"erlexec"}, 462 {copy_file,"dialyzer"}, 463 {copy_file,"beam.smp"}, 464 {copy_file,"run_erl"}, 465 {copy_file,"erl","erts-10.0/bin/dyn_erl"}, 466 {copy_file,"to_erl"}, 467 {copy_file,"epmd"}, 468 {copy_file,"erl_child_setup"}, 469 {copy_file,"heart"}, 470 {copy_file,[...]}, 471 {copy_file,...}, 472 {...}|...]}, 473 {create_dir,"lib", 474 [{create_dir,"internal", 475 [{copy_file,"liberts_internal.a"}, 476 {copy_file,"liberts_internal_r.a"}, 477 {copy_file,"libethread.a"}, 478 {copy_file,"README"}]}, 479 {copy_file,"liberts.a"}, 480 {copy_file,"liberts_r.a"}]}, 481 {create_dir,"src",[{copy_file,"setuid_socket_wrap.c"}]}, 482 {create_dir,"doc",[]}, 483 {create_dir,"man",[]}, 484 {create_dir,"include", 485 [{create_dir,"internal", 486 [{create_dir,"i386",[{...}|...]}, 487 {copy_file,"erl_errno.h"}, 488 {copy_file,[...]}, 489 {copy_file,...}, 490 {...}|...]}, 491 {copy_file,"erl_memory_trace_parser.h"}, 492 {copy_file,"driver_int.h"}, 493 {copy_file,"erl_nif_api_funcs.h"}, 494 {copy_file,"erl_fixed_size_int_types.h"}, 495 {copy_file,"erl_int_sizes_config.h"}, 496 {copy_file,[...]}, 497 {copy_file,...}, 498 {...}]}]}, 499 {create_dir,"lib", 500 [{archive,"compiler-7.0.4.ez",[], 501 [{create_dir,"compiler-7.0.4", 502 [{create_dir,"src", 503 [{copy_file,"beam_flatten.erl"}, 504 {copy_file,[...]}, 505 {copy_file,...}, 506 {...}|...]}, 507 {create_dir,"ebin", 508 [{copy_file,[...]},{copy_file,...},{...}|...]}]}]}, 509 {archive,"crypto-3.7.4.ez",[], 510 [{create_dir,"crypto-3.7.4", 511 [{create_dir,"src",[{copy_file,[...]},{copy_file,...}]}, 512 {create_dir,"ebin",[{copy_file,...},{...}|...]}]}]}, 513 {create_dir,"crypto-3.7.4", 514 [{create_dir,"priv", 515 [{create_dir,"lib",[{copy_file,[...]},{copy_file,...}]}, 516 {create_dir,"obj",[{copy_file,...},{...}|...]}]}]}, 517 {archive,"erts-10.0.ez",[], 518 [{create_dir,"erts-10.0", 519 [{create_dir,"src",[{...}|...]}, 520 {create_dir,"ebin",[...]}]}]}, 521 {archive,"hipe-3.15.4.ez",[], 522 [{create_dir,"hipe-3.15.4", 523 [{create_dir,"flow",[...]}, 524 {copy_file,[...]}, 525 {create_dir,...}, 526 {...}|...]}]}, 527 {archive,"inets-6.3.9.ez",[], 528 [{create_dir,"inets-6.3.9", 529 [{create_dir,[...],...},{create_dir,...},{...}]}]}, 530 {create_dir,"inets-6.3.9", 531 [{create_dir,"priv",[{create_dir,[...],...}]}, 532 {create_dir,"include",[{copy_file,...},{...}]}]}, 533 {archive,"kernel-5.2.ez",[], 534 [{create_dir,"kernel-5.2",[{...}|...]}]}, 535 {create_dir,"kernel-5.2", 536 [{create_dir,"include",[{...}|...]}]}, 537 {archive,"sasl-3.0.3.ez",[],[{create_dir,[...],...}]}, 538 {archive,"stdlib-3.3.ez",[],[{create_dir,...}]}, 539 {create_dir,"stdlib-3.3",[{create_dir,...}]}, 540 {archive,"tools-2.9.1.ez",[],[...]}]}]} 5413> 5423> TargetDir = "/tmp/my_target_dir". 543"/tmp/my_target_dir" 5444> 5454> reltool:eval_target_spec(Spec, code:root_dir(), TargetDir). 546{error,"/tmp/my_target_dir: no such file or directory"} 5475> 5485> file:make_dir(TargetDir). 549ok 5506> 5516> reltool:eval_target_spec(Spec, code:root_dir(), TargetDir). 552ok 5537> 5547> file:list_dir(TargetDir). 555{ok,["bin","Install","lib","misc","usr","erts-10.0", 556 "releases"]} 5578> 5588> file:list_dir(filename:join([TargetDir,"lib"])). 559{ok,["tools-2.9.1.ez","kernel-5.2.ez","inets-6.3.9.ez", 560 "kernel-5.2","sasl-3.0.3.ez","hipe-3.15.4.ez","inets-6.3.9", 561 "crypto-3.7.4","crypto-3.7.4.ez","stdlib-3.3.ez", 562 "erts-10.0.ez","stdlib-3.3","compiler-7.0.4.ez"]} 5639> 5649> file:make_dir("/tmp/yet_another_target_dir"). 565ok 56610> 56710> reltool:create_target([Config], "/tmp/yet_another_target_dir"). 568ok 56911> 57011> file:list_dir("/tmp/yet_another_target_dir"). 571{ok,["bin","Install","lib","misc","usr","erts-10.0", 572 "releases"]} 573 </pre> 574 575 </section> 576</chapter> 577