contrib/win32/mercurial.iss
author Adrian Buehlmann <adrian@cadifra.com>
Fri, 15 May 2009 13:59:43 +0200
changeset 8435 6f56dc1dd8ce
parent 8058 a0555ae394b3
child 8936 1de6e7e1bb9f
permissions -rw-r--r--
contrib/win32: license is GPLv2 only according to Matt Mackall
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!
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     3
[Setup]
7662
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
     4
AppCopyright=Copyright 2005-2009 Matt Mackall and others
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     5
AppName=Mercurial
3863
1ef8ada4370f Remove hard-coded version numbers and release notes from packaging
Matt Mackall <mpm@selenic.com>
parents: 3617
diff changeset
     6
AppVerName=Mercurial snapshot
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     7
InfoAfterFile=contrib/win32/postinstall.txt
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     8
LicenseFile=COPYING
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     9
ShowLanguageDialog=yes
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    10
AppPublisher=Matt Mackall and others
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    11
AppPublisherURL=http://www.selenic.com/mercurial
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    12
AppSupportURL=http://www.selenic.com/mercurial
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    13
AppUpdatesURL=http://www.selenic.com/mercurial
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    14
AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3}
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    15
AppContact=mercurial@selenic.com
3863
1ef8ada4370f Remove hard-coded version numbers and release notes from packaging
Matt Mackall <mpm@selenic.com>
parents: 3617
diff changeset
    16
OutputBaseFilename=Mercurial-snapshot
5625
876acbe2f856 win32: move default install path inside program files
Steve Borho <steve@borho.org>
parents: 5624
diff changeset
    17
DefaultDirName={pf}\Mercurial
5626
28899bf513cc win32: use relative path to install source
Steve Borho <steve@borho.org>
parents: 5625
diff changeset
    18
SourceDir=..\..
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    19
VersionInfoDescription=Mercurial distributed SCM
7662
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    20
VersionInfoCopyright=Copyright 2005-2009 Matt Mackall and others
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    21
VersionInfoCompany=Matt Mackall and others
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    22
InternalCompressLevel=max
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    23
SolidCompression=true
7659
25ac72ca68f6 Add Lee Cantey's installer icon to win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 6790
diff changeset
    24
SetupIconFile=contrib\win32\mercurial.ico
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    25
AllowNoIcons=true
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    26
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
    27
PrivilegesRequired=none
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    28
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    29
[Files]
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    30
Source: contrib\mercurial.el; DestDir: {app}/Contrib
5627
382e336098ed win32: include contrib/vim in Windows package
Steve Borho <steve@borho.org>
parents: 5626
diff changeset
    31
Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim
5628
71179daf6941 win32: include zsh_completion in Windows package
Steve Borho <steve@borho.org>
parents: 5627
diff changeset
    32
Source: contrib\zsh_completion; DestDir: {app}/Contrib
7663
b0a0eb28a933 Package hgk Tcl/Tk script in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7662
diff changeset
    33
Source: contrib\hgk; DestDir: {app}/Contrib; DestName: hgk.tcl
1844
b768f3ae0c2c Remove patchbomb from list of contrib files to install since it's now an extension.
Lee Cantey <lcantey@gmail.com>
parents: 1690
diff changeset
    34
Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme
7662
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    35
Source: contrib\mergetools.hgrc; DestDir: {tmp};
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    36
Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles;
1844
b768f3ae0c2c Remove patchbomb from list of contrib files to install since it's now an extension.
Lee Cantey <lcantey@gmail.com>
parents: 1690
diff changeset
    37
Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt
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
    38
Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local')
8057
2a4cb1d509ec Bundle python dll in win32 installer if present
Pascal Quantin <pascal.quantin@gmail.com>
parents: 8056
diff changeset
    39
Source: dist\python*.dll; Destdir: {app}; Flags: skipifsourcedoesntexist
1844
b768f3ae0c2c Remove patchbomb from list of contrib files to install since it's now an extension.
Lee Cantey <lcantey@gmail.com>
parents: 1690
diff changeset
    40
Source: dist\library.zip; DestDir: {app}
8058
a0555ae394b3 Add Python 2.6 support to win32 installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 8057
diff changeset
    41
