contrib/packaging/inno/readme.rst
changeset 41853 d7dc4ac1ff84
parent 41849 d22198b4b3dd
child 41854 7a1433e90482
equal deleted inserted replaced
41852:db3098d02a6d 41853:d7dc4ac1ff84
       
     1 Requirements
       
     2 ============
       
     3 
       
     4 Building the Inno installer requires a Windows machine.
       
     5 
       
     6 The following system dependencies must be installed:
       
     7 
       
     8 * Python 2.7 (download from https://www.python.org/downloads/)
       
     9 * Microsoft Visual C++ Compiler for Python 2.7
       
    10   (https://www.microsoft.com/en-us/download/details.aspx?id=44266)
       
    11 * Windows 10 SDK (download from
       
    12   https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
       
    13   or install via a modern version of Visual Studio)
       
    14 * Inno Setup (http://jrsoftware.org/isdl.php) version 5.4 or newer.
       
    15   Be sure to install the optional Inno Setup Preprocessor feature,
       
    16   which is required.
       
    17 * Python 3.5+ (to run the ``build.py`` script)
       
    18 
       
    19 Building
       
    20 ========
       
    21 
       
    22 The ``build.py`` script automates the process of producing an
       
    23 Inno installer. It manages fetching and configuring the
       
    24 non-system dependencies (such as py2exe, gettext, and various
       
    25 Python packages).
       
    26 
       
    27 The script requires an activated ``Visual C++ 2008`` command prompt.
       
    28 A shortcut to such a prompt was installed with ``Microsoft Visual C++
       
    29 Compiler for Python 2.7``. From your Start Menu, look for
       
    30 ``Microsoft Visual C++ Compiler Package for Python 2.7`` then launch
       
    31 either ``Visual C++ 2008 32-bit Command Prompt`` or
       
    32 ``Visual C++ 2008 64-bit Command Prompt``.
       
    33 
       
    34 From the prompt, change to the Mercurial source directory. e.g.
       
    35 ``cd c:\src\hg``.
       
    36 
       
    37 Next, invoke ``build.py`` to produce an Inno installer. You will
       
    38 need to supply the path to the Python interpreter to use.:
       
    39 
       
    40    $ python3.exe contrib\packaging\inno\build.py \
       
    41        --python c:\python27\python.exe
       
    42 
       
    43 .. note::
       
    44 
       
    45    The script validates that the Visual C++ environment is
       
    46    active and that the architecture of the specified Python
       
    47    interpreter matches the Visual C++ environment and errors
       
    48    if not.
       
    49 
       
    50 If everything runs as intended, dependencies will be fetched and
       
    51 configured into the ``build`` sub-directory, Mercurial will be built,
       
    52 and an installer placed in the ``dist`` sub-directory. The final
       
    53 line of output should print the name of the generated installer.
       
    54 
       
    55 Additional options may be configured. Run ``build.py --help`` to
       
    56 see a list of program flags.
       
    57 
       
    58 MinGW
       
    59 =====
       
    60 
       
    61 It is theoretically possible to generate an installer that uses
       
    62 MinGW. This isn't well tested and ``build.py`` and may properly
       
    63 support it. See old versions of this file in version control for
       
    64 potentially useful hints as to how to achieve this.