Commits

Jan Borsodi committed 8ef128f

Removed the patch for ISS installer file in mercurial and changed it to filter out specific entries with cutehg data.
In addition an ISS file containing additional files and steps is added, it includes the filtered ISS file.

  • Participants
  • Parent commits 43f1064

Comments (0)

Files changed (4)

File installer/hg-patches/cutehg-modify-installer-data

-Modifies the installer data for Inno Setup to contain fields related to CuteHg, also adds extra files and installation items.
-
-diff -r 177ed49630b8 contrib/win32/mercurial.iss
---- a/contrib/win32/mercurial.iss	Fri Apr 24 15:21:28 2009 +0200
-+++ b/contrib/win32/mercurial.iss	Fri Apr 24 21:48:46 2009 +0200
-@@ -1,30 +1,31 @@
- ; Script generated by the Inno Setup Script Wizard.
- ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
- [Setup]
--AppCopyright=Copyright 2005-2009 Matt Mackall and others
--AppName=Mercurial
--AppVerName=Mercurial snapshot
-+AppCopyright=CuteHg Copyright (C) 2009 Tom Burdick, Mercurial Copyright 2005-2009 Matt Mackall and others
-+AppName=CuteHg
-+AppVerName=CuteHg-${version}
- InfoAfterFile=contrib/win32/postinstall.txt
- LicenseFile=COPYING
- ShowLanguageDialog=yes
--AppPublisher=Matt Mackall and others
--AppPublisherURL=http://www.selenic.com/mercurial
--AppSupportURL=http://www.selenic.com/mercurial
--AppUpdatesURL=http://www.selenic.com/mercurial
--AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3}
--AppContact=mercurial@selenic.com
--OutputBaseFilename=Mercurial-snapshot
--DefaultDirName={pf}\Mercurial
--SourceDir=..\..
--VersionInfoDescription=Mercurial distributed SCM
--VersionInfoCopyright=Copyright 2005-2009 Matt Mackall and others
--VersionInfoCompany=Matt Mackall and others
-+AppPublisher=Tom Burdick and others
-+AppPublisherURL=http://bitbucket.org/bfrog/cutehg-stable/wiki/Home
-+AppSupportURL=http://bitbucket.org/bfrog/cutehg-stable/wiki/Home
-+AppUpdatesURL=http://bitbucket.org/bfrog/cutehg-stable/wiki/Home
-+AppID={{52E114B1-5806-4E75-9D7C-24369BDAACAF}
-+AppContact=cutehg@googlegroups.com
-+OutputBaseFilename=CuteHg-${version}
-+DefaultDirName={pf}\CuteHg
-+SourceDir=${path}
-+VersionInfoDescription=Mercurial distributed SCM and CuteHg GUI
-+VersionInfoCopyright=CuteHg Copyright (C) 2009 Tom Burdick, Mercurial Copyright 2005-2009 Matt Mackall and others
-+VersionInfoCompany=Tom Burdick and others
- InternalCompressLevel=max
- SolidCompression=true
- SetupIconFile=contrib\win32\mercurial.ico
- AllowNoIcons=true
--DefaultGroupName=Mercurial
--PrivilegesRequired=none
-+DefaultGroupName=CuteHg
-+PrivilegesRequired=poweruser
-+SetupLogging=yes
- 
- [Files]
- Source: contrib\mercurial.el; DestDir: {app}/Contrib
-@@ -49,15 +50,23 @@
- Source: templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs
- Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt
- Source: COPYING; DestDir: {app}; DestName: Copying.txt
-+Source: dist\*.exe; DestDir: {app}; Flags: ignoreversion restartreplace uninsrestartdelete
-+Source: dist\*.dll; DestDir: {app}; Flags: ignoreversion restartreplace uninsrestartdelete
-+Source: dist\*.pyd; DestDir: {app}; Flags: ignoreversion restartreplace uninsrestartdelete
-+Source: dist\tortoiseoverlays-win32.msi; DestDir: {app}
-+Source: dist\tortoiseoverlays-x64.msi; DestDir: {app}
- 
- [INI]
-+Filename: {app}\CuteHg.url; Section: InternetShortcut; Key: URL; String: http://bitbucket.org/bfrog/cutehg-stable/wiki/Home
- Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://www.selenic.com/mercurial/
- 
- [UninstallDelete]
-+Type: files; Name: {app}\CuteHg.url
- Type: files; Name: {app}\Mercurial.url
- 
- [Icons]
--Name: {group}\Uninstall Mercurial; Filename: {uninstallexe}
-+Name: {group}\Uninstall CuteHg; Filename: {uninstallexe}
-+Name: {group}\CuteHg Web Site; Filename: {app}\CuteHg.url
- Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.html
- Name: {group}\Mercurial Configuration Files; Filename: {app}\Docs\hgrc.5.html
- Name: {group}\Mercurial Ignore Files; Filename: {app}\Docs\hgignore.5.html
-@@ -65,12 +74,27 @@
- 
- [Run]
- Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path"
-+; Only on 32 bit
-+Filename: msiexec.exe; Parameters: "/i ""{app}\tortoiseoverlays-win32.msi"" /qn /norestart ALLUSERS=1"; StatusMsg: Installing TortoiseOverlays.dll ...; Check: Is32BitInstallMode
-+Filename: regsvr32.exe; Parameters: "/s ""{app}\cutehg-32.dll"""; StatusMsg: Installing shell extension...; Check: Is32BitInstallMode
-+; Only on 64 bit
-+Filename: msiexec.exe; Parameters: "/i ""{app}\tortoiseoverlays-x64.msi"" /qn /norestart ALLUSERS=1"; StatusMsg: Installing TortoiseOverlays.dll ...; Check: Is64BitInstallMode
-+Filename: regsvr32.exe; Parameters: "/s ""{app}\cutehg-64.dll"""; StatusMsg: Installing shell extension...; Check: Is64BitInstallMode
- 
- [UninstallRun]
- Filename: "{app}\add_path.exe"; Parameters: "/del {app}"
-+; Only on 32 bit
-+Filename: regsvr32.exe; Parameters: "/s /u ""{app}\cutehg-32.dll"""; Check: Is32BitInstallMode
-+; Only on 64 bit
-+Filename: regsvr32.exe; Parameters: "/s /u ""{app}\cutehg-64.dll"""; Check: Is64BitInstallMode
- 
- [UninstallDelete]
- Type: files; Name: "{app}\hg.exe.local"
-+
-+[Registry]
-+Root: HKLM; Subkey: Software\CuteHg; Flags: uninsdeletekey; ValueData: {app}
-+Root: HKLM; Subkey: Software\Mercurial; Flags: uninsdeletekey; ValueData: {app}\Mercurial.ini
-+
- [Code]
- var
-   WriteFile: Boolean;
-@@ -101,3 +125,11 @@
- begin
-   SaveStringToFile(ExpandConstant(fn), '', False);
- end;
-+
-+function Is32BitInstallMode(): Boolean;
-+begin
-+    if Is64BitInstallMode() then
-+        Result := False
-+    else
-+        Result := True;
-+end;

File installer/hg-patches/series

 cutehg-setup-fixes
-cutehg-modify-installer-data
 cutehg-installer-no-locales
 cutehg-extension

File installer/mercurial.iss

+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+#include "mercurial-orig.iss"
+
+[Setup]
+SetupLogging=yes
+VersionInfoVersion=${version}
+VersionInfoProductName=CuteHg
+VersionInfoProductVersion=${version}
+AppVersion=${version}
+
+[Files]
+Source: dist\*.exe; DestDir: {app}; Flags: ignoreversion restartreplace uninsrestartdelete
+Source: dist\*.dll; DestDir: {app}; Flags: ignoreversion restartreplace uninsrestartdelete
+Source: dist\*.pyd; DestDir: {app}; Flags: ignoreversion restartreplace uninsrestartdelete
+Source: dist\tortoiseoverlays-win32.msi; DestDir: {app}
+Source: dist\tortoiseoverlays-x64.msi; DestDir: {app}
+
+[INI]
+Filename: {app}\CuteHg.url; Section: InternetShortcut; Key: URL; String: http://bitbucket.org/bfrog/cutehg-stable/wiki/Home
+
+[UninstallDelete]
+Type: files; Name: {app}\CuteHg.url
+
+[Icons]
+Name: {group}\Uninstall Mercurial; Filename: "dontinstallthisfile"; Flags: createonlyiffileexists
+Name: {group}\Uninstall CuteHg; Filename: {uninstallexe}
+Name: {group}\CuteHg Web Site; Filename: {app}\CuteHg.url
+
+[Run]
+; 32/64 bit
+Filename: msiexec.exe; Parameters: "/i ""{app}\tortoiseoverlays-win32.msi"" /qn /norestart ALLUSERS=1"; StatusMsg: Installing TortoiseOverlays.dll ...
+Filename: regsvr32.exe; Parameters: "/s ""{app}\cutehg-32.dll"""; StatusMsg: Installing shell extension...
+; Only on 64 bit
+Filename: msiexec.exe; Parameters: "/i ""{app}\tortoiseoverlays-x64.msi"" /qn /norestart ALLUSERS=1"; StatusMsg: Installing TortoiseOverlays.dll ...; Check: Is64BitInstallMode
+Filename: regsvr32.exe; Parameters: "/s ""{app}\cutehg-64.dll"""; StatusMsg: Installing shell extension...; Check: Is64BitInstallMode
+
+[UninstallRun]
+; 32/64 bit
+Filename: regsvr32.exe; Parameters: "/s /u ""{app}\cutehg-32.dll"""
+; Only on 64 bit
+Filename: regsvr32.exe; Parameters: "/s /u ""{app}\cutehg-64.dll"""; Check: Is64BitInstallMode
+
+[Registry]
+Root: HKLM; Subkey: Software\CuteHg; Flags: uninsdeletekey; ValueData: {app}
+Root: HKLM; Subkey: Software\Mercurial; Flags: uninsdeletekey; ValueData: {app}\Mercurial.ini
                 raise distutils.errors.DistutilsExecError('Could not find ' + installer_file)
 
         # Creating the .iss file
-        iss_file = join('contrib', 'win32', 'mercurial.iss')
+        hg_iss_file = join(build_path, 'contrib', 'win32', 'mercurial.iss')
+        out = open(hg_iss_file, 'rb').read()
+        import re
+        replacements = {'AppCopyright': 'CuteHg Copyright (C) 2009 Tom Burdick, Mercurial Copyright 2005-2009 Matt Mackall and others',
+                        'AppName': 'CuteHg',
+                        'AppVerName': 'CuteHg-%s' % version,
+                        'AppPublisher': 'Tom Burdick and others',
+                        'AppPublisherURL': 'http://bitbucket.org/bfrog/cutehg-stable/wiki/Home',
+                        'AppSupportURL': 'http://bitbucket.org/bfrog/cutehg-stable/wiki/Home',
+                        'AppUpdatesURL': 'http://bitbucket.org/bfrog/cutehg-stable/wiki/Home',
+                        'AppID': '{{52E114B1-5806-4E75-9D7C-24369BDAACAF}',
+                        'AppContact': 'cutehg@googlegroups.com',
+                        'OutputBaseFilename': 'CuteHg-%s' % version,
+                        'DefaultDirName': '{pf}\\\\CuteHg',
+                        'SourceDir': '..',
+                        'VersionInfoDescription': 'Mercurial distributed SCM and CuteHg GUI',
+                        'VersionInfoCopyright': 'CuteHg Copyright (C) 2009 Tom Burdick, Mercurial Copyright 2005-2009 Matt Mackall and others',
+                        'VersionInfoCompany': 'Tom Burdick and others',
+                        'DefaultGroupName': 'CuteHg',
+                        'PrivilegesRequired': 'poweruser',
+                        }
+        for k, v in replacements.iteritems():
+            out = re.compile('^%s=.*' % k, re.I | re.M).sub('%s=%s' % (k, v), out)
+        out = re.compile('^Name: \\{group\\}\\\\Uninstall Mercurial;.*$', re.I | re.M).sub('', out)
+        iss = join('dist', 'mercurial-orig.iss')
+        open(join(build_path, iss), "wb").write(out)
+
+        # Creating the .iss file
+        iss_file = join('installer', 'mercurial.iss')
         iss = join('dist', 'mercurial.iss')
         log.info("preparing installer: %s" % iss)
         from string import Template
-        t = Template(open(join(build_path, iss_file), "rb").read())
+        t = Template(open(iss_file, "rb").read())
         out = t.safe_substitute(version=version, path='..')
         open(join(build_path, iss), "wb").write(out)