2 Subject: Patch 6.2.124 (extra)
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
10 Patch 6.2.124 (after 6.2.121)(extra)
11 Problem: Mac: Recursive use of M4FLAGS causes problems. When running Vim
12 directly it can't find the runtime files. (Emily Jackson)
13 Using GNU constructs causes warnings with other make programs.
15 Solution: Use another name for the M4FLAGS variable.
16 Don't remove "Vim.app" from the path.
17 Update the explanation for compiling on the Mac. (Eric Kow)
18 Don't use $(shell ) and $(addprefix ).
19 Files: src/INSTALLmac.txt, src/Makefile, src/misc1.c
22 *** ../vim-6.2.123/src/INSTALLmac.txt Sun May 4 22:40:16 2003
23 --- src/INSTALLmac.txt Wed Oct 15 16:50:16 2003
26 This file contains instructions for compiling Vim. If you already have an
27 executable version of Vim, you don't need this.
29 ! -----------------------------------------------------------
31 ! Here's a summary of how Vim can be compiled under MacOS, depending on
32 ! the version of MacOS, the compiler and the interface.
34 ! A. Supported compiler and environement
36 ! 1. CodeWarrior (pre-MacOS X)
37 ! 2. MPW (pre-MacOS X)
38 ! 3. Project Builder (MacOS X)
39 ! 4. Unix Compiler (MacOS X)
41 ! B. Supported user interface
43 ! 1. Original MacOS Toolbox [Compile with A.1 and A.2]
44 ! 2. Carbon MacOS [Compile with A.3]
45 ! 3. X (Athena, GTK, Motif). [Compile with A.4]
46 ! 4. Plain Text [Compile with A.4]
48 ! NOTE: Sorry, Cocoa is not expected to be supported for now.
50 ! C. Supported "OS" style
52 ! 1. MacOS [Compile as B.1]
53 ! 2. MacOS X [Compile as B.2]
54 ! 3. BSD Unix [Compile as B.2, B.3 and B.4]
56 ! -----------------------------------------------------------
58 ! Special Consideration
59 ! ---------------------
61 ! B.2: Compiling for Carbon
63 ! Currently the Carbon version can only be compiled properly under MacOS X.
64 ! The binary created in that way does'nt work under previous version.
66 ! B.3: Compiling for X
68 ! You need to first install XFree86 and XDarwin.
69 ! Please visit http://www.XDarwin.org
71 ! C.1: The MacOS version
73 ! Both ':' and '/' supported as path separator.
75 ! C.2: The MacOS X version
77 ! Only '/' supported as path separator.
79 ! C.3: The BSD Unix version
81 Only '/' supported as path separator.
82 - Shell command can be invoked (:!)
84 ! -----------------------------------------------------------
86 ! A.1: Compiling with CodeWarior
88 1. Expand the resource file:
89 ! - ../src/os_mac.rsr.hqx (to produce ../src/gui_mac.rsrc)
91 2. Expand the project file:
92 - ../src/os_mac.sit.hqx (to produce ../src/vim.mcp)
94 This file contains instructions for compiling Vim. If you already have an
95 executable version of Vim, you don't need this.
97 ! An alternate way of building that Benji Fisher uses can be found here:
99 ! http://macvim.swdev.org/OSX/#Developers
101 ! ----------------------------------------------------------------------------
103 ! ----------------------------------------------------------------------------
106 ! 1.1. Carbon interface
107 ! 1.2. X (Athena, GTK, Motif) or plain text.
113 ! NOTE: The Carbon version can only be compiled properly under
116 ! ----------------------------------------------------------------------------
118 ! ----------------------------------------------------------------------------
122 Only '/' supported as path separator.
124 ! 1.1 Carbon interface (default)
126 ! You can compile vim with the standard Unix routine:
131 ! This will create a working Vim.app application bundle in the src
132 ! directory. You can move this bundle (the Vim.app directory) anywhere
133 ! you want, for example, /Applications.
135 ! 1.2 X-Windows or Plain Text
137 ! If you do not want the Carbon interface, you must explicitly tell
138 ! configure to use a different GUI.
141 ! ./configure --enable-gui=gtk2
144 ! NOTE: The following GUI options are supported:
145 ! no (for text), motif, athena, nextaw
146 ! gtk, gtk2, gnome, gnome2,
148 ! NOTE: You need to first install XFree86 and XDarwin.
149 ! Please visit http://www.XDarwin.org
151 ! ----------------------------------------------------------------------------
153 ! ----------------------------------------------------------------------------
155 ! Both ':' and '/' supported as path separator.
157 + 2.1: Compiling with CodeWarior
159 1. Expand the resource file:
160 ! open ../src/os_mac.rsr.hqx to produce ../src/gui_mac.rsrc:
162 ! % open -a StuffIt\ Expander os_mac.rsr.hqx
164 2. Expand the project file:
165 - ../src/os_mac.sit.hqx (to produce ../src/vim.mcp)
172 ! A.2: Compiling with MPW.
174 0. You will need a recent version of the MPW and the Universal Interfaces.
180 ! 2.2: Compiling with MPW.
182 0. You will need a recent version of the MPW and the Universal Interfaces.
188 1. Expand the resource file:
189 ! - ../src/os_mac.rsr.hqx (to produce ../src/gui_mac.rsrc)
191 3. Double click on os_make.make, the MPW will now open in the correct
192 folder and load the CreateVimMake script. Change to the Worksheet
196 1. Expand the resource file:
197 ! open ../src/os_mac.rsr.hqx to produce ../src/gui_mac.rsrc:
199 ! % open -a StuffIt\ Expander os_mac.rsr.hqx
201 3. Double click on os_make.make, the MPW will now open in the correct
202 folder and load the CreateVimMake script. Change to the Worksheet
206 4. Select "Build" from the menu (or type command-B). Type the program name
209 - A.3: Compiling with Project Builder.
211 - 1. Expand the resource file:
212 - - ../src/os_mac.rsr.hqx (to produce ../src/gui_mac.rsrc)
214 - 2. Open ../src/os_mac.pbproject with Project Builder
216 - 3. Choose between C.2 and C.3
218 - In Target ... CCFLAGS use:
221 - if you want a normal MacOS X version (using os_mac.c)
224 - if you want to use shell commands (using os_unix.c)
225 - NOTE: some functionality may be missing
227 - 4. Hammer the build button in ;)
230 - A.4: Using the unix compiler.
232 - From Terminal.app you can use "configure" and "make". Refer to INSTALL for
233 - full detail. The MacOS port is not involve here.
236 ------------------------------------------------------
239 *** ../vim-6.2.123/src/Makefile Tue Oct 14 10:36:08 2003
240 --- src/Makefile Thu Oct 16 12:56:23 2003
243 ### MacOS X installation
245 ### This creates a runnable Vim.app in the src directory
247 - ### TODO: install the runtime files in Vim.app instead of
248 - ### requiring that they be in a seperate directory.
250 REZ = /Developer/Tools/Rez
251 RESMRG = /Developer/Tools/ResMerger
258 ! M4FLAGS = $(M4FLAGS) -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) \
259 -DAPP_VER=$(VERSION) -DICON_APP=$(ICON_APP)
262 ! # You can download Douglas Stebila's icons:
263 ! # http://homepage.mac.com/dstebila/code/vim/
264 ! # TODO: Honestly, why don't we just go ahead and do this? OS 9?
265 ! # If you place those *.icns at src directory, it will be detected by this
266 ! # Makefile automatically, and used for Vim.
267 ! ICON_APP = $(shell if [ -e app.icns ] ; then echo app.icns ; else echo gui_mac.icns ; fi)
268 ! ICON_DOC = $(shell if [ -e doc.icns ] ; then echo doc.icns ; else echo ; fi)
269 ! ICON_DOCTXT = $(shell if [ -e doc-txt.icns ] ; then echo doc-txt.icns ; else echo ; fi)
270 ! ICONS = $(addprefix $(RESDIR)/, $(ICON_APP) $(ICON_DOC) $(ICON_DOCTXT))
272 install_macosx: bundle-dir bundle-executable bundle-info bundle-resource \
278 ! M4FLAGSX = $(M4FLAGS) -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) \
279 -DAPP_VER=$(VERSION) -DICON_APP=$(ICON_APP)
282 ! ICON_APP = gui_mac.icns
283 ! ICONS = $(RESDIR)/$(ICON_APP)
285 ! # If you uncomment the following lines the *.icns in the src directory will be
286 ! # detected by this Makefile automatically, and used for Vim.
287 ! #ICON_APP = $(shell if [ -e app.icns ] ; then echo app.icns ; else echo gui_mac.icns ; fi)
288 ! #ICON_DOC = $(shell if [ -e doc.icns ] ; then echo doc.icns ; else echo ; fi)
289 ! #ICON_DOCTXT = $(shell if [ -e doc-txt.icns ] ; then echo doc-txt.icns ; else echo ; fi)
290 ! #ICONS = $(addprefix $(RESDIR)/, $(ICON_APP) $(ICON_DOC) $(ICON_DOCTXT))
292 install_macosx: bundle-dir bundle-executable bundle-info bundle-resource \
296 @echo "Creating PkgInfo"
297 @echo -n "APPLVIM!" > $(APPDIR)/Contents/PkgInfo
298 @echo "Creating Info.plist"
299 ! m4 $(M4FLAGS) infplist.xml > $(APPDIR)/Contents/Info.plist
301 bundle-resource: bundle-dir bundle-icons bundle-rsrc
304 @echo "Creating PkgInfo"
305 @echo -n "APPLVIM!" > $(APPDIR)/Contents/PkgInfo
306 @echo "Creating Info.plist"
307 ! m4 $(M4FLAGSX) infplist.xml > $(APPDIR)/Contents/Info.plist
309 bundle-resource: bundle-dir bundle-icons bundle-rsrc
311 *** ../vim-6.2.123/src/misc1.c Sat Sep 27 19:48:50 2003
312 --- src/misc1.c Wed Oct 15 11:30:39 2003
316 static char_u *vim_version_dir __ARGS((char_u *vimdir));
317 static char_u *remove_tail __ARGS((char_u *p, char_u *pend, char_u *name));
318 - #if defined(USE_EXE_NAME) && defined(MACOS_X)
319 - static char_u *remove_tail_with_ext __ARGS((char_u *p, char_u *pend, char_u *name));
321 static int get_indent_str __ARGS((char_u *ptr, int ts));
322 static int copy_indent __ARGS((int size, char_u *src));
329 pend = remove_tail(p, pend, (char_u *)"Contents/MacOS");
330 - pend = remove_tail_with_ext(p, pend, (char_u *)".app");
331 pend = remove_tail(p, pend, (char_u *)"build");
341 - #if defined(USE_EXE_NAME) && defined(MACOS_X)
343 - * If the string between "p" and "pend" ends in "???.ext/", return "pend" minus
344 - * the length of "???.ext/". Otherwise return "pend".
347 - remove_tail_with_ext(p, pend, ext)
352 - int len = (int)STRLEN(ext) + 1;
353 - char_u *newend = pend - len;
356 - && fnamencmp(newend, ext, len - 1) == 0)
357 - for (;newend != p && !vim_ispathsep(*(newend -1)); newend--);
359 - if (newend == p || vim_ispathsep(*(newend - 1)))
366 * Call expand_env() and store the result in an allocated string.
368 *** ../vim-6.2.123/src/version.c Fri Oct 17 12:01:21 2003
369 --- src/version.c Fri Oct 17 12:05:52 2003
373 { /* Add new patch number below this line */
379 hundred-and-one symptoms of being an internet addict:
380 10E. You start counting in hex.
382 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
383 /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
384 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
385 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///