Differences between revisions 1 and 12 (spanning 11 versions)
Revision 1 as of 2006-12-15 16:34:06
Size: 728
Editor: 10
Comment:
Revision 12 as of 2010-10-21 06:13:10
Size: 2534
Editor: mpm
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma section-numbers 2
= Mercurial Under Wine =

How to use Wine for developing and testing Mercurial's Windows support under Linux and elsewhere.

/!\ This page is intended for developers.

<<TableOfContents>>

== Introduction ==
Line 6: Line 17:
 * Wine (obviously)
 * Python
 * MinGW (for compiling extensions)
 * Py2exe (for building a distribution executable)
 * Inno Setup (for building an installer)
 * [[http://www.winehq.org/download/|Wine]] (obviously)
 * [[http://www.python.org/download/|Python for Windows]]
 * [[http://www.mingw.org/|MinGW]] (for compiling extensions)
Line 12: Line 21:
== Getting a Wine Command Prompt == Wine is a sufficiently good emulation of Windows to exercise at least the following:

 * most Mercurial functionality, including networking support
 * case sensitivity issues and other path naming issues
 * console and GUI charset and encoding behavior
 * 32-bit memory fragmentation and restrictions
 * subprocess and pipe oddities
 * EOL behavior

== Getting a Wine command prompt ==
Line 17: Line 35:
wineconsole --backend=user cmd wineconsole cmd
Line 21: Line 39:
From here, you should be able to run the installers for Python, etc. From here, you should be able to run the installers for Python, etc. This is stored in $HOME/.wine/drive_c if you want to get at these files from the Linux side.

You'll also want to setup your PATH variable. Run 'start regedit' and edit the key under {{{HKLM/System/CurrentControlSet/SessionManager/Environment/Path}}}.

== Building Mercurial Extensions ==

Once you've got Python and MinGW installed and a Mercurial tree unpacked in an appropriate place, you can build Mercurial's extensions with something like the following:

{{{
python setup.py build_ext -i -f -c mingw32
}}}

== Tips ==

Create a 'win' (or 'lose' if you prefer) script in your host environment like the following to make starting Wine in console mode more convenient:
{{{
cd ~/.wine/drive_c
wineconsole cmd > /dev/null 2>&1 &
}}}

Create an 'hg.bat' script in 'c:\windows' to make running hg easier:

{{{
@c:\python25\python c:\hg\hg %1 %2 %3 %4 %5 %6 %7 %8 %9
}}}

== Py2Exe and InnoSetup ==

These programs install just fine but won't yet work correctly in Wine (as of Wine 0.9.25) due to emulation of !BeginUpdateResource() being incomplete (see http://bugs.winehq.org/show_bug.cgi?id=3897).

----
CategoryDevelopers CategoryWindows CategoryTesting CategoryHowTo

Mercurial Under Wine

How to use Wine for developing and testing Mercurial's Windows support under Linux and elsewhere.

/!\ This page is intended for developers.

1. Introduction

It's possible to get Mercurial working under Wine with no Windows components. This is useful for cross-platform testing if you don't want use Windows.

You'll need the following packages:

Wine is a sufficiently good emulation of Windows to exercise at least the following:

  • most Mercurial functionality, including networking support
  • case sensitivity issues and other path naming issues
  • console and GUI charset and encoding behavior
  • 32-bit memory fragmentation and restrictions
  • subprocess and pipe oddities
  • EOL behavior

2. Getting a Wine command prompt

Once you have Wine installed, something like this should get you a command prompt:

wineconsole cmd

You'll probably want to start with 'cd c:\' to get to Wine's fake Windows install, where you can install new packages safely. From here, you should be able to run the installers for Python, etc. This is stored in $HOME/.wine/drive_c if you want to get at these files from the Linux side.

You'll also want to setup your PATH variable. Run 'start regedit' and edit the key under HKLM/System/CurrentControlSet/SessionManager/Environment/Path.

3. Building Mercurial Extensions

Once you've got Python and MinGW installed and a Mercurial tree unpacked in an appropriate place, you can build Mercurial's extensions with something like the following:

python setup.py build_ext -i -f -c mingw32

4. Tips

Create a 'win' (or 'lose' if you prefer) script in your host environment like the following to make starting Wine in console mode more convenient:

cd ~/.wine/drive_c
wineconsole cmd > /dev/null 2>&1 &

Create an 'hg.bat' script in 'c:\windows' to make running hg easier:

@c:\python25\python c:\hg\hg %1 %2 %3 %4 %5 %6 %7 %8 %9

5. Py2Exe and InnoSetup

These programs install just fine but won't yet work correctly in Wine (as of Wine 0.9.25) due to emulation of BeginUpdateResource() being incomplete (see http://bugs.winehq.org/show_bug.cgi?id=3897).


CategoryDevelopers CategoryWindows CategoryTesting CategoryHowTo

MercurialUnderWine (last edited 2012-11-06 23:06:24 by abuehl)