From fa3ee72a1c6ebe06282d6419972a651c26b66ac0 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Sun, 10 Mar 2024 16:10:36 +0100 Subject: [PATCH] xinit: evaluate simuldir to adjust netlist_dir depending on local_netlist_dir setting, even if no netlist command given on cmdline, so netlist_dir will always point to the right place in the running session --- src/xinit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xinit.c b/src/xinit.c index 2b3facc9..3fcf7ddb 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -2789,6 +2789,8 @@ int Tcl_AppInit(Tcl_Interp *inter) my_strncpy(xctx->sch_to_compare, abs_sym_path(cli_opt_diff, ""), S(xctx->sch_to_compare)); tclsetvar("compare_sch", "1"); } + + tcleval("simuldir"); /* set netlist_dir according to local_netlist_dir setting */ if(cli_opt_filename[0]) { char f[PATH_MAX]; @@ -2817,7 +2819,6 @@ int Tcl_AppInit(Tcl_Interp *inter) remove_symbols(); /* if cli_opt_do_netlist=1 call load_schematic with 'reset_undo=0' avoiding call to tcl is_xschem_file that could change xctx->netlist_type to symbol */ - if(cli_opt_do_netlist) tcleval("simuldir"); load_schematic(1, f, !cli_opt_do_netlist, 1); if(cli_opt_do_netlist) set_modify(-1); /* set tab/window title */ tclvareval("update_recent_file {", f, "}", NULL); @@ -2833,7 +2834,6 @@ int Tcl_AppInit(Tcl_Interp *inter) my_strncpy(fname, abs_sym_path(tmp, ""), S(fname)); /* if cli_opt_do_netlist=1 call load_schematic with 'reset_undo=0' avoiding call to tcl is_xschem_file that could change xctx->netlist_type to symbol */ - if(cli_opt_do_netlist) tcleval("simuldir"); load_schematic(1, fname, !cli_opt_do_netlist, 1); if(cli_opt_do_netlist) set_modify(-1); /* set tab/window title */ }