OSDN Git Service

mingw-get-0.3-mingw32-alpha-1 released.
[mingw/mingw-get.git] / srcdist-doc / INSTALL.in
1 Installation Instructions
2 =========================
3
4 $Id$
5
6 The information which follows describes the procedure for installing
7 and configuring mingw-get, and for keeping the installation current.
8 The online version of this document is an abridged form, focussing on
9 the installation of binary releases; users who prefer to build and
10 install from source are advised to consult the unabridged form of
11 this document, which may be found in the file "INSTALL", within the
12 source code distribution tarball.
13
14 Please report bugs as directed at http://mingw.org/Reporting_Bugs
15
16
17 First Time Installation of a Binary Release
18 -------------------------------------------
19
20 To install mingw-get, visit the MinGW files repository at:
21
22     http://sourceforge.net/projects/mingw/files
23
24 and, from the "Automated MinGW Installer/mingw-get" folder,
25 download your choice of either:
26
27     {PACKAGE_DISTNAME}-bin.zip
28
29 or (preferred, if you know how to unpack it):
30
31     {PACKAGE_DISTNAME}-bin.tar.gz
32
33 Whichever of these you choose to download, you should unpack it into
34 the directory in which you intend to host your MinGW installation; (we
35 *strongly* recommend that you adopt our standard of C:\MinGW [*], unless
36 you have an exceptional reason to make an alternative choice), then use
37 your preferred method for assignment of environment variables to add the
38 appropriate directory (default C:\MinGW\bin) to your PATH; (this should
39 be added as a permanent PATH assignment).
40
41 Having completed this phase of installation, you may then wish to review
42 the following section on configuration; if nothing else, you may wish to
43 copy the supplied defaults.xml file to profile.xml, even if you choose not
44 to introduce any customisations.  Finally, to initialise the installation
45 recording database, you should run the command [**]:
46
47     C:\> mingw-get install mingw-get
48
49
50 [*] If you insist on adopting a different directory from the recommended
51 default, you are *strongly* advised to avoid any directory which has white
52 space in its absolute path name; in particular, those who choose to ignore
53 this advice, and install MinGW into some subdirectory of (for example)
54 C:\Program Files", usually discover to their cost that certain
55 tools may not work correctly.
56
57 This document will refer to files as though installed in the recommended
58 default location, with a path prefix of C:\MinGW.  If, having read the
59 above warning, you do decide to adopt an alternative installation path,
60 then please substitute your alternative prefix, as appropriate, where this
61 document refers to C:\MinGW.  
62
63 [**] If you have chosen {PACKAGE_DISTNAME}-bin.tar.gz as your installation
64 source, rather than {PACKAGE_DISTNAME}-bin.zip, you may like to create the
65 directory:
66
67     C:\MinGW\var\cache\mingw-get\packages
68
69 (together with any requisite parents, and adjusting the C:\MinGW prefix
70 to suit your installation choice, if necessary).  You may then move the
71 {PACKAGE_DISTNAME}-bin.tar.gz file to it, *before* you run the above
72 command; this will relieve mingw-get of the overhead which would be
73 incurred by downloading the file a second time.  
74
75
76 Specifying the Configuration
77 ----------------------------
78
79 When you invoke mingw-get, it will attempt to read configuration data
80 from the file:
81
82     C:\MinGW\var\lib\mingw-get\data\profile.xml
83
84 (with any necessary adjustment of the C:\MinGW installation prefix, as
85 noted previously); if, and only if, this file cannot be read, then a
86 fallback attempt will be made, to read the configuration from:
87
88     C:\MinGW\var\lib\mingw-get\data\defaults.xml
89
90 instead.  Of this pair of files, profile.xml is *not* included within
91 the mingw-get distribution, but defaults.xml *is*.  It is a liberally
92 commented XML file, which you are advised to copy to create profile.xml;
93 you may then modify this, as you see fit, to suit your own installation
94 requirements. [*]
95
96 At the present time, the only entries you should consider changing are
97 the path names specified by the "path" attribute associated with each
98 of the "sysroot" elements within the first (only) "system-map" element;
99 (these specify the prefix directory path names for your installation).
100 You probably want to make the path for the "mingw32" subsystem match
101 your choice for your mingw-get installation; (the "%R" notation, used
102 in defaults.xml, sets it up thus, regardless of whether you choose to
103 install in C:\MinGW, or an alternative location).
104
105 [*] The recommendation to copy defaults.xml to profile.xml may seem to
106 be an unnecessary inconvenience; it is implemented this way in order to
107 safeguard any configuration changes you wish to make; during an upgrade,
108 defaults.xml will be overwritten, but profile.xml will not, so your
109 configuration will be preserved.
110
111
112 Upgrading an Existing Installation to a Newer Binary Release
113 ------------------------------------------------------------
114
115 Once you have completed a first-time installation of mingw-get, whether
116 from a binary release or by building and installing from source, you may
117 wish to upgrade it, as the project team publishes new releases.  Unless
118 you insist on *always* installing from source, (in which case each
119 upgrade effectively becomes a fresh first-time installation from the
120 new source code), and provided:
121
122 - you have previously installed mingw-get-0.1-mingw32-alpha-3 or newer,
123   and
124
125 - you have completed the first-time installation process, by running
126
127       C:\> mingw-get install mingw-get
128
129 then you may upgrade to a newer binary release by running
130
131 !     C:\> mingw-get update
132 !     C:\> mingw-get upgrade mingw-get
133
134 Otherwise, if you have a previously unfinalised installation, i.e. you
135 did not previously run
136
137       C:\> mingw-get install mingw-get
138
139 and that previous installation is of mingw-get-0.1-mingw32-alpha-3 or
140 newer, then you may upgrade and finalise by running
141
142 !     C:\> mingw-get update
143 !     C:\> mingw-get install mingw-get
144
145 Alternatively, any previous installation of mingw-get may be upgraded
146 by simply performing a new first-time installation, overwriting the
147 previously installed version; (this is the only option available, if
148 the original installation predates mingw-get-0.1-mingw32-alpha-3).
149
150 ;--------8<-------------------- cut-line -------------------->8--------
151 ;
152 ; Any text added below the cut-line will be included in the INSTALL
153 ; file, which is to be included in the source distribution, but it
154 ; will be excluded from the readme.txt file, which is to be used to
155 ; add descriptive content on the SourceForge download page.
156 ;
157 ; Any lines, such as these, which begin with a semicolon in their
158 ; first column (not indented), will be excluded from both files.
159 ;
160
161 Building and Installing from Source
162 -----------------------------------
163
164 In order to build mingw-get from source, you will require:
165
166 - A build platform which is capable of running Bourne shell scripts,
167   which provides at least the set of core tools required by the GNU
168   Coding Standards, together with a C/C++ compiler suite generating
169   code for execution on a native MS-Windows host.  Suitable platforms
170   include MSYS, in it's normal MinGW personality, with the MinGW
171   compiler suite, or either of Cygwin or GNU/Linux, with a suitable
172   cross-compiler suite for a MinGW host. 
173
174 - A statically linkable libz.a (or equal) for the native MS-Windows
175   host, together with its associated header files.
176
177 - A statically linkable libbz2.a (or equal) for the native MS-Windows
178   host, together with its associated header files.
179
180 - A statically linkable liblzma.a (or equal) for the native MS-Windows
181   host, together with its associated header files; (this should be built
182   from libxz sources no older than version 4.999.9beta, with a snapshot
183   release date of 2009-12-09 or later).
184
185 Having provisioned a suitable build platform, with these pre-requisite
186 libraries installed, you should obtain and unpack the source tarball,
187 {PACKAGE_DISTNAME}-src.tar.gz, in any working directory of your choice,
188 to create your {PACKAGE_DIRNAME} source directory.
189
190 At this point, you may elect to build in-source, in which case you would
191 follow the conventional GNU build procedure:
192
193 !   $ cd {PACKAGE_DIRNAME}
194 !   $ ./configure --prefix=/mingw [options ...]
195 !   $ make
196
197 However, it is strongly recommended that you elect instead, to create
198 and use a separate build directory.  This may be a subdirectory of your
199 {PACKAGE_DIRNAME} source directory, e.g.&nbsp;build-dir, in which case
200 you would proceed as follows:
201
202 !   $ mkdir {PACKAGE_DIRNAME}/build-dir
203 !   $ cd {PACKAGE_DIRNAME}/build-dir
204 !   $ ../configure --prefix=/mingw [options ...]
205 !   $ make
206
207 Finally, if you are building on the host on which you intend to deploy,
208 and provided the build has completed without error, you may install
209 mingw-get by executing:
210
211 !   $ make install
212
213 or:
214
215 !   $ make install-strip
216
217 Alternatively, if you wish to create an installation kit for deployment
218 on any remote host, you may:
219
220 !   $ mkdir staged
221 !   $ make prefix=`pwd`/staged install
222
223 or:
224
225 !   $ mkdir staged
226 !   $ make prefix=`pwd`/staged install-strip
227
228 and then:
229
230 !   $ cd staged
231 !   $ tar cf ../{PACKAGE_DISTNAME}-inst.tar .
232
233 to create an installation tarball, which may be deployed simply by
234 unpacking it in the /mingw root directory, on any host you choose.
235
236
237 Building and Installing from Source in CVS
238 ------------------------------------------
239
240 If, rather than building mingw-get from the source code provided in the
241 form of a release tarball, you prefer to keep on the cutting edge of
242 development within the public CVS repository, there are a few additional
243 pre-requisites which you must satisfy on your build platform:
244
245 - You must have a CVS client, which you can use to fetch the source code
246   from the repository, and subsequently keep it current.
247
248 - You must have the GNU autoconf package, with a version number of 2.59
249   or later, (and preferrably 2.67 or later).
250
251 - You must have a working lex, (or flex), scanner generating tool.
252
253 - If you also wish to be able to generate the documentation files, as
254   included in the top level directory of a source distribution tarball,
255   you will need a working nroff implementation.
256
257 Provided you can satisfy (at least the first three of) these additional
258 pre-requisites, you may check out the latest source code thus [*]:
259
260 !   $ export CVSROOT
261 !   $ CVSROOT=:pserver:anonymous@mingw.cvs.sf.net:/cvsroot/mingw
262 !   $ cvs login
263 !   $ cvs -z3 co -P mingw-get
264
265 This will create a working copy of the mingw-get source tree, in the
266 mingw-get subdirectory of your current working directory.
267
268 [*] If you are an accredited MinGW Developer, you may prefer to use the
269 :ext: access protocol of CVS, in conjunction with your registered SSH
270 keys, to access the CVS repository; in this case, you should know the
271 appropriate procedure to use, in place of the above.
272
273 Having thus obtained your working copy of the source code from the CVS
274 repository, you should then:
275
276 !   $ cd mingw-get
277 !   $ autoconf
278
279 to generate the configure script, and then:
280
281 !   $ mkdir obj
282 !   $ cd obj
283 !   $ ../configure --prefix=/mingw [options ...]
284 !   $ make
285
286 to progress the build [**], as in the previous case of building from the
287 source code extracted from a distribution tarball.
288
289 [**] Notice that here we choose to build in a subdirectory called obj;
290 when building from source in CVS, building in-source becomes even less
291 desirable than it is when building from distributed source.  The choice
292 of obj for the build directory name is dictated by the configuration of
293 mingw-get's CVS module itself; cvs "knows" that this directory does not
294 contain any source files of interest to it.
295
296 $RCSfile$: end of file