From fbd65c888e18def1398646756749a82527403678 Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Mon, 29 Sep 2008 01:12:52 +0200 Subject: [PATCH] Docs: explain MacOS 10.3/10.4 setup --- Documentation/user/converters.itely | 7 +++-- Documentation/user/install.itely | 7 ++++- Documentation/user/lilypond-book.itely | 9 ++++--- Documentation/user/setup.itely | 36 +++++++++++++++++++++----- python/lilylib.py | 2 +- 5 files changed, 48 insertions(+), 13 deletions(-) diff --git a/Documentation/user/converters.itely b/Documentation/user/converters.itely index 4bb0db9c1e..160689fb21 100644 --- a/Documentation/user/converters.itely +++ b/Documentation/user/converters.itely @@ -18,8 +18,11 @@ There are other tools that produce LilyPond input, for example GUI sequencers and XML converters. Refer to the @uref{http://@/lilypond@/.org,website} for more details. -These are separate programs from @command{lilypond} itself, and are run -on the command-line; see @ref{Command-line usage} for more information. +These are separate programs from @command{lilypond} itself, and are +run on the command line; see @ref{Command-line usage} for more +information. If you have MacOS 10.3 or 10.4 and you have trouble +running some of these scripts, e.g. @code{convert-ly}, see @ref{Setup +for MacOS X}. @knownissues diff --git a/Documentation/user/install.itely b/Documentation/user/install.itely index 5e8dde80c7..d556bc5973 100644 --- a/Documentation/user/install.itely +++ b/Documentation/user/install.itely @@ -47,12 +47,17 @@ darwin-x86 - MacOS X intel freebsd-64 - FreeBSD 6.x, x86_64 freebsd-x86 - FreeBSD 4.x, x86 linux-64 - Any GNU/Linux distribution, x86_64 -linux-arm - Any GNU/Linux distribution, arm linux-ppc - Any GNU/Linux distribution, powerpc linux-x86 - Any GNU/Linux distribution, x86 mingw - Windows x86 @end example +@knownissues + +If you have MacOS 10.3 or 10.4 and you would like to use Python +scripts such as @command{convert-ly} and @command{lilypond-book}, see +@ref{Setup for MacOS X}. + @node Compiling from source @section Compiling from source diff --git a/Documentation/user/lilypond-book.itely b/Documentation/user/lilypond-book.itely index 58a2d48c13..7fc46d3f15 100644 --- a/Documentation/user/lilypond-book.itely +++ b/Documentation/user/lilypond-book.itely @@ -24,10 +24,13 @@ program extracts snippets of music from your document, runs substituted for the music. The line width and font size definitions for the music are adjusted to match the layout of your document. -This is a separate program from @command{lilypond} itself, and is run on -the command-line; for more information, see @ref{Command-line usage}. +This is a separate program from @command{lilypond} itself, and is run +on the command line; for more information, see @ref{Command-line +usage}. If you have MacOS 10.3 or 10.4 and you have trouble running +@code{lilypond-book}, see @ref{Setup for MacOS X}. -This procedure may be applied to @LaTeX{}, HTML, Texinfo or DocBook documents. +This procedure may be applied to @LaTeX{}, HTML, Texinfo or DocBook +documents. @cindex texinfo @cindex latex diff --git a/Documentation/user/setup.itely b/Documentation/user/setup.itely index 852b96af6b..796db8dc40 100644 --- a/Documentation/user/setup.itely +++ b/Documentation/user/setup.itely @@ -30,15 +30,39 @@ This section explains how to perform additional setup for specific operating systems. @menu -* MacOS X on the command-line:: +* Setup for MacOS X:: @end menu +@node Setup for MacOS X +@subsection Setup for MacOS X -@node MacOS X on the command-line -@subsection MacOS X on the command-line +@subsubheading Using Python scripts on MacOS 10.3 or 10.4 -The scripts (such as lilypond-book, convert-ly, abc2ly, and even -lilypond itself) are included inside the .app file for MacOS@tie{}X. They can be run from +LilyPond binaries for MacOS X do not provide Python, but Python 2.4 or +newer is required by @command{convert-ly}. Therefore, if you use MacOS +10.3 or 10.4, you must install a newer Python version from +@uref{http://python.org/download/}, then edit the first line of +@command{convert-ly} and @command{lilypond-book} as follows: if the +Python binary you just installed is in your @var{PATH}, the first line +should be + +@example +#!/usr/bin/env python +@end example + +@noindent +otherwise it should be + +@example +#!@var{/path/to/newly_installed/python} +@end example + + +@subsubheading MacOS X on the command line + +The scripts --- such as @command{lilypond-book}, @command{convert-ly}, +@command{abc2ly}, and even @command{lilypond} itself --- are included +inside the @code{.app} file for MacOS@tie{}X. They can be run from the command line by invoking them directly, e.g. @example @@ -47,7 +71,7 @@ the command line by invoking them directly, e.g. @noindent The same is true of the other scripts in that directory, including -lilypond-book, convert-ly, abc2ly, etc. +@command{lilypond-book}, @command{convert-ly}, @command{abc2ly}, etc. Alternatively, you may create scripts which add the path automatically. Create a directory to store these scripts, diff --git a/python/lilylib.py b/python/lilylib.py index 15b654f84c..27dd98deab 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -72,7 +72,7 @@ def require_python_version (): if sys.hexversion < 0x02040000: stderr_write ("Python 2.4 or newer is required to run this program.\n\ Please upgrade Python from http://python.org/download/, and if you use MacOS X,\n\ -please read installation instructions in Application usage.") +please read 'Setup for MacOS X' in Application Usage.") os.system ("open http://python.org/download/") sys.exit (2) -- 2.39.5