[cups.development] [RFE] STR #2439: expand cupsaddsmb to support 64 bit Windowsdrivers

franz.pfoertsch.brose franz.pfoertsch at brose.com
Wed Jul 11 08:20:32 PDT 2007


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Here the diff to  cupsaddsmb 1.1.23

*** cupsaddsmb.c.1.1.23 2005-01-03 20:29:59.000000000 +0100
--- cupsaddsmb.c        2007-07-05 18:24:26.000000000 +0200
*************** export_dest(const char *dest)           /* I - De
*** 594,600 ****
    *     pscript5.dll
    */

!   snprintf(file, sizeof(file), "%s/drivers/pscript5.dll", datadir);
    if (!access(file, 0))
    {
     /*
--- 594,600 ----
    *     pscript5.dll
    */

!   snprintf(file, sizeof(file), "%s/drivers/PSCRIPT5.DLL", datadir);
    if (!access(file, 0))
    {
     /*
*************** export_dest(const char *dest)           /* I - De
*** 607,616 ****
      snprintf(subcmd, sizeof(subcmd),
               "mkdir W32X86;"
             "put %s W32X86/%s.ppd;"
!            "put %s/drivers/ps5ui.dll W32X86/ps5ui.dll;"
!            "put %s/drivers/pscript.hlp W32X86/pscript.hlp;"
!            "put %s/drivers/pscript.ntf W32X86/pscript.ntf;"
!            "put %s/drivers/pscript5.dll W32X86/pscript5.dll",
             ppdfile, dest, datadir, datadir, datadir, datadir);

      if ((status = do_samba_command(command, subcmd)) != 0)
--- 607,616 ----
      snprintf(subcmd, sizeof(subcmd),
               "mkdir W32X86;"
             "put %s W32X86/%s.ppd;"
!            "put %s/drivers/PS5UI.DLL W32X86/PS5UI.DLL;"
!            "put %s/drivers/PSCRIPT.HLP W32X86/PSCRIPT.HLP;"
!            "put %s/drivers/PSCRIPT.NTF W32X86/PSCRIPT.NTF;"
!            "put %s/drivers/PSCRIPT5.DLL W32X86/PSCRIPT5.DLL",
             ppdfile, dest, datadir, datadir, datadir, datadir);

      if ((status = do_samba_command(command, subcmd)) != 0)
*************** export_dest(const char *dest)           /* I - De
*** 680,685 ****
--- 680,739 ----
      }
    }

+   snprintf(file, sizeof(file), "%s/drivers/x64/PSCRIPT5.DLL", datadir);
+   if (!access(file, 0))
+   {
+    /*
+     * Windows XP/64 driver is installed; do the smbclient commands
needed
+     * to copy the WinXP/64 drivers over...
+     */
+
+     snprintf(command, sizeof(command), "smbclient //%s/print\\$",
SAMBAServer);
+
+     snprintf(subcmd, sizeof(subcmd),
+              "mkdir x64;"
+              "put %s x64/%s.ppd;"
+              "put %s/drivers/x64/PS5UI.DLL x64/PS5UI.DLL;"
+              "put %s/drivers/x64/PSCRIPT.HLP x64/PSCRIPT.HLP;"
+              "put %s/drivers/x64/PSCRIPT.NTF x64/PSCRIPT.NTF;"
+              "put %s/drivers/x64/PSCRIPT5.DLL x64/PSCRIPT5.DLL",
+              ppdfile, dest, datadir, datadir, datadir, datadir);
+
+     if ((status = do_samba_command(command, subcmd)) != 0)
+     {
+       fprintf(stderr, "cupsaddsmb: Unable to copy Windows XP/64 printer
driver files (%d)!\n",
+               status);
+       unlink(ppdfile);
+       return (4);
+     }
+
+
+      /*
+       * Use the standard Windows XP/64
+       * drivers...
+       */
+
+       snprintf(subcmd, sizeof(subcmd),
+                "adddriver \"Windows x64\" \"%s:"
+                "PSCRIPT5.DLL:%s.PPD:PS5UI.DLL:PSCRIPT.HLP:NULL:RAW:"
+                "PSCRIPT.NTF\"",
+                dest, dest);
+     }
+
+     snprintf(command, sizeof(command), "rpcclient %s", SAMBAServer);
+
+     if ((status = do_samba_command(command, subcmd)) != 0)
+     {
+       fprintf(stderr, "cupsaddsmb: Unable to install Windows XP/64
printer driver files (%d)!\n",
+               status);
+       unlink(ppdfile);
+       return (5);
+     }
+
+
+
+
+
    snprintf(file, sizeof(file), "%s/drivers/ADOBEPS4.DRV", datadir);
    if (!access(file, 0))
    {

Link: http://www.cups.org/str.php?L2439
Version:  -feature





More information about the cups-devel mailing list