How to create the standalone windows installer

Zbynek Winkler zwin at users.sourceforge.net
Wed Sep 28 08:37:36 CDT 2005


A couple hours ago I've sent this email but our smtp server seems to be
broken :( Appologies if you get it multiple times once they fix it.

Zbynek Winkler wrote:

> Hello!
>
> I'd like to create the standalone windows installer from the current tip
for my colleagues. How would I do that? I've found that I can use the
'bdist_wininst' option for setup.py but unfortunately that is not it :(
Any help appreciated.


Ok, I've found out that I need to install py2exe. However py2exe doesn't
work for me. I am getting some error because there is no __init__.py in
hgext. Putting empty __init__.py in hgext fixes the problem for me.

Running "python.exe setup.py py2exe -b 1" creates fairly similar layout to
that of the installer. Only the 'templates' directory in located under
mercurial subdirectory. I am not going to use http serving on windows
anyway so I don't really care.

I've added the Mercurial.ini, patch.exe and TortoisePlink.exe. I've added
[ui]
ssh = TortoisePlink.exe
to the ini file, but it seems to be ignored.

pulling from ssh://....
searching for changes
remote: 'ssh' is not recognized as an internal or external command,
remote: operable program or batch file.
abort: unexpected response ''!

And the error is local and not remote. May be we should first try to
somehow check for the existence of the sshcmd and report proper error when
it is not found.

When I add --ssh tortoiseplink to the command line everything works fine.

The reason seems to be the hardcoded path in util.py, line 374 :( .
Replacing the line with
   rcpath = (os.path.dirname(sys.argv[0]) + r'\mercurial.ini',
fixes the problem with for me.

Zbynek

-- 
http://zw.matfyz.cz/     http://robotika.cz/
Faculty of Mathematics and Physics, Charles University, Prague, Czech
Republic




More information about the Mercurial mailing list