Andy Smith wrote:

See patch [971471]. I think this clears up a lot of issues. Mike and Alex, this one replaces the one I sent earlier. Please comment.

The .bat files are in Unix format, probably because I used GVIM to create them.


It's not a problem for Windows NT+ as Windows NT+ can handle it fine, but I don't think Windows 95 likes .bat files in Unix format. They should be converted to DOS format.

Mike, can you please convert the three batch files to DOS format and update CVS?

Andy, can you please convert on your end and make sure your script still works?

Alex



Andy

Alex Burger wrote:

[EMAIL PROTECTED] wrote:

I have a question regarding the NSIS installer functions
that create the .bat files for snmpconf, mib2c, and traptoemail.
I'll show the fragment for snmpconf; Know that the others have
similar constructs.
  -=-=-=-=-=-=-
    StrCmp $2 "set MYPERLPROGRAM=c:\usr\bin\snmpconf$\r$\n" 0 +3
      FileWrite $1 "set MYPERLPROGRAM=$INSTDIR\bin\snmpconf$\r$\n"
      Goto snmpconfloop
    StrCmp $2 "set MYPERLPROGRAM=c:\usr\bin\snmpconf" 0 +3
      FileWrite $1 "set MYPERLPROGRAM=$INSTDIR\bin\snmpconf"
      Goto snmpconfloop
  -=-=-=-=-=-=-


In the last package, snmpconf.bat was broken, but mib2c.bat and traptoemail.bat were not. In that case, snmpconf.bat contained this after an install to base directory "c:/usr" -=-=-=-=-=-=- c:\usr\ -=-=-=-=-=-=- QUESTION: Since the NSIS functions are almost identical for these three ".bat" files, what accounts for snmpconf.bat breaking ? Was something _not_ translating UNIX line terminator into DOS CRLF line terminator ?



The reason snmpconf.bat contained c:\usr\ is because of a step I followed from the README. I have corrected the README and submitted a patch already. The c:\usr\ has nothing to do with the .nsi script not working.


Mib2c.bat and traptoemail.bat were broken. If you installed to a path other than c:\usr they were not updated.

Consider now the patch
[971222 ] Win32 installer script not modifying .bat files

which would add yet another condition (per each .bat) :
@@ -362,6 +362,9 @@
     StrCmp $2 "set MYPERLPROGRAM=c:\usr\bin\snmpconf$\r$\n" 0 +3
       FileWrite $1 "set MYPERLPROGRAM=$INSTDIR\bin\snmpconf$\r$\n"
       Goto snmpconfloop
+    StrCmp $2 "set MYPERLPROGRAM=c:\usr\bin\snmpconf$\n" 0 +3
+      FileWrite $1 "set MYPERLPROGRAM=$INSTDIR\bin\snmpconf$\n"
+      Goto snmpconfloop
     StrCmp $2 "set MYPERLPROGRAM=c:\usr\bin\snmpconf" 0 +3
       FileWrite $1 "set MYPERLPROGRAM=$INSTDIR\bin\snmpconf"
       Goto snmpconfloop

QUESTION:
  Is this done because we don't know whether the file being read
  came from some .ZIP or was pulled from CVS with a Windows CVS tool
  or with a Unix CVS tool ?  It seems the problem would only get
  worse for other cases when sources would need to be translated.



I don't know why it worked before (if it did) but doesn't work now unless the .bat files were changed to use different endlines..


Seeing as how Nullsoft is picky, we should check for both. Or better yet, add a wildcard to the end of the line if it supports it. Andy?

Alex



------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to