source: Daodan/MinGW/msys/1.0/share/doc/MSYS/README.rtf@ 1130

Last change on this file since 1130 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 10.8 KB
RevLine 
[1046]1{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}{\f1\fmodern\fprq1\fcharset0 Lucida Console;}}
2{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\nowidctlpar\tx2610\b\i\f0\fs20 File:\b0\tab\i0 README\par
3\b\i Copyright (C):\b0\i0\tab 2001, 2002, 2006\par
4 Earnie Boyd <earnie@users.sf.net>\par
5\b\i Distribution:\b0\i0\tab See MSYS_LICENSE\par
6\pard\nowidctlpar\qc\tx2610\i\par
7\pard\nowidctlpar\b Preface:\b0\i0\par
8Ok, you have installed msys and now you're reading this to understand how to get started. However, I must first explain some important facts about Msys. Msys file system bindings (mounts) are automatic and happens as described in table 1. These automatic file system bindings are not changable by the user. User defined file system bindings can be created by specifying them in the /etc/fstab directory as explained in table 2.\par
9\par
10\b\i TABLE 1 - Automatic file system maps:\b0\i0\par
11\f1\fs16 + ---------------------------------------------------------------------------- +\par
12| The automatic mounts are relative to where the msys-1.0.dll (DLL) is located |\par
13| such that the following is true: |\par
14| |\par
15| / - is the parent directory of the directory containing the DLL |\par
16| /usr - the parent directory of the directory containing the DLL |\par
17| /tmp - the value of the TMP environment variable |\par
18| /c - C:\\ |\par
19| /d - D:\\ |\par
20| . . . |\par
21| /z - Z:\\ |\par
22| |\par
23+ ---------------------------------------------------------------------------- +\par
24\f0\fs20\par
25\b\i TABLE 2 - /etc/fstab layout:\b0\i0\par
26\f1\fs16 + ---------------------------------------------------------------------------- +\par
27| The record format for the /etc/fstab is current a simple one. I need to |\par
28| work on the syntax parsing more so that things like embedded spaces work. |\par
29| If you wish to map a path with spaces you must use the DOS style name. |\par
30| |\par
31| The record format is as follows: |\par
32| d:/some/foo/path /bar |\par
33| |\par
34| As you can see this is simply the Win32 path mapped to a mount point. It is |\par
35| unix practice to have the /bar created as an empty directory before it can |\par
36| mount the mount point. Msys doesn't force this but it will be to advantage |\par
37| if you do. Some programs, e.g. find, and some operations, e.g. tab |\par
38| operate better if the physical directory is present for those mount points. |\par
39| |\par
40| If you create a /etc/fstab record that maps to an automatic mount point Msys |\par
41| will remove it when it adds the automatic point. This means that at some |\par
42| small moment in time your mount point actually exists. However it doesn't |\par
43| exist long enough to be of any use to you. |\par
44| |\par
45+ ---------------------------------------------------------------------------- +\par
46\f0\fs20\par
47For any executable not dependent on msys-1.0.dll, MSYS will convert POSIX paths that are used as arguments to Win32 paths. (Prior to MSYS version 1.0.11, an executable was determined to be msys-1.0.dll if it resided in /bin or /usr/bin directories.) This means that you now have a POSIX environment that will automagically do the right thing w.r.t. changing the paths passed as arguments. Arguments beginning with a // are considered to be Win32 style switches and will be passed to the program with // converted to / to allow for the command.com/cmd.exe (Win32) style switch. An example of a Win32 style switch is `write //p /mydocs/msys-rocks.' In this example write (a.k.a. WordPad) exists in the c:\\winnt\\system32 path on my system. The //p becomes /p which tells write to print the document. And mydocs/msys-rocks converts to c:\\msys\\1.0\\mydocs\\msys-rocks so that write can find it. \par
48\b\i\par
49\page STARTING Msys:\par
50\b0\i0 Starting Msys should just be a matter of clicking on the MSYS icon on your desktop or Start menu. If you have the File Manager window open, you may now click on it and have it start also. Doing these presents you with a console window within which you may enter commands.\par
51\par
52\b\i Working with MinGW:\par
53\b0\i0 If you already have MinGW installed then simply bind the path to MinGW to the /mingw mount point in the /etc/fstab as described above. If you don't have MinGW installed already then simply unarchive the MinGW tar.gz file in the /mingw directory. With versions of MSYS \ul prior\ulnone to \ul 1.0.11\ulnone , \ul\b DO NOT\ulnone\b0 unarchive the MinGW tar.gz file in the / directory. I find it advantageous to now put MinGW and MSYS binaries in the same /bin directory. It provides one less confusion with where to install your products.\par
54\b\i\par
55Working with other products:\par
56\b0\i0 I find that the easiest thing for working with other products, such as Microsoft Office, is to create a script pointing to the executable. An example of a script for Microsoft Word on my system looks like the example in Table 3. I have this stored in my /usr/local/bin directory with a filename of word. Now all I need to do to edit a word document is `word /mydoc/proposal.doc' and voila up pops a Microsoft Word window with my document in it.\par
57\par
58\b\i Table 3 - Script to execute MS Word from the command line:\par
59\b0\i0\f1\fs16 + ---------------------------------------------------------------------------- +\par
60+ #!/bin/sh +\par
61+ start '/c/Program\\ Files/Microsoft\\ Office/Office/WINWORD' "$@" +\par
62+ ---------------------------------------------------------------------------- +\par
63\par
64\f0\fs20 This is also advantageous if you find that your program isn\rquote t working with RXVT correctly. RXVT uses PTY emulation and it is often the case that controlling the stdio of a native program isn\rquote t functional. There is no known cure for this PTY issue and I have stopped looking for one. The above script method is the way you start the processes that don\rquote t flush their buffers or cause I/O blocking on the standard I/O channels.\par
65\b\i\par
66Other documentation:\b0\i0\par
67Be sure to read the MSYS_ series. I have tried to document how I'm changing the cygwin code to allow us to use it with MSYS. These can be found in the /doc/msys directory, or you can find them in the /usr/doc/msys directory. You will also find HOWTO documentation at http://www.mingw.org/wiki/MinGWiki/ so please read it.\par
68\par
69\b\i Using binaries with different runtimes:\b0\i0\par
70You can't use Cygwin binaries at all and if you try you'll most likely just cause the processes to "hang". You can use Win32 native binaries but you should put them into the /mingw/bin or your /usr/local/bin directory tree. If you wish to replace an MSYS binary with a native win32 version then delete or rename the /bin version.\par
71\page\b\i Symlinks\par
72\b0\i0 Native w32 applications have no notion of POSIX-style symlinks. On the other hand, it is natural to assume that useful scripts and tools have come to rely on their existence. So, having some sort of symlink emulation makes it easier to port them to MSYS, provided they are transparent to w32 applications. One approximation that works in pratice is to replace symlink creation with a copy operation. \par
73\par
74The semantics of the symlink operation under MSYS are as follow:\par
751) The original source is copied to the destination.\par
762) In case of a directory, a deep copy is performed.\par
773) If the source path is relative, it is taken relative to the directory of the destination.\par
78\par
79The following are the differences with respect to standard symlink behaviour: \par
801) The original source must already exist at symlink creation time.\par
812) Modifying the contents of the original source does not affect the destination and vice-versa.\par
823) When creating a symlink pointing to a component of the symlink own path, the deep copy operation avoids descending into the newly created tree, to avoid infinite recursion.\par
83For instance:\par
84$ mkdir foo\par
85$ ln -s .. foo/bar\par
86On POSIX, you can dereference foo/bar/foo/bar/...\par
87On MSYS, it stops after foo/bar/foo\par
884) When doing a deep copy operation, the directory traversal is done in the w32 domain. As a result, it does not traverse mount points found within the directory hierarchy.\par
89For instance: if foo/mnt is a mount point, then ls -s foo bar does not copy the contents of foo/mnt.\par
90\b\i\par
91Effective use of the clipboard:\par
92\b0\i0 You may use the clipboard with MSYS. When using rxvt as the terminal, just selecting with data with click and drag of the mouse, copies the data to the clipboard. To paste the clipboard data in the rxvt terminal you can Shift and Left Click or press both mouse buttons if 3 button mouse emulation is on or press the mouse wheel. To copy the highlighted data to your favorite windows email client the you use the paste options for that program, typically Ctrl-V. You can also use interesting bash shell commands such as `cat /dev/clipboard > /tmp/foo' or `less -f /dev/clipboard'. Data entered into the clipboard by non-MSYS programs can also be used by MSYS programs and vice versa.\b\i\par
93\par
94\b\i Handling pop-up error dialog boxes:\par
95\b0\i0 Sometimes, executing an automated testsuite (like libtool's) may trigger unwanted pop-up error dialog boxes.
96The error-mode tool can be used to temporarily turn off these pop-ups. See ``error-mode --help'' for further info.\par
97\par
98Bug Reports:\b0\i0\par
99See http://www.mingw.org/bugs.shtml\par
100\par
101\b\i User Posts:\b0\i0\par
102MinGW-msys@lists.sf.net\par
103\par
104\b\i Disclaimer:\par
105\b0\i0 Products mentioned in this and other documents are solely owned by their trademark owners. We claim no rights to those trademarks and any mention of those products are for example only. Your uses of those products are your responsibility and no endorsement of any mentioned product is being given.\par
106\b\i\par
107}
108
Note: See TracBrowser for help on using the repository browser.