diff options
Diffstat (limited to 'lib/reltool')
-rw-r--r-- | lib/reltool/doc/src/notes.xml | 39 | ||||
-rw-r--r-- | lib/reltool/doc/src/reltool_examples.xml | 631 | ||||
-rw-r--r-- | lib/reltool/src/reltool.app.src | 2 | ||||
-rw-r--r-- | lib/reltool/src/reltool.erl | 4 | ||||
-rw-r--r-- | lib/reltool/src/reltool.hrl | 4 | ||||
-rw-r--r-- | lib/reltool/src/reltool_app_win.erl | 8 | ||||
-rw-r--r-- | lib/reltool/src/reltool_fgraph_win.erl | 2 | ||||
-rw-r--r-- | lib/reltool/src/reltool_mod_win.erl | 6 | ||||
-rw-r--r-- | lib/reltool/src/reltool_server.erl | 39 | ||||
-rw-r--r-- | lib/reltool/src/reltool_sys_win.erl | 22 | ||||
-rw-r--r-- | lib/reltool/src/reltool_target.erl | 39 | ||||
-rw-r--r-- | lib/reltool/src/reltool_utils.erl | 12 | ||||
-rw-r--r-- | lib/reltool/test/reltool_app_SUITE.erl | 2 | ||||
-rw-r--r-- | lib/reltool/test/reltool_manual_gui_SUITE.erl | 2 | ||||
-rw-r--r-- | lib/reltool/test/reltool_server_SUITE.erl | 6 | ||||
-rw-r--r-- | lib/reltool/test/reltool_test_lib.erl | 2 | ||||
-rw-r--r-- | lib/reltool/test/reltool_wx_SUITE.erl | 2 | ||||
-rw-r--r-- | lib/reltool/test/rtt.erl | 2 | ||||
-rw-r--r-- | lib/reltool/vsn.mk | 2 |
19 files changed, 480 insertions, 346 deletions
diff --git a/lib/reltool/doc/src/notes.xml b/lib/reltool/doc/src/notes.xml index b47d451055..d7ad7c8dcc 100644 --- a/lib/reltool/doc/src/notes.xml +++ b/lib/reltool/doc/src/notes.xml @@ -5,7 +5,7 @@ <header> <copyright> <year>2009</year> - <year>2016</year> + <year>2017</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> @@ -38,7 +38,42 @@ thus constitutes one section in this document. The title of each section is the version number of Reltool.</p> - <section><title>Reltool 0.7.3</title> + <section><title>Reltool 0.7.5</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Files generated by <c>release_handler</c> and + <c>reltool</c>, which might contain Unicode characters, + are now encoded as UTF-8 and written with format "~tp" or + "~ts". If the file is to be read by + <c>file:consult/1</c>, an encoding comment is added.</p> + <p> + Own Id: OTP-14463</p> + </item> + </list> + </section> + +</section> + +<section><title>Reltool 0.7.4</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> The User's Guide examples are updated after removal + of support for Dets files created with Erlang/OTP R7 and + earlier. </p> + <p> + Own Id: OTP-14422 Aux Id: OTP-13830 </p> + </item> + </list> + </section> + +</section> + +<section><title>Reltool 0.7.3</title> <section><title>Fixed Bugs and Malfunctions</title> <list> diff --git a/lib/reltool/doc/src/reltool_examples.xml b/lib/reltool/doc/src/reltool_examples.xml index f735d914ea..30cb3c13b6 100644 --- a/lib/reltool/doc/src/reltool_examples.xml +++ b/lib/reltool/doc/src/reltool_examples.xml @@ -5,7 +5,7 @@ <header> <copyright> <year>2009</year> - <year>2016</year> + <year>2017</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> @@ -41,30 +41,31 @@ <p>The main process in Reltool is the server. It can be used as it is or be used via the GUI frontend process. When the GUI is started, a server process will automatically be started. The GUI - process is started with <c>reltool:start/0</c>, - <c>reltool:start/1</c> or <c>reltool:start_link/1</c>. The pid of - its server can be obtained with <c>reltool:get_server/1</c></p> + process is started with + <seealso marker="reltool#start-0"><c>reltool:start/0</c></seealso>, + <seealso marker="reltool#start-1"><c>reltool:start/1</c></seealso> or + <seealso marker="reltool#start_link-1"><c>reltool:start_link/1</c></seealso>. + The pid of its server can be obtained with + <seealso marker="reltool#start_link-1"><c>reltool:get_server/1</c></seealso> + </p> <pre> -Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:4:4] [rq:4] - [async-threads:0] [kernel-poll:false] - -Eshell V5.7.3 (abort with ^G) +Erlang/OTP 20 [erts-9.0] [source-c13b302] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] +[hipe] [kernel-poll:false] +Eshell V9.0 (abort with ^G) +1> 1> {ok, Win} = reltool:start([]). {ok,<0.36.01>} -2> {ok, Server} = reltool:get_server([]). +2> {ok, Server} = reltool:get_server(Win). {ok,<0.37.01>} 3> reltool:get_config(Server). {ok,{sys,[]}} -4> reltool:stop(Win). -ok - - -5> {ok, Server2} = reltool:start_server([]). +4> +4> {ok, Server2} = reltool:start_server([]). {ok,<0.6535.01>} -6> reltool:get_config(Server2). +5> reltool:get_config(Server2). {ok,{sys,[]}} -7> reltool:stop(Server2). +6> reltool:stop(Server2). ok </pre> @@ -74,13 +75,11 @@ ok <title>Inspecting the configuration</title> <pre> -Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:4:4] [rq:4] - [async-threads:0] [kernel-poll:false] - -Eshell V5.7.3 (abort with ^G) -1> Config = {sys, [{escript, - "examples/display_args", - [{incl_cond, include}]}, +Erlang/OTP 20 [erts-9.0] [source-c13b302] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] +[hipe] [kernel-poll:false] +Eshell V9.0 (abort with ^G) +1> +1> Config = {sys, [{escript, "examples/display_args", [{incl_cond, include}]}, {app, inets, [{incl_cond, include}]}, {app, mnesia, [{incl_cond, exclude}]}, {app, ssl, [{incl_cond, exclude}]}, @@ -92,88 +91,105 @@ Eshell V5.7.3 (abort with ^G) {app,ssl,[{incl_cond,exclude}]}, {app,runtime_tools,[{incl_cond,exclude}]}, {app,syntax_tools,[{incl_cond,exclude}]}]} - - - +2> 2> {ok, Server} = reltool:start_server([Config]). -{ok,<0.35.0>} +{ok,<0.66.0>} +3> 3> reltool:get_config(Server). -{ok,{sys,[{escript,"/clearcase/otp/tools/reltool/examples/display_args", - [{incl_cond,include}]}]}} +{ok,{sys,[{escript,"/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args", + [{incl_cond,include}]}, + {app,inets,[{incl_cond,include}]}, + {app,mnesia,[{incl_cond,exclude}]}, + {app,runtime_tools,[{incl_cond,exclude}]}, + {app,ssl,[{incl_cond,exclude}]}, + {app,syntax_tools,[{incl_cond,exclude}]}]}} +4> 4> reltool:get_config(Server, false, false). -{ok,{sys,[{escript,"/clearcase/otp/tools/reltool/examples/display_args", - [{incl_cond,include}]}]}} - - - +{ok,{sys,[{escript,"/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args", + [{incl_cond,include}]}, + {app,inets,[{incl_cond,include}]}, + {app,mnesia,[{incl_cond,exclude}]}, + {app,runtime_tools,[{incl_cond,exclude}]}, + {app,ssl,[{incl_cond,exclude}]}, + {app,syntax_tools,[{incl_cond,exclude}]}]}} +5> 5> reltool:get_config(Server, true, false). -{ok,{sys,[{root_dir,"/ldisk/hakan/otp_test"}, +{ok,{sys,[{root_dir,"/usr/local/lib/erlang"}, {lib_dirs,[]}, - {escript,"/clearcase/otp/tools/reltool/examples/display_args", + {escript,"/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args", [{incl_cond,include}]}, {mod_cond,all}, {incl_cond,derived}, + {app,inets, + [{incl_cond,include},{vsn,undefined},{lib_dir,undefined}]}, + {app,mnesia,[{incl_cond,exclude}]}, + {app,runtime_tools,[{incl_cond,exclude}]}, + {app,ssl,[{incl_cond,exclude}]}, + {app,syntax_tools,[{incl_cond,exclude}]}, {boot_rel,"start_clean"}, + {rel,"start_clean","1.0",[]}, + {rel,"start_sasl","1.0",[sasl]}, {emu_name,"beam"}, {relocatable,true}, {profile,development}, - {incl_sys_files,[".*"]}, - {excl_sys_files,[]}, - {incl_app_files,[".*"]}, - {excl_app_files,[]}, - {incl_archive_dirs,[".*"]}, - {excl_archive_dirs,["^include$","^priv$"]}, + {incl_sys_filters,[".*"]}, + {excl_sys_filters,[]}, + {incl_app_filters,[".*"]}, + {excl_app_filters,[]}, + {incl_archive_filters,[".*"]}, + {excl_archive_filters,[[...]|...]}, {archive_opts,[]}, - {app_type,permanent}, - {app_file,keep}, - {debug_info,keep}]}} - - - + {rel_app_type,...}, + {...}|...]}} +6> 6> reltool:get_config(Server, true, true). -{ok,{sys,[{root_dir,"/ldisk/hakan/otp_test"}, +{ok,{sys,[{root_dir,"/usr/local/lib/erlang"}, {lib_dirs,[]}, - {escript,"/clearcase/otp/tools/reltool/examples/display_args", + {escript,"/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args", [{incl_cond,include}]}, {mod_cond,all}, {incl_cond,derived}, - {erts,[{vsn,"5.7.3"}, - {mod,erl_prim_loader,[]}, - {mod,erlang,[]}, - {mod,init,[]}, - {mod,otp_ring0,[]}, - {mod,prim_file,[]}, - {mod,prim_inet,[]}, - {mod,prim_zip,[]}, - {mod,zlib,[]}]}, + {erts,[{app,erts, + [{vsn,"9.0"}, + {lib_dir,"/usr/local/lib/erlang/lib/erts-9.0"}, + {mod,erl_prim_loader,[]}, + {mod,erl_tracer,[]}, + {mod,erlang,[]}, + {mod,erts_code_purger,[]}, + {mod,erts_dirty_process_code_checker,[]}, + {mod,erts_internal,[]}, + {mod,erts_literal_area_collector,[]}, + {mod,init,[]}, + {mod,otp_ring0,...}, + {mod,...}, + {...}|...]}]}, {app,compiler, - [{vsn,"4.6.3"}, + [{vsn,"7.0.4"}, + {lib_dir,"/usr/local/lib/erlang/lib/compiler-7.0.4"}, + {mod,beam_a,[]}, {mod,beam_asm,[]}, {mod,beam_block,[]}, - {mod,beam_bool,[]}, + {mod,beam_bs,[]}, {mod,beam_bsm,[]}, {mod,beam_clean,[]}, {mod,beam_dead,[]}, {mod,beam_dict,[]}, {mod,beam_disasm,[]}, - {mod,beam_flatten,[]}, - {mod,beam_jump,[]}, - {mod,beam_listing,[]}, - {mod,beam_opcodes,...}, + {mod,beam_except,[]}, + {mod,beam_flatten,...}, {mod,...}, {...}|...]}, {app,crypto, - [{vsn,"1.6.1"}, + [{vsn,"3.7.4"}, + {lib_dir,"/usr/local/lib/erlang/lib/crypto-3.7.4"}, {mod,crypto,[]}, - {mod,crypto_app,[]}, - {mod,crypto_server,[]}, - {mod,crypto_sup,[]}]}, + {mod,crypto_ec_curves,[]}]}, {app,hipe, - [{vsn,"3.7.3"}, + [{vsn,"3.15.4"}, + {lib_dir,"/usr/local/lib/erlang/lib/hipe-3.15.4"}, {mod,cerl_cconv,[]}, {mod,cerl_closurean,[]}, {mod,cerl_hipeify,[]}, - {mod,cerl_hybrid_transform,[]}, {mod,cerl_lib,[]}, {mod,cerl_messagean,[]}, {mod,cerl_pmatch,[]}, @@ -182,65 +198,110 @@ Eshell V5.7.3 (abort with ^G) {mod,cerl_typean,...}, {mod,...}, {...}|...]}, + {app,inets, + [{incl_cond,include}, + {vsn,"6.3.9"}, + {lib_dir,"/usr/local/lib/erlang/lib/inets-6.3.9"}, + {mod,ftp,[]}, + {mod,ftp_progress,[]}, + {mod,ftp_response,[]}, + {mod,ftp_sup,[]}, + {mod,http_chunk,[]}, + {mod,http_request,[]}, + {mod,http_response,...}, + {mod,...}, + {...}|...]}, {app,kernel, - [{vsn,"2.13.3"}, + [{vsn,"5.2"}, + {lib_dir,"/usr/local/lib/erlang/lib/kernel-5.2"}, {mod,application,[]}, {mod,application_controller,[]}, {mod,application_master,[]}, {mod,application_starter,[]}, {mod,auth,[]}, {mod,code,[]}, - {mod,code_server,[]}, - {mod,disk_log,[]}, - {mod,disk_log_1,...}, + {mod,code_server,...}, + {mod,...}, + {...}|...]}, + {app,mnesia,[{incl_cond,exclude}]}, + {app,runtime_tools,[{incl_cond,exclude}]}, + {app,sasl, + [{vsn,"3.0.3"}, + {lib_dir,"/usr/local/lib/erlang/lib/sasl-3.0.3"}, + {mod,alarm_handler,[]}, + {mod,erlsrv,[]}, + {mod,format_lib_supp,[]}, + {mod,misc_supp,...}, {mod,...}, {...}|...]}, + {app,ssl,[{incl_cond,exclude}]}, {app,stdlib, - [{vsn,"1.16.3"}, + [{vsn,"3.3"}, + {lib_dir,"/usr/local/lib/erlang/lib/stdlib-3.3"}, {mod,array,[]}, - {mod,base64,[]}, - {mod,beam_lib,[]}, - {mod,c,[]}, - {mod,calendar,[]}, - {mod,dets,[]}, - {mod,dets_server,[]}, - {mod,dets_sup,...}, + {mod,base64,...}, {mod,...}, {...}|...]}, + {app,syntax_tools,[{incl_cond,exclude}]}, + {app,tools, + [{vsn,"2.9.1"},{lib_dir,[...]},{mod,...},{...}|...]}, {boot_rel,"start_clean"}, + {rel,"start_clean","1.0",[]}, + {rel,"start_sasl","1.0",[...]}, {emu_name,"beam"}, {relocatable,true}, - {profile,development}, - {incl_sys_files,[".*"]}, - {excl_sys_files,[]}, - {incl_app_files,[".*"]}, - {excl_app_files,[]}, - {incl_archive_dirs,[".*"]}, - {excl_archive_dirs,["^include$",[...]]}, - {archive_opts,[]}, - {app_type,permanent}, - {app_file,...}, - {...}]}} - - - -7> reltool:get_config([{sys,[{profile, embedded}]}]). -{ok,{sys,[{profile,embedded}, + {profile,...}, + {...}|...]}} +7> +7> reltool:get_config([{sys, [{profile, embedded}]}], true, false). +{ok,{sys,[{root_dir,"/usr/local/lib/erlang"}, + {lib_dirs,[]}, + {mod_cond,all}, + {incl_cond,derived}, + {boot_rel,"start_clean"}, + {rel,"start_clean","1.0",[]}, + {rel,"start_sasl","1.0",[sasl]}, + {emu_name,"beam"}, + {relocatable,true}, + {profile,embedded}, {incl_sys_filters,["^bin","^erts","^lib","^releases"]}, {excl_sys_filters,["^bin/(erlc|dialyzer|typer)(|\\.exe)$", "^erts.*/bin/(erlc|dialyzer|typer)(|\\.exe)$", "^erts.*/bin/.*(debug|pdb)"]}, - {incl_app_filters,["^ebin","^include","^priv"]}]}} -8> reltool:get_config([{sys,[{profile, standalone}]}]). -{ok,{sys,[{profile,standalone}, + {incl_app_filters,["^ebin","^include","^priv"]}, + {excl_app_filters,[]}, + {incl_archive_filters,[".*"]}, + {excl_archive_filters,["^include$","^priv$"]}, + {archive_opts,[]}, + {rel_app_type,permanent}, + {embedded_app_type,load}, + {app_file,keep}, + {debug_info,keep}]}} +8> +8> reltool:get_config([{sys, [{profile, standalone}]}], true, false). +{ok,{sys,[{root_dir,"/usr/local/lib/erlang"}, + {lib_dirs,[]}, + {mod_cond,all}, + {incl_cond,derived}, + {boot_rel,"start_clean"}, + {rel,"start_clean","1.0",[]}, + {rel,"start_sasl","1.0",[sasl]}, + {emu_name,"beam"}, + {relocatable,true}, + {profile,standalone}, {incl_sys_filters,["^bin/(erl|epmd)(|\\.exe|\\.ini)$", "^bin/start(|_clean).boot$","^erts.*/bin","^lib$"]}, {excl_sys_filters,["^erts.*/bin/(erlc|dialyzer|typer)(|\\.exe)$", "^erts.*/bin/(start|escript|to_erl|run_erl)(|\\.exe)$", "^erts.*/bin/.*(debug|pdb)"]}, {incl_app_filters,["^ebin","^priv"]}, - {excl_app_filters,["^ebin/.*\\.appup$"]}]}} - + {excl_app_filters,["^ebin/.*\\.appup$"]}, + {incl_archive_filters,[".*"]}, + {excl_archive_filters,["^include$","^priv$"]}, + {archive_opts,[]}, + {rel_app_type,permanent}, + {app_file,keep}, + {debug_info,keep}]}} </pre> </section> @@ -248,43 +309,51 @@ Eshell V5.7.3 (abort with ^G) <section> <title>Generate release and script files</title> <pre> -5> {ok, Server} = reltool:start_server([{config, {sys, [{boot_rel, "NAME"}, +Erlang/OTP 20 [erts-9.0] [source-c13b302] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] +[hipe] [kernel-poll:false] +Eshell V9.0 (abort with ^G) +1> +1> {ok, Server} = reltool:start_server([{config, {sys, [{boot_rel, "NAME"}, {rel, "NAME", "VSN", [sasl]}]}}]). {ok,<0.1288.0>} -6> reltool:get_config(Server). +2> +2> reltool:get_config(Server). {ok,{sys,[{boot_rel,"NAME"}, {rel,"NAME","VSN",[sasl]}]}} -7> reltool:get_rel(Server, "NAME"). +3> +3> reltool:get_rel(Server, "NAME"). {ok,{release,{"NAME","VSN"}, - {erts,"5.7"}, - [{kernel,"2.13"},{stdlib,"1.16"},{sasl,"2.1.6"}]}} -8> reltool:get_script(Server, "NAME"). + {erts,"9.0"}, + [{kernel,"5.2"},{stdlib,"3.3"},{sasl,"3.0.3"}]}} +4> +4> reltool:get_script(Server, "NAME"). {ok,{script,{"NAME","VSN"}, - [{preLoaded,[erl_prim_loader,erlang,init,otp_ring0, - prim_eval,prim_file,prim_inet,prim_zip, - zlib]}, + [{preLoaded,[erl_prim_loader,erl_tracer,erlang, + erts_code_purger,erts_dirty_process_code_checker, + erts_internal,erts_literal_area_collector,init,otp_ring0, + prim_eval,prim_file,prim_inet,prim_zip,zlib]}, {progress,preloaded}, - {path,["$ROOT/lib/kernel-2.13/ebin", - "$ROOT/lib/stdlib-1.16/ebin"]}, + {path,["$ROOT/lib/kernel-5.2/ebin", + "$ROOT/lib/stdlib-3.3/ebin"]}, {primLoad,[error_handler]}, {kernel_load_completed}, {progress,kernel_load_completed}, - {path,["$ROOT/lib/kernel-2.13/ebin"]}, + {path,["$ROOT/lib/kernel-5.2/ebin"]}, {primLoad,[application,application_controller, application_master,application_starter,auth,code, code_server,disk_log,disk_log_1,disk_log_server, disk_log_sup,dist_ac,dist_util,erl_boot_server|...]}, - {path,["$ROOT/lib/stdlib-1.16/ebin"]}, - {primLoad,[array,base64,beam_lib,c,calendar,dets, - dets_server,dets_sup,dets_utils,dets_v8,dets_v9,dict|...]}, - {path,["$ROOT/lib/sasl-2.1.6/ebin"]}, + {path,["$ROOT/lib/stdlib-3.3/ebin"]}, + {primLoad,[array,base64,beam_lib,binary,c,calendar,dets, + dets_server,dets_sup,dets_utils,dets_v9,dict|...]}, + {path,["$ROOT/lib/sasl-3.0.3/ebin"]}, {primLoad,[alarm_handler,erlsrv,format_lib_supp,misc_supp, - overload,rb,rb_format_supp,release_handler, - release_handler_1,sasl|...]}, + rb,rb_format_supp,release_handler,release_handler_1,sasl, + sasl_report|...]}, {progress,modules_loaded}, - {path,["$ROOT/lib/kernel-2.13/ebin", - "$ROOT/lib/stdlib-1.16/ebin","$ROOT/lib/sasl-2.1.6/ebin"]}, + {path,["$ROOT/lib/kernel-5.2/ebin", + "$ROOT/lib/stdlib-3.3/ebin","$ROOT/lib/sasl-3.0.3/ebin"]}, {kernelProcess,heart,{heart,start,[]}}, {kernelProcess,error_logger,{error_logger,start_link,[]}}, {kernelProcess,application_controller, @@ -296,7 +365,8 @@ Eshell V5.7.3 (abort with ^G) {apply,{...}}, {apply,...}, {...}|...]}} -9> reltool:stop(Server). +5> +5> reltool:stop(Server). ok </pre> </section> @@ -304,13 +374,11 @@ ok <section> <title>Create a target system</title> <pre> -Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:4:4] [rq:4] - [async-threads:0] [kernel-poll:false] - -Eshell V5.7.3 (abort with ^G) -1> Config = {sys, [{escript, - "examples/display_args", - [{incl_cond, include}]}, +Erlang/OTP 20 [erts-9.0] [source-c13b302] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] +[hipe] [kernel-poll:false] +Eshell V9.0 (abort with ^G) +1> +1> Config = {sys, [{escript, "examples/display_args", [{incl_cond, include}]}, {app, inets, [{incl_cond, include}]}, {app, mnesia, [{incl_cond, exclude}]}, {app, ssl, [{incl_cond, exclude}]}, @@ -322,156 +390,183 @@ Eshell V5.7.3 (abort with ^G) {app,ssl,[{incl_cond,exclude}]}, {app,runtime_tools,[{incl_cond,exclude}]}, {app,syntax_tools,[{incl_cond,exclude}]}]} - - - +2> 2> {ok, Spec} = reltool:get_target_spec([Config]). {ok,[{create_dir,"releases", - [{write_file,"start_erl.data","5.7.3 1.0"}, - {create_dir,"1.0", - [{write_file,"start_clean.rel", - [37,37,32,114,101,108,32,103,101,110,101|...]}, - {write_file,"start_clean.script", - [37,37,32,115,99,114,105,112,116,32|...]}, - {write_file,"start_clean.boot", - <<131,104,3,100,0,6,115,99,114,...>>}, - {write_file,"start_sasl.rel", - [37,37,32,114,101,108,32,103,101,110,101|...]}, - {write_file,"start_sasl.script", - [37,37,32,115,99,114,105,112,116,32|...]}, - {write_file,"start_sasl.boot", - <<131,104,3,100,0,6,115,99,114,...>>}]}]}, + [{write_file,"start_erl.data","9.0 1.0\n"}, + {create_dir,"1.0", + [{write_file,"start_clean.rel", + [37,37,32,114,101,108,32,103,101,110,101,114,97,116|...]}, + {write_file,"start_clean.script", + [37,37,32,115,99,114,105,112,116,32,103,101,110|...]}, + {write_file,"start_clean.boot", + <<131,104,3,119,6,115,99,114,105,112,116,104,...>>}, + {write_file,"start_sasl.rel", + [37,37,32,114,101,108,32,103,101,110,101|...]}, + {write_file,"start_sasl.script", + [37,37,32,115,99,114,105,112,116,32|...]}, + {write_file,"start_sasl.boot", + <<131,104,3,119,6,115,99,114,105,...>>}]}]}, {create_dir,"bin", - [{copy_file,"display_args.escript", - "/clearcase/otp/tools/reltool/examples/display_args"}, - {copy_file,"display_args","erts-5.7.3/bin/escript"}, - {copy_file,"start","erts-5.7.3/bin/start"}, - {copy_file,"erl","erts-5.7.3/bin/dyn_erl"}, - {copy_file,"epmd","erts-5.7.3/bin/epmd"}, - {copy_file,"to_erl","erts-5.7.3/bin/to_erl"}, - {copy_file,"run_erl","erts-5.7.3/bin/run_erl"}, - {copy_file,"escript","erts-5.7.3/bin/escript"}, - {copy_file,"erlc","erts-5.7.3/bin/erlc"}, - {copy_file,"dialyzer","erts-5.7.3/bin/dialyzer"}, - {copy_file,"typer","erts-5.7.3/bin/typer"}, - {write_file,"start_clean.boot", - <<131,104,3,100,0,6,115,...>>}, - {write_file,"start_sasl.boot",<<131,104,3,100,0,6,...>>}, - {write_file,"start.boot",<<131,104,3,100,0,...>>}]}, - {create_dir,"misc", - [{copy_file,"makewhatis"},{copy_file,"format_man_pages"}]}, + [{copy_file,"display_args.escript", + "/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args"}, + {copy_file,"display_args","erts-9.0/bin/escript"}, + {copy_file,"start","erts-9.0/bin/start"}, + {copy_file,"ct_run","erts-9.0/bin/ct_run"}, + {copy_file,"dialyzer","erts-9.0/bin/dialyzer"}, + {copy_file,"run_erl","erts-9.0/bin/run_erl"}, + {copy_file,"erl","erts-9.0/bin/dyn_erl"}, + {copy_file,"to_erl","erts-9.0/bin/to_erl"}, + {copy_file,"epmd","erts-9.0/bin/epmd"}, + {copy_file,"erlc","erts-9.0/bin/erlc"}, + {copy_file,"typer","erts-9.0/bin/typer"}, + {copy_file,"escript","erts-9.0/bin/escript"}, + {write_file,"start_clean.boot",<<131,104,3,119,6,115,...>>}, + {write_file,"start_sasl.boot",<<131,104,3,119,6,...>>}, + {write_file,"start.boot",<<131,104,3,119,...>>}]}, {copy_file,"Install"}, + {create_dir,"misc", + [{copy_file,"makewhatis"},{copy_file,"format_man_pages"}]}, {create_dir,"usr", - [{create_dir,"lib", - [{copy_file,"liberts_r.a"},{copy_file,"liberts.a"}]}, - {create_dir,"include", - [{copy_file,"erl_fixed_size_int_types.h"}, - {copy_file,"erl_int_sizes_config.h"}, - {copy_file,"erl_memory_trace_parser.h"}, - {create_dir,"obsolete",[{copy_file,"driver.h"}]}, - {copy_file,"driver_int.h"}, - {copy_file,"erl_driver.h"}]}]}, - {create_dir,"erts-5.7.3", - [{create_dir,"lib", - [{create_dir,"internal", - [{copy_file,"liberts_internal_r.a"}, - {copy_file,"liberts_internal.a"}, - {copy_file,"libethread.a"}, - {copy_file,"README"}]}, - {copy_file,"liberts_r.a"}, - {copy_file,"liberts.a"}]}, - {create_dir,"bin", - [{copy_file,"start"}, - {copy_file,"erl","erts-5.7.3/bin/dyn_erl"}, - {copy_file,"epmd"}, - {copy_file,"to_erl"}, - {copy_file,"run_erl"}, - {copy_file,"escript"}, - {copy_file,"erlc"}, - {copy_file,"dialyzer"}, - {copy_file,"typer"}, - {copy_file,"erlexec"}, - {copy_file,[...]}, - {copy_file,...}, - {...}|...]}, - {create_dir,"doc",[]}, - {create_dir,"man",[]}, - {create_dir,"include", - [{create_dir,"internal", - [{create_dir,"tile",[{copy_file,...},{...}]}, - {create_dir,"sparc64",[{...}]}, - {create_dir,"sparc32",[...]}, - {create_dir,[...],...}, - {create_dir,...}, - {...}|...]}, - {copy_file,"erl_fixed_size_int_types.h"}, - {copy_file,"erl_int_sizes_config.h"}, - {copy_file,"erl_memory_trace_parser.h"}, - {copy_file,"driver_int.h"}, - {copy_file,"erl_driver.h"}]}, - {create_dir,"src",[{copy_file,"setuid_socket_wrap.c"}]}]}, + [{create_dir,"lib", + [{copy_file,"liberts.a"}, + {copy_file,"liberl_interface_st.a"}, + {copy_file,"liberts_r.a"}, + {copy_file,"libic.a"}, + {copy_file,"liberl_interface.a"}, + {copy_file,"libei_st.a"}, + {copy_file,"libei.a"}]}, + {create_dir,"include", + [{copy_file,"erl_memory_trace_parser.h"}, + {copy_file,"driver_int.h"}, + {copy_file,"ei_connect.h"}, + {copy_file,"ei.h"}, + {copy_file,"erl_nif_api_funcs.h"}, + {copy_file,"erl_fixed_size_int_types.h"}, + {copy_file,"erl_int_sizes_config.h"}, + {copy_file,"erl_interface.h"}, + {copy_file,"eicode.h"}, + {copy_file,"erl_driver.h"}, + {copy_file,"erlang.idl"}, + {copy_file,[...]}, + {copy_file,...}, + {...}]}]}, + {create_dir,"erts-9.0", + [{create_dir,"bin", + [{copy_file,"start"}, + {copy_file,"ct_run"}, + {copy_file,"erlexec"}, + {copy_file,"dialyzer"}, + {copy_file,"beam.smp"}, + {copy_file,"run_erl"}, + {copy_file,"erl","erts-9.0/bin/dyn_erl"}, + {copy_file,"to_erl"}, + {copy_file,"epmd"}, + {copy_file,"erl_child_setup"}, + {copy_file,"heart"}, + {copy_file,[...]}, + {copy_file,...}, + {...}|...]}, + {create_dir,"lib", + [{create_dir,"internal", + [{copy_file,"liberts_internal.a"}, + {copy_file,"liberts_internal_r.a"}, + {copy_file,"libethread.a"}, + {copy_file,"README"}]}, + {copy_file,"liberts.a"}, + {copy_file,"liberts_r.a"}]}, + {create_dir,"src",[{copy_file,"setuid_socket_wrap.c"}]}, + {create_dir,"doc",[]}, + {create_dir,"man",[]}, + {create_dir,"include", + [{create_dir,"internal", + [{create_dir,"i386",[{...}|...]}, + {copy_file,"erl_errno.h"}, + {copy_file,[...]}, + {copy_file,...}, + {...}|...]}, + {copy_file,"erl_memory_trace_parser.h"}, + {copy_file,"driver_int.h"}, + {copy_file,"erl_nif_api_funcs.h"}, + {copy_file,"erl_fixed_size_int_types.h"}, + {copy_file,"erl_int_sizes_config.h"}, + {copy_file,[...]}, + {copy_file,...}, + {...}]}]}, {create_dir,"lib", - [{archive,"compiler-4.6.3.ez",[], - [{create_dir,"compiler-4.6.3", - [{create_dir,"ebin", - [{copy_file,"compiler.appup"}, - {copy_file,[...]}, - {copy_file,...}, - {...}|...]}, - {create_dir,"src", - [{copy_file,[...]}, - {copy_file,...},{...}|...]}]}]}, - {archive,"crypto-1.6.1.ez",[], - [{create_dir,"crypto-1.6.1", - [{create_dir,"ebin", - [{copy_file,[...]}, - {copy_file,...},{...}|...]}, - {create_dir,"src",[{copy_file,...},{...}|...]}]}]}, - {create_dir,"crypto-1.6.1", - [{create_dir,"priv", - [{create_dir,"lib",[{copy_file,[...]}]}, - {create_dir,"obj",[{copy_file,...},{...}]}]}]}, - {archive,"erts-5.7.3.ez",[], - [{create_dir,"erts-5.7.3", - [{create_dir,"ebin",[{...}|...]}, - {create_dir,"src",[...]}]}]}, - {archive,"hipe-3.7.3.ez",[], - [{create_dir,"hipe-3.7.3", - [{create_dir,"util",[...]}, - {create_dir,[...],...}, - {create_dir,...}, - {...}|...]}]}, - {archive,"kernel-2.13.3.ez",[], - [{create_dir,"kernel-2.13.3", - [{create_dir,[...],...},{create_dir,...},{...}]}]}, - {create_dir,"kernel-2.13.3", - [{create_dir,"include", - [{copy_file,[...]},{copy_file,...},{...}]}]}, - {archive,"stdlib-1.16.3.ez",[], - [{create_dir,"stdlib-1.16.3",[{...}|...]}]}, - {create_dir,"stdlib-1.16.3", - [{create_dir,"include",[{...}|...]}]}]}]} - - - -3> TargetDir = "my_target_dir". -"my_target_dir" + [{archive,"compiler-7.0.4.ez",[], + [{create_dir,"compiler-7.0.4", + [{create_dir,"src", + [{copy_file,"beam_flatten.erl"}, + {copy_file,[...]}, + {copy_file,...}, + {...}|...]}, + {create_dir,"ebin", + [{copy_file,[...]},{copy_file,...},{...}|...]}]}]}, + {archive,"crypto-3.7.4.ez",[], + [{create_dir,"crypto-3.7.4", + [{create_dir,"src",[{copy_file,[...]},{copy_file,...}]}, + {create_dir,"ebin",[{copy_file,...},{...}|...]}]}]}, + {create_dir,"crypto-3.7.4", + [{create_dir,"priv", + [{create_dir,"lib",[{copy_file,[...]},{copy_file,...}]}, + {create_dir,"obj",[{copy_file,...},{...}|...]}]}]}, + {archive,"erts-9.0.ez",[], + [{create_dir,"erts-9.0", + [{create_dir,"src",[{...}|...]}, + {create_dir,"ebin",[...]}]}]}, + {archive,"hipe-3.15.4.ez",[], + [{create_dir,"hipe-3.15.4", + [{create_dir,"flow",[...]}, + {copy_file,[...]}, + {create_dir,...}, + {...}|...]}]}, + {archive,"inets-6.3.9.ez",[], + [{create_dir,"inets-6.3.9", + [{create_dir,[...],...},{create_dir,...},{...}]}]}, + {create_dir,"inets-6.3.9", + [{create_dir,"priv",[{create_dir,[...],...}]}, + {create_dir,"include",[{copy_file,...},{...}]}]}, + {archive,"kernel-5.2.ez",[], + [{create_dir,"kernel-5.2",[{...}|...]}]}, + {create_dir,"kernel-5.2", + [{create_dir,"include",[{...}|...]}]}, + {archive,"sasl-3.0.3.ez",[],[{create_dir,[...],...}]}, + {archive,"stdlib-3.3.ez",[],[{create_dir,...}]}, + {create_dir,"stdlib-3.3",[{create_dir,...}]}, + {archive,"tools-2.9.1.ez",[],[...]}]}]} +3> +3> TargetDir = "/tmp/my_target_dir". +"/tmp/my_target_dir" +4> 4> reltool:eval_target_spec(Spec, code:root_dir(), TargetDir). -{error,"/clearcase/otp/tools/reltool/my_target_dir: no such file or directory"} -5> file:make_dir("my_target_dir"). +{error,"/tmp/my_target_dir: no such file or directory"} +5> +5> file:make_dir(TargetDir). ok +6> 6> reltool:eval_target_spec(Spec, code:root_dir(), TargetDir). ok +7> 7> file:list_dir(TargetDir). -{ok,["lib","erts-5.7.3","usr","Install","misc","bin","releases"]} +{ok,["bin","Install","lib","misc","usr","erts-9.0", + "releases"]} +8> 8> file:list_dir(filename:join([TargetDir,"lib"])). -{ok,["stdlib-1.16.3","stdlib-1.16.3.ez","kernel-2.13.3", - "kernel-2.13.3.ez","hipe-3.7.3.ez","erts-5.7.3.ez", - "crypto-1.6.1","crypto-1.6.1.ez","compiler-4.6.3.ez"]} -9> file:make_dir("yet_another_target_dir"). +{ok,["tools-2.9.1.ez","kernel-5.2.ez","inets-6.3.9.ez", + "kernel-5.2","sasl-3.0.3.ez","hipe-3.15.4.ez","inets-6.3.9", + "crypto-3.7.4","crypto-3.7.4.ez","stdlib-3.3.ez", + "erts-9.0.ez","stdlib-3.3","compiler-7.0.4.ez"]} +9> +9> file:make_dir("/tmp/yet_another_target_dir"). ok -10> reltool:create_target(Config, "yet_another_target_dir"). +10> +10> reltool:create_target([Config], "/tmp/yet_another_target_dir"). ok +11> +11> file:list_dir("/tmp/yet_another_target_dir"). +{ok,["bin","Install","lib","misc","usr","erts-9.0", + "releases"]} </pre> </section> diff --git a/lib/reltool/src/reltool.app.src b/lib/reltool/src/reltool.app.src index 90f93d2901..dc21c1cfce 100644 --- a/lib/reltool/src/reltool.app.src +++ b/lib/reltool/src/reltool.app.src @@ -36,6 +36,6 @@ {registered, []}, {applications, [stdlib, kernel]}, {env, []}, - {runtime_dependencies, ["wx-1.2","tools-2.6.14","stdlib-2.0","sasl-2.4", + {runtime_dependencies, ["wx-1.2","tools-2.6.14","stdlib-3.4","sasl-2.4", "kernel-3.0","erts-7.0"]} ]}. diff --git a/lib/reltool/src/reltool.erl b/lib/reltool/src/reltool.erl index f6ce5578bc..feb6925044 100644 --- a/lib/reltool/src/reltool.erl +++ b/lib/reltool/src/reltool.erl @@ -80,7 +80,7 @@ get_server(WinPid) -> {ok, _ServerPid} = OK -> OK; {error, Reason} -> - {error, lists:flatten(io_lib:format("~p", [Reason]))} + {error, lists:flatten(io_lib:format("~tp", [Reason]))} end. %% Stop a server or window process @@ -93,7 +93,7 @@ stop(Pid) when is_pid(Pid) -> {'DOWN', Ref, _, _, shutdown} -> ok; {'DOWN', Ref, _, _, Reason} -> - {error, lists:flatten(io_lib:format("~p", [Reason]))} + {error, lists:flatten(io_lib:format("~tp", [Reason]))} end. %% Internal library function diff --git a/lib/reltool/src/reltool.hrl b/lib/reltool/src/reltool.hrl index 3b1e868757..9c8aae6b7e 100644 --- a/lib/reltool/src/reltool.hrl +++ b/lib/reltool/src/reltool.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2016. All Rights Reserved. +%% Copyright Ericsson AB 2009-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -119,7 +119,7 @@ | {archive, base_file(), [archive_opt()], [target_spec()]} | {copy_file, base_file()} | {copy_file, base_file(), top_file()} - | {write_file, base_file(), iolist()} + | {write_file, base_file(), binary()} | {strip_beam_file, base_file()}. -type target_dir() :: dir(). -type incl_defaults() :: boolean(). diff --git a/lib/reltool/src/reltool_app_win.erl b/lib/reltool/src/reltool_app_win.erl index 468ba297bb..663144861f 100644 --- a/lib/reltool/src/reltool_app_win.erl +++ b/lib/reltool/src/reltool_app_win.erl @@ -174,7 +174,7 @@ loop(#state{xref_pid = Xref, common = C, app = App} = S) -> S#state.mod_wins)}, ?MODULE:loop(S2); Msg -> - error_logger:format("~w~w got unexpected message:\n\t~p\n", + error_logger:format("~w~w got unexpected message:\n\t~tp\n", [?MODULE, self(), Msg]), ?MODULE:loop(S) end. @@ -182,7 +182,7 @@ loop(#state{xref_pid = Xref, common = C, app = App} = S) -> exit_warning({'EXIT', _Pid, shutdown}) -> ok; exit_warning({'EXIT', _Pid, _Reason} = Msg) -> - error_logger:format("~w~w got unexpected message:\n\t~p\n", + error_logger:format("~w~w got unexpected message:\n\t~tp\n", [?MODULE, self(), Msg]). create_window(#state{app = App} = S) -> @@ -629,7 +629,7 @@ handle_event(#state{sys = Sys, app = App} = S, Wx) -> handle_mod_button(S, Items, Action); _ -> error_logger:format("~w~w got unexpected app event from " - "wx:\n\t~p\n", + "wx:\n\t~tp\n", [?MODULE, self(), Wx]), S end. @@ -676,7 +676,7 @@ move_mod(App, {_ItemNo, ModStr}, Action) -> undefined; _ -> error_logger:format("~w~w got unexpected mod " - "button event: ~w\n\t ~p\n", + "button event: ~w\n\t ~tp\n", [?MODULE, self(), ModName, Action]), M#mod.incl_cond end, diff --git a/lib/reltool/src/reltool_fgraph_win.erl b/lib/reltool/src/reltool_fgraph_win.erl index 915330794c..a10a2281db 100644 --- a/lib/reltool/src/reltool_fgraph_win.erl +++ b/lib/reltool/src/reltool_fgraph_win.erl @@ -526,7 +526,7 @@ loop(S, G) -> exit(Reason); Other -> - error_logger:format("~w~w got unexpected message:\n\t~p\n", + error_logger:format("~w~w got unexpected message:\n\t~tp\n", [?MODULE, self(), Other]), loop(S, G) end. diff --git a/lib/reltool/src/reltool_mod_win.erl b/lib/reltool/src/reltool_mod_win.erl index 8cd63bdda1..2d56d74563 100644 --- a/lib/reltool/src/reltool_mod_win.erl +++ b/lib/reltool/src/reltool_mod_win.erl @@ -171,7 +171,7 @@ loop(#state{xref_pid = Xref, common = C, mod = Mod} = S) -> S2 = handle_event(S, Wx), ?MODULE:loop(S2); _ -> - error_logger:format("~w~w got unexpected message:\n\t~p\n", + error_logger:format("~w~w got unexpected message:\n\t~tp\n", [?MODULE, self(), Msg]), ?MODULE:loop(S) end @@ -487,7 +487,7 @@ handle_event(#state{xref_pid = Xref} = S, Wx) -> S; _ -> error_logger:format("~w~w got unexpected mod event from " - "wx:\n\t~p\n", + "wx:\n\t~tp\n", [?MODULE, self(), Wx]), S end. @@ -667,7 +667,7 @@ goto_function(S, Editor) -> wxStyledTextCtrl:setSelection(Editor, Left2, Right2), Text = wxStyledTextCtrl:getSelectedText(Editor), S2 = add_pos_to_history(S, CurrentPos), - do_goto_function(S2, string:tokens(Text, ":")); + do_goto_function(S2, string:lexemes(Text, ":")); _ -> %% No function call wxStyledTextCtrl:hideSelection(Editor, false), diff --git a/lib/reltool/src/reltool_server.erl b/lib/reltool/src/reltool_server.erl index 89e90670cf..853191c696 100644 --- a/lib/reltool/src/reltool_server.erl +++ b/lib/reltool/src/reltool_server.erl @@ -225,12 +225,12 @@ parse_options([{Key, Val} | KeyVals], S, C, Sys) -> Sys2 = read_config(Sys, {sys, Val}), parse_options(KeyVals, S, C, Sys2); _ -> - reltool_utils:throw_error("Illegal option: ~p", [{Key, Val}]) + reltool_utils:throw_error("Illegal option: ~tp", [{Key, Val}]) end; parse_options([], S, C, Sys) -> S#state{common = C, sys = Sys}; parse_options(KeyVals, _S, _C, _Sys) -> - reltool_utils:throw_error("Illegal option: ~p", [KeyVals]). + reltool_utils:throw_error("Illegal option: ~tp", [KeyVals]). loop(#state{sys = Sys} = S) -> receive @@ -400,12 +400,12 @@ loop(#state{sys = Sys} = S) -> {'EXIT', Pid, Reason} when Pid =:= S#state.parent_pid -> exit(Reason); {call, ReplyTo, Ref, Msg} when is_pid(ReplyTo), is_reference(Ref) -> - error_logger:format("~w~w got unexpected call:\n\t~p\n", + error_logger:format("~w~w got unexpected call:\n\t~tp\n", [?MODULE, self(), Msg]), reltool_utils:reply(ReplyTo, Ref, {error, {invalid_call, Msg}}), ?MODULE:loop(S); Msg -> - error_logger:format("~w~w got unexpected message:\n\t~p\n", + error_logger:format("~w~w got unexpected message:\n\t~tp\n", [?MODULE, self(), Msg]), ?MODULE:loop(S) end. @@ -1232,7 +1232,7 @@ parse_app_info(File, [{Key, Val} | KeyVals], AI, Status) -> Status); _ -> Status2 = - reltool_utils:add_warning("Unexpected item ~p in app file ~tp.", + reltool_utils:add_warning("Unexpected item ~tp in app file ~tp.", [Key,File], Status), parse_app_info(File, KeyVals, AI, Status2) @@ -1417,9 +1417,12 @@ shrink_app(A) -> do_save_config(S, Filename, InclDef, InclDeriv) -> {ok, Config} = do_get_config(S, InclDef, InclDeriv), - IoList = io_lib:format("%% config generated at ~w ~w\n~p.\n\n", - [date(), time(), Config]), - file:write_file(Filename, IoList). + IoList = io_lib:format("%% ~s\n" + "%% config generated at ~w ~w\n" + "~tp.\n\n", + [epp:encoding_to_string(utf8),date(), time(), Config]), + Bin = unicode:characters_to_binary(IoList), + file:write_file(Filename, Bin). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1455,7 +1458,7 @@ read_config(OldSys, {sys, KeyVals}) -> [NewSys2#sys.boot_rel]) end; read_config(_OldSys, BadConfig) -> - reltool_utils:throw_error("Illegal content: ~p", [BadConfig]). + reltool_utils:throw_error("Illegal content: ~tp", [BadConfig]). decode(#sys{apps = Apps} = Sys, [{erts = Name, AppKeyVals} | SysKeyVals]) when is_atom(Name), is_list(AppKeyVals) -> @@ -1565,7 +1568,7 @@ decode(#sys{} = Sys, [{Key, Val} | KeyVals]) -> debug_info when Val =:= keep; Val =:= strip -> Sys#sys{debug_info = Val}; _ -> - reltool_utils:throw_error("Illegal option: ~p", [{Key, Val}]) + reltool_utils:throw_error("Illegal option: ~tp", [{Key, Val}]) end, decode(Sys3, KeyVals); decode(#app{} = App, [{Key, Val} | KeyVals]) -> @@ -1620,14 +1623,14 @@ decode(#app{} = App, [{Key, Val} | KeyVals]) -> active_dir = Dir, sorted_dirs = [Dir]}; false -> - reltool_utils:throw_error("Illegal lib dir for ~w: ~p", + reltool_utils:throw_error("Illegal lib dir for ~w: ~tp", [App#app.name, Val]) end; SelectVsn when SelectVsn=:=vsn; SelectVsn=:=lib_dir -> reltool_utils:throw_error("Mutual exclusive options " "'vsn' and 'lib_dir'",[]); _ -> - reltool_utils:throw_error("Illegal option: ~p", [{Key, Val}]) + reltool_utils:throw_error("Illegal option: ~tp", [{Key, Val}]) end, decode(App2, KeyVals); decode(#app{mods = Mods} = App, [{mod, Name, ModKeyVals} | AppKeyVals]) -> @@ -1641,7 +1644,7 @@ decode(#mod{} = Mod, [{Key, Val} | KeyVals]) -> debug_info when Val =:= keep; Val =:= strip -> Mod#mod{debug_info = Val}; _ -> - reltool_utils:throw_error("Illegal option: ~p", [{Key, Val}]) + reltool_utils:throw_error("Illegal option: ~tp", [{Key, Val}]) end, decode(Mod2, KeyVals); decode(#rel{rel_apps = RelApps} = Rel, [RelApp | KeyVals]) -> @@ -1666,12 +1669,12 @@ decode(#rel{rel_apps = RelApps} = Rel, [RelApp | KeyVals]) -> true -> decode(Rel#rel{rel_apps = RelApps ++ [RA]}, KeyVals); false -> - reltool_utils:throw_error("Illegal option: ~p", [RelApp]) + reltool_utils:throw_error("Illegal option: ~tp", [RelApp]) end; decode(Acc, []) -> Acc; decode(_Acc, KeyVal) -> - reltool_utils:throw_error("Illegal option: ~p", [KeyVal]). + reltool_utils:throw_error("Illegal option: ~tp", [KeyVal]). is_type(Type) -> case Type of @@ -1866,7 +1869,7 @@ escripts_to_apps([Escript | Escripts], Apps, Status) -> {ok, AF} -> AF; {error, Reason1} -> - reltool_utils:throw_error("Illegal escript ~tp: ~p", + reltool_utils:throw_error("Illegal escript ~tp: ~tp", [Escript,Reason1]) end, @@ -1950,7 +1953,7 @@ escripts_to_apps([Escript | Escripts], Apps, Status) -> Status2), escripts_to_apps(Escripts, Apps2, Status3); {error, Reason2} -> - reltool_utils:throw_error("Illegal escript ~tp: ~p", + reltool_utils:throw_error("Illegal escript ~tp: ~tp", [Escript,Reason2]) end; escripts_to_apps([], Apps, Status) -> @@ -2013,7 +2016,7 @@ init_escript_app(AppName, EscriptAppName, Dir, Info, Mods, Apps, Status) -> case lists:keymember(AppName, #app.name, Apps) of true -> reltool_utils:throw_error( - "~w: Application name clash. Escript ~tp contains application ~tp.", + "~w: Application name clash. Escript ~tp contains application ~w.", [AppName,Dir,AppName]); false -> {App2, Status} diff --git a/lib/reltool/src/reltool_sys_win.erl b/lib/reltool/src/reltool_sys_win.erl index ba0d90ef5f..92df270752 100644 --- a/lib/reltool/src/reltool_sys_win.erl +++ b/lib/reltool/src/reltool_sys_win.erl @@ -136,7 +136,7 @@ init(Options) -> do_init(Options) catch error:Reason -> - io:format("~p: ~p~n",[Reason, erlang:get_stacktrace()]), + io:format("~tp: ~tp~n",[Reason, erlang:get_stacktrace()]), exit({Reason, erlang:get_stacktrace()}) end. @@ -182,7 +182,7 @@ do_init([{safe_config, Safe}, {parent, Parent} | Options]) -> end. restart_server_safe_config(true,Parent,Reason) -> - io:format("~w(~w): <ERROR> ~p\n", [?MODULE, ?LINE, Reason]), + io:format("~w(~w): <ERROR> ~tp\n", [?MODULE, ?LINE, Reason]), proc_lib:init_ack(Parent, {error,Reason}); restart_server_safe_config(false,Parent,Reason) -> wx:new(), @@ -199,7 +199,7 @@ restart_server_safe_config(false,Parent,Reason) -> ?wxID_OK -> do_init([{safe_config,true},{parent,Parent},?safe_config]); ?wxID_CANCEL -> - io:format("~w(~w): <ERROR> ~p\n", [?MODULE, ?LINE, Reason]), + io:format("~w(~w): <ERROR> ~tp\n", [?MODULE, ?LINE, Reason]), proc_lib:init_ack(Parent,{error,Reason}) end. @@ -251,7 +251,7 @@ loop(S) -> ?MODULE:loop(S#state{warning_wins = WWs2}); false -> error_logger:format("~w~w got unexpected " - "message:\n\t~p\n", + "message:\n\t~tp\n", [?MODULE, self(), Msg]), ?MODULE:loop(S) end @@ -292,7 +292,7 @@ loop(S) -> S#state.app_wins), ?MODULE:loop(S#state{fgraph_wins = FWs, app_wins = AWs}); Msg -> - error_logger:format("~w~w got unexpected message:\n\t~p\n", + error_logger:format("~w~w got unexpected message:\n\t~tp\n", [?MODULE, self(), Msg]), ?MODULE:loop(S) end. @@ -316,7 +316,7 @@ handle_child_exit({'EXIT', Pid, _Reason} = Exit, FWs, AWs) -> msg_warning({'EXIT', _Pid, shutdown}, Type) when Type =/= unknown -> ok; msg_warning(Exit, Type) -> - error_logger:format("~w~w got unexpected message (~w):\n\t~p\n", + error_logger:format("~w~w got unexpected message (~w):\n\t~tp\n", [?MODULE, self(), Type, Exit]). create_window(S) -> @@ -1163,12 +1163,12 @@ handle_system_event(#state{sys = Sys} = S, do_set_sys(S#state{sys = Sys2}); handle_system_event(S, Event, ObjRef, UserData) -> error_logger:format("~w~w got unexpected wx sys event to ~p " - "with user data: ~p\n\t ~p\n", + "with user data: ~tp\n\t ~tp\n", [?MODULE, self(), ObjRef, UserData, Event]), S. handle_release_event(S, _Event, _ObjRef, UserData) -> - io:format("Release data: ~p\n", [UserData]), + io:format("Release data: ~tp\n", [UserData]), S. handle_source_event(S, @@ -1225,7 +1225,7 @@ handle_app_event(S, handle_app_button(S, Items, Action); handle_app_event(S, Event, ObjRef, UserData) -> error_logger:format("~w~w got unexpected wx app event to " - "~p with user data: ~p\n\t ~p\n", + "~p with user data: ~tp\n\t ~tp\n", [?MODULE, self(), ObjRef, UserData, Event]), S. @@ -1269,7 +1269,7 @@ move_app(S, {_ItemNo, AppBase}, Action) -> undefined; _ -> error_logger:format("~w~w got unexpected app " - "button event: ~p ~p\n", + "button event: ~tp ~tp\n", [?MODULE, self(), Action, AppBase]), OldApp#app.incl_cond end, @@ -1543,7 +1543,7 @@ check_and_refresh(S, Status) -> display_message(Reason, ?wxICON_ERROR), false; {error, Reason} -> - Msg = lists:flatten(io_lib:format("Error:\n\n~p\n", [Reason])), + Msg = lists:flatten(io_lib:format("Error:\n\n~tp\n", [Reason])), display_message(Msg, ?wxICON_ERROR), false end, diff --git a/lib/reltool/src/reltool_target.erl b/lib/reltool/src/reltool_target.erl index 1615a3e9b7..1b1461178e 100644 --- a/lib/reltool/src/reltool_target.erl +++ b/lib/reltool/src/reltool_target.erl @@ -787,16 +787,20 @@ do_spec_rel_files(#rel{name = RelName} = Rel, Sys) -> {ok, BootBin} = gen_boot(Script), Date = date(), Time = time(), - RelIoList = io_lib:format("%% rel generated at ~w ~w\n~p.\n\n", + RelIoList = io_lib:format("%% rel generated at ~w ~w\n~tp.\n\n", [Date, Time, GenRel]), - ScriptIoList = io_lib:format("%% script generated at ~w ~w\n~p.\n\n", + ScriptIoList = io_lib:format("%% script generated at ~w ~w\n~tp.\n\n", [Date, Time, Script]), [ - {write_file, RelFile, RelIoList}, - {write_file, ScriptFile, ScriptIoList}, + {write_file, RelFile, to_utf8_bin_with_enc_comment(RelIoList)}, + {write_file, ScriptFile, to_utf8_bin_with_enc_comment(ScriptIoList)}, {write_file, BootFile, BootBin} ]. +to_utf8_bin_with_enc_comment(IoList) when is_list(IoList) -> + unicode:characters_to_binary("%% " ++ epp:encoding_to_string(utf8) ++ "\n" + ++ IoList). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Generate a complete target system %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1001,7 +1005,8 @@ spec_start_file(#sys{boot_rel = BootRelName, {value, Erts} = lists:keysearch(erts, #app.name, Apps), {value, BootRel} = lists:keysearch(BootRelName, #rel.name, Rels), Data = Erts#app.vsn ++ " " ++ BootRel#rel.vsn ++ "\n", - {BootRel#rel.vsn, {write_file, "start_erl.data", Data}}. + {BootRel#rel.vsn, {write_file, "start_erl.data", + unicode:characters_to_binary(Data)}}. lookup_spec(Prefix, Specs) -> lists:filter(fun(S) -> lists:prefix(Prefix, element(2, S)) end, Specs). @@ -1183,18 +1188,18 @@ spec_app_file(#app{name = Name, Info#app_info.modules)], App2 = App#app{info = Info#app_info{modules = ModNames}}, Contents = gen_app(App2), - AppIoList = io_lib:format("%% app generated at ~w ~w\n~p.\n\n", + AppIoList = io_lib:format("%% app generated at ~w ~w\n~tp.\n\n", [date(), time(), Contents]), - [{write_file, AppFilename, AppIoList}]; + [{write_file, AppFilename, to_utf8_bin_with_enc_comment(AppIoList)}]; all -> %% Include all included modules %% Generate new file ModNames = [M#mod.name || M <- Mods, M#mod.is_included], App2 = App#app{info = Info#app_info{modules = ModNames}}, Contents = gen_app(App2), - AppIoList = io_lib:format("%% app generated at ~w ~w\n~p.\n\n", + AppIoList = io_lib:format("%% app generated at ~w ~w\n~tp.\n\n", [date(), time(), Contents]), - [{write_file, AppFilename, AppIoList}] + [{write_file, AppFilename, to_utf8_bin_with_enc_comment(AppIoList)}] end. @@ -1285,7 +1290,7 @@ do_eval_spec({archive, Archive, Options, Files}, {ok, _} -> ok; {error, Reason} -> - reltool_utils:throw_error("create archive ~ts failed: ~p", + reltool_utils:throw_error("create archive ~ts failed: ~tp", [ArchiveFile, Reason]) end; do_eval_spec({copy_file, File}, _OrigSourceDir, SourceDir, TargetDir) -> @@ -1299,12 +1304,12 @@ do_eval_spec({copy_file, File, OldFile}, SourceFile = filename:join([OrigSourceDir, OldFile]), TargetFile = filename:join([TargetDir, File]), reltool_utils:copy_file(SourceFile, TargetFile); -do_eval_spec({write_file, File, IoList}, +do_eval_spec({write_file, File, Bin}, _OrigSourceDir, _SourceDir, TargetDir) -> TargetFile = filename:join([TargetDir, File]), - reltool_utils:write_file(TargetFile, IoList); + reltool_utils:write_file(TargetFile, Bin); do_eval_spec({strip_beam, File}, _OrigSourceDir, SourceDir, TargetDir) -> SourceFile = filename:join([SourceDir, File]), TargetFile = filename:join([TargetDir, File]), @@ -1336,7 +1341,7 @@ cleanup_spec({copy_file, File}, TargetDir) -> cleanup_spec({copy_file, NewFile, _OldFile}, TargetDir) -> TargetFile = filename:join([TargetDir, NewFile]), file:delete(TargetFile); -cleanup_spec({write_file, File, _IoList}, TargetDir) -> +cleanup_spec({write_file, File, _}, TargetDir) -> TargetFile = filename:join([TargetDir, File]), file:delete(TargetFile); cleanup_spec({strip_beam, File}, TargetDir) -> @@ -1406,7 +1411,7 @@ do_filter_spec(Path, ExclRegexps) -> Path2 = opt_join(Path, NewFile), match(Path2, InclRegexps, ExclRegexps); -do_filter_spec(Path, {write_file, File, _IoList}, InclRegexps, ExclRegexps) -> +do_filter_spec(Path, {write_file, File, _}, InclRegexps, ExclRegexps) -> Path2 = opt_join(Path, File), match(Path2, InclRegexps, ExclRegexps); do_filter_spec(Path, {strip_beam, File}, InclRegexps, ExclRegexps) -> @@ -1448,7 +1453,7 @@ do_install(RelName, TargetDir) -> RelDir = filename:join([TargetDir2, "releases"]), DataFile = filename:join([RelDir, "start_erl.data"]), Bin = reltool_utils:read_file(DataFile), - case string:tokens(binary_to_list(Bin), " \n") of + case string:lexemes(unicode:characters_to_list(Bin), " \n") of [ErlVsn, RelVsn | _] -> ErtsBinDir = filename:join([TargetDir2, "erts-" ++ ErlVsn, "bin"]), BinDir = filename:join([TargetDir2, "bin"]), @@ -1501,8 +1506,8 @@ subst_src_script(Script, SrcDir, DestDir, Vars, Opts) -> subst_file(Src, Dest, Vars, Opts) -> Bin = reltool_utils:read_file(Src), - Chars = subst(binary_to_list(Bin), Vars), - reltool_utils:write_file(Dest, Chars), + Chars = subst(unicode:characters_to_list(Bin), Vars), + reltool_utils:write_file(Dest, unicode:characters_to_binary(Chars)), case lists:member(preserve, Opts) of true -> FileInfo = reltool_utils:read_file_info(Src), diff --git a/lib/reltool/src/reltool_utils.erl b/lib/reltool/src/reltool_utils.erl index 60edc9f3ca..3891b5ae4d 100644 --- a/lib/reltool/src/reltool_utils.erl +++ b/lib/reltool/src/reltool_utils.erl @@ -55,7 +55,7 @@ root_dir() -> code:root_dir(). erl_libs() -> - string:tokens(os:getenv("ERL_LIBS", ""), ":;"). + string:lexemes(os:getenv("ERL_LIBS", ""), ":;"). lib_dirs(Dir) -> case erl_prim_loader:list_dir(Dir) of @@ -286,7 +286,7 @@ split_app_dir(Dir) -> {Name, Vsn} = split_app_name(Base), Vsn2 = try - [list_to_integer(N) || N <- string:tokens(Vsn, ".")] + [list_to_integer(N) || N <- string:lexemes(Vsn, ".")] catch _:_ -> Vsn @@ -427,7 +427,7 @@ scroll_size(ObjRef) -> safe_keysearch(Key, Pos, List, Mod, Line) -> case lists:keysearch(Key, Pos, List) of false -> - io:format("~w(~w): lists:keysearch(~p, ~w, ~p) -> false\n", + io:format("~w(~w): lists:keysearch(~tp, ~w, ~tp) -> false\n", [Mod, Line, Key, Pos, List]), erlang:error({Mod, Line, lists, keysearch, [Key, Pos, List]}); {value, Val} -> @@ -498,8 +498,8 @@ read_file(File) -> throw_error("read file ~ts: ~ts", [File, Text]) end. -write_file(File, IoList) -> - case file:write_file(File, IoList) of +write_file(File, Bin) -> + case file:write_file(File, Bin) of ok -> ok; {error, Reason} -> @@ -601,7 +601,7 @@ do_decode_regexps(Key, [Regexp | Regexps], Acc) -> Regexps, [#regexp{source = Regexp, compiled = MP} | Acc]); _ -> - Text = lists:flatten(io_lib:format("~p", [{Key, Regexp}])), + Text = lists:flatten(io_lib:format("~tp", [{Key, Regexp}])), throw({error, "Illegal option: " ++ Text}) end; do_decode_regexps(_Key, [], Acc) -> diff --git a/lib/reltool/test/reltool_app_SUITE.erl b/lib/reltool/test/reltool_app_SUITE.erl index 18c74bea6c..a51ee8875a 100644 --- a/lib/reltool/test/reltool_app_SUITE.erl +++ b/lib/reltool/test/reltool_app_SUITE.erl @@ -24,7 +24,7 @@ %%---------------------------------------------------------------------- -module(reltool_app_SUITE). --compile(export_all). +-compile([export_all, nowarn_export_all]). -include("reltool_test_lib.hrl"). -include_lib("common_test/include/ct.hrl"). diff --git a/lib/reltool/test/reltool_manual_gui_SUITE.erl b/lib/reltool/test/reltool_manual_gui_SUITE.erl index eebe2303fb..44da4ffd2c 100644 --- a/lib/reltool/test/reltool_manual_gui_SUITE.erl +++ b/lib/reltool/test/reltool_manual_gui_SUITE.erl @@ -23,7 +23,7 @@ init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2]). --compile(export_all). +-export([config/1, depgraphs/1]). -include_lib("common_test/include/ct.hrl"). -include("reltool_test_lib.hrl"). diff --git a/lib/reltool/test/reltool_server_SUITE.erl b/lib/reltool/test/reltool_server_SUITE.erl index e8dfea94da..49efe5aeda 100644 --- a/lib/reltool/test/reltool_server_SUITE.erl +++ b/lib/reltool/test/reltool_server_SUITE.erl @@ -19,11 +19,7 @@ -module(reltool_server_SUITE). --export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, - init_per_suite/1, end_per_suite/1, - init_per_testcase/2, end_per_testcase/2]). - --compile(export_all). +-compile([export_all, nowarn_export_all]). -include_lib("reltool/src/reltool.hrl"). -include("reltool_test_lib.hrl"). diff --git a/lib/reltool/test/reltool_test_lib.erl b/lib/reltool/test/reltool_test_lib.erl index 6cc2d259fb..53aeb8c08c 100644 --- a/lib/reltool/test/reltool_test_lib.erl +++ b/lib/reltool/test/reltool_test_lib.erl @@ -18,7 +18,7 @@ %% %CopyrightEnd% -module(reltool_test_lib). --compile(export_all). +-compile([export_all, nowarn_export_all]). -include("reltool_test_lib.hrl"). -define(timeout, 20). % minutes diff --git a/lib/reltool/test/reltool_wx_SUITE.erl b/lib/reltool/test/reltool_wx_SUITE.erl index ac820db21c..19707894ae 100644 --- a/lib/reltool/test/reltool_wx_SUITE.erl +++ b/lib/reltool/test/reltool_wx_SUITE.erl @@ -23,7 +23,7 @@ init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2]). --compile(export_all). +-export([start_all_windows/1, check_no_win_crash/0, wait_terminate/1]). -include("reltool_test_lib.hrl"). diff --git a/lib/reltool/test/rtt.erl b/lib/reltool/test/rtt.erl index 173ffc5166..d9e8e5520d 100644 --- a/lib/reltool/test/rtt.erl +++ b/lib/reltool/test/rtt.erl @@ -18,7 +18,7 @@ %% %CopyrightEnd% -module(rtt). --compile(export_all). +-compile([export_all, nowarn_export_all]). %% Modules or suites can be shortcuts, for example server expands to reltool_server_SUITE. %% diff --git a/lib/reltool/vsn.mk b/lib/reltool/vsn.mk index 2d07eeb8f0..49997b1e52 100644 --- a/lib/reltool/vsn.mk +++ b/lib/reltool/vsn.mk @@ -1 +1 @@ -RELTOOL_VSN = 0.7.3 +RELTOOL_VSN = 0.7.5 |