@itemize @bullet
-@item @uref{README-W32.html,Compiling and running on Windows32}
@item @uref{../misc/out-www/CHANGES-0.0.html, Change logs from 0.0 till 0.1 }
@item @uref{../misc/out-www/CHANGES-0.1.html, Change logs from 0.1 till 1.0 }
@item @uref{../misc/out-www/CHANGES-1.0.html, Change logs from 1.0 till 1.1 }
@item @uref{../misc/out-www/ANNOUNCE-1.2.html, Announcement of 1.2 (includes summary of changes)}
@item @uref{../misc/out-www/AIMS.html, Why LilyPond?}
@item @uref{../misc/out-www/interview.html, Answers} to the Brave GNU world standard questions.
+@item @uref{../windows/out-www/lily-wins.html, Lily Wins}
@end itemize
xdvi test
@end example
+@c FIXME: should we say anything on xdvi-gs interaction?
+
You should see the following in a window next to some buttons.
@lilypond
\score {
@cindex PostScript
@cindex .ps
+
@unnumberedsubsec Windows
-@strong{[TODO]}
-* setting of env vars (TFMFONTS,MFINPUTS,TEXINPUTS)
+On windows, you open a LilyPond shell, and then you invoke ly2dvi
+compile your lilypond source file, just like on Unix:
+
+@example
+ly2dvi -P test
+@end example
+
+You will see the following on your screen:
+
+@c FIXME: leave this out, just refer to unix section?
+@c FIXME: commands run in dos shell: we can't redirect output
+@example
+GNU LilyPond 1.3.147
+Now processing: `C:\cygwin\home\tim\ly\test.ly'
+Parsing...
+Interpreting music...[1]
+Preprocessing elements...
+Calculating column positions... [2]
+paper output to test.tex...
+
+This is TeX, Version 3.14159 (MiKTeX 2)
+LaTeX2e <2000/06/01>
+Babel <v3.6Z> and hyphenation patterns for english, french, german, ngerman, du
+mylang, nohyphenation, loaded.
+
+(test.latex (C:\Program Files\MiKTeX\tex\latex\base\article.cls
+Document Class: article 2000/05/19 v1.4b Standard LaTeX document class
+(C:\Program Files\MiKTeX\tex\latex\base\size10.clo))
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\geometry.sty
+(C:\Program Files\MiKTeX\tex\latex\graphics\keyval.sty))
+(C:\Program Files\MiKTeX\tex\latex\base\inputenc.sty
+(C:\Program Files\MiKTeX\tex\latex\base\latin1.def))
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\titledefs.tex)
+No file test.aux.
+(test.tex
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\lilyponddefs.tex
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\lilypond-latex.tex
+LaTeX definitions)
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\feta20.tex)
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\lily-ps-defs.tex)
+[footer empty]
+(C:\cygwin\usr\lilypond-1.3.147\share\lilypond\tex\fetdefs.tex)))
+Overfull \hbox (15.0pt too wide) in paragraph at lines 22--26
+[] $[]$
+[1] (test.aux) )
+(see the transcript file for additional information)
+Output written on test.dvi (1 page, 4292 bytes).
+Transcript written on test.log.
+This is dvips(k) 5.86 Copyright 1999 Radical Eye Software (www.radicaleye.com)
+' TeX output 2001.04.12:0033' -> test.ps
+<texc.pro><special.pro>. [1]
+Running LilyPond...
+Analyzing test.tex...
+Running LaTeX...
+Running dvips...
+PS output to test.ps...
+DVI output to test.dvi...
+@end example
+
+To view the @code{test.dvi} output, run Yap
+
+@example
+yap test
+@end example
+
+You should see the following in a window
+@lilypond
+\score {
+ \notes { c'4 e' g' }
+}
+@end lilypond
+
+@c FIXME: talk about newer Yap versions, proper gs installation?
+When you're satisfied with the result, you can print from within Yap
+(File/Print). Note that Yap may not display embedded PostScript symbols
+such as beams and slurs. Don't worry, they'll be printed anyway.
+
+You can also print the PostScript file directly from the
+command line using GSview:
+
+@example
+gsview32 /s test.ps
+@end example
-* dvi viewer doesn't display postscript
@node The first tune
EXTRA_DIST_FILES = LilyPond.ico $(wildcard *.sh *.patch)
-STEPMAKE_TEMPLATES=documentation
+STEPMAKE_TEMPLATES=documentation texinfo
include $(depth)/make/stepmake.make
-default:
+default: local-doc
+
+local-WWW:
+
-Binary files ../cinstall/LilyPond.ico and ./LilyPond.ico differ
+Only in .: LilyPond.ico
diff -urN ../cinstall/Makefile.in ./Makefile.in
--- ../cinstall/Makefile.in Thu Feb 8 05:55:22 2001
-+++ ./Makefile.in Sun Apr 8 19:54:54 2001
-@@ -130,11 +130,15 @@
++++ ./Makefile.in Tue Apr 10 19:20:14 2001
+@@ -130,11 +130,16 @@
@chmod a-x $@
clean:
- rm -f *.o *.rc $(PROGS)
+- $(MAKE) -C zlib clean
+ rm -f *.o $(PROGS)
- $(MAKE) -C zlib clean
++ $(MAKE) -C zlib $@
realclean: clean
rm -f Makefile config.cache
++ rm -f *.d
+ rm -f inilex.c iniparse.c iniparse.h version.c config.log config.status *.d
+
+
$(SHELL) $(updir1)/mkinstalldirs $(bindir) $(etcdir)
diff -urN ../cinstall/desktop.cc ./desktop.cc
--- ../cinstall/desktop.cc Sat Nov 11 05:55:16 2000
-+++ ./desktop.cc Sun Apr 8 21:52:48 2001
-@@ -85,6 +85,11 @@
++++ ./desktop.cc Tue Apr 10 19:15:01 2001
+@@ -79,9 +79,7 @@
+ "done",
+ "",
+ "export MAKE_MODE=unix",
+- "export PS1='\\[\\033]0;\\w\\007",
+- "\\033[32m\\]\\u@\\h \\[\\033[33m\\w\\033[0m\\]",
+- "$ '",
++ "export PS1='\\[\\033]0;\\w\\007\\033[32m\\]\\u@\\h \\[\\033[33m\\w\\033[0m\\]$ '",
"",
"cd \"$HOME\"",
"",
-+ "PATH=\"/usr/lilypond/bin:$PATH\"",
-+ "if [ ! -e \"/usr/lilypond\" ]; then",
-+ " ln -s `tail -1 /usr/lilypond-*` /usr/lilypond",
-+ "fi",
-+ "",
- "test -f ./.bashrc && . ./.bashrc",
- 0
- };
-@@ -197,6 +202,30 @@
+@@ -197,6 +195,30 @@
}
static void
make_etc_profile ()
{
char *fname = concat (root_dir, "/etc/profile", 0);
-@@ -299,11 +328,11 @@
+@@ -299,11 +321,11 @@
}
static void
if (rsrc == NULL)
{
fatal ("FindResource failed");
-@@ -323,7 +352,7 @@
+@@ -323,7 +345,7 @@
static void
do_desktop_setup()
{
make_cygwin_bat ();
make_etc_profile ();
-@@ -335,6 +364,17 @@
+@@ -335,6 +357,17 @@
if (root_desktop) {
desktop_icon ("Cygwin", batname);
#define IDC_SOURCE_DOWNLOAD 1000
#define IDC_SOURCE_NETINST 1001
#define IDC_SOURCE_CWD 1002
+Common subdirectories: ../cinstall/zlib and ./zlib
--- /dev/null
+#!/bin/bash
+
+PATH="//c/Program Files/Python:$PATH"
--- /dev/null
+#!/bin/bash
+# /etc/profile.d/lily-tex.sh -- Check for TeX or try to setup MiKTeX
+
+texmf='//c/Program Files/MiKTeX'
+texmf_bin='//c/Program Files/MiKTeX/miktex'
+
+if [ ! -e /usr/share/texmf ]; then
+ echo /usr/share/texmf not found
+ if [ -e "$texmf" ]; then
+ ln -s "$texmf" /usr/share/texmf
+ echo MiKTeX found: linked to "$texmf"
+ else
+ echo setup /usr/share/texmf yourself
+ fi
+fi
+if type -p tex; then
+ echo no TeX in PATH
+ if [ -e "$texmf_bin" ]; then
+ echo MiKTeX found: added "$texmf_bin" to PATH
+ PATH=`cygpath -u "$texmf/miktex"`:"$PATH"
+ fi
+fi
+
--- /dev/null
+#!/bin/bash
+# /etc/profile.d/lilypond-profile.z.sh -- profile additions for Windows
+# run after lilypond-profile.sh
+
+POSIX_GS_LIB="$(cygpath -apu $GS_LIB)"
+WINDOWS_GS_LIB="$(cygpath -apw $POSIX_GS_LIB)"
+
+POSIX_GS_FONTPATH="$(cygpath -apu $GS_FONTPATH)"
+WINDOWS_GS_FONTPATH="$(cygpath -apw $POSIX_GS_FONTPATH)"
+
+POSIX_TEXINPUTS="$(cygpath -apu $TEXINPUTS)"
+WINDOWS_TEXINPUTS="$(cygpath -apw $POSIX_TEXINPUTS)"
+
+POSIX_TFMFONTS="$(cygpath -apu $TFMFONTS)"
+WINDOWS_TFMFONTS="$(cygpath -apw $POSIX_TFMFONTS)"
+
+POSIX_MFINPUTS="$(cygpath -apu $MFINPUTS)"
+WINDOWS_MFINPUTS="$(cygpath -apw $POSIX_MFINPUTS)"
+
+# we assume running dos-based TeX, ie, MiKTeX
+# maybe move to /etc/profile.d/lily-tex.sh
+TEXINPUTS="$WINDOWS_TEXINPUTS"
+# TFMFONTS="$WINDOWS_TFMFONTS"
+
+rm -f /usr/lilypond
+# ugh
+# ln -s /usr/lilypond-@TOPLEVEL_VERSION@ /usr/lilypond
+lily=$(ls -utrd1 /usr/lilypond-* | tail -1)
+ln -s $lily /usr/lilypond
+
+PATH="/usr/lilypond/bin:$PATH"
+PATH="$lily/bin:$PATH"
+
+# gsv-2.7-gs-5.50
+PATH="//c/gstools/gsview://c/gstools/gs:$PATH"
+
+# gsv-3.6-gs-6.50
+PATH="//c/Ghostgum/gsview://c/gstools/gs:$PATH"
+
+# python-1.5.2
+PATH="//c/Program Files/Python:$PATH"
+PATH="//c/Program Files/MiKTeX/miktex:$PATH"
+
--- /dev/null
+#!/bin/bash
+# ly2dvi.sh -- ly2dvi wrapper for Windows
+
+if echo | python - >/dev/null 2>&1; then
+ echo
+else
+ cat <<EOF
+Python not found. Install python-1.5.2 from www.python.org.
+Make sure python.exe in in your PATH
+EOF
+ exit 1
+fi
+python $(cygpath -w /usr/lilypond/bin/ly2dvi.py) $*
#include "config.h"
#include <stdio.h>
#include <errno.h>
+#include <limits.h>
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#ifdef __CYGWIN__
+#include <sys/cygwin.h>
+
+// URGURG
+#include "../lily/include/scm-option.hh"
+#endif
+
#include "file-path.hh"
#define EXTSEP '.'
#endif
+
+
+#ifdef __CYGWIN__
+static String
+dos_to_posix (String path)
+{
+ char buf[PATH_MAX];
+ char *filename = path.copy_ch_p ();
+ /* urg, wtf? char const* argument gets modified! */
+ cygwin_conv_to_posix_path (filename, buf);
+ delete filename;
+ return buf;
+}
+
+static String
+dos_to_posix_list (String path)
+{
+ char *filename = path.copy_ch_p ();
+ int len = cygwin_win32_to_posix_path_list_buf_size (filename);
+ if (len < PATH_MAX)
+ len = PATH_MAX;
+ char *buf = new char[len];
+ /* urg, wtf? char const* argument gets modified! */
+ cygwin_win32_to_posix_path_list (filename, buf);
+ delete filename;
+
+ String ret = buf;
+ delete buf;
+ return ret;
+}
+#endif /* __CYGWIN__ */
+
/* Join components to full path. */
String
Path::str () const
Path
split_path (String path)
{
+#ifdef __CYGWIN__
+ /* All system functions would work, even if we don't convert to
+ posix path, but we'd think that \foe\bar\baz.ly is in the cwd. */
+ if (testing_level_global & 1)
+ path = dos_to_posix (path);
+#endif
+
Path p;
int i = path.index_i (ROOTSEP);
if (i >= 0)
void
File_path::parse_path (String p)
{
+#ifdef __CYGWIN__
+ if (testing_level_global & 4)
+ p = dos_to_posix_list (p);
+#endif
+
int l;
while ((l = p.length_i ()) )
return false;
fclose (f);
- push (s);
+ add (s);
return true;
}
void
File_path::add (String s)
{
+#ifdef __CYGWIN__
+ if (testing_level_global & 2)
+ s = dos_to_posix (s);
+#endif
+
push (s);
}
extern bool dependency_global_b;
extern String dependency_prefix_global;
extern Array<String> dump_header_fieldnames_global;
-extern bool midi_debug_global_b;
extern bool no_paper_global_b;
extern String output_format_global;
extern String output_name_global;
--- /dev/null
+/*
+ scm-option.hh -- declare Scheme options
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2001 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+#ifndef SCM_OPTION_HH
+#define SCM_OPTION_HH
+
+/* options */
+extern bool midi_debug_global_b;
+extern int testing_level_global;
+
+#endif /* SCM_OPTION_HH */
follow regular localisation guidelines).
*/
static Long_option_init options_static[] = {
+ {_i ("EXPR"), "evaluate", 'e',_i ("evalute EXPR as Scheme after .scm init is read")},
/* another bug in option parser: --output=foe is taken as an abbreviation
for --output-format */
- // {_i ("EXT"), "output-format", 'f', _i ("use output format EXT (scm, ps, tex or as)")},
-
{_i ("EXT"), "format", 'f', _i ("use output format EXT (scm, ps, tex or as)")},
{0, "help", 'h', _i ("this help")},
{_i ("FIELD"), "header", 'H', _i ("write header field to BASENAME.FIELD")},
{_i ("DIR"), "include", 'I', _i ("add DIR to search path")},
{_i ("FILE"), "init", 'i', _i ("use FILE as init file")},
{0, "dependencies", 'M', _i ("write Makefile dependencies for every input file")},
- {_i ("DIR"), "dep-prefix", 'P', _i ("prepend DIR to dependencies")},
- {_i ("EXPR"), "evaluate", 'e',_i ("evalute EXPR as Scheme after .scm init is read")},
{0, "no-paper", 'm', _i ("produce MIDI output only")},
{_i ("FILE"), "output", 'o', _i ("write output to FILE")},
+ {_i ("DIR"), "dep-prefix", 'P', _i ("prepend DIR to dependencies")},
{0, "safe", 's', _i ("inhibit file output naming and exporting")},
{0, "version", 'v', _i ("print version number")},
{0, "verbose", 'V', _i ("verbose")},
#include "midi-stream.hh"
#include "audio-item.hh"
#include "duration.hh"
+#include "scm-option.hh"
#include "killing-cons.tcc"
#include "midi-item.hh"
#include "midi-stream.hh"
#include "debug.hh"
+#include "scm-option.hh"
Midi_stream::Midi_stream (String filename)
{
--- /dev/null
+/*
+ scm-option.cc -- implement option setting from Scheme
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include <iostream.h>
+#include "string.hh"
+#include "lily-guile.hh"
+#include "scm-option.hh"
+
+/*
+ TODO: mooie onschuldige test, en koel om allerleide dingen te kunnen zetten,
+ maar is dit nou wel handig voor gebruikert?
+
+ -X, of -fps is hendiger dan
+
+ -e "(set-lily-option 'midi-debug #t)'
+
+ [niet voor niets tiepo in 139 announs..]
+
+*/
+
+
+/* Write midi as formatted ascii stream? */
+bool midi_debug_global_b;
+/* General purpose testing flag */
+int testing_level_global;
+
+
+/*
+
+ TODO: verzin iets tegen optie code bloot
+
+
+ other interesting stuff to add:
+
+@item -T,--no-timestamps
+don't timestamp the output
+
+@item -t,--test
+Switch on any experimental features. Not for general public use.
+
+ */
+
+SCM
+set_lily_option (SCM var, SCM val)
+{
+ if (var == ly_symbol2scm ("help"))
+ {
+ cout << '\n';
+ cout << _ ("Scheme options:");
+ cout << "help";
+ cout << "midi-debug (boolean)";
+ cout << "testing-level (int)";
+ cout << '\n';
+ exit (0);
+ }
+ else if (var == ly_symbol2scm ("midi-debug"))
+ {
+ midi_debug_global_b = to_boolean (val);
+ }
+ else if (var == ly_symbol2scm ("testing-level"))
+ {
+ testing_level_global = gh_scm2int (val);
+ }
+ else if (var == ly_symbol2scm ("find-old-relative"))
+ {
+ /*
+ Seems to have been broken for some time!
+
+ @item -Q,--find-old-relative
+ show all changes needed to convert a file to relative octave syntax.
+
+
+
+ */
+
+ ;
+
+ }
+
+ return SCM_UNSPECIFIED;
+}
+
+
+static void
+init_functions ()
+{
+ scm_make_gsubr ("set-lily-option", 2, 0, 0, (Scheme_function_unknown)set_lily_option);
+}
+
+
+ADD_SCM_INIT_FUNC (init_functions_sopt, init_functions);
+
+
* multiple \score blocks?
- * windows-sans-cygwin compatibility? rm -rf, cp file... dir
-
'''
import re
import getopt
import sys
+import shutil
import __main__
import operator
import tempfile
track_dependencies_p = 0
dependency_files = []
-# be verbose?
-verbose_p = 0
-
# lily_py.py -- options and stuff
#
NO WARRANTY.'''))
sys.stdout.write ('\n')
+if ( os.name == 'posix' ):
+ errorport=sys.stderr
+else:
+ errorport=sys.stdout
+
def progress (s):
- sys.stderr.write (s + '\n')
+ errorport.write (s + '\n')
def warning (s):
- sys.stderr.write (_ ("warning: ") + s)
- sys.stderr.write ('\n')
-
+ progress (_ ("warning: ") + s)
def error (s):
- sys.stderr.write (_ ("error: ") + s)
- sys.stderr.write ('\n')
+ progress (_ ("error: ") + s)
raise _ ("Exiting ... ")
def getopt_args (opts):
if not keep_temp_dir_p:
if verbose_p:
progress (_ ("Cleaning %s...") % temp_dir)
- system ('rm -rf %s' % temp_dir)
+ shutil.rmtree (temp_dir)
def set_setting (dict, key, val):
def run_lilypond (files, outbase, dep_prefix):
opts = '--output=%s.tex' % outbase
- opts = opts + ' ' + string.join (map (lambda x : '-I ' + x, include_path))
+ opts = opts + ' ' + string.join (map (lambda x : '-I ' + x,
+ include_path))
if paper_p:
- opts = opts + ' ' + string.join (map (lambda x : '-H ' + x, fields))
+ opts = opts + ' ' + string.join (map (lambda x : '-H ' + x,
+ fields))
else:
opts = opts + ' --no-paper'
first = 0
s = s + r'''
-% I don't see why we want to clobber the footer here
+% I do not see why we want to clobber the footer here
\vfill\hfill\parbox{\textwidth}{\mbox{}\makelilypondtagline}
%\makeatletter
%\renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}%
f.write (s)
f.close ()
- cmd = 'latex \\\\nonstopmode \\\\input %s' % outbase + '.latex'
+ if ( os.name == 'posix' ):
+ cmd = 'latex \\\\nonstopmode \\\\input %s' % outbase + '.latex'
+ else:
+ cmd = 'latex \\nonstopmode \\input %s' % outbase + '.latex'
if not verbose_p:
progress ( _("Running %s...") % 'LaTeX')
cmd = cmd + ' 1> /dev/null 2> /dev/null'
opts = ''
if extra['papersize']:
- opts = opts + ' -t %s' % extra['papersize'][0]
+ opts = opts + ' -t%s' % extra['papersize'][0]
if extra['orientation'] and extra['orientation'][0] == 'landscape':
- opts = opts + ' -t landscape'
+ opts = opts + ' -tlandscape'
- cmd = 'dvips %s -o %s %s' % (opts, outbase + '.ps', outbase + '.dvi')
+ cmd = 'dvips %s -o%s %s' % (opts, outbase + '.ps', outbase + '.dvi')
if not verbose_p:
progress ( _("Running %s...") % 'dvips')
- cmd = cmd + ' 2> /dev/null'
+ if os.name == 'posix':
+ cmd = cmd + ' 1> /dev/null 2> /dev/null'
system (cmd)
warranty ()
sys.exit (0)
+
+def cp_to_dir (pattern, dir):
+ "Copy files matching re PATTERN from cwd to DIR"
+ # Duh. Python style portable: cp *.EXT OUTDIR
+ # system ('cp *.%s %s' % (ext, outdir), 1)
+ files = filter (lambda x, p=pattern: re.match (p, x), os.listdir ('.'))
+ map (lambda x, d=dir: shutil.copy2 (x, os.path.join (d, x)), files)
+
+# Python < 1.5.2 compatibility
+#
# On most platforms, this is equivalent to
#`normpath(join(os.getcwd()), PATH)'. *Added in Python version 1.5.2*
-def compat_abspath (path):
- return os.path.normpath (os.path.join (os.getcwd (), path))
+if os.path.__dict__.has_key ('abspath'):
+ abspath = os.path.abspath
+else:
+ def abspath (path):
+ return os.path.normpath (os.path.join (os.getcwd (), path))
+
+if os.__dict__.has_key ('makedirs'):
+ makedirs = os.makedirs
+else:
+ def makedirs (dir, mode=0777):
+ system ('mkdir -p %s' % dir)
+
+def mkdir_p (dir, mode=0777):
+ if not os.path.isdir (dir):
+ makedirs (dir, mode)
-include_path = map (compat_abspath, include_path)
+include_path = map (abspath, include_path)
original_output = output
for i in ('.dvi', '.latex', '.ly', '.ps', '.tex'):
output = strip_extension (output, i)
- files = map (compat_abspath, files)
+ files = map (abspath, files)
if os.path.dirname (output) != '.':
dep_prefix = os.path.dirname (output)
dep_prefix = 0
reldir = os.path.dirname (output)
- (outdir, outbase) = os.path.split (compat_abspath (output))
+ (outdir, outbase) = os.path.split (abspath (output))
setup_environment ()
setup_temp ()
run_dvips (outbase, extra)
if outdir != '.' and (track_dependencies_p or targets.keys ()):
- system ('mkdir -p %s' % outdir)
+ mkdir_p (outdir, 0777)
# add DEP to targets?
if track_dependencies_p:
for i in targets.keys ():
ext = string.lower (i)
- if re.match ('.*[.]%s' % ext, string.join (os.listdir ('.'))):
- system ('cp *.%s %s' % (ext, outdir))
+ cp_to_dir ('.*\.%s$' % ext, outdir)
outname = outbase + '.' + string.lower (i)
abs = os.path.join (outdir, outname)
if reldir != '.':
else:
# FIXME
help ()
- sys.stderr.write ('\n')
+ progress ('\n')
try:
error (_ ("no FILEs specified, can't invoke as filter"))
except:
latest = find_latest (url)
if os.path.isdir ('%s/%s' % (build_root, latest)):
- progress (_ ("latest is %s") % latest)
+ progress (_ ("latest is: %s") % latest)
progress (_ ("relax, %s is up to date" % package_name))
sys.exit (0)