swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distributing Win95/NT exe files?


From: Marcus G. Daniels
Subject: Re: Distributing Win95/NT exe files?
Date: 02 Apr 1998 12:14:19 -0800

>>>>> "B" == Benedikt Stefansson <address@hidden> writes:

B> I just left them in the same directory as the exe file, and then
B> tried to run it from a MS-DOS shell. It seems that once the DLLs
B> are all there the simulation starts but get's stuck somewhere in
B> initSwarm(), at least I'm guessing from the "can't find cstring"
B> error message that I mentioned in my previous message.

Ok, the files that you need to make a Swarm application run outside of
the development kit are the following:

DLLs:
  cygwinb19.dll
  cygtcl80.dll
  cygtk80.dll

Tcl support files:
  init.tcl
  word.tcl 

Tk support files:
  button.tcl
  entry.tcl
  listbox.tcl
  menu.tcl
  scale.tcl
  scrlbar.tcl
  text.tcl
  tk.tcl

BLT support files:
  bltGraph.tcl

Currently you need to either need to dump them in the executable
directory, or set TCL_LIBRARY, TK_LIBRARY, BLT_LIBRARY, and PATH (for the DLLs)
to the right place.

In addition, you need the patch below, so that the absence of 
SWARMHOME and the inability of the heuristics in Swarm to find a source
tree don't cause the sort of failure you were seeing.

[Incidentally, here's a tip for debugging problems like this:
if you do a:

  set STRACE=N,log

..cygwin will send a system call trace to the file "log".  The number
N can be made bigger to get more debugging information in that file.]

Index: src/objectbase/Arguments.m
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/objectbase/Arguments.m,v
retrieving revision 1.6
diff -c -r1.6 Arguments.m
*** Arguments.m 1998/03/31 03:32:26     1.6
--- Arguments.m 1998/04/02 19:50:34
***************
*** 228,234 ****
    swarmPath = findDirectory (arguments, swarmVersionPathBuf);
    if (swarmPath == NULL)
      swarmPath = findDirectory (arguments, "swarm/VERSION");
!   return dropDirectory (swarmPath);
  }
  
  - (const char *)getSwarmHome
--- 228,237 ----
    swarmPath = findDirectory (arguments, swarmVersionPathBuf);
    if (swarmPath == NULL)
      swarmPath = findDirectory (arguments, "swarm/VERSION");
!   if (swarmPath)
!     return dropDirectory (swarmPath);
!   else
!     return NULL;
  }
  
  - (const char *)getSwarmHome
Index: src/objectbase/ChangeLog
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/objectbase/ChangeLog,v
retrieving revision 1.31
diff -c -r1.31 ChangeLog
*** ChangeLog   1998/03/31 03:32:26     1.31
--- ChangeLog   1998/04/02 19:50:35
***************
*** 1,3 ****
--- 1,8 ----
+ 1998-04-02  Marcus G. Daniels  <address@hidden>
+ 
+       * Arguments.m (findSwarm): return NULL if the SWARMHOME
+       can't be found.
+ 
  1998-03-30  Marcus G. Daniels  <address@hidden>
  
        * Arguments.m ([Arguments +createArgc:Argv:]): glibc or not,
Index: src/tkobjc/ChangeLog
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/tkobjc/ChangeLog,v
retrieving revision 1.92
diff -c -r1.92 ChangeLog
*** ChangeLog   1998/03/31 19:00:45     1.92
--- ChangeLog   1998/04/02 19:50:36
***************
*** 1,3 ****
--- 1,11 ----
+ 1998-04-02  Marcus G. Daniels  <address@hidden>
+ 
+       * TkExtra.m (ensureBltSupportFiles): Cope with the inability
+       to find the Swarm source tree; use the current directory.
+       ([TkExtra -preInitWithArgc:argv:]): Load bltGraph.tcl instead
+       of setting up the autoload path.  Look for word.tcl in the
+       current directory if there is not value for [info library].
+ 
  1998-03-31  Marcus G. Daniels  <address@hidden>
  
        * ZoomRaster.m ([ZoomRaster -handleConfigureWidth:Height:]): Don't
Index: src/tkobjc/TkExtra.m
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/tkobjc/TkExtra.m,v
retrieving revision 1.13
diff -c -r1.13 TkExtra.m
*** TkExtra.m   1998/03/20 07:06:05     1.13
--- TkExtra.m   1998/04/02 19:50:36
***************
*** 40,54 ****
          if (!retry)
            {
              const char *swarmHome = [arguments getSwarmHome];
!             const char *libdir = "/lib";
!             char libPath[strlen (swarmHome) + strlen (libdir) + 1];
!             char *p;
!             
!             p = stpcpy (libPath, swarmHome);
!             stpcpy (p, libdir);
!             
!             basePath = strdup (libPath); 
!             [globalTkInterp globalEval: "set blt_library %s", libPath];
              retry = 1;
              continue;
            }
--- 40,63 ----
          if (!retry)
            {
              const char *swarmHome = [arguments getSwarmHome];
! 
!             if (swarmHome)
!               {
!                 const char *libdir = "/lib";
!                 char libPath[strlen (swarmHome) + strlen (libdir) + 1];
!                 char *p;
!                 
!                 p = stpcpy (libPath, swarmHome);
!                 stpcpy (p, libdir);
!                 
!                 basePath = strdup (libPath); 
!                 [globalTkInterp globalEval: "set blt_library %s", libPath];
!               }
!             else
!               {
!                 basePath = ".";
!                 [globalTkInterp globalEval: "set blt_library %s", basePath];
!               }
              retry = 1;
              continue;
            }
***************
*** 84,92 ****
  
    ensureBltSupportFiles (arguments, self);
  
!   // (nelson) I think this is ok: lets us load cool graph code.
!   // presumably, $blt_library is always set right.
!   [self eval: "lappend auto_path $blt_library"];
  
    [self eval: "wm withdraw ."];                         // don't map "."
    
--- 93,101 ----
  
    ensureBltSupportFiles (arguments, self);
  
!   // This avoids the need for consultation of tclIndex, which is useful
!   // when distributing just the minimum set of Tcl support files.
!   [self eval: "source $blt_library/bltGraph.tcl"];
  
    [self eval: "wm withdraw ."];                         // don't map "."
    
***************
*** 111,117 ****
        // Without the load below, on VarProbeEntry double-clicks, this occured:
        //   Original error: no value given for parameter "start" to 
"tcl_wordBreakBefore"
        // -mgd
!       [self eval: "source [info library]/word.tcl"];
      }
  
    return filename;
--- 120,130 ----
        // Without the load below, on VarProbeEntry double-clicks, this occured:
        //   Original error: no value given for parameter "start" to 
"tcl_wordBreakBefore"
        // -mgd
!       [self eval: "if {[info library] == \"\"} { "
!             "source ./word.tcl "
!             "} else { "
!             "source [info library]/word.tcl "
!             "}"];
      }
  
    return filename;




                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]