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 ?


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.




-------------------------------------------------------
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