contrib/win32/win32-build.txt
author Matt Mackall <mpm@selenic.com>
Wed, 01 Aug 2007 12:33:12 -0500
changeset 5045 f191bc3916f7
parent 4402 d1dd16256114
child 5115 ea7b982b6c08
permissions -rw-r--r--
merge: do early copy to deal with issue636 Without copies/renames, merges source names are 1:1 with their targets. Copies and renames introduce the possibility that there will be two merges with the same input but different output. By doing the copy to the destination name before the merge, the actual merge becomes 1:1 again, and no source is the input to two different merges. - add a preliminary scan to applyupdates to do copies - for the merge action, pass the old name (for finding ancestors) and the new name (for input to the merge) to filemerge - eliminate the old post-merge copy - lookup file contents from new name in filemerge - pass new name to external merge helper - report merge failure at new name - add a test
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1291
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     1
The standalone Windows installer for Mercurial is built in a somewhat
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     2
jury-rigged fashion.
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     3
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     4
It has the following prerequisites, at least as I build it:
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     5
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     6
  Python for Windows
4402
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
     7
      http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi
1291
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     8
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     9
  MinGW
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    10
      http://www.mingw.org/
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    11
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    12
  Python for Windows Extensions
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    13
      http://sourceforge.net/projects/pywin32/
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    14
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    15
  mfc71.dll (just download, don't install)
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    16
      http://starship.python.net/crew/mhammond/win32/
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    17
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    18
  The py2exe distutils extension
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    19
      http://sourceforge.net/projects/py2exe/
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    20
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    21
  Inno Setup
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    22
      http://www.jrsoftware.org/isinfo.php
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    23
4402
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    24
  ISTool - optional
1291
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    25
      http://www.istool.org/default.aspx/
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    26
2384
068b32d06873 Automatically add the path of hg to %PATH% using add_path
Marco Barisione <marco@barisione.org>
parents: 1291
diff changeset
    27
  add_path (you need only add_path.exe in the zip file)
068b32d06873 Automatically add the path of hg to %PATH% using add_path
Marco Barisione <marco@barisione.org>
parents: 1291
diff changeset
    28
      http://www.barisione.org/apps.html#add_path
068b32d06873 Automatically add the path of hg to %PATH% using add_path
Marco Barisione <marco@barisione.org>
parents: 1291
diff changeset
    29
1291
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    30
And, of course, Mercurial itself.
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    31
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    32
Once you have all this installed and built, clone a copy of the
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    33
Mercurial repository you want to package, and name the repo
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    34
C:\hg\hg-release.
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    35
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    36
In a shell, build a standalone copy of the hg.exe program:
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    37
4402
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    38
  python setup.py build -c mingw32 
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    39
  python setup.py py2exe -b 1
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    40
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    41
Note: the previously suggested combined command of "python setup.py build -c
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    42
mingw32 py2exe -b 1" doesn't work correctly anymore as it doesn't include the
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    43
extensions in the mercurial subdirectory.
1291
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    44
4402
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    45
If you want to create a file named setup.cfg with the contents:
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    46
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    47
[build]
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    48
compiler=mingw32
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    49
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    50
you can skip the first build step.
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    51
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    52
Copy mfc71.dll and add_path.exe into the dist directory that just got created.
1291
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    53
4402
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    54
If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    55
file and type Ctrl-F9 to compile the installer file.
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    56
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    57
Otherwise you run the Inno Setup compiler.  Assuming it's on the path you run:
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    58
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    59
  iscc contrib\win32\mercurial.iss
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    60
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    61
The actual installer will be in the C:\hg\hg-release\Output directory.
1291
a942bf419a64 Document Windows installer build process.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    62
4402
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    63
To automate the steps above you may want to create a batchfile based on the
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    64
following:
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    65
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    66
  echo [build] > setup.cfg
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    67
  echo compiler=mingw32 >> setup.cfg
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    68
  python setup.py py2exe -b 1
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    69
  iscc contrib\win32\mercurial.iss
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    70
d1dd16256114 Update Windows build instructions.
Lee Cantey <lcantey@gmail.com>
parents: 2384
diff changeset
    71
and run it from the root of the hg repository (c:\hg\hg-release).