Let's isolate the inno installer files to their own directory
so the separation between things is clearer.
This required adjusting a few relative paths and references to
the old directory.
| hg-reviewers |
Let's isolate the inno installer files to their own directory
so the separation between things is clearer.
This required adjusting a few relative paths and references to
the old directory.
| Lint Skipped |
| Unit Tests Skipped |
| ; Script generated by the Inno Setup Script Wizard. | ; Script generated by the Inno Setup Script Wizard. | ||||
| ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||||
| #ifndef VERSION | #ifndef VERSION | ||||
| #define FileHandle | #define FileHandle | ||||
| #define FileLine | #define FileLine | ||||
| #define VERSION = "unknown" | #define VERSION = "unknown" | ||||
| #if FileHandle = FileOpen(SourcePath + "\..\..\mercurial\__version__.py") | #if FileHandle = FileOpen(SourcePath + "\..\..\..\mercurial\__version__.py") | ||||
| #expr FileLine = FileRead(FileHandle) | #expr FileLine = FileRead(FileHandle) | ||||
| #expr FileLine = FileRead(FileHandle) | #expr FileLine = FileRead(FileHandle) | ||||
| #define VERSION = Copy(FileLine, Pos('"', FileLine)+1, Len(FileLine)-Pos('"', FileLine)-1) | #define VERSION = Copy(FileLine, Pos('"', FileLine)+1, Len(FileLine)-Pos('"', FileLine)-1) | ||||
| #endif | #endif | ||||
| #if FileHandle | #if FileHandle | ||||
| #expr FileClose(FileHandle) | #expr FileClose(FileHandle) | ||||
| #endif | #endif | ||||
| #pragma message "Detected Version: " + VERSION | #pragma message "Detected Version: " + VERSION | ||||
| ShowLanguageDialog=yes | ShowLanguageDialog=yes | ||||
| AppPublisher=Matt Mackall and others | AppPublisher=Matt Mackall and others | ||||
| AppPublisherURL=https://mercurial-scm.org/ | AppPublisherURL=https://mercurial-scm.org/ | ||||
| AppSupportURL=https://mercurial-scm.org/ | AppSupportURL=https://mercurial-scm.org/ | ||||
| AppUpdatesURL=https://mercurial-scm.org/ | AppUpdatesURL=https://mercurial-scm.org/ | ||||
| AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3} | AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3} | ||||
| AppContact=mercurial@mercurial-scm.org | AppContact=mercurial@mercurial-scm.org | ||||
| DefaultDirName={pf}\Mercurial | DefaultDirName={pf}\Mercurial | ||||
| SourceDir=..\.. | SourceDir=..\..\.. | ||||
| VersionInfoDescription=Mercurial distributed SCM (version {#VERSION}) | VersionInfoDescription=Mercurial distributed SCM (version {#VERSION}) | ||||
| VersionInfoCopyright=Copyright 2005-2019 Matt Mackall and others | VersionInfoCopyright=Copyright 2005-2019 Matt Mackall and others | ||||
| VersionInfoCompany=Matt Mackall and others | VersionInfoCompany=Matt Mackall and others | ||||
| InternalCompressLevel=max | InternalCompressLevel=max | ||||
| SolidCompression=true | SolidCompression=true | ||||
| SetupIconFile=contrib\win32\mercurial.ico | SetupIconFile=contrib\win32\mercurial.ico | ||||
| AllowNoIcons=true | AllowNoIcons=true | ||||
| DefaultGroupName=Mercurial | DefaultGroupName=Mercurial | ||||
| Before building the installer, you have to build Mercurial HTML documentation | Before building the installer, you have to build Mercurial HTML documentation | ||||
| (or fix mercurial.iss to not reference the doc directory): | (or fix mercurial.iss to not reference the doc directory): | ||||
| cd doc | cd doc | ||||
| mingw32-make html | mingw32-make html | ||||
| cd .. | cd .. | ||||
| If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss | If you use ISTool, you open the | ||||
| C:\hg\hg-release\contrib\packaging\inno\mercurial.iss | |||||
| file and type Ctrl-F9 to compile the installer file. | file and type Ctrl-F9 to compile the installer file. | ||||
| Otherwise you run the Inno Setup compiler. Assuming it's in the path | Otherwise you run the Inno Setup compiler. Assuming it's in the path | ||||
| you should execute: | you should execute: | ||||
| iscc contrib\win32\mercurial.iss /dVERSION=foo | iscc contrib\packaging\inno\mercurial.iss /dVERSION=foo | ||||
| Where 'foo' is the version number you would like to see in the | Where 'foo' is the version number you would like to see in the | ||||
| 'Add/Remove Applications' tool. The installer will be placed into | 'Add/Remove Applications' tool. The installer will be placed into | ||||
| a directory named Output/ at the root of your repository. | a directory named Output/ at the root of your repository. | ||||
| If the /dVERSION=foo parameter is not given in the command line, the | If the /dVERSION=foo parameter is not given in the command line, the | ||||
| installer will retrieve the version information from the __version__.py file. | installer will retrieve the version information from the __version__.py file. | ||||
| If you want to build an installer for a 64-bit mercurial, add /dARCH=x64 to | If you want to build an installer for a 64-bit mercurial, add /dARCH=x64 to | ||||
| your command line: | your command line: | ||||
| iscc contrib\win32\mercurial.iss /dARCH=x64 | iscc contrib\packaging\inno\mercurial.iss /dARCH=x64 | ||||
| To automate the steps above you may want to create a batchfile based on the | To automate the steps above you may want to create a batchfile based on the | ||||
| following (MinGW build chain): | following (MinGW build chain): | ||||
| echo [build] > setup.cfg | echo [build] > setup.cfg | ||||
| echo compiler=mingw32 >> setup.cfg | echo compiler=mingw32 >> setup.cfg | ||||
| python setup.py py2exe -b 2 | python setup.py py2exe -b 2 | ||||
| cd doc | cd doc | ||||
| mingw32-make html | mingw32-make html | ||||
| cd .. | cd .. | ||||
| iscc contrib\win32\mercurial.iss /dVERSION=snapshot | iscc contrib\packaging\inno\mercurial.iss /dVERSION=snapshot | ||||
| and run it from the root of the hg repository (c:\hg\hg-release). | and run it from the root of the hg repository (c:\hg\hg-release). | ||||
| WiX installer source files | WiX installer source files | ||||
| ========================== | ========================== | ||||
| The files in this folder are used by the thg-winbuild [1] package | The files in this folder are used by the thg-winbuild [1] package | ||||
| building architecture to create a Mercurial MSI installer. These files | building architecture to create a Mercurial MSI installer. These files | ||||
| are versioned within the Mercurial source tree because the WXS files | are versioned within the Mercurial source tree because the WXS files | ||||
| must kept up to date with distribution changes within their branch. In | must kept up to date with distribution changes within their branch. In | ||||
| other words, the default branch WXS files are expected to diverge from | other words, the default branch WXS files are expected to diverge from | ||||
| the stable branch WXS files. Storing them within the same repository is | the stable branch WXS files. Storing them within the same repository is | ||||
| the only sane way to keep the source tree and the installer in sync. | the only sane way to keep the source tree and the installer in sync. | ||||
| The MSI installer builder uses only the mercurial.ini file from the | The MSI installer builder uses only the mercurial.ini file from the | ||||
| contrib/win32 folder, the contents of which have been historically used | contrib/win32 folder. | ||||
| to create an InnoSetup based installer. The rest of the files there are | |||||
| ignored. | |||||
| The MSI packages built by thg-winbuild require elevated (admin) | The MSI packages built by thg-winbuild require elevated (admin) | ||||
| privileges to be installed due to the installation of MSVC CRT libraries | privileges to be installed due to the installation of MSVC CRT libraries | ||||
| under the C:\WINDOWS\WinSxS folder. Thus the InnoSetup installers may | under the C:\WINDOWS\WinSxS folder. Thus the InnoSetup installers may | ||||
| still be useful to some users. | still be useful to some users. | ||||
| To build your own MSI packages, clone the thg-winbuild [1] repository | To build your own MSI packages, clone the thg-winbuild [1] repository | ||||
| and follow the README.txt [2] instructions closely. There are fewer | and follow the README.txt [2] instructions closely. There are fewer | ||||
| prerequisites for a WiX [3] installer than an InnoSetup installer, but | prerequisites for a WiX [3] installer than an InnoSetup installer, but | ||||
| they are more specific. | they are more specific. | ||||
| Direct questions or comments to Steve Borho <steve@borho.org> | Direct questions or comments to Steve Borho <steve@borho.org> | ||||
| [1] http://bitbucket.org/tortoisehg/thg-winbuild | [1] http://bitbucket.org/tortoisehg/thg-winbuild | ||||
| [2] http://bitbucket.org/tortoisehg/thg-winbuild/src/tip/README.txt | [2] http://bitbucket.org/tortoisehg/thg-winbuild/src/tip/README.txt | ||||
| [3] http://wix.sourceforge.net/ | [3] http://wix.sourceforge.net/ | ||||