Source: dist\mfc*.dll; DestDir: {app}
a0555ae394b3 Add Python 2.6 support to win32 installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 8057
diff changeset
    42
Source: dist\msvc*.dll; DestDir: {app}
a0555ae394b3 Add Python 2.6 support to win32 installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 8057
diff changeset
    43
Source: dist\Microsoft.VC*.CRT.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist
a0555ae394b3 Add Python 2.6 support to win32 installer
Pascal Quantin <pascal.quantin@gmail.com>
parents: 8057
diff changeset
    44
Source: dist\Microsoft.VC*.MFC.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist
1844
b768f3ae0c2c Remove patchbomb from list of contrib files to install since it's now an extension.
Lee Cantey <lcantey@gmail.com>
parents: 1690
diff changeset
    45
Source: dist\w9xpopen.exe; DestDir: {app}
2384
068b32d06873 Automatically add the path of hg to %PATH% using add_path
Marco Barisione <marco@barisione.org>
parents: 2276
diff changeset
    46
Source: dist\add_path.exe; DestDir: {app}
4822
4da2149b63a1 Add html docs and use for help shortcut
Lee Cantey <lcantey@gmail.com>
parents: 4629
diff changeset
    47
Source: doc\*.html; DestDir: {app}\Docs
7809
dcdda2f59513 include i18n files in the win32 installer
Stefan Rusek <stefan@rusek.org>
parents: 7663
diff changeset
    48
Source: locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs
1844
b768f3ae0c2c Remove patchbomb from list of contrib files to install since it's now an extension.
Lee Cantey <lcantey@gmail.com>
parents: 1690
diff changeset
    49
Source: templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs
b768f3ae0c2c Remove patchbomb from list of contrib files to install since it's now an extension.
Lee Cantey <lcantey@gmail.com>
parents: 1690
diff changeset
    50
Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt
1290
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    51
Source: COPYING; DestDir: {app}; DestName: Copying.txt
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    52
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    53
[INI]
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    54
Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://www.selenic.com/mercurial/
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
[UninstallDelete]
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    57
Type: files; Name: {app}\Mercurial.url
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    58
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    59
[Icons]
f310f034422f Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    60
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
    61
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
    62
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
    63
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
    64
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
    65
068b32d06873 Automatically add the path of hg to %PATH% using add_path
Marco Barisione <marco@barisione.org>
parents: 2276
diff changeset
    66
[Run]
068b32d06873 Automatically add the path of hg to %PATH% using add_path
Marco Barisione <marco@barisione.org>
parents: 2276
diff changeset
    67
Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path"
068b32d06873 Automatically add the path of hg to %PATH% using add_path
Marco Barisione <marco@barisione.org>
parents: 2276
diff changeset
    68
068b32d06873 Automatically add the path of hg to %PATH% using add_path
Marco Barisione <marco@barisione.org>
parents: 2276
diff changeset
    69
[UninstallRun]
068b32d06873 Automatically add the path of hg to %PATH% using add_path
Marco Barisione <marco@barisione.org>
parents: 2276
diff changeset
    70
Filename: "{app}\add_path.exe"; Parameters: "/del {app}"
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
    71
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
    72
[UninstallDelete]
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
    73
Type: files; Name: "{app}\hg.exe.local"
7662
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    74
[Code]
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    75
var
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    76
  WriteFile: Boolean;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    77
  CheckDone: Boolean;
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
    78
7662
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    79
function CheckFile(): Boolean;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    80
begin
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    81
  if not CheckDone then begin
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    82
    WriteFile := True;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    83
    if FileExists(ExpandConstant(CurrentFileName)) then begin
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    84
        WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    85
    end;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    86
    CheckDone := True;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    87
  end;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    88
  Result := WriteFile;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    89
end;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    90
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    91
procedure ConcatenateFiles();
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    92
var
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    93
  MergeConfigs: TArrayOfString;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    94
begin
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    95
  if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    96
    SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True);
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    97
  end;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    98
end;
8aa338cd0df3 Update mercurial.ini file packaged in win32 installer
Pascal Quantin <pascal.quantin@wavecom.com>
parents: 7659
diff changeset
    99
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
   100
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
   101
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
   102
  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
   103
end;