summaryrefslogtreecommitdiffstats
path: root/ds9/unix
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-01-18 18:07:34 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-01-18 18:07:34 (GMT)
commita51d63de1a6b963f9671367831e51aaa5bc9474a (patch)
tree251d1bb2ae6b4c1009008b244bd488f67afd7791 /ds9/unix
parent1f541ce182380f9c4b9bc5b78378acce3ad8379a (diff)
downloadblt-a51d63de1a6b963f9671367831e51aaa5bc9474a.zip
blt-a51d63de1a6b963f9671367831e51aaa5bc9474a.tar.gz
blt-a51d63de1a6b963f9671367831e51aaa5bc9474a.tar.bz2
tclzipfs
Diffstat (limited to 'ds9/unix')
-rw-r--r--ds9/unix/ds9.C18
1 files changed, 3 insertions, 15 deletions
diff --git a/ds9/unix/ds9.C b/ds9/unix/ds9.C
index 2429de3..a6ada4a 100644
--- a/ds9/unix/ds9.C
+++ b/ds9/unix/ds9.C
@@ -70,13 +70,10 @@ int SAOLocalMainHook(int* argcPtr, char*** argvPtr)
// so that tcl and tk know where to find their libs
// we do it here before InitLibraryPath is called
- // putenv((char*)"TCL_LIBRARY=./zipfsmntpt/tcl8.6");
- // putenv((char*)"TK_LIBRARY=./zipfsmntpt/tk8.6");
- putenv((char*)"TCL_LIBRARY=./tcl8.6");
- putenv((char*)"TK_LIBRARY=./tk8.6");
+ putenv((char*)"TCL_LIBRARY=zipfs:/zipfsmntpt/tcl8.6");
+ putenv((char*)"TK_LIBRARY=zipfs:/zipfsmntpt/tk8.6");
// startup script
- // Tcl_Obj *path = Tcl_NewStringObj("./zipfsmntpt/library/ds9.tcl",-1);
Tcl_Obj *path = Tcl_NewStringObj("zipfs:/zipfsmntpt/library/ds9.tcl",-1);
Tcl_SetStartupScript(path, NULL);
@@ -98,27 +95,18 @@ int SAOAppInit(Tcl_Interp *interp)
// find current working directory, and set as mount point
{
- // Tcl_DString pwd;
- // Tcl_DStringInit(&pwd);
- // Tcl_GetCwd(interp, &pwd);
-
#ifdef ZIPFILE
ostringstream str;
str << (char *)Tcl_GetNameOfExecutable()
<< ".zip"
<< ends;
- // if(TclZipfs_Mount(interp, (const char*)str.str().c_str(), Tcl_DStringValue(&pwd), NULL) != TCL_OK ){
if(TclZipfs_Mount(interp, "", (const char*)str.str().c_str(), NULL) != TCL_OK ){
- char str[] = "ERROR: Unable to open the auxiliary ds9 file 'ds9.zip'. If you moved the ds9 program from its original location, please also move the zip file to the same place.";
-
- cerr << str << endl;
+ cerr << "ERROR: Unable to open the auxiliary ds9 file 'ds9.zip'. If you moved the ds9 program from its original location, please also move the zip file to the same place." << endl;
exit(1);
}
#else
- // TclZipfs_Mount(interp, (const char *)Tcl_GetNameOfExecutable(), Tcl_DStringValue(&pwd), NULL);
TclZipfs_Mount(interp, "", (const char *)Tcl_GetNameOfExecutable(), NULL);
#endif
- // Tcl_DStringFree(&pwd);
}
// Tcl