diff --git a/idapyswitch.cpp b/idapyswitch.cpp index 672760a..dd13c32 100644 --- a/idapyswitch.cpp +++ b/idapyswitch.cpp @@ -342,13 +342,21 @@ bool pyver_tool_t::do_pick_sip( char dst_sip_path[QMAXPATH]; qmakepath(dst_sip_path, sizeof(dst_sip_path), idadir(""), "python", "3", "PyQt5", "sip" PY_MODULE_EXT, nullptr); - out_verb("Copying \"%s\" to \"%s\"\n", src_sip_path, dst_sip_path); - const int code = qcopyfile(src_sip_path, dst_sip_path, /*overwrite=*/ true); - if ( code != 0 ) + + if ( args.dry_run ) { - errbuf->sprnt("Couldn't copy file \"%s\" to \"%s\": %s", - src_sip_path, dst_sip_path, qstrerror(-1)); - return false; + out("Would copy %s to %s\n", src_sip_path, dst_sip_path); + } + else + { + out_verb("Copying \"%s\" to \"%s\"\n", src_sip_path, dst_sip_path); + const int code = qcopyfile(src_sip_path, dst_sip_path, /*overwrite=*/ true); + if ( code != 0 ) + { + errbuf->sprnt("Couldn't copy file \"%s\" to \"%s\": %s", + src_sip_path, dst_sip_path, qstrerror(-1)); + return false; + } } return true; diff --git a/idapyswitch_mac.cpp b/idapyswitch_mac.cpp index 8ecd01e..e7cf1c1 100644 --- a/idapyswitch_mac.cpp +++ b/idapyswitch_mac.cpp @@ -423,7 +423,13 @@ static bool patch_python_dylib_cmd( const pylib_entry_t &entry, qstring *errbuf) { - out_verb("patching: %s\n", path); + if ( args.dry_run ) + { + out("Would patch: %s\n", path); + return true; + } + + out_verb("Patching: %s\n", path); python_lc_info_t plc; if ( !get_python_lc_info(&plc, path, errbuf) ) diff --git a/out_of_tree/parsed_notifications.zip b/out_of_tree/parsed_notifications.zip index ed1d880..c9c2c34 100644 Binary files a/out_of_tree/parsed_notifications.zip and b/out_of_tree/parsed_notifications.zip differ diff --git a/pydoc_injections2.txt b/pydoc_injections2.txt index 73824f0..60ed8ed 100644 --- a/pydoc_injections2.txt +++ b/pydoc_injections2.txt @@ -43036,7 +43036,7 @@ class __IDAPython_Completion_Util(__builtin__.object) Help on function IDAPython_ExecScript in module ida_idaapi: -IDAPython_ExecScript(script, g, print_error=True) +IDAPython_ExecScript(path, g, print_error=True) Run the specified script. Help on function IDAPython_ExecSystem in module ida_idaapi: @@ -43052,7 +43052,7 @@ IDAPython_FormatExc(etype, value=None, tb=None, limit=None) Help on function IDAPython_LoadProcMod in module ida_idaapi: -IDAPython_LoadProcMod(script, g, print_error=True) +IDAPython_LoadProcMod(path, g, print_error=True) Load processor module. Help on function IDAPython_UnLoadProcMod in module ida_idaapi: diff --git a/pydoc_injections3.txt b/pydoc_injections3.txt index 3af1e8e..2860619 100644 --- a/pydoc_injections3.txt +++ b/pydoc_injections3.txt @@ -43138,7 +43138,7 @@ class __IDAPython_Completion_Util(builtins.object) Help on function IDAPython_ExecScript in module ida_idaapi: -IDAPython_ExecScript(script, g, print_error=True) +IDAPython_ExecScript(path, g, print_error=True) Run the specified script. Help on function IDAPython_ExecSystem in module ida_idaapi: @@ -43154,7 +43154,7 @@ IDAPython_FormatExc(etype, value=None, tb=None, limit=None) Help on function IDAPython_LoadProcMod in module ida_idaapi: -IDAPython_LoadProcMod(script, g, print_error=True) +IDAPython_LoadProcMod(path, g, print_error=True) Load processor module. Help on function IDAPython_UnLoadProcMod in module ida_idaapi: