Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017 
<== Date ==> <== Thread ==>

Subject: msi for windows IOC build
From: <ronaldo.mercado@diamond.ac.uk>
To: <tech-talk@aps.anl.gov>
Date: Wed, 28 Oct 2015 09:48:55 +0000
Hello,

I am writing because while building an IOC for the PerkinElmer area detector module 2-3, I found that
msi on windows expects ':' as path separator.  This behaviour does not allow to
specify paths for "include" that reside on a different windows drive.

Has anyone else encountered this problem while using msi on windows? 

How have you solved them?

My proposal introduces a "-w" switch. The changes are pasted below (changes made against msi 1-5).
I also posted my version at http://controls.diamond.ac.uk/downloads/other/files/patched-msi.c

Thanks,

Ronaldo


--- /dls_sw/epics/R3.14.12.3/extensions/src/msi/msi.c	2013-01-18 20:25:57.045064658 +0000
+++ /home/rjq35657/msi/msi.c	2015-10-21 18:30:29.000000000 +0100
@@ -54,6 +54,7 @@
 
 /*Exit status*/
 static int exitStatus = 0;
+static int windowsPaths = 0;
 
 

 int main(int argc,char **argv)
@@ -87,6 +88,8 @@
 	} else if(strncmp(argv[1],"-V",2)==0) {
 	    macSuppressWarning(macPvt,0);
 	    narg = 1; /* no argument for this option */
+	} else if(strncmp(argv[1],"-w",2)==0) {
+            windowsPaths = 1;
 	} else {
 	    usageExit();
 	}
@@ -131,7 +134,7 @@
 

 void usageExit(void)
 {
-    fprintf(stderr,"usage: msi -V -opath -Ipath ... -Msub ... -Ssubfile  template\n");
+    fprintf(stderr,"usage: msi -w -V -opath -Ipath ... -Msub ... -Ssubfile  template\n");
     fprintf(stderr,"    Specifying path will replace the default '.'\n");
     fprintf(stderr,"    stdin is used if template is not given\n");
     exit(1);
@@ -293,16 +296,17 @@
     const char	*pdir;
     int		len;
     int		emptyName;
-
+    char        pathSeparator = windowsPaths ? ';' : ':';
+    
     pdir = path;
     /*an empty name at beginning, middle, or end means current directory*/
     while(pdir && *pdir) {
-	emptyName = ((*pdir == ':') ? 1 : 0);
+	emptyName = ((*pdir == pathSeparator) ? 1 : 0);
 	if(emptyName) ++pdir;
 	ppathNode = (pathNode *)calloc(1,sizeof(pathNode));
 	ellAdd(ppathList,&ppathNode->node);
 	if(!emptyName) {
-	    pcolon = strchr(pdir,':');
+	    pcolon = strchr(pdir,pathSeparator);
 	    len = (pcolon ? (pcolon - pdir) : strlen(pdir));
 	    if(len>0)  {
 	        ppathNode->directory = (char *)calloc(len+1,sizeof(char));




-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom



Replies:
Re: msi for windows IOC build Andrew Johnson

Navigate by Date:
Prev: RE: Subject: RE: To read single element from waveform record Mark Rivers
Next: Using V4 pvCommonCPP module with external boost library alan.greer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017 
Navigate by Thread:
Prev: Re: Subject: RE: To read single element from waveform record Andrew Johnson
Next: Re: msi for windows IOC build Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·