contrib/packaging/inno/mercurial.iss
author Matt Harbison <matt_harbison@yahoo.com>
Fri, 24 Jan 2020 01:37:18 -0500
branchstable
changeset 44153 e4344e463c0c
parent 43609 8aa6aa9b7843
child 44170 0ab651b5f77c
permissions -rw-r--r--
packaging: rename hgrc.d to defaultrc for Windows config files next to the exe The code and the help still says that it will read hgrc.d next to the executable. But this directory needs to exist to read the resource based config files. Otherwise even `hg version` errors out: $ /c/Program\ Files/Mercurial/hg.exe version Traceback (most recent call last): File "hg", line 43, in <module> File "mercurial\dispatch.pyc", line 110, in run File "mercurial\dispatch.pyc", line 226, in dispatch File "mercurial\ui.pyc", line 308, in load File "mercurial\rcutil.pyc", line 99, in rccomponents File "mercurial\rcutil.pyc", line 69, in default_rc_resources File "mercurial\utils\resourceutil.pyc", line 84, in contents WindowsError: [Error 3] The system cannot find the path specified: 'c:\\Program Files\\mercurial\\defaultrc\\*.*' Differential Revision: https://phab.mercurial-scm.org/D7981
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     1
; Script generated by the Inno Setup Script Wizard.
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     2
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
9356
9488a4d64fb5 iss: take version from iscc command line or __version__.py
Steve Borho <steve@borho.org>
parents: 8936
diff changeset
     3
12263
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
     4
#ifndef ARCH
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
     5
#define ARCH = "x86"
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
     6
#endif
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
     7
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     8
[Setup]
41455
8427fea04017 copyright: update to 2019
Anton Shestakov <av6@dwimlabs.net>
parents: 35774
diff changeset
     9
AppCopyright=Copyright 2005-2019 Matt Mackall and others
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    10
AppName=Mercurial
27687
4cea1b918b21 installer: add windows application version number to inno installer script
Urs Rau <urs.rau@gmail.com>
parents: 27435
diff changeset
    11
