OSDN Git Service

mingw-get-0.6.0-mingw32-beta-20130904-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 Current Binary Release
18 ---------------------------------------------------
19
20 Note that, as of release 0.6.0, the installation procedure for mingw-get
21 has been significantly simplified.  The installation instructions which
22 follow relate to this release, and later; for instructions relating to
23 any earlier release, or if you are unable to run the new setup tool on
24 any legacy version of Windows, please refer to the following section,
25 under the heading "First Time Installation of a Legacy Binary Release".
26
27 To install mingw-get, visit the MinGW files repository at:
28
29     http://sourceforge.net/projects/mingw/files
30
31 then, from the "Installer" folder,
32 download and run mingw-get-setup.exe, and select your choices from the
33 options presented [*], to install mingw-get.  When this has completed,
34 you will then be offered the option to immediately continue with the
35 installation of a basic selection of MinGW packages [**].  If you do
36 choose to continue with package selection, this will be processed by an
37 integrated preview of the mingw-get GUI application, (regardless of
38 whether you have accepted or declined the option to install the GUI); to
39 complete your initial installation:--
40
41 - Select individual packages, within the upper right hand "list-view"
42   pane of the GUI window;
43
44 - From the "Package" menu, (which also appears as a pop-up, when you
45   click the status icon at the left hand side of the list entry), select
46   the option to "Mark for Installation", in respect of each package
47   which you wish to install;
48
49 - Having so marked all packages which you wish to install, from the
50   "Installation" menu select the "Apply Changes" option, to complete
51   your initial installation.
52
53 After you have completed the installation of mingw-get, as described
54 above, and regardless of whether you chose to install additional
55 packages, or not, you are advised to review the configuration, as
56 specified in your profile.xml file, and noting in particular, any new
57 features which are described in the supplied defaults.xml file, if you
58 have a profile.xml from a previous release; please refer to the section
59 below, under the heading "Specifying the Configuration", for details.
60
61 [*] By default, mingw-get-setup.exe will offer to install mingw-get into
62 the "C:\MinGW" directory.  You are *strongly* recommended to adopt this
63 default; however, if you do decide to change it, please *do* choose an
64 alternative with no white space within its absolute path name.
65 In particular, those who choose to ignore
66 this advice, and install MinGW into some subdirectory of (for example)
67 C:\Program Files", usually discover to their cost that certain
68 tools may not work correctly.
69
70 [**] The set of packages offered, as the foundation for a basic
71 installation, are equivalent to those offered by the mingw-get-inst.exe
72 companion to earlier releases of mingw-get.  Unlike mingw-get-inst.exe,
73 mingw-get-setup.exe, does *not* insist that you install the basic GCC
74 compiler suite.  You are free to install it, or not, at your own option;
75 if you do wish to install it, please select the "mingw32-base" package,
76 which is the equivalent of the minimum mandatory selection imposed by
77 mingw-get-inst.exe
78
79
80 First Time Installation of a Legacy Binary Release
81 --------------------------------------------------
82
83 The instructions which follow relate to the installation of mingw-get
84 releases prior to version 0.6.0; they also apply in the case of later
85 versions, where a legacy version of Windows may not permit you to run
86 the new mingw-get-setup.exe tool.  For installation of release 0.6.0, or
87 any later release, using the new tool, please refer to the preceeding
88 section, under the heading "First Time Installation of a Current Binary
89 Release".
90
91 To install mingw-get, visit the MinGW files repository at:
92
93     http://sourceforge.net/projects/mingw/files
94
95 and, from the "Installer/mingw-get-<version>-<class>-<release>" folder,
96 download your choice of either:
97
98     mingw-get-<version>-mingw32-<class>-<release>-bin.zip
99
100 or (preferred, if you know how to unpack it):
101
102     mingw-get-<version>-mingw32-<class>-<release>-bin.tar.xz
103
104 Whichever of these you choose to download, you should unpack it into
105 the directory in which you intend to host your MinGW installation; (we
106 *strongly* recommend that you adopt our standard of C:\MinGW [*], unless
107 you have an exceptional reason to make an alternative choice), then use
108 your preferred method for assignment of environment variables to add the
109 appropriate directory (default C:\MinGW\bin) to your PATH; (this should
110 be added as a permanent PATH assignment).
111
112 Having completed this phase of installation, you may then wish to review
113 the following section on configuration; if nothing else, you may wish to
114 copy the supplied defaults.xml file to profile.xml, even if you choose not
115 to introduce any customisations.  Finally, to initialise the installation
116 recording database, you should run the command [**]:
117
118     C:\> mingw-get install mingw-get
119
120
121 [*] If you insist on adopting a different directory from the recommended
122 default, you are *strongly* advised to avoid any directory which has white
123 space in its absolute path name; in particular, those who choose to ignore
124 this advice, and install MinGW into some subdirectory of (for example)
125 C:\Program&nbsp;Files", usually discover to their cost that certain
126 tools may not work correctly.
127
128 This document will refer to files as though installed in the recommended
129 default location, with a path prefix of C:\MinGW.  If, having read the
130 above warning, you do decide to adopt an alternative installation path,
131 then please substitute your alternative prefix, as appropriate, where this
132 document refers to C:\MinGW.  
133
134 [**] If you have chosen {PACKAGE_DISTNAME}-bin.tar.xz as your installation
135 source, rather than {PACKAGE_DISTNAME}-bin.zip, you may like to create the
136 directory:
137
138     C:\MinGW\var\cache\mingw-get\packages
139
140 (together with any requisite parents, and adjusting the C:\MinGW prefix
141 to suit your installation choice, if necessary).  You may then move the
142 {PACKAGE_DISTNAME}-bin.tar.gz file to it, *before* you run the above
143 command; this will relieve mingw-get of the overhead which would be
144 incurred by downloading the file a second time.  
145
146
147 Specifying the Configuration
148 ----------------------------
149
150 When you invoke mingw-get, it will attempt to read configuration data
151 from the file:
152
153     C:\MinGW\var\lib\mingw-get\data\profile.xml
154
155 (with any necessary adjustment of the C:\MinGW installation prefix, as
156 noted previously); if, and only if, this file cannot be read, then a
157 fallback attempt will be made, to read the configuration from:
158
159     C:\MinGW\var\lib\mingw-get\data\defaults.xml
160
161 instead.  Of this pair of files, profile.xml is *not* included within
162 the mingw-get distribution, but defaults.xml *is*.  It is a liberally
163 commented XML file, which you are advised to copy to create profile.xml;
164 you may then modify this, as you see fit, to suit your own installation
165 requirements. [*]
166
167 At the present time, the only entries you should consider changing are
168 the path names specified by the "path" attribute associated with each
169 of the "sysroot" elements within the first (only) "system-map" element;
170 (these specify the prefix directory path names for your installation).
171 You probably want to make the path for the "mingw32" subsystem match
172 your choice for your mingw-get installation; (the "%R" notation, used
173 in defaults.xml, sets it up thus, regardless of whether you choose to
174 install in C:\MinGW, or an alternative location).
175
176 [*] The recommendation to copy defaults.xml to profile.xml may seem to
177 be an unnecessary inconvenience; it is implemented this way in order to
178 safeguard any configuration changes you wish to make; during an upgrade,
179 defaults.xml will be overwritten, but profile.xml will not, so your
180 configuration will be preserved.
181
182
183 Upgrading an Existing Installation to a Newer Binary Release
184 ------------------------------------------------------------
185
186 Once you have completed a first-time installation of mingw-get, whether
187 from a binary release or by building and installing from source, you may
188 wish to upgrade it, as the project team publishes new releases.  Unless
189 you insist on *always* installing from source, (in which case each
190 upgrade effectively becomes a fresh first-time installation from the
191 new source code), and provided:
192
193 - you have previously installed mingw-get-0.1-mingw32-alpha-3 or newer,
194   and
195
196 - you have completed the first-time installation process, by running
197
198       C:\> mingw-get install mingw-get
199
200 then you may upgrade to a newer binary release by running
201
202 !     C:\> mingw-get update
203 !     C:\> mingw-get upgrade mingw-get
204
205 Otherwise, if you have a previously unfinalised installation, i.e. you
206 did not previously run
207
208       C:\> mingw-get install mingw-get
209
210 and that previous installation is of mingw-get-0.1-mingw32-alpha-3 or
211 newer, then you may upgrade and finalise by running
212
213 !     C:\> mingw-get update
214 !     C:\> mingw-get install mingw-get
215
216 Alternatively, any previous installation of mingw-get may be upgraded
217 by simply performing a new first-time installation, overwriting the
218 previously installed version; (this is the only option available, if
219 the original installation predates mingw-get-0.1-mingw32-alpha-3).
220
221 ;--------8<-------------------- cut-line -------------------->8--------
222 ;
223 ; Any text added below the cut-line will be included in the INSTALL
224 ; file, which is to be included in the source distribution, but it
225 ; will be excluded from the readme.txt file, which is to be used to
226 ; add descriptive content on the SourceForge download page.
227 ;
228 ; Any lines, such as these, which begin with a semicolon in their
229 ; first column (not indented), will be excluded from both files.
230 ;
231
232 Building and Installing from Source
233 -----------------------------------
234
235 In order to build mingw-get from source, you will require:
236
237 - A build platform which is capable of running Bourne shell scripts,
238   which provides at least the set of core tools required by the GNU
239   Coding Standards, together with a C/C++ compiler suite generating
240   code for execution on a native MS-Windows host.  Suitable platforms
241   include MSYS, in it's normal MinGW personality, with the MinGW
242   compiler suite, or either of Cygwin or GNU/Linux, with a suitable
243   cross-compiler suite for a MinGW host. 
244
245 - A statically linkable libz.a (or equal) for the native MS-Windows
246   host, together with its associated header files.
247
248 - A statically linkable libbz2.a (or equal) for the native MS-Windows
249   host, together with its associated header files.
250
251 - A statically linkable liblzma.a (or equal) for the native MS-Windows
252   host, together with its associated header files; (this should be built
253   from libxz sources no older than version 4.999.9beta, with a snapshot
254   release date of 2009-12-09 or later).
255
256 - A statically linkable liblua.a for the native MS-Windows host,
257   together with its associated header files; (this should be binary
258   compatible with the lua-5.2.0 release, as offered by MinGW.org).
259
260 - A statically linkable libwtklite.a, together with its associated
261   header files; (this is a MinGW.org specific product, currently offered
262   only in source format, which you are advised to build and install for
263   yourself).
264
265 Having provisioned a suitable build platform, with these pre-requisite
266 libraries installed, you should obtain and unpack the source tarball,
267 {PACKAGE_DISTNAME}-src.tar.gz, in any working directory of your choice,
268 to create your {PACKAGE_DIRNAME} source directory.
269
270 At this point, you may elect to build in-source, in which case you would
271 follow the conventional GNU build procedure:
272
273 !   $ cd {PACKAGE_DIRNAME}
274 !   $ ./configure --prefix=/mingw [options ...]
275 !   $ make
276
277 However, it is strongly recommended that you elect instead, to create
278 and use a separate build directory.  This may be a subdirectory of your
279 {PACKAGE_DIRNAME} source directory, e.g.&nbsp;build-dir, in which case
280 you would proceed as follows:
281
282 !   $ mkdir {PACKAGE_DIRNAME}/build-dir
283 !   $ cd {PACKAGE_DIRNAME}/build-dir
284 !   $ ../configure --prefix=/mingw [options ...]
285 !   $ make
286
287 Finally, if you are building on the host on which you intend to deploy,
288 and provided the build has completed without error, you may install
289 mingw-get by executing:
290
291 !   $ make install
292
293 or:
294
295 !   $ make install-strip
296
297 Alternatively, if you wish to create an installation kit for deployment
298 on any remote host, you may:
299
300 !   $ mkdir staged
301 !   $ make prefix=`pwd`/staged install
302
303 or:
304
305 !   $ mkdir staged
306 !   $ make prefix=`pwd`/staged install-strip
307
308 and then:
309
310 !   $ cd staged
311 !   $ tar cf ../{PACKAGE_DISTNAME}-inst.tar .
312
313 to create an installation tarball, which may be deployed simply by
314 unpacking it in the /mingw root directory, on any host you choose.
315
316
317 Building and Installing from Source in Git
318 ------------------------------------------
319
320 If, rather than building mingw-get from the source code provided in the
321 form of a release tarball, you prefer to keep on the cutting edge of
322 development within the public CVS repository, there are a few additional
323 pre-requisites which you must satisfy on your build platform:
324
325 - You must have either a git client, or a mercurial client with the
326   hggit extension enabled, which you can use to fetch the source code
327   from the repository, and subsequently keep it current.
328
329 - You must have the GNU autoconf package, with a version number of 2.59
330   or later, (and preferrably 2.67 or later).
331
332 - You must have a working lex, (or flex), scanner generating tool.
333
334 - If you also wish to be able to generate the documentation files, as
335   included in the top level directory of a source distribution tarball,
336   you will need a working nroff implementation.
337
338 Provided you can satisfy (at least the first three of) these additional
339 pre-requisites, you may check out the latest source code thus [*]:
340
341 !   $ git clone git://git.code.sf.net/p/mingw/mingw-get
342
343 or:
344
345 !   $ hg clone git://git.code.sf.net/p/mingw/mingw-get
346
347 This will create a working copy of the mingw-get source tree, in the
348 mingw-get subdirectory of your current working directory [**].
349
350 [*] If you are an accredited MinGW Developer, you may prefer to use the
351 SSH access protocol for git, in conjunction with your registered SSH
352 keys, to access the git repository; in this case, you should know the
353 appropriate procedure to use, in place of the above.
354
355 [**] Note that, if you are a git user, you *must* perform an additional
356 checkout step, (which is not necessary for hg users):
357
358 !   $ cd mingw-get
359 !   $ git submodule add ../build-aux
360
361 Having thus obtained your working copy of the source code from the git
362 repository, you should then:
363
364 !   $ cd mingw-get
365 !   $ autoconf
366
367 (git users should omit the 'cd mingw-get' step, since they will already
368 be in the appropriate directory, following the addition of the build-aux
369 submodule), to generate the configure script, and then:
370
371 !   $ mkdir obj
372 !   $ cd obj
373 !   $ ../configure --prefix=/mingw [options ...]
374 !   $ make
375
376 to progress the build [***], as in the previous case of building from
377 the source code extracted from a distribution tarball.
378
379 [***] Notice that here we choose to build in a subdirectory called obj;
380 when building from source in git, building in-source becomes even less
381 desirable than it is when building from distributed source.  The choice
382 of obj for the build directory name is dictated by the configuration of
383 mingw-get's git module itself; both git and hg "know" that this
384 directory does not contain any source files of interest to them.
385
386 $RCSfile$: end of file