[Zope-Coders] silly windows request

Chris McDonough chrism@zope.com
08 Oct 2002 22:04:03 -0400


Thanks very much Tim...

> That is, it needed a checkout cmd, and for whatever reason it's impossible
> for me to check out anything from a Zope machine on Win98 unless I stuff a
> user name in the first -d thingie.

If you're using an openssh port on win98, you might be able to solve the
"need username" problem by setting your CVS_RSH envvar to the path to a
.bat script that looks something like this:

ssh -l tim_one %1% %2% %3% %4% %5% %6% %7% %8%

(Or if you use Cygwin, you can extrapolate a suitable bash script.)

I haven't tried it, but it'd be worth a shot (I use Cygwin's cvs+openssh
under NT which seems to discover my username ok).

> >  cd InstallBranch
> 
> Even I could handle that one <wink>.
> 
> >  vcvars32
> 
> Not normally on the PATH under Win9x; a user has to remember where they
> installed MSVC (no problem for me).

On Win2k, it gets put into the global PATH.  Go figure. ;-)

> So each line ends with \r\r\n.  This is "as if" you checked in a .bat file
> with normal Windows \r\n line ends but did so from a Linux box.  Then \r\n
> ends up in the CVS repository.  When checking that out from a Windows box,
> then, CVS goes "ah, OK, it's a text file, and the target is Windows, so I'll
> change every \n into \r\n".  The result is \r\r\n line endings, and
> command.com (the Win9x shell) has no idea what to do with those.

Doh.  I think you're right.  I just edited the Windows Makefile under
emacs on Linux, and rechecked it in.  :-(  Thanks.

> python-for-zope.reg does exist, and the "Syntax error" comes from the

Wow!  The save-from-regedit worked!  How about that! That was the last
thing I'd expect to work.  Of course, nothing else in the script works,
so it all evens out in the end.

>     for /F "tokens=1* delims==" %%A IN ('TYPE %Temp%\py ...
> 
> loop, which uses a bunch of stuff unique to cmd.exe (the WinNT+ shell);
> command.com doesn't know what to do with this (neither do I -- I don't read
> cmd.exe either <wink>).

Yeah, this set of commands is a bizarre hack I stole from a website
devoted to batch file scripting (they exist).  It's functionally
equivalent to something like:

for line in file.readlines():
   if line.find('Python.exe=') != -1:
       FOUND_PYTHON = line.split('=')[1]
       break

> TARGET_PYTHON_VER was never set, so it's an empty string.  I believe this
> was intended to be PYTHON_TARGET_VER, which was set, right?

Yup, thanks!

> >  nmake build
> 
> You wish <wink>.  Let's stick to 8 steps at time.

Hey, I don't know what you're talking about.  It works perfectly on my
Amiga.  ;-)

> I'm afraid command.com is much harder to live with, and its "for" loop in
> particular *just* loops; no parsing, no magic.
> 
> Happy to help more, but I can only do this from home (I don't have Win98 at
> the office).

Thanks again.

- C