changeset 2384:068b32d06873

Automatically add the path of hg to %PATH% using add_path
author Marco Barisione <marco@barisione.org>
date Mon, 22 May 2006 14:12:41 +0200
parents dec7aa404dcf
children 5d895018ef42
files contrib/win32/ReadMe.html contrib/win32/mercurial.iss contrib/win32/win32-build.txt
diffstat 3 files changed, 13 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/win32/ReadMe.html	Mon May 22 14:06:12 2006 +0200
+++ b/contrib/win32/ReadMe.html	Mon May 22 14:12:41 2006 +0200
@@ -31,51 +31,7 @@
       href="http://www.selenic.com/mercurial">Mercurial web site</a>.</p>
 
     <p>By default, Mercurial installs to <tt>C:\Mercurial</tt>.  The
-      Mercurial command is called <tt>hg.exe</tt>.  To run this
-      command, the install directory must be in your search path.</p>
-
-    <h2>Setting your search path temporarily</h2>
-
-    <p>To set your search path temporarily, type the following into a
-      command prompt window:</p>
-
-    <pre>
-set PATH=C:\Mercurial;%PATH%
-</pre>
-
-    <h2>Setting your search path permanently</h2>
-
-    <p>To set your search path permanently, perform the following
-      steps.  These instructions are for Windows NT, 2000 and XP.</p>
-
-    <ol>
-      <li>Open the Control Panel.  Under Windows XP, select the
-	"Classic View".</li>
-
-      <li>Double-click on the "System" control panel.</li>
-
-      <li>Click on the "Advanced" tab.</li>
-
-      <li>Click on "Environment Variables".  You'll find this near the
-	bottom of the window.</li>
-
-      <li>Under "System variables", you will see "Path".  Double-click
-	it.</li>
-
-      <li>Edit "Variable value".  Each path element is separated by a
-	semicolon (";") character.  Append a semicolon to the end of the
-	list, followed by the path where you installed Mercurial
-	(e.g. <tt>C:\Mercurial</tt>).</li>
-
-      <li>Click on the various "OK" buttons until you've completely
-	exited from the System control panel.</li>
-
-      <li>Log out and log back in, or restart your system.</li>
-
-      <li>The next time you run the Windows command prompt, you will be
-	able to run the <tt>hg</tt> command without any special
-	help.</li>
-    </ol>
+      Mercurial command is called <tt>hg.exe</tt>.</p>
 
     <h1>Testing Mercurial after you've installed it</h1>
 
--- a/contrib/win32/mercurial.iss	Mon May 22 14:06:12 2006 +0200
+++ b/contrib/win32/mercurial.iss	Mon May 22 14:12:41 2006 +0200
@@ -38,6 +38,7 @@
 Source: dist\mfc71.dll; DestDir: {sys}; Flags: sharedfile uninsnosharedfileprompt
 Source: dist\msvcr71.dll; DestDir: {sys}; Flags: sharedfile uninsnosharedfileprompt
 Source: dist\w9xpopen.exe; DestDir: {app}
+Source: dist\add_path.exe; DestDir: {app}
 Source: doc\*.txt; DestDir: {app}\Docs
 Source: templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs
 Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt
@@ -55,3 +56,9 @@
 Name: {group}\Uninstall Mercurial; Filename: {uninstallexe}
 Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.txt
 Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url
+
+[Run]
+Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path"
+
+[UninstallRun]
+Filename: "{app}\add_path.exe"; Parameters: "/del {app}"
--- a/contrib/win32/win32-build.txt	Mon May 22 14:06:12 2006 +0200
+++ b/contrib/win32/win32-build.txt	Mon May 22 14:12:41 2006 +0200
@@ -24,6 +24,9 @@
   ISTool
       http://www.istool.org/default.aspx/
 
+  add_path (you need only add_path.exe in the zip file)
+      http://www.barisione.org/apps.html#add_path
+
 And, of course, Mercurial itself.
 
 Once you have all this installed and built, clone a copy of the
@@ -34,7 +37,8 @@
 
   python setup.py build -c mingw32 py2exe -b 1
 
-Copy mfc71.dll into the dist directory that just got created.
+Copy mfc71.dll and add_path.exe into the dist directory that just
+got created.
 
 Run ISTool, and open the C:\hg\hg-release\contrib\win32\mercurial.iss
 file.