make uninstall: remove empty directories (share/xschem and share/doc/xschem); make command `xschem help` work also if running in src/ directory; use XSCHEM_SHAREDIR shell variable (if defined and directory existing), else set XCSCHEM_SHAREDIR to `pwd` if started from src/ dir, else set compile set XSCHEM_SHAREDIR. xschemrc can override this XSCHEM_SHAREDIR setting.
This commit is contained in:
parent
09813f8e1e
commit
fd5fec64aa
2
Makefile
2
Makefile
|
|
@ -29,9 +29,9 @@ install_pdf: FORCE
|
||||||
cd doc && $(MAKE) install_pdf
|
cd doc && $(MAKE) install_pdf
|
||||||
|
|
||||||
uninstall: FORCE
|
uninstall: FORCE
|
||||||
cd src && $(MAKE) uninstall
|
|
||||||
cd xschem_library && $(MAKE) uninstall
|
cd xschem_library && $(MAKE) uninstall
|
||||||
cd doc && $(MAKE) uninstall
|
cd doc && $(MAKE) uninstall
|
||||||
cd src/utile && $(MAKE) uninstall
|
cd src/utile && $(MAKE) uninstall
|
||||||
|
cd src && $(MAKE) uninstall
|
||||||
|
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ uninstall: FORCE
|
||||||
$(SCCBOX) rm -f "$(XDOCDIR)"/xschem_man/*
|
$(SCCBOX) rm -f "$(XDOCDIR)"/xschem_man/*
|
||||||
$(SCCBOX) rm -f "$(XDOCDIR)"/*
|
$(SCCBOX) rm -f "$(XDOCDIR)"/*
|
||||||
$(SCCBOX) rm -f "$(MANDIR)"/man1/xschem.1
|
$(SCCBOX) rm -f "$(MANDIR)"/man1/xschem.1
|
||||||
|
$(SCCBOX) rm -f "$(XDOCDIR)"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,12 @@ foreach /local/n in /local/install_shares
|
||||||
$(SCCBOX) rm "$(XSHAREDIR)"/@/local/n@ @]
|
$(SCCBOX) rm "$(XSHAREDIR)"/@/local/n@ @]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print [@
|
||||||
|
$(SCCBOX) rm "$(XSHAREDIR)"/systemlib
|
||||||
|
$(SCCBOX) rm "$(XSHAREDIR)"/xschem_library
|
||||||
|
$(SCCBOX) rm "$(XSHAREDIR)"
|
||||||
|
@]
|
||||||
|
|
||||||
print [@
|
print [@
|
||||||
|
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
|
||||||
|
|
@ -97,13 +97,16 @@ int get_instance(const char *s)
|
||||||
static void xschem_cmd_help(int argc, const char **argv)
|
static void xschem_cmd_help(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
char prog[PATH_MAX];
|
char prog[PATH_MAX];
|
||||||
|
const char *xschem_sharedir=tclgetvar("XSCHEM_SHAREDIR");
|
||||||
|
#ifdef __unix__
|
||||||
|
int running_in_src_dir = tclgetintvar("running_in_src_dir");
|
||||||
|
#endif
|
||||||
if( get_file_path("x-www-browser")[0] == '/' ) goto done;
|
if( get_file_path("x-www-browser")[0] == '/' ) goto done;
|
||||||
if( get_file_path("firefox")[0] == '/' ) goto done;
|
if( get_file_path("firefox")[0] == '/' ) goto done;
|
||||||
if( get_file_path("chromium")[0] == '/' ) goto done;
|
if( get_file_path("chromium")[0] == '/' ) goto done;
|
||||||
if( get_file_path("chrome")[0] == '/' ) goto done;
|
if( get_file_path("chrome")[0] == '/' ) goto done;
|
||||||
if( get_file_path("xdg-open")[0] == '/' ) goto done;
|
if( get_file_path("xdg-open")[0] == '/' ) goto done;
|
||||||
#ifndef __unix__
|
#ifndef __unix__
|
||||||
const char *xschem_sharedir=tclgetvar("XSCHEM_SHAREDIR");
|
|
||||||
wchar_t app[MAX_PATH] = {0};
|
wchar_t app[MAX_PATH] = {0};
|
||||||
wchar_t w_url[PATH_MAX];
|
wchar_t w_url[PATH_MAX];
|
||||||
char url[PATH_MAX]="", url2[PATH_MAX]="";
|
char url[PATH_MAX]="", url2[PATH_MAX]="";
|
||||||
|
|
@ -123,8 +126,13 @@ static void xschem_cmd_help(int argc, const char **argv)
|
||||||
done:
|
done:
|
||||||
my_strncpy(prog, tclresult(), S(prog));
|
my_strncpy(prog, tclresult(), S(prog));
|
||||||
#ifdef __unix__
|
#ifdef __unix__
|
||||||
tclvareval("launcher {", "file://", XSCHEM_SHAREDIR,
|
if(running_in_src_dir) {
|
||||||
"/../doc/xschem/xschem_man/developer_info.html#cmdref", "} ", prog, NULL);
|
tclvareval("launcher {", "file://", xschem_sharedir,
|
||||||
|
"/../doc/xschem_man/developer_info.html#cmdref", "} ", prog, NULL);
|
||||||
|
} else {
|
||||||
|
tclvareval("launcher {", "file://", xschem_sharedir,
|
||||||
|
"/../doc/xschem/xschem_man/developer_info.html#cmdref", "} ", prog, NULL);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
my_snprintf(url2, S(url2), "file://%s#cmdref", url);
|
my_snprintf(url2, S(url2), "file://%s#cmdref", url);
|
||||||
MultiByteToWideChar(CP_ACP, 0, url2, -1, w_url, S(w_url));
|
MultiByteToWideChar(CP_ACP, 0, url2, -1, w_url, S(w_url));
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ install: FORCE
|
||||||
|
|
||||||
uninstall: FORCE
|
uninstall: FORCE
|
||||||
$(SCCBOX) rm -f "$(XSHAREDIR)"/utile/*
|
$(SCCBOX) rm -f "$(XSHAREDIR)"/utile/*
|
||||||
|
$(SCCBOX) rm -f "$(XSHAREDIR)"/utile
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
||||||
|
|
|
||||||
71
src/xinit.c
71
src/xinit.c
|
|
@ -2285,6 +2285,7 @@ void tclmainloop(void)
|
||||||
int Tcl_AppInit(Tcl_Interp *inter)
|
int Tcl_AppInit(Tcl_Interp *inter)
|
||||||
{
|
{
|
||||||
const char *tmp_ptr;
|
const char *tmp_ptr;
|
||||||
|
char *xschem_sharedir=NULL;
|
||||||
char name[PATH_MAX]; /* overflow safe 20161122 */
|
char name[PATH_MAX]; /* overflow safe 20161122 */
|
||||||
char tmp[2*PATH_MAX+100]; /* 20161122 overflow safe */
|
char tmp[2*PATH_MAX+100]; /* 20161122 overflow safe */
|
||||||
#ifndef __unix__
|
#ifndef __unix__
|
||||||
|
|
@ -2296,6 +2297,9 @@ int Tcl_AppInit(Tcl_Interp *inter)
|
||||||
int running_in_src_dir;
|
int running_in_src_dir;
|
||||||
int fs;
|
int fs;
|
||||||
|
|
||||||
|
char xschemtcl[PATH_MAX];
|
||||||
|
char systemlib[PATH_MAX];
|
||||||
|
char xschemexec[PATH_MAX];
|
||||||
#ifdef __unix__
|
#ifdef __unix__
|
||||||
const char* home_buff;
|
const char* home_buff;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -2324,6 +2328,18 @@ int Tcl_AppInit(Tcl_Interp *inter)
|
||||||
}
|
}
|
||||||
Tcl_CreateExitHandler(tclexit, 0);
|
Tcl_CreateExitHandler(tclexit, 0);
|
||||||
#ifdef __unix__
|
#ifdef __unix__
|
||||||
|
/* XSCHEM_SHAREDIR set in shell variable */
|
||||||
|
if ((xschem_sharedir=getenv("XSCHEM_SHAREDIR")) != NULL && !stat(xschem_sharedir, &buf)) {
|
||||||
|
tclsetvar("XSCHEM_SHAREDIR", xschem_sharedir);
|
||||||
|
/* running in ./src/ directory */
|
||||||
|
} else if( !stat("./xschem.tcl", &buf) && !stat("./systemlib", &buf) && !stat("./xschem", &buf)) {
|
||||||
|
tclsetvar("XSCHEM_SHAREDIR",pwd_dir);
|
||||||
|
/* compile-time set XSCHEM_SHAREDIR */
|
||||||
|
} else /* if(!stat(XSCHEM_SHAREDIR, &buf)) */ {
|
||||||
|
tclsetvar("XSCHEM_SHAREDIR", XSCHEM_SHAREDIR);
|
||||||
|
}
|
||||||
|
/* if still not found rely on xschemrc for setting this needed path */
|
||||||
|
|
||||||
my_snprintf(tmp, S(tmp),"regsub -all {~/} {%s} {%s/}", XSCHEM_LIBRARY_PATH, home_dir);
|
my_snprintf(tmp, S(tmp),"regsub -all {~/} {%s} {%s/}", XSCHEM_LIBRARY_PATH, home_dir);
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
tclsetvar("XSCHEM_LIBRARY_PATH", tclresult());
|
tclsetvar("XSCHEM_LIBRARY_PATH", tclresult());
|
||||||
|
|
@ -2336,51 +2352,60 @@ int Tcl_AppInit(Tcl_Interp *inter)
|
||||||
tclsetvar("USER_CONF_DIR", user_conf_dir);
|
tclsetvar("USER_CONF_DIR", user_conf_dir);
|
||||||
|
|
||||||
/* test if running xschem in src/ dir (usually for testing) */
|
/* test if running xschem in src/ dir (usually for testing) */
|
||||||
|
my_snprintf(xschemtcl, S(xschemtcl), "%s/%s", tclgetvar("XSCHEM_SHAREDIR"), "xschem.tcl");
|
||||||
|
my_snprintf(systemlib, S(systemlib), "%s/%s", tclgetvar("XSCHEM_SHAREDIR"), "systemlib");
|
||||||
|
my_snprintf(xschemexec, S(xschemexec), "%s/%s", tclgetvar("XSCHEM_SHAREDIR"), "xschem");
|
||||||
running_in_src_dir = 0;
|
running_in_src_dir = 0;
|
||||||
if( !stat("./xschem.tcl", &buf) && !stat("./systemlib", &buf) && !stat("./xschem", &buf)) {
|
if( !stat(xschemtcl, &buf) && !stat(systemlib, &buf) && !stat(xschemexec, &buf)) {
|
||||||
running_in_src_dir = 1;
|
running_in_src_dir = 1;
|
||||||
tclsetvar("XSCHEM_SHAREDIR",pwd_dir); /* for testing xschem builds in src dir*/
|
|
||||||
|
|
||||||
/* set builtin library path if running in src/ */
|
/* set builtin library path if running in src/ */
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"set XSCHEM_LIBRARY_PATH %s/xschem_library", user_conf_dir);
|
"set XSCHEM_LIBRARY_PATH %s/xschem_library", user_conf_dir);
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/devices", pwd_dir);
|
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/devices",
|
||||||
|
tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/examples", pwd_dir);
|
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/examples",
|
||||||
|
tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/ngspice", pwd_dir);
|
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/ngspice",
|
||||||
|
tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/logic", pwd_dir);
|
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/logic",
|
||||||
|
tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/xschem_simulator", pwd_dir);
|
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/xschem_simulator",
|
||||||
|
tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/generators", pwd_dir);
|
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/generators",
|
||||||
|
tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/inst_sch_select", pwd_dir);
|
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/inst_sch_select",
|
||||||
|
tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/binto7seg", pwd_dir);
|
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/binto7seg",
|
||||||
|
tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/pcb", pwd_dir);
|
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/pcb",
|
||||||
|
tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
my_snprintf(tmp, S(tmp),
|
my_snprintf(tmp, S(tmp),
|
||||||
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/rom8k", pwd_dir);
|
"append XSCHEM_LIBRARY_PATH : [file dirname \"%s\"]/xschem_library/rom8k",
|
||||||
|
tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
tcleval(tmp);
|
tcleval(tmp);
|
||||||
} else if( !stat(XSCHEM_SHAREDIR, &buf) ) {
|
|
||||||
tclsetvar("XSCHEM_SHAREDIR",XSCHEM_SHAREDIR);
|
|
||||||
/* ... else give up searching, may set later after loading xschemrc */
|
|
||||||
}
|
}
|
||||||
tclsetintvar("running_in_src_dir", running_in_src_dir);
|
tclsetintvar("running_in_src_dir", running_in_src_dir);
|
||||||
#else
|
#else /* windows */
|
||||||
char *up_hier=NULL, *win_xschem_library_path=NULL;
|
char *up_hier=NULL, *win_xschem_library_path=NULL;
|
||||||
#define WIN_XSCHEM_LIBRARY_PATH_NUM 11
|
#define WIN_XSCHEM_LIBRARY_PATH_NUM 11
|
||||||
const char *WIN_XSCHEM_LIBRARY_PATH[WIN_XSCHEM_LIBRARY_PATH_NUM] = {
|
const char *WIN_XSCHEM_LIBRARY_PATH[WIN_XSCHEM_LIBRARY_PATH_NUM] = {
|
||||||
|
|
@ -2432,7 +2457,6 @@ int Tcl_AppInit(Tcl_Interp *inter)
|
||||||
tclsetvar("XSCHEM_LIBRARY_PATH", win_xschem_library_path_clean);
|
tclsetvar("XSCHEM_LIBRARY_PATH", win_xschem_library_path_clean);
|
||||||
my_free(_ALLOC_ID_, &win_xschem_library_path);
|
my_free(_ALLOC_ID_, &win_xschem_library_path);
|
||||||
my_free(_ALLOC_ID_, &up_hier);
|
my_free(_ALLOC_ID_, &up_hier);
|
||||||
char *xschem_sharedir=NULL;
|
|
||||||
if ((xschem_sharedir=getenv("XSCHEM_SHAREDIR")) != NULL) {
|
if ((xschem_sharedir=getenv("XSCHEM_SHAREDIR")) != NULL) {
|
||||||
if (!stat(xschem_sharedir, &buf)) {
|
if (!stat(xschem_sharedir, &buf)) {
|
||||||
tclsetvar("XSCHEM_SHAREDIR", xschem_sharedir);
|
tclsetvar("XSCHEM_SHAREDIR", xschem_sharedir);
|
||||||
|
|
@ -2478,7 +2502,7 @@ int Tcl_AppInit(Tcl_Interp *inter)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
fprintf(errfp, "Using run time directory XSCHEM_SHAREDIR = %s\n", tclgetvar("XSCHEM_SHAREDIR"));
|
||||||
/* Execute tcl script given on command line with --preinit, before sourcing xschemrc */
|
/* Execute tcl script given on command line with --preinit, before sourcing xschemrc */
|
||||||
if(cli_opt_preinit_command) {
|
if(cli_opt_preinit_command) {
|
||||||
tcleval(cli_opt_preinit_command);
|
tcleval(cli_opt_preinit_command);
|
||||||
|
|
@ -2548,6 +2572,17 @@ int Tcl_AppInit(Tcl_Interp *inter)
|
||||||
}
|
}
|
||||||
/* END SOURCING xschemrc */
|
/* END SOURCING xschemrc */
|
||||||
|
|
||||||
|
|
||||||
|
/* test again if running xschem in src/ dir after xschemrc settings */
|
||||||
|
my_snprintf(xschemtcl, S(xschemtcl), "%s/%s", tclgetvar("XSCHEM_SHAREDIR"), "xschem.tcl");
|
||||||
|
my_snprintf(systemlib, S(systemlib), "%s/%s", tclgetvar("XSCHEM_SHAREDIR"), "systemlib");
|
||||||
|
my_snprintf(xschemexec, S(xschemexec), "%s/%s", tclgetvar("XSCHEM_SHAREDIR"), "xschem");
|
||||||
|
running_in_src_dir = 0;
|
||||||
|
if( !stat(xschemtcl, &buf) && !stat(systemlib, &buf) && !stat(xschemexec, &buf)) {
|
||||||
|
running_in_src_dir = 1;
|
||||||
|
}
|
||||||
|
tclsetintvar("running_in_src_dir", running_in_src_dir);
|
||||||
|
|
||||||
if(!sel_file[0]) {
|
if(!sel_file[0]) {
|
||||||
my_snprintf(sel_file, S(sel_file), "%s/%s", user_conf_dir, ".selection.sch");
|
my_snprintf(sel_file, S(sel_file), "%s/%s", user_conf_dir, ".selection.sch");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1768,9 +1768,9 @@ proc simconf_add {tool} {
|
||||||
|
|
||||||
|
|
||||||
############ cellview
|
############ cellview
|
||||||
# this proc prints symbol bindings (default binding or "schematic" attr in symbol)
|
# proc cellview prints symbol bindings (default binding or "schematic" attr in symbol)
|
||||||
# of all symbols used in current and sub schematics.
|
# of all symbols used in current and sub schematics.
|
||||||
proc cellview_setlabels {w sym_sch default_sch sym_spice_sym_def} {
|
proc cellview_setlabels {w symbol sym_sch default_sch sym_spice_sym_def} {
|
||||||
global dark_gui_colorscheme
|
global dark_gui_colorscheme
|
||||||
if {$dark_gui_colorscheme} {
|
if {$dark_gui_colorscheme} {
|
||||||
set symfg SeaGreen1
|
set symfg SeaGreen1
|
||||||
|
|
@ -1792,6 +1792,8 @@ proc cellview_setlabels {w sym_sch default_sch sym_spice_sym_def} {
|
||||||
# ....
|
# ....
|
||||||
} elseif {[$w get] eq $sym_sch} {
|
} elseif {[$w get] eq $sym_sch} {
|
||||||
$w configure -bg $symbg
|
$w configure -bg $symbg
|
||||||
|
} else {
|
||||||
|
puts "need to update:[$w get] --> $sym_sch"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1813,8 +1815,8 @@ proc cellview {} {
|
||||||
update
|
update
|
||||||
raise .cv
|
raise .cv
|
||||||
frame .cv.top
|
frame .cv.top
|
||||||
label .cv.top.sym -text { SYMBOL} -width 20 -bg grey60 -anchor w -padx 4 -font $font
|
label .cv.top.sym -text { SYMBOL} -width 30 -bg grey60 -anchor w -padx 4 -font $font
|
||||||
label .cv.top.sch -text SCHEMATIC -width 50 -bg grey60 -anchor w -padx 4 -font $font
|
label .cv.top.sch -text SCHEMATIC -width 45 -bg grey60 -anchor w -padx 4 -font $font
|
||||||
label .cv.top.pad -text { } -width 1 -bg grey60 -font $font
|
label .cv.top.pad -text { } -width 1 -bg grey60 -font $font
|
||||||
pack .cv.top.sym .cv.top.sch -side left -fill x -expand 1
|
pack .cv.top.sym .cv.top.sch -side left -fill x -expand 1
|
||||||
pack .cv.top.pad -side left -fill x
|
pack .cv.top.pad -side left -fill x
|
||||||
|
|
@ -1841,10 +1843,10 @@ proc cellview {} {
|
||||||
if {$type eq {subcircuit}} {
|
if {$type eq {subcircuit}} {
|
||||||
frame $sf.f$i
|
frame $sf.f$i
|
||||||
pack $sf.f$i -side top -fill x
|
pack $sf.f$i -side top -fill x
|
||||||
label $sf.f$i.l -text $symbol -width 20 -anchor w -padx 4 -borderwidth 1 \
|
label $sf.f$i.l -text $symbol -width 30 -anchor w -padx 4 -borderwidth 1 \
|
||||||
-relief sunken -pady 1 -font $font
|
-relief sunken -pady 1 -font $font
|
||||||
# puts $sf.f$i.s
|
# puts $sf.f$i.s
|
||||||
entry $sf.f$i.s -width 50 -borderwidth 1 -relief sunken -font $font
|
entry $sf.f$i.s -width 45 -borderwidth 1 -relief sunken -font $font
|
||||||
balloon $sf.f$i.s $abs_sch
|
balloon $sf.f$i.s $abs_sch
|
||||||
button $sf.f$i.b -text Sch -padx 4 -borderwidth 1 -pady 0 -font $font \
|
button $sf.f$i.b -text Sch -padx 4 -borderwidth 1 -pady 0 -font $font \
|
||||||
-command "
|
-command "
|
||||||
|
|
@ -1859,9 +1861,9 @@ proc cellview {} {
|
||||||
$sf.f$i.s insert 0 {defined in symbol spice_sym_def}
|
$sf.f$i.s insert 0 {defined in symbol spice_sym_def}
|
||||||
}
|
}
|
||||||
bind $sf.f$i.s <KeyRelease> "
|
bind $sf.f$i.s <KeyRelease> "
|
||||||
cellview_setlabels %W [list $sym_sch] [list $default_sch] [list $sym_spice_sym_def]
|
cellview_setlabels %W [list $symbol] [list $sym_sch] [list $default_sch] [list $sym_spice_sym_def]
|
||||||
"
|
"
|
||||||
cellview_setlabels $sf.f$i.s $sym_sch $default_sch $sym_spice_sym_def
|
cellview_setlabels $sf.f$i.s $symbol $sym_sch $default_sch $sym_spice_sym_def
|
||||||
pack $sf.f$i.l $sf.f$i.s -side left -fill x -expand 1
|
pack $sf.f$i.l $sf.f$i.s -side left -fill x -expand 1
|
||||||
pack $sf.f$i.b -side left
|
pack $sf.f$i.b -side left
|
||||||
}
|
}
|
||||||
|
|
@ -1892,7 +1894,7 @@ proc traversal_setlabels {w parent_sch instname inst_sch sym_sch default_sch ins
|
||||||
# update schematic
|
# update schematic
|
||||||
if {$parent_sch ne {}} {
|
if {$parent_sch ne {}} {
|
||||||
set current [xschem get current_name]
|
set current [xschem get current_name]
|
||||||
puts "traversal_update_schematic: $w parent: $parent_sch $instname def: $sym_sch $inst_sch --> [$w get]"
|
# puts "traversal_update_schematic: $w parent: $parent_sch $instname def: $sym_sch $inst_sch --> [$w get]"
|
||||||
if { $inst_sch ne [$w get] } {
|
if { $inst_sch ne [$w get] } {
|
||||||
puts "update attr"
|
puts "update attr"
|
||||||
xschem load $parent_sch noundoreset nodraw
|
xschem load $parent_sch noundoreset nodraw
|
||||||
|
|
@ -1904,7 +1906,7 @@ proc traversal_setlabels {w parent_sch instname inst_sch sym_sch default_sch ins
|
||||||
xschem set_modify 3 ;# set only modified flag to force a save, do not update window/tab titles
|
xschem set_modify 3 ;# set only modified flag to force a save, do not update window/tab titles
|
||||||
xschem save
|
xschem save
|
||||||
set inst_sch [$w get]
|
set inst_sch [$w get]
|
||||||
puts "inst_sch set to: $inst_sch"
|
# puts "inst_sch set to: $inst_sch"
|
||||||
xschem load $current noundoreset nodraw
|
xschem load $current noundoreset nodraw
|
||||||
|
|
||||||
bind $w <KeyRelease> "
|
bind $w <KeyRelease> "
|
||||||
|
|
@ -8878,7 +8880,7 @@ if {$text_replace_selection && $OS != "Windows"} {
|
||||||
|
|
||||||
## allow to unpost menu entries when clicking a posted menu
|
## allow to unpost menu entries when clicking a posted menu
|
||||||
|
|
||||||
if { [info tclversion] >= 8.6 } {
|
if { [info exists has_x] && [info tclversion] >= 8.6 } {
|
||||||
bind Menu <Button> {
|
bind Menu <Button> {
|
||||||
if { [%W cget -type] eq "menubar" && [info exists tk::Priv(menuActivated)]} {
|
if { [%W cget -type] eq "menubar" && [info exists tk::Priv(menuActivated)]} {
|
||||||
%W activate none
|
%W activate none
|
||||||
|
|
|
||||||
|
|
@ -44,14 +44,16 @@ install: FORCE
|
||||||
$(SCCBOX) install -f -d gschem_import/sym/*.sym "$(XDOCDIR)"/gschem_import/sym
|
$(SCCBOX) install -f -d gschem_import/sym/*.sym "$(XDOCDIR)"/gschem_import/sym
|
||||||
|
|
||||||
uninstall: FORCE
|
uninstall: FORCE
|
||||||
$(SCCBOX) rm -f "$(system_library_dir)"/* "$(XDOCDIR)"/examples/* "$(XDOCDIR)"/pcb/* \
|
$(SCCBOX) rm -f "$(system_library_dir)"/* \
|
||||||
"$(XDOCDIR)"/ngspice/* "$(XDOCDIR)"/symgen/* "$(XDOCDIR)"/logic/* "$(XDOCDIR)"/xTAG/* \
|
"$(system_library_dir)" \
|
||||||
"$(XDOCDIR)"/rom8k/* "$(XDOCDIR)"/xschem_simulator/* "$(XDOCDIR)"/binto7seg/* \
|
"$(XDOCDIR)"/examples/* "$(XDOCDIR)"/pcb/* \
|
||||||
"$(XDOCDIR)"/rulz-r8c33/* "$(XDOCDIR)"/generators/* "$(XDOCDIR)"/inst_sch_select/* \
|
"$(XDOCDIR)"/ngspice/* "$(XDOCDIR)"/symgen/* "$(XDOCDIR)"/logic/* "$(XDOCDIR)"/xTAG/* \
|
||||||
"$(XDOCDIR)"/gschem_import/*.sym \
|
"$(XDOCDIR)"/rom8k/* "$(XDOCDIR)"/xschem_simulator/* "$(XDOCDIR)"/binto7seg/* \
|
||||||
"$(XDOCDIR)"/gschem_import/*.sch \
|
"$(XDOCDIR)"/rulz-r8c33/* "$(XDOCDIR)"/generators/* "$(XDOCDIR)"/inst_sch_select/* \
|
||||||
"$(XDOCDIR)"/gschem_import/sym/*.sym \
|
"$(XDOCDIR)"/gschem_import/*.sym \
|
||||||
"$(XDOCDIR)"/gschem_import/sym
|
"$(XDOCDIR)"/gschem_import/*.sch \
|
||||||
|
"$(XDOCDIR)"/gschem_import/sym/*.sym \
|
||||||
|
"$(XDOCDIR)"/gschem_import/sym
|
||||||
clean:
|
clean:
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue