Show More
@@ -1,131 +1,130 b'' | |||
|
1 | 1 | ; Script generated by the Inno Setup Script Wizard. |
|
2 | 2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! |
|
3 | 3 | |
|
4 | 4 | #ifndef VERSION |
|
5 | 5 | #define FileHandle |
|
6 | 6 | #define FileLine |
|
7 | 7 | #define VERSION = "unknown" |
|
8 | 8 | #if FileHandle = FileOpen(SourcePath + "\..\..\mercurial\__version__.py") |
|
9 | 9 | #expr FileLine = FileRead(FileHandle) |
|
10 | 10 | #expr FileLine = FileRead(FileHandle) |
|
11 | 11 | #define VERSION = Copy(FileLine, Pos('"', FileLine)+1, Len(FileLine)-Pos('"', FileLine)-1) |
|
12 | 12 | #endif |
|
13 | 13 | #if FileHandle |
|
14 | 14 | #expr FileClose(FileHandle) |
|
15 | 15 | #endif |
|
16 | 16 | #pragma message "Detected Version: " + VERSION |
|
17 | 17 | #endif |
|
18 | 18 | |
|
19 | 19 | [Setup] |
|
20 | 20 | AppCopyright=Copyright 2005-2010 Matt Mackall and others |
|
21 | 21 | AppName=Mercurial |
|
22 | 22 | AppVerName=Mercurial {#VERSION} |
|
23 | 23 | InfoAfterFile=contrib/win32/postinstall.txt |
|
24 | 24 | LicenseFile=COPYING |
|
25 | 25 | ShowLanguageDialog=yes |
|
26 | 26 | AppPublisher=Matt Mackall and others |
|
27 | 27 | AppPublisherURL=http://mercurial.selenic.com/ |
|
28 | 28 | AppSupportURL=http://mercurial.selenic.com/ |
|
29 | 29 | AppUpdatesURL=http://mercurial.selenic.com/ |
|
30 | 30 | AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3} |
|
31 | 31 | AppContact=mercurial@selenic.com |
|
32 | 32 | OutputBaseFilename=Mercurial-{#VERSION} |
|
33 | 33 | DefaultDirName={pf}\Mercurial |
|
34 | 34 | SourceDir=..\.. |
|
35 | 35 | VersionInfoDescription=Mercurial distributed SCM (version {#VERSION}) |
|
36 | 36 | VersionInfoCopyright=Copyright 2005-2010 Matt Mackall and others |
|
37 | 37 | VersionInfoCompany=Matt Mackall and others |
|
38 | 38 | InternalCompressLevel=max |
|
39 | 39 | SolidCompression=true |
|
40 | 40 | SetupIconFile=contrib\win32\mercurial.ico |
|
41 | 41 | AllowNoIcons=true |
|
42 | 42 | DefaultGroupName=Mercurial |
|
43 | 43 | PrivilegesRequired=none |
|
44 | 44 | |
|
45 | 45 | [Files] |
|
46 | 46 | Source: contrib\mercurial.el; DestDir: {app}/Contrib |
|
47 | 47 | Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim |
|
48 | 48 | Source: contrib\zsh_completion; DestDir: {app}/Contrib |
|
49 | 49 | Source: contrib\bash_completion; DestDir: {app}/Contrib |
|
50 | 50 | Source: contrib\tcsh_completion; DestDir: {app}/Contrib |
|
51 | 51 | Source: contrib\tcsh_completion_build.sh; DestDir: {app}/Contrib |
|
52 | 52 | Source: contrib\hgk; DestDir: {app}/Contrib; DestName: hgk.tcl |
|
53 | 53 | Source: contrib\xml.rnc; DestDir: {app}/Contrib |
|
54 | 54 | Source: contrib\shrink-revlog.py; DestDir: {app}/Contrib |
|
55 | 55 | Source: contrib\mercurial.el; DestDir: {app}/Contrib |
|
56 | 56 | Source: contrib\mq.el; DestDir: {app}/Contrib |
|
57 | 57 | Source: contrib\hgweb.fcgi; DestDir: {app}/Contrib |
|
58 | 58 | Source: contrib\hgweb.wsgi; DestDir: {app}/Contrib |
|
59 | 59 | Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme |
|
60 | 60 | Source: contrib\mergetools.hgrc; DestDir: {tmp}; |
|
61 | 61 | Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles; |
|
62 | 62 | Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt |
|
63 | 63 | Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local') |
|
64 | 64 | Source: dist\python*.dll; Destdir: {app}; Flags: skipifsourcedoesntexist |
|
65 | 65 | Source: dist\library.zip; DestDir: {app} |
|
66 | Source: dist\mfc*.dll; DestDir: {app}; Flags: skipifsourcedoesntexist | |
|
67 | 66 | Source: dist\msvc*.dll; DestDir: {app}; Flags: skipifsourcedoesntexist |
|
68 | 67 | Source: dist\Microsoft.VC*.CRT.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist |
|
69 | Source: dist\Microsoft.VC*.MFC.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist | |
|
70 | 68 | Source: dist\w9xpopen.exe; DestDir: {app} |
|
71 | 69 | Source: dist\add_path.exe; DestDir: {app} |
|
72 | 70 | Source: doc\*.html; DestDir: {app}\Docs |
|
73 | 71 | Source: doc\style.css; DestDir: {app}\Docs |
|
74 | 72 | Source: mercurial\help\*.txt; DestDir: {app}\help |
|
75 | Source: mercurial\locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs | |
|
73 | Source: mercurial\locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs skipifsourcedoesntexist | |
|
76 | 74 | Source: mercurial\templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs |
|
77 | 75 | Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt |
|
78 | 76 | Source: COPYING; DestDir: {app}; DestName: Copying.txt |
|
79 | 77 | |
|
80 | 78 | [INI] |
|
81 | 79 | Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://mercurial.selenic.com/ |
|
82 | 80 | |
|
83 | 81 | [UninstallDelete] |
|
84 | 82 | Type: files; Name: {app}\Mercurial.url |
|
85 | 83 | Type: files; Name: {app}\Contrib\shrink-revlog.pyc |
|
86 | 84 | |
|
87 | 85 | [Icons] |
|
88 | 86 | Name: {group}\Uninstall Mercurial; Filename: {uninstallexe} |
|
89 | 87 | Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.html |
|
90 | 88 | Name: {group}\Mercurial Configuration Files; Filename: {app}\Docs\hgrc.5.html |
|
91 | 89 | Name: {group}\Mercurial Ignore Files; Filename: {app}\Docs\hgignore.5.html |
|
92 | 90 | Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url |
|
93 | 91 | |
|
94 | 92 | [Run] |
|
95 | 93 | Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path" |
|
96 | 94 | |
|
97 | 95 | [UninstallRun] |
|
98 | 96 | Filename: "{app}\add_path.exe"; Parameters: "/del {app}" |
|
99 | 97 | |
|
100 | 98 | [UninstallDelete] |
|
101 | 99 | Type: files; Name: "{app}\hg.exe.local" |
|
100 | ||
|
102 | 101 | [Code] |
|
103 | 102 | var |
|
104 | 103 | WriteFile: Boolean; |
|
105 | 104 | CheckDone: Boolean; |
|
106 | 105 | |
|
107 | 106 | function CheckFile(): Boolean; |
|
108 | 107 | begin |
|
109 | 108 | if not CheckDone then begin |
|
110 | 109 | WriteFile := True; |
|
111 | 110 | if FileExists(ExpandConstant(CurrentFileName)) then begin |
|
112 | 111 | WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes; |
|
113 | 112 | end; |
|
114 | 113 | CheckDone := True; |
|
115 | 114 | end; |
|
116 | 115 | Result := WriteFile; |
|
117 | 116 | end; |
|
118 | 117 | |
|
119 | 118 | procedure ConcatenateFiles(); |
|
120 | 119 | var |
|
121 | 120 | MergeConfigs: TArrayOfString; |
|
122 | 121 | begin |
|
123 | 122 | if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin |
|
124 | 123 | SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True); |
|
125 | 124 | end; |
|
126 | 125 | end; |
|
127 | 126 | |
|
128 | 127 | procedure Touch(fn: String); |
|
129 | 128 | begin |
|
130 | 129 | SaveStringToFile(ExpandConstant(fn), '', False); |
|
131 | 130 | end; |
@@ -1,114 +1,115 b'' | |||
|
1 | 1 | The standalone Windows installer for Mercurial is built in a somewhat |
|
2 | 2 | jury-rigged fashion. |
|
3 | 3 | |
|
4 | 4 | It has the following prerequisites, at least as I build it: |
|
5 | 5 | |
|
6 | Python for Windows | |
|
7 | http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi | |
|
6 | Python 2.6 for Windows | |
|
7 | http://www.python.org/download/releases/ | |
|
8 | 8 | |
|
9 | MinGW | |
|
9 | A compiler: | |
|
10 | either MinGW | |
|
10 | 11 | http://www.mingw.org/ |
|
12 | or Microsoft Visual C++ 2008 SP1 Express Edition | |
|
13 | http://www.microsoft.com/express/Downloads/Download-2008.aspx | |
|
11 | 14 | |
|
12 | 15 | Python for Windows Extensions |
|
13 | 16 | http://sourceforge.net/projects/pywin32/ |
|
14 | 17 | |
|
15 | 18 | mfc71.dll (just download, don't install; not needed for Python 2.6) |
|
16 | 19 | http://starship.python.net/crew/mhammond/win32/ |
|
17 | 20 | |
|
18 | Visual C++ 2008 redistributable package (needed for Python 2.6) | |
|
19 |
http://www.microsoft.com/downloads/details.aspx? |
|
|
21 | Visual C++ 2008 SP1 redistributable package (needed for >= Python 2.6 or if you compile with MSVC) | |
|
22 | http://www.microsoft.com/downloads/details.aspx?FamilyID=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2 | |
|
20 | 23 | |
|
21 | 24 | The py2exe distutils extension |
|
22 | 25 | http://sourceforge.net/projects/py2exe/ |
|
23 | 26 | |
|
24 | GnuWin32 gettext utility | |
|
27 | GnuWin32 gettext utility (if you want to build translations) | |
|
25 | 28 | http://gnuwin32.sourceforge.net/packages/gettext.htm |
|
26 | 29 | |
|
27 | 30 | Inno Setup |
|
28 | 31 | http://www.jrsoftware.org/isdl.php#qsp |
|
29 | 32 | |
|
30 |
Get and install ispack-5.3. |
|
|
33 | Get and install ispack-5.3.10.exe which includes Inno Setup Processor, | |
|
31 | 34 | which is necessary to package Mercurial. |
|
32 | 35 | |
|
33 | 36 | ISTool - optional |
|
34 | 37 | http://www.istool.org/default.aspx/ |
|
35 | 38 | |
|
36 | 39 | add_path (you need only add_path.exe in the zip file) |
|
37 | 40 | http://www.barisione.org/apps.html#add_path |
|
38 | 41 | |
|
39 | 42 | Docutils |
|
40 | 43 | http://docutils.sourceforge.net/ |
|
41 | 44 | |
|
42 | 45 | And, of course, Mercurial itself. |
|
43 | 46 | |
|
44 | 47 | Once you have all this installed and built, clone a copy of the |
|
45 | 48 | Mercurial repository you want to package, and name the repo |
|
46 | 49 | C:\hg\hg-release. |
|
47 | 50 | |
|
48 |
In a shell, build a standalone copy of the hg.exe program |
|
|
51 | In a shell, build a standalone copy of the hg.exe program. | |
|
49 | 52 | |
|
53 | Building instructions for MinGW: | |
|
50 | 54 | python setup.py build -c mingw32 |
|
51 |
python setup.py py2exe -b |
|
|
52 | ||
|
55 | python setup.py py2exe -b 2 | |
|
53 | 56 | Note: the previously suggested combined command of "python setup.py build -c |
|
54 |
mingw32 py2exe -b |
|
|
57 | mingw32 py2exe -b 2" doesn't work correctly anymore as it doesn't include the | |
|
55 | 58 | extensions in the mercurial subdirectory. |
|
56 | ||
|
57 | 59 | If you want to create a file named setup.cfg with the contents: |
|
58 | ||
|
59 | 60 | [build] |
|
60 | 61 | compiler=mingw32 |
|
62 | you can skip the first build step. | |
|
61 | 63 | |
|
62 | you can skip the first build step. | |
|
64 | Building instructions with MSVC 2008 SP1 Express Edition: | |
|
65 | python setup.py py2exe -b 2 | |
|
63 | 66 | |
|
64 | 67 | Copy add_path.exe into the dist directory that just got created. |
|
65 | 68 | |
|
66 | 69 | If you are using Python up to version 2.5.4, copy mfc71.dll into the dist |
|
67 | 70 | directory that just got created. |
|
68 | 71 | |
|
69 |
If you are using Python 2.6 or later, |
|
|
70 | redistributable package copy into the dist directory that just got created the | |
|
71 | following files: | |
|
72 | - from the directory starting with | |
|
73 | Windows/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8 | |
|
74 |
|
|
|
75 | - from the directory starting with | |
|
76 | Windows/WinSxS/x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 | |
|
77 | the files named: mfc90.dll, mfc90u.dll, mfcm90.dll and mfcm90u.dll | |
|
78 | - from the directory named Windows/WinSxS/Manifests, the manifest file | |
|
79 | starting with x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8 | |
|
80 | (rename it to Microsoft.VC90.CRT.manifest) and the manifest file starting | |
|
81 | with x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 (rename it to | |
|
82 | Microsoft.VC90.MFC.manifest) | |
|
72 | If you are using Python 2.6 or later, or if you are using MSVC 2008 to compile | |
|
73 | mercurial, you must include the C runtime libraries in the installer. To do so, | |
|
74 | install the Visual C++ 2008 SP1 redistributable package. Then in your | |
|
75 | windows\winsxs folder, locate the folder containing the dlls version 9.0.30729. | |
|
76 | For x86, it should be named like x86_Microsoft.VC90.CRT_(...)_9.0.30729(...). | |
|
77 | Copy the files named msvcm90.dll, msvcp90.dll and msvcr90.dll into the dist | |
|
78 | directory. | |
|
79 | Then in the windows\winsxs\manifests folder, locate the corresponding manifest | |
|
80 | file (x86_Microsoft.VC90.CRT_(...)_9.0.30729(...).manifest for x86), copy it in | |
|
81 | the dist directory and rename it to Microsoft.VC90.CRT.manifest. | |
|
83 | 82 | |
|
84 | 83 | Before building the installer, you have to build Mercurial HTML documentation |
|
85 | 84 | (or fix mercurial.iss to not reference the doc directory): |
|
86 | 85 | |
|
87 | 86 | cd doc |
|
88 | 87 | mingw32-make html |
|
89 | 88 | cd .. |
|
90 | 89 | |
|
91 | 90 | If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss |
|
92 | 91 | file and type Ctrl-F9 to compile the installer file. |
|
93 | 92 | |
|
94 | 93 | Otherwise you run the Inno Setup compiler. Assuming it's in the path |
|
95 | 94 | you should execute: |
|
96 | 95 | |
|
97 |
iscc contrib\win32\mercurial.iss / |
|
|
96 | iscc contrib\win32\mercurial.iss /dVERSION=foo | |
|
98 | 97 | |
|
99 | 98 | Where 'foo' is the version number you would like to see in the |
|
100 | 99 | 'Add/Remove Applications' tool. The installer will be placed into |
|
101 | 100 | a directory named Output/ at the root of your repository. |
|
101 | If the /dVERSION=foo parameter is not given in the command line, the | |
|
102 | installer will retrieve the version information from the __version__.py file. | |
|
102 | 103 | |
|
103 | 104 | To automate the steps above you may want to create a batchfile based on the |
|
104 | following: | |
|
105 | following (MinGW build chain): | |
|
105 | 106 | |
|
106 | 107 | echo [build] > setup.cfg |
|
107 | 108 | echo compiler=mingw32 >> setup.cfg |
|
108 |
python setup.py py2exe -b |
|
|
109 | python setup.py py2exe -b 2 | |
|
109 | 110 | cd doc |
|
110 | 111 | mingw32-make html |
|
111 | 112 | cd .. |
|
112 |
iscc contrib\win32\mercurial.iss / |
|
|
113 | iscc contrib\win32\mercurial.iss /dVERSION=snapshot | |
|
113 | 114 | |
|
114 | 115 | and run it from the root of the hg repository (c:\hg\hg-release). |
General Comments 0
You need to be logged in to leave comments.
Login now