[RFC] executable on windows

Jan Hudec bulb at ucw.cz
Fri Mar 24 07:17:31 GMT 2006


On Thu, Mar 23, 2006 at 22:04:43 +0200, Alexander Belchenko wrote:
> Aaron Bentley ??????????:
> >On Windows, executing 'bzr' causes 'bzr.py' to be run.  On *nix, it
> >causes 'bzr' to be run.
> 
> Actually, current bzr setup create bzr.bat to invoke 'bzr'. So, actually 
> on windows bzr invoke bzr.exe or bzr.bat. To force windows to invoke 
> bzr.py you need first add '.PY' to environment variable $PATHEXT. This 
> is not default settings of windows (afaik).

No, that certainly isn't. Though it seems to work if you add it.

> >To accomodate both styles, I propose we rename bzr to bzr.py and create
> >a new bzr that simply invokes bzr.py.
> >
> >Thoughts?

Very, very ugly.

On Windows, a .bat should be created to invoke python bzr.

We could also generate appropriate '#!'-sequence for windows and rename
bzr to bzr.bat there. The sequence is something like (NT/XP only):

@goto RunPython
"""
:RunPython
@\Path\To\python.exe -x "%0" %*
@goto :EOF
"""
<python code follows...>

There should be some if errorlevel things and such so it exits with
proper status.

The installer should do this on windows. Folks running bzr without
installing are hopefuly able enough to create a one-line batch or
shortcut for them.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060324/bc72d293/attachment.pgp 


More information about the bazaar mailing list