AppVersion={#VERSION}
12263
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
    12
#if ARCH == "x64"
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
    13
AppVerName=Mercurial {#VERSION} (64-bit)
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
    14
OutputBaseFilename=Mercurial-{#VERSION}-x64
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
    15
ArchitecturesAllowed=x64
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
    16
ArchitecturesInstallIn64BitMode=x64
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
    17
#else
9356
9488a4d64fb5 iss: take version from iscc command line or __version__.py
Steve Borho <steve@borho.org>
parents: 8936
diff changeset
    18
AppVerName=Mercurial {#VERSION}
12263
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
    19
OutputBaseFilename=Mercurial-{#VERSION}
5f19416056b4 win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 12262
diff changeset
    20
#endif
43516
d053d3f10b6a packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43515
diff changeset
    21
InfoAfterFile=../postinstall.txt
d053d3f10b6a packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43515
diff changeset
    22
LicenseFile=Copying.txt
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    23
ShowLanguageDialog=yes
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    24
AppPublisher=Matt Mackall and others
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 25858
diff changeset
    25
AppPublisherURL=https://mercurial-scm.org/
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 25858
diff changeset
    26
AppSupportURL=https://mercurial-scm.org/
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 25858
diff changeset
    27
AppUpdatesURL=https://mercurial-scm.org/
43515
7bd88d0d6a82 packaging: process Inno Setup files with Jinja2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43514
diff changeset
    28
{{ 'AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3}' }}
30888
561a019c0268 misc: replace domain of mercurial ML address by mercurial-scm.org
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 27925
diff changeset
    29
AppContact=mercurial@mercurial-scm.org
5625
876acbe2f856 win32: move default install path inside program files
Steve Borho <steve@borho.org>
parents: 5624
diff changeset
    30
DefaultDirName={pf}\Mercurial
43516
d053d3f10b6a packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43515
diff changeset
    31
SourceDir=stage
9356
9488a4d64fb5 iss: take version from iscc command line or __version__.py
Steve Borho <steve@borho.org>
parents: 8936
diff changeset
    32
VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
41455
8427fea04017 copyright: update to 2019
Anton Shestakov <av6@dwimlabs.net>
parents: 35774
diff changeset
    33
VersionInfoCopyright=Copyright 2005-2019 Matt Mackall and others
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    34
VersionInfoCompany=Matt Mackall and others
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    35
InternalCompressLevel=max
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    36
SolidCompression=true
43516
d053d3f10b6a packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43515
diff changeset
    37
SetupIconFile=../mercurial.ico
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    38
AllowNoIcons=true
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    39
DefaultGroupName=Mercurial
4629
a04b5f37eda7 Fixes to not require administrator privleges and use private copies of DLLs when running the Windows installer.
Lee Cantey <lcantey@gmail.com>
parents: 4385
diff changeset
    40
PrivilegesRequired=none
41847
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    41
ChangesEnvironment=true
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    42
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    43
[Files]
43516
d053d3f10b6a packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43515
diff changeset
    44
{% for entry in package_files -%}
d053d3f10b6a packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43515
diff changeset
    45
Source: {{ entry.source }}; DestDir: {{ entry.dest_dir }}
d053d3f10b6a packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43515
diff changeset
    46
{%- if entry.metadata %}; {{ entry.metadata }}{% endif %}
d053d3f10b6a packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43515
diff changeset
    47
{% endfor %}
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    48
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    49
[INI]
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 25858
diff changeset
    50
Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: https://mercurial-scm.org/
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    51
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    52
[UninstallDelete]
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    53
Type: files; Name: {app}\Mercurial.url
44153
e4344e463c0c packaging: rename hgrc.d to defaultrc for Windows config files next to the exe
Matt Harbison <matt_harbison@yahoo.com>
parents: 43609
diff changeset
    54
Type: filesandordirs; Name: {app}\defaultrc
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    55
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    56
[Icons]
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    57
Name: {group}\Uninstall Mercurial; Filename: {uninstallexe}
4822
4da2149b63a1 Add html docs and use for help shortcut
Lee Cantey <lcantey@gmail.com>
parents: 4629
diff changeset
    58
Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.html
8056
f614f11a96ca Win32 installer: add hgrc.5.html and hgignore.5.html links to Start Menu folder
Pascal Quantin <pascal.quantin@gmail.com>
parents: 7809
diff changeset
    59
Name: {group}\Mercurial Configuration Files; Filename: {app}\Docs\hgrc.5.html
f614f11a96ca Win32 installer: add hgrc.5.html and hgignore.5.html links to Start Menu folder
Pascal Quantin <pascal.quantin@gmail.com>
parents: 7809
diff changeset
    60
Name: {group}\Mercurial Ignore Files; Filename: {app}\Docs\hgignore.5.html
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    61
Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url
2384
068b32d06873 Automatically add the path of hg to %PATH% using add_path
Marco Barisione <marco@barisione.org>
parents: 2276
diff changeset
    62
41847
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    63
[Tasks]
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    64
Name: modifypath; Description: Add the installation path to the search path; Flags: unchecked
4629
a04b5f37eda7 Fixes to not require administrator privleges and use private copies of DLLs when running the Windows installer.
Lee Cantey <lcantey@gmail.com>
parents: 4385
diff changeset
    65
7662
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    66
[Code]
4629
a04b5f37eda7 Fixes to not require administrator privleges and use private copies of DLLs when running the Windows installer.
Lee Cantey <lcantey@gmail.com>
parents: 4385
diff changeset
    67
procedure Touch(fn: String);
a04b5f37eda7 Fixes to not require administrator privleges and use private copies of DLLs when running the Windows installer.
Lee Cantey <lcantey@gmail.com>
parents: 4385
diff changeset
    68
begin
a04b5f37eda7 Fixes to not require administrator privleges and use private copies of DLLs when running the Windows installer.
Lee Cantey <lcantey@gmail.com>
parents: 4385
diff changeset
    69
  SaveStringToFile(ExpandConstant(fn), '', False);
a04b5f37eda7 Fixes to not require administrator privleges and use private copies of DLLs when running the Windows installer.
Lee Cantey <lcantey@gmail.com>
parents: 4385
diff changeset
    70
end;
41847
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    71
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    72
const
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    73
    ModPathName = 'modifypath';
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    74
    ModPathType = 'user';
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    75
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    76
function ModPathDir(): TArrayOfString;
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    77
begin
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    78
    setArrayLength(Result, 1)
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    79
    Result[0] := ExpandConstant('{app}');
0f49b56d5d74 inno: replace add_path.exe with a Pascal script
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41846
diff changeset
    80
end;
43515
7bd88d0d6a82 packaging: process Inno Setup files with Jinja2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43514
diff changeset
    81
7bd88d0d6a82 packaging: process Inno Setup files with Jinja2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 43514
diff changeset
    82
{% include 'modpath.iss' %}