Mercurial > hg
annotate contrib/packaging/inno/mercurial.iss @ 52284:f4aede0f01af
rust-manifest: use `memchr` crate for all byte-finding needs
While writing a very dumb manifest diffing algorithm for a proof-of-concept
I saw that `Manifest::find_by_path` was much slower than I was expecting.
It turns out that the Rust stdlib uses slow (all is relative) code when
searching for byte positions for reasons ranging from portability, SIMD
API stability, nobody doing the work, etc. `memch` is much faster for these
purposes, so let's use it.
I was measuring ~670ms of profile time in `find_by_path`, after this patch
it went down to ~230ms.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 12 Nov 2024 23:20:04 +0100 |
parents | 45ba8416afc4 |
children |
rev | line source |
---|---|
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] |
51668
45ba8416afc4
copyright: update to 2024
Anton Shestakov <av6@dwimlabs.net>
parents:
49830
diff
changeset
|
9 AppCopyright=Copyright 2005-2024 Olivia 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} |
44769
9ade217b550d
packaging: add -python2 to Windows installer filenames
Gregory Szorc <gregory.szorc@gmail.com>
parents:
44221
diff
changeset
|
12 OutputBaseFilename=Mercurial-{#VERSION}{#SUFFIX} |
12263
5f19416056b4
win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents:
12262
diff
changeset
|
13 #if ARCH == "x64" |
5f19416056b4
win32: 64-bit Inno Setup installer
Pascal Quantin <pascal.quantin@gmail.com>
parents:
12262
diff
changeset
|
14 AppVerName=Mercurial {#VERSION} (64-bit) |
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 #endif |
43516
d053d3f10b6a
packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents:
43515
diff
changeset
|
20 InfoAfterFile=../postinstall.txt |
d053d3f10b6a
packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents:
43515
diff
changeset
|
21 LicenseFile=Copying.txt |
1290
f310f034422f
Add Windows installer file.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
22 ShowLanguageDialog=yes |
46819
d4ba4d51f85f
contributor: change mentions of mpm to olivia
Raphaël Gomès <rgomes@octobus.net>
parents:
46413
diff
changeset
|
23 AppPublisher=Olivia Mackall and others |
26421
4b0fc75f9403
urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents:
25858
diff
changeset
|
24 AppPublisherURL=https://mercurial-scm.org/ |
4b0fc75f9403
urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents:
25858
diff
changeset
|
25 AppSupportURL=https://mercurial-scm.org/ |
4b0fc75f9403
urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents:
25858
diff
changeset
|
26 AppUpdatesURL=https://mercurial-scm.org/ |
43515
7bd88d0d6a82
packaging: process Inno Setup files with Jinja2
Gregory Szorc <gregory.szorc@gmail.com>
parents:
43514
diff
changeset
|
27 {{ '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
|
28 AppContact=mercurial@mercurial-scm.org |
5625
876acbe2f856
win32: move default install path inside program files
Steve Borho <steve@borho.org>
parents:
5624
diff
changeset
|
29 DefaultDirName={pf}\Mercurial |
43516
d053d3f10b6a
packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com>
parents:
43515
diff
changeset
|
30 SourceDir=stage |
9356
9488a4d64fb5
iss: take version from iscc command line or __version__.py
Steve Borho <steve@borho.org>
parents:
8936
diff
changeset
|
31 VersionInfoDescription=Mercurial distributed SCM (version {#VERSION}) |
51668
45ba8416afc4
copyright: update to 2024
Anton Shestakov <av6@dwimlabs.net>
parents:
49830
diff
changeset
|
32 VersionInfoCopyright=Copyright 2005-2024 Olivia Mackall and others |
46819
d4ba4d51f85f
contributor: change mentions of mpm to olivia
Raphaël Gomès <rgomes@octobus.net>
parents:
46413
diff
changeset
|
33 VersionInfoCompany=Olivia Mackall and others |
44221
f37971c31067
packaging: set the FileVersion field in the Inno installer executable
Matt Harbison <matt_harbison@yahoo.com>
parents:
44170
diff
changeset
|
34 VersionInfoVersion={#QUAD_VERSION} |
1290
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' %} |