Show More
@@ -1,101 +1,103 | |||||
1 | ; Script generated by the Inno Setup Script Wizard. |
|
1 | ; Script generated by the Inno Setup Script Wizard. | |
2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! |
|
2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | |
3 | [Setup] |
|
3 | [Setup] | |
4 | AppCopyright=Copyright 2005-2009 Matt Mackall and others |
|
4 | AppCopyright=Copyright 2005-2009 Matt Mackall and others | |
5 | AppName=Mercurial |
|
5 | AppName=Mercurial | |
6 | AppVerName=Mercurial snapshot |
|
6 | AppVerName=Mercurial snapshot | |
7 | InfoAfterFile=contrib/win32/postinstall.txt |
|
7 | InfoAfterFile=contrib/win32/postinstall.txt | |
8 | LicenseFile=COPYING |
|
8 | LicenseFile=COPYING | |
9 | ShowLanguageDialog=yes |
|
9 | ShowLanguageDialog=yes | |
10 | AppPublisher=Matt Mackall and others |
|
10 | AppPublisher=Matt Mackall and others | |
11 | AppPublisherURL=http://www.selenic.com/mercurial |
|
11 | AppPublisherURL=http://www.selenic.com/mercurial | |
12 | AppSupportURL=http://www.selenic.com/mercurial |
|
12 | AppSupportURL=http://www.selenic.com/mercurial | |
13 | AppUpdatesURL=http://www.selenic.com/mercurial |
|
13 | AppUpdatesURL=http://www.selenic.com/mercurial | |
14 | AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3} |
|
14 | AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3} | |
15 | AppContact=mercurial@selenic.com |
|
15 | AppContact=mercurial@selenic.com | |
16 | OutputBaseFilename=Mercurial-snapshot |
|
16 | OutputBaseFilename=Mercurial-snapshot | |
17 | DefaultDirName={pf}\Mercurial |
|
17 | DefaultDirName={pf}\Mercurial | |
18 | SourceDir=..\.. |
|
18 | SourceDir=..\.. | |
19 | VersionInfoDescription=Mercurial distributed SCM |
|
19 | VersionInfoDescription=Mercurial distributed SCM | |
20 | VersionInfoCopyright=Copyright 2005-2009 Matt Mackall and others |
|
20 | VersionInfoCopyright=Copyright 2005-2009 Matt Mackall and others | |
21 | VersionInfoCompany=Matt Mackall and others |
|
21 | VersionInfoCompany=Matt Mackall and others | |
22 | InternalCompressLevel=max |
|
22 | InternalCompressLevel=max | |
23 | SolidCompression=true |
|
23 | SolidCompression=true | |
24 | SetupIconFile=contrib\win32\mercurial.ico |
|
24 | SetupIconFile=contrib\win32\mercurial.ico | |
25 | AllowNoIcons=true |
|
25 | AllowNoIcons=true | |
26 | DefaultGroupName=Mercurial |
|
26 | DefaultGroupName=Mercurial | |
27 | PrivilegesRequired=none |
|
27 | PrivilegesRequired=none | |
28 |
|
28 | |||
29 | [Files] |
|
29 | [Files] | |
30 | Source: contrib\mercurial.el; DestDir: {app}/Contrib |
|
30 | Source: contrib\mercurial.el; DestDir: {app}/Contrib | |
31 | Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim |
|
31 | Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim | |
32 | Source: contrib\zsh_completion; DestDir: {app}/Contrib |
|
32 | Source: contrib\zsh_completion; DestDir: {app}/Contrib | |
33 | Source: contrib\hgk; DestDir: {app}/Contrib; DestName: hgk.tcl |
|
33 | Source: contrib\hgk; DestDir: {app}/Contrib; DestName: hgk.tcl | |
34 | Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme |
|
34 | Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme | |
35 | Source: contrib\mergetools.hgrc; DestDir: {tmp}; |
|
35 | Source: contrib\mergetools.hgrc; DestDir: {tmp}; | |
36 | Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles; |
|
36 | Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles; | |
37 | Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt |
|
37 | Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt | |
38 | Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local') |
|
38 | Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local') | |
39 | Source: dist\python*.dll; Destdir: {app}; Flags: skipifsourcedoesntexist |
|
39 | Source: dist\python*.dll; Destdir: {app}; Flags: skipifsourcedoesntexist | |
40 | Source: dist\library.zip; DestDir: {app} |
|
40 | Source: dist\library.zip; DestDir: {app} | |
41 |
Source: dist\mfc |
|
41 | Source: dist\mfc*.dll; DestDir: {app} | |
42 |
Source: dist\msvc |
|
42 | Source: dist\msvc*.dll; DestDir: {app} | |
|
43 | Source: dist\Microsoft.VC*.CRT.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist | |||
|
44 | Source: dist\Microsoft.VC*.MFC.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist | |||
43 | Source: dist\w9xpopen.exe; DestDir: {app} |
|
45 | Source: dist\w9xpopen.exe; DestDir: {app} | |
44 | Source: dist\add_path.exe; DestDir: {app} |
|
46 | Source: dist\add_path.exe; DestDir: {app} | |
45 | Source: doc\*.html; DestDir: {app}\Docs |
|
47 | Source: doc\*.html; DestDir: {app}\Docs | |
46 | Source: locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs |
|
48 | Source: locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs | |
47 | Source: templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs |
|
49 | Source: templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs | |
48 | Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt |
|
50 | Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt | |
49 | Source: COPYING; DestDir: {app}; DestName: Copying.txt |
|
51 | Source: COPYING; DestDir: {app}; DestName: Copying.txt | |
50 |
|
52 | |||
51 | [INI] |
|
53 | [INI] | |
52 | Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://www.selenic.com/mercurial/ |
|
54 | Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://www.selenic.com/mercurial/ | |
53 |
|
55 | |||
54 | [UninstallDelete] |
|
56 | [UninstallDelete] | |
55 | Type: files; Name: {app}\Mercurial.url |
|
57 | Type: files; Name: {app}\Mercurial.url | |
56 |
|
58 | |||
57 | [Icons] |
|
59 | [Icons] | |
58 | Name: {group}\Uninstall Mercurial; Filename: {uninstallexe} |
|
60 | Name: {group}\Uninstall Mercurial; Filename: {uninstallexe} | |
59 | Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.html |
|
61 | Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.html | |
60 | Name: {group}\Mercurial Configuration Files; Filename: {app}\Docs\hgrc.5.html |
|
62 | Name: {group}\Mercurial Configuration Files; Filename: {app}\Docs\hgrc.5.html | |
61 | Name: {group}\Mercurial Ignore Files; Filename: {app}\Docs\hgignore.5.html |
|
63 | Name: {group}\Mercurial Ignore Files; Filename: {app}\Docs\hgignore.5.html | |
62 | Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url |
|
64 | Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url | |
63 |
|
65 | |||
64 | [Run] |
|
66 | [Run] | |
65 | Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path" |
|
67 | Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path" | |
66 |
|
68 | |||
67 | [UninstallRun] |
|
69 | [UninstallRun] | |
68 | Filename: "{app}\add_path.exe"; Parameters: "/del {app}" |
|
70 | Filename: "{app}\add_path.exe"; Parameters: "/del {app}" | |
69 |
|
71 | |||
70 | [UninstallDelete] |
|
72 | [UninstallDelete] | |
71 | Type: files; Name: "{app}\hg.exe.local" |
|
73 | Type: files; Name: "{app}\hg.exe.local" | |
72 | [Code] |
|
74 | [Code] | |
73 | var |
|
75 | var | |
74 | WriteFile: Boolean; |
|
76 | WriteFile: Boolean; | |
75 | CheckDone: Boolean; |
|
77 | CheckDone: Boolean; | |
76 |
|
78 | |||
77 | function CheckFile(): Boolean; |
|
79 | function CheckFile(): Boolean; | |
78 | begin |
|
80 | begin | |
79 | if not CheckDone then begin |
|
81 | if not CheckDone then begin | |
80 | WriteFile := True; |
|
82 | WriteFile := True; | |
81 | if FileExists(ExpandConstant(CurrentFileName)) then begin |
|
83 | if FileExists(ExpandConstant(CurrentFileName)) then begin | |
82 | WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes; |
|
84 | WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes; | |
83 | end; |
|
85 | end; | |
84 | CheckDone := True; |
|
86 | CheckDone := True; | |
85 | end; |
|
87 | end; | |
86 | Result := WriteFile; |
|
88 | Result := WriteFile; | |
87 | end; |
|
89 | end; | |
88 |
|
90 | |||
89 | procedure ConcatenateFiles(); |
|
91 | procedure ConcatenateFiles(); | |
90 | var |
|
92 | var | |
91 | MergeConfigs: TArrayOfString; |
|
93 | MergeConfigs: TArrayOfString; | |
92 | begin |
|
94 | begin | |
93 | if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin |
|
95 | if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin | |
94 | SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True); |
|
96 | SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True); | |
95 | end; |
|
97 | end; | |
96 | end; |
|
98 | end; | |
97 |
|
99 | |||
98 | procedure Touch(fn: String); |
|
100 | procedure Touch(fn: String); | |
99 | begin |
|
101 | begin | |
100 | SaveStringToFile(ExpandConstant(fn), '', False); |
|
102 | SaveStringToFile(ExpandConstant(fn), '', False); | |
101 | end; |
|
103 | end; |
@@ -1,85 +1,106 | |||||
1 | The standalone Windows installer for Mercurial is built in a somewhat |
|
1 | The standalone Windows installer for Mercurial is built in a somewhat | |
2 | jury-rigged fashion. |
|
2 | jury-rigged fashion. | |
3 |
|
3 | |||
4 | It has the following prerequisites, at least as I build it: |
|
4 | It has the following prerequisites, at least as I build it: | |
5 |
|
5 | |||
6 | Python for Windows |
|
6 | Python for Windows | |
7 | http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi |
|
7 | http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi | |
8 |
|
8 | |||
9 | MinGW |
|
9 | MinGW | |
10 | http://www.mingw.org/ |
|
10 | http://www.mingw.org/ | |
11 |
|
11 | |||
12 | Python for Windows Extensions |
|
12 | Python for Windows Extensions | |
13 | http://sourceforge.net/projects/pywin32/ |
|
13 | http://sourceforge.net/projects/pywin32/ | |
14 |
|
14 | |||
15 | mfc71.dll (just download, don't install) |
|
15 | mfc71.dll (just download, don't install; not needed for Python 2.6) | |
16 | http://starship.python.net/crew/mhammond/win32/ |
|
16 | http://starship.python.net/crew/mhammond/win32/ | |
17 |
|
17 | |||
|
18 | Visual C++ 2008 redistributable package (needed for Python 2.6) | |||
|
19 | http://www.microsoft.com/downloads/details.aspx?familyid=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en | |||
|
20 | ||||
18 | The py2exe distutils extension |
|
21 | The py2exe distutils extension | |
19 | http://sourceforge.net/projects/py2exe/ |
|
22 | http://sourceforge.net/projects/py2exe/ | |
20 |
|
23 | |||
21 | Inno Setup |
|
24 | Inno Setup | |
22 | http://www.jrsoftware.org/isinfo.php |
|
25 | http://www.jrsoftware.org/isinfo.php | |
23 |
|
26 | |||
24 | ISTool - optional |
|
27 | ISTool - optional | |
25 | http://www.istool.org/default.aspx/ |
|
28 | http://www.istool.org/default.aspx/ | |
26 |
|
29 | |||
27 | add_path (you need only add_path.exe in the zip file) |
|
30 | add_path (you need only add_path.exe in the zip file) | |
28 | http://www.barisione.org/apps.html#add_path |
|
31 | http://www.barisione.org/apps.html#add_path | |
29 |
|
32 | |||
30 | Asciidoc - optional |
|
33 | Asciidoc - optional | |
31 | http://www.methods.co.nz/asciidoc/ |
|
34 | http://www.methods.co.nz/asciidoc/ | |
32 |
|
35 | |||
33 | And, of course, Mercurial itself. |
|
36 | And, of course, Mercurial itself. | |
34 |
|
37 | |||
35 | Once you have all this installed and built, clone a copy of the |
|
38 | Once you have all this installed and built, clone a copy of the | |
36 | Mercurial repository you want to package, and name the repo |
|
39 | Mercurial repository you want to package, and name the repo | |
37 | C:\hg\hg-release. |
|
40 | C:\hg\hg-release. | |
38 |
|
41 | |||
39 | In a shell, build a standalone copy of the hg.exe program: |
|
42 | In a shell, build a standalone copy of the hg.exe program: | |
40 |
|
43 | |||
41 | python setup.py build -c mingw32 |
|
44 | python setup.py build -c mingw32 | |
42 | python setup.py py2exe -b 1 |
|
45 | python setup.py py2exe -b 1 | |
43 |
|
46 | |||
44 | Note: the previously suggested combined command of "python setup.py build -c |
|
47 | Note: the previously suggested combined command of "python setup.py build -c | |
45 | mingw32 py2exe -b 1" doesn't work correctly anymore as it doesn't include the |
|
48 | mingw32 py2exe -b 1" doesn't work correctly anymore as it doesn't include the | |
46 | extensions in the mercurial subdirectory. |
|
49 | extensions in the mercurial subdirectory. | |
47 |
|
50 | |||
48 | If you want to create a file named setup.cfg with the contents: |
|
51 | If you want to create a file named setup.cfg with the contents: | |
49 |
|
52 | |||
50 | [build] |
|
53 | [build] | |
51 | compiler=mingw32 |
|
54 | compiler=mingw32 | |
52 |
|
55 | |||
53 | you can skip the first build step. |
|
56 | you can skip the first build step. | |
54 |
|
57 | |||
55 |
Copy |
|
58 | Copy add_path.exe into the dist directory that just got created. | |
|
59 | ||||
|
60 | If you are using Python up to version 2.5.4, copy mfc71.dll into the dist | |||
|
61 | directory that just got created. | |||
|
62 | ||||
|
63 | If you are using Python 2.6 or later, after installing the Visual C++ 2008 | |||
|
64 | redistributable package copy into the dist directory that just got created the | |||
|
65 | following files: | |||
|
66 | - from the directory starting with | |||
|
67 | Windows/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8 | |||
|
68 | the files named: msvcm90.dll, msvcp90.dll and msvcr90.dll | |||
|
69 | - from the directory starting with | |||
|
70 | Windows/WinSxS/x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 | |||
|
71 | the files named: mfc90.dll, mfc90u.dll, mfcm90.dll and mfcm90u.dll | |||
|
72 | - from the directory named Windows/WinSxS/Manifests, the manifest file | |||
|
73 | starting with x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8 | |||
|
74 | (rename it to Microsoft.VC90.CRT.manifest) and the manifest file starting | |||
|
75 | with x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 (rename it to | |||
|
76 | Microsoft.VC90.MFC.manifest) | |||
56 |
|
77 | |||
57 | Before building the installer, you have to build Mercurial HTML documentation |
|
78 | Before building the installer, you have to build Mercurial HTML documentation | |
58 | (or fix mercurial.iss to not reference the doc directory). Assuming you have an |
|
79 | (or fix mercurial.iss to not reference the doc directory). Assuming you have an | |
59 | "asciidoc.bat" batch file somewhere in your PATH: |
|
80 | "asciidoc.bat" batch file somewhere in your PATH: | |
60 |
|
81 | |||
61 | cd doc |
|
82 | cd doc | |
62 | mingw32-make ASCIIDOC=asciidoc.bat html |
|
83 | mingw32-make ASCIIDOC=asciidoc.bat html | |
63 | cd .. |
|
84 | cd .. | |
64 |
|
85 | |||
65 | If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss |
|
86 | If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss | |
66 | file and type Ctrl-F9 to compile the installer file. |
|
87 | file and type Ctrl-F9 to compile the installer file. | |
67 |
|
88 | |||
68 | Otherwise you run the Inno Setup compiler. Assuming it's on the path you run: |
|
89 | Otherwise you run the Inno Setup compiler. Assuming it's on the path you run: | |
69 |
|
90 | |||
70 | iscc contrib\win32\mercurial.iss |
|
91 | iscc contrib\win32\mercurial.iss | |
71 |
|
92 | |||
72 | The actual installer will be in the C:\hg\hg-release\Output directory. |
|
93 | The actual installer will be in the C:\hg\hg-release\Output directory. | |
73 |
|
94 | |||
74 | To automate the steps above you may want to create a batchfile based on the |
|
95 | To automate the steps above you may want to create a batchfile based on the | |
75 | following: |
|
96 | following: | |
76 |
|
97 | |||
77 | echo [build] > setup.cfg |
|
98 | echo [build] > setup.cfg | |
78 | echo compiler=mingw32 >> setup.cfg |
|
99 | echo compiler=mingw32 >> setup.cfg | |
79 | python setup.py py2exe -b 1 |
|
100 | python setup.py py2exe -b 1 | |
80 | cd doc |
|
101 | cd doc | |
81 | mingw32-make ASCIIDOC=asciidoc.bat html |
|
102 | mingw32-make ASCIIDOC=asciidoc.bat html | |
82 | cd .. |
|
103 | cd .. | |
83 | iscc contrib\win32\mercurial.iss |
|
104 | iscc contrib\win32\mercurial.iss | |
84 |
|
105 | |||
85 | and run it from the root of the hg repository (c:\hg\hg-release). |
|
106 | 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