From d232ec8f99f1bcdf4781119ba28fc94a24a1e8db Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 13 May 2005 15:45:33 +0000 Subject: [PATCH] * Documentation/pictures/lilypond-48.xpm: New file. * flower/file-path.cc (to_string): Bugfix: use PATHSEP. * ly/Welcome_to_LilyPond.ly: New file. * lily/main.cc (main): Only identify if we have a terminal. * scm/backend-library.scm (postscript->png) (postscript->pdf): Fix file name quoting for GS/MINGW (ie, non-/bin/sh). --- ChangeLog | 16 + Documentation/pictures/GNUmakefile | 30 +- Documentation/pictures/lilypond-48.xpm | 407 +++++++++++++++++++++++++ flower/file-name.cc | 17 +- flower/file-path.cc | 2 +- flower/include/string.hh | 4 +- flower/string.cc | 19 +- lily/GNUmakefile | 7 +- lily/main.cc | 5 +- lily/slur.cc | 3 - ly/Welcome_to_LilyPond.ly | 31 ++ scm/backend-library.scm | 6 +- scm/lily.scm | 48 +-- stepmake/aclocal.m4 | 13 +- 14 files changed, 550 insertions(+), 58 deletions(-) create mode 100644 Documentation/pictures/lilypond-48.xpm create mode 100644 ly/Welcome_to_LilyPond.ly diff --git a/ChangeLog b/ChangeLog index ef07d77fb7..5a44f07a14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2005-05-13 Jan Nieuwenhuizen + + * Documentation/pictures/lilypond-48.xpm: New file. + + * flower/file-path.cc (to_string): Bugfix: use PATHSEP. + + * ly/Welcome_to_LilyPond.ly: New file. + + * lily/main.cc (main): Only identify if we have a terminal. + + * scm/backend-library.scm (postscript->png) + (postscript->pdf): Fix file name quoting for GS/MINGW (ie, + non-/bin/sh). + 2005-05-13 Heikki Junes * Documentation/topdocs/AUTHORS.texi: polish, update. @@ -36,6 +50,8 @@ 2005-05-12 Jan Nieuwenhuizen + * stepmake/aclocal.m4: Typo. + * flower/string.cc (substitute): Take two strings or two characters. Update callers. diff --git a/Documentation/pictures/GNUmakefile b/Documentation/pictures/GNUmakefile index 9b432aa92c..30873a98e3 100644 --- a/Documentation/pictures/GNUmakefile +++ b/Documentation/pictures/GNUmakefile @@ -6,12 +6,36 @@ OUTGIF_FILES = $(addprefix $(outdir)/,$(XPM_FILES:.xpm=.gif)) OUTPNG_FILES = $(addprefix $(outdir)/,$(XPM_FILES:.xpm=.png)) EXTRA_DIST_FILES= $(XPM_FILES) -# OUT_DIST_FILES = $(package-icon) +OUT_DIST_FILES = $(icon) #$(package-icon) + +icon = $(outdir)/lilypond.ico +ICON_SIZES=48 32 16 + +#$(outdir)/lilypond.ico: platte-lucht-kikker-ly-48.xpm include $(depth)/make/stepmake.make -default: # $(package-icon) -local-dist: # $(package-icon) +default: $(icon) +local-dist: $(icon) # $(package-icon) + +$(outdir)/%.ico: $(ICON_SIZES:%=$(outdir)/\%-%.png) $(ICON_SIZES:%=$(outdir)/\%-%-8.png) + #convert +adjoin $^ $@ + icotool --output=$@ --create $^ + +# cancel default rule that breaks transparency +$(outdir)/%.png: %.xpm + +$(outdir)/%-48.png: %-48.xpm + convert -sample 48 -depth 24 $< $@ + +$(outdir)/%-32.png: %-48.xpm + convert -depth 24 -sample 32 $< $@ + +$(outdir)/%-16.png: %-48.xpm + convert -depth 24 -sample 16 $< $@ + +$(outdir)/%-8.png: $(outdir)/%.png + convert -depth 8 $< $@ xgifs: $(OUTGIF_FILES) pngs: $(OUTPNG_FILES) diff --git a/Documentation/pictures/lilypond-48.xpm b/Documentation/pictures/lilypond-48.xpm new file mode 100644 index 0000000000..aef1fe9f29 --- /dev/null +++ b/Documentation/pictures/lilypond-48.xpm @@ -0,0 +1,407 @@ +/* XPM */ +static char * platte_lucht_kikker_grote_ly_48_xpm[] = { +"48 48 356 2", +" c None", +". c #0D4EF1", +"+ c #FFFFFF", +"@ c #FDFDFE", +"# c #F9FAFE", +"$ c #EBF0FD", +"% c #D8E2FC", +"& c #C5D4FB", +"* c #B4C8FA", +"= c #A8BFF9", +"- c #87A7F8", +"; c #3C70F3", +"> c #D4E0FC", +", c #5B87F5", +"' c #000000", +") c #9F9F9F", +"! c #535353", +"~ c #171717", +"{ c #F0F0F0", +"] c #A6A6A6", +"^ c #B0B0B0", +"/ c #D1DDFC", +"( c #5885F5", +"_ c #E4E4E4", +": c #0E0E0E", +"< c #6D6D6D", +"[ c #F2F2F2", +"} c #1A1A1A", +"| c #515151", +"1 c #D0DCFC", +"2 c #5683F5", +"3 c #929292", +"4 c #030303", +"5 c #D0D0D0", +"6 c #727272", +"7 c #0D0D0D", +"8 c #CFDCFC", +"9 c #5583F5", +"0 c #FDFDFD", +"a c #353535", +"b c #2B2B2B", +"c c #040404", +"d c #CEDBFC", +"e c #5582F5", +"f c #0D4EF0", +"g c #0D4EEF", +"h c #0D4FEE", +"i c #CFCFCF", +"j c #5584F1", +"k c #1154E4", +"l c #145ADA", +"m c #1962CB", +"n c #1F6CB9", +"o c #2271AF", +"p c #0E50EC", +"q c #6F6F6F", +"r c #CFDDF8", +"s c #5F94D3", +"t c #297C9A", +"u c #338C7D", +"v c #39966A", +"w c #3E9F5A", +"x c #41A352", +"y c #1C67C1", +"z c #1357DE", +"A c #D5E6E7", +"B c #75B891", +"C c #45AA46", +"D c #4AB335", +"E c #4DB72D", +"F c #4FBA27", +"G c #50BC24", +"H c #3B9A63", +"I c #2F8687", +"J c #1F6DB7", +"K c #1256E1", +"L c #DAEED9", +"M c #82CC6B", +"N c #51BE21", +"O c #52C01D", +"P c #53C219", +"Q c #54C318", +"R c #54C317", +"S c #46AC42", +"T c #399768", +"U c #2677A3", +"V c #155CD6", +"W c #0E4FED", +"X c #3B3B3B", +"Y c #5F5F5F", +"Z c #969696", +"` c #DCF1D2", +" . c #86D35E", +".. c #55C415", +"+. c #55C514", +"@. c #55C513", +"#. c #53C11A", +"$. c #50BD22", +"%. c #4AB334", +"&. c #3FA057", +"*. c #2A7E98", +"=. c #165DD5", +"-. c #575757", +";. c #DBF0D5", +">. c #87D65A", +",. c #56C613", +"'. c #52BF1E", +"). c #4CB62F", +"!. c #3FA156", +"~. c #155BD7", +"{. c #D4E5EA", +"]. c #82CD68", +"^. c #3D9D5E", +"/. c #2474A9", +"(. c #1156E2", +"_. c #F0F4FE", +":. c #CCD9FC", +"<. c #A9C0FA", +"[. c #95B1F8", +"}. c #8CABF8", +"|. c #89A8F8", +"1. c #86A7F8", +"2. c #86A6F8", +"3. c #86A7F5", +"4. c #8EB3DF", +"5. c #9BC9B7", +"6. c #97C4C0", +"7. c #89ABED", +"8. c #6D94F6", +"9. c #62BA5A", +"0. c #5AC719", +"a. c #62CA24", +"b. c #6BCD31", +"c. c #63CA25", +"d. c #51BE20", +"e. c #49B237", +"f. c #37946F", +"g. c #1D68BF", +"h. c #287B9C", +"i. c #43A74B", +"j. c #4FBB26", +"k. c #37936F", +"l. c #318982", +"m. c #1256E0", +"n. c #2372AD", +"o. c #4EBA28", +"p. c #69CC2E", +"q. c #85D655", +"r. c #9CDD75", +"s. c #B1E492", +"t. c #87D657", +"u. c #5DC81E", +"v. c #1A63C8", +"w. c #358F77", +"x. c #4BB433", +"y. c #53C11B", +"z. c #38956C", +"A. c #1B65C5", +"B. c #83CE68", +"C. c #C6EBAF", +"D. c #D9F2CB", +"E. c #E5F6DB", +"F. c #9FDE79", +"G. c #89D75A", +"H. c #A5E082", +"I. c #7BD246", +"J. c #0F52E8", +"K. c #44A848", +"L. c #2A7E96", +"M. c #1054E5", +"N. c #4287B8", +"O. c #B9E3AA", +"P. c #F5FBF1", +"Q. c #F8FCF5", +"R. c #AAE288", +"S. c #92DA67", +"T. c #D9F2CA", +"U. c #D8F2C9", +"V. c #ACE38B", +"W. c #297D99", +"X. c #45AB44", +"Y. c #54C416", +"Z. c #6ACC2F", +"`. c #97DC6E", +" + c #77B0B3", +".+ c #367EB8", +"++ c #A0D1A7", +"@+ c #FBFDFA", +"#+ c #FDFDF9", +"$+ c #E5F5D9", +"%+ c #E1F5D6", +"&+ c #F7FCF4", +"*+ c #EFF9E9", +"=+ c #91DA66", +"-+ c #57C615", +";+ c #308785", +">+ c #49B139", +",+ c #79D244", +"'+ c #B7E69B", +")+ c #DCF3CE", +"!+ c #D8EED7", +"~+ c #DFEDD5", +"{+ c #F7F4B6", +"]+ c #FFF5A6", +"^+ c #FDF6AF", +"/+ c #FCFADD", +"(+ c #F1FAEC", +"_+ c #ABE28A", +":+ c #1963C9", +"<+ c #369173", +"[+ c #4CB630", +"}+ c #5FC91F", +"|+ c #8ED961", +"1+ c #CEEEBB", +"2+ c #FCF5B0", +"3+ c #FEEE65", +"4+ c #FFEB4D", +"5+ c #FFEC55", +"6+ c #FFF393", +"7+ c #F5F9E0", +"8+ c #B0E490", +"9+ c #65CB29", +"0+ c #1A64C7", +"a+ c #379370", +"b+ c #4CB62E", +"c+ c #65CB28", +"d+ c #9CDD76", +"e+ c #DBF2CD", +"f+ c #F5FBF2", +"g+ c #FFF07B", +"h+ c #FFEB49", +"i+ c #FFEB45", +"j+ c #FFED58", +"k+ c #FCFAD8", +"l+ c #EBF7E3", +"m+ c #D7F1C8", +"n+ c #C2EAAA", +"o+ c #59C717", +"p+ c #64CA27", +"q+ c #70CE38", +"r+ c #77D141", +"s+ c #B3E592", +"t+ c #FCEF77", +"u+ c #FFFBDB", +"v+ c #FCFDFA", +"w+ c #F3FBEF", +"x+ c #D5F0C4", +"y+ c #94DB6A", +"z+ c #61C922", +"A+ c #175ED1", +"B+ c #328B7E", +"C+ c #90D964", +"D+ c #FFEE66", +"E+ c #FAF18D", +"F+ c #F4F8DD", +"G+ c #F9FCF6", +"H+ c #ECF8E5", +"I+ c #C0E9A7", +"J+ c #80D44E", +"K+ c #5BC81B", +"L+ c #4DB412", +"M+ c #449E12", +"N+ c #439C17", +"O+ c #44A52F", +"P+ c #1358DC", +"Q+ c #2C8192", +"R+ c #47AD40", +"S+ c #51BF1F", +"T+ c #D3F0C1", +"U+ c #F3FAEE", +"V+ c #FBFBEB", +"W+ c #F7F5B5", +"X+ c #F9F39E", +"Y+ c #FFF6B1", +"Z+ c #FAFADB", +"`+ c #B7E697", +" @ c #83D551", +".@ c #AEE38F", +"+@ c #71CF39", +"@@ c #57C614", +"#@ c #4EB512", +"$@ c #347910", +"%@ c #285B10", +"&@ c #275B10", +"*@ c #30721F", +"=@ c #2B7A7E", +"-@ c #42A64D", +";@ c #50BD23", +">@ c #85D554", +",@ c #BEE9A5", +"'@ c #E3F5D9", +")@ c #EDF8E6", +"!@ c #BAE79B", +"~@ c #FBFCF9", +"{@ c #B4E596", +"]@ c #66CB2A", +"^@ c #3C8911", +"/@ c #275A10", +"(@ c #265710", +"_@ c #265911", +":@ c #266553", +"<@ c #0F51EA", +"[@ c #1D69BE", +"}@ c #8BD85D", +"|@ c #A4E081", +"1@ c #F1FAEB", +"2@ c #E9F7E0", +"3@ c #CDEEBA", +"4@ c #388211", +"5@ c #265810", +"6@ c #265711", +"7@ c #225E54", +"8@ c #145AD9", +"9@ c #2D838E", +"0@ c #46AD41", +"a@ c #71CF38", +"b@ c #92DA68", +"c@ c #C9EDB4", +"d@ c #B4E597", +"e@ c #75D03E", +"f@ c #429811", +"g@ c #2A6010", +"h@ c #265A1B", +"i@ c #1B5887", +"j@ c #0F52E9", +"k@ c #2170B1", +"l@ c #3D9D5D", +"m@ c #52C01C", +"n@ c #6ECE35", +"o@ c #72CF3A", +"p@ c #5BC71A", +"q@ c #409517", +"r@ c #2D6915", +"s@ c #2A641F", +"t@ c #23656F", +"u@ c #2B8093", +"v@ c #43A64C", +"w@ c #4FBB27", +"x@ c #0E50EB", +"y@ c #318A80", +"z@ c #1053E7", +"A@ c #1C66C2", +"B@ c #328C7E", +"C@ c #1053E6", +"D@ c #2F8786", +"E@ c #41A54F", +"F@ c #4BB531", +"G@ c #1860CF", +"H@ c #3A9867", +"I@ c #1B65C6", +"J@ c #2678A2", +"K@ c #348E78", +"L@ c #3D9E5C", +"M@ c #47AE3E", +"N@ c #175FD0", +"O@ c #2D838D", +" ", +" ", +" . . . . . . . . . . ", +" + + + + + + + + + @ # $ % & * = - ; . . . . . . . . . . . . . ", +"+ + + + + + + + + + + + + + + + + > , . . . . . . . . . . . . . . . ", +"+ + ' ' ) + + ! ' ~ { + + ] ' ' ^ / ( . . . . . . . . . . . . . . . . . ", +"+ + ' ' ) + + _ : ' < + [ } ' | + 1 2 . . . . . . . . . . . . . . . . . . ", +"+ + ' ' ) + + + 3 ' 4 5 6 ' 7 _ + 8 9 . . . . . . . . . . . . . . . . . . . . ", +"+ + ' ' ) + + + 0 a ' b c ' 3 + + d e . . f g h h g f . . . . . . . . . . . . . ", +"+ + ' ' ) + + + + i 4 ' ' a 0 + + d j k l m n o o n m l k p . . . . . . . . . . . ", +"+ + ' ' ) + + + + + q ' ' i + + + r s t u v w x x w v u t y z p . . . . . . . . . ", +"+ + ' ' ) + + + + + ) ' ' + + + + A B C D E F G G F E D C H I J K g . . . . . . . . ", +"+ + ' ' ) + + + + + ) ' ' + + + + L M N O P Q R R Q P O N E S T U V W . . . . . . . . ", +"+ + ' ' X Y Y Y Z + ) ' ' + + + + ` .R ..+.@.@.@.@.+...R #.$.%.&.*.=.W . . . . . . . ", +"+ + ' ' ' ' ' ' -.+ ) ' ' + + + + ;.>.@.,.,.,.,.,.,.,.,.@.+.Q '.).!.*.~.g . . . . . . . ", +"+ + + + + + + + + + + + + + + + + {.].,.,.,.,.,.,.,.,.,.,.@.+.R '.).^./.(.. . . . . . . ", +" _.:.<.[.}.|.- 1.2.3.4.5.6.7.2.2.8.9.,.,.0.a.b.c.,.,.,.,.,.,.+.R d.e.f.g.p . . . . . . . ", +" . . . . . . . K h.i.j.k.l.m.. n.o.p.q.r.s.t.,.,.u.u.,.,.@.+.Q j.i.h.K . . . . . . . ", +" . . . . . . p v.w.x.y...@.z.A.p n.B.C.D.E.F.,.G.H.I.u.,.,.@...y.x.w.v.p . . . . . . ", +" . . . . . . . J.n.!.j.Q @.,.,.K.L.M.N.O.P.Q.R.S.T.U.V.I.u.,.,.@.Q j.!.n.J.. . . . . . . ", +" . . . . . . . m.W.X.d.Y.@.,.,.Z.`. +.+++@+#+$+%+&+*+U.=+-+,.,.@.Y.d.X.W.m.. . . . . . . ", +" . . . . . . . V ;+>+O ..@.,.0.,+'+)+!+~+{+]+^+/+#+(+_+a.,.,.,.@...O >+;+V . . . . . . . ", +" . . . . . . g :+<+[+#.+.@.,.}+|+1+(+@+2+3+4+5+6+7+8+9+,.,.,.,.@.+.#.[+<+:+g . . . . . . ", +" . . . . . . g 0+a+b+P +.@.,.c+d+e+f+#+g+h+i+i+j+k+l+m+n+=+c.,.@.+.P b+a+0+g . . . . . . ", +" . . . . . . g 0+a+b+P +.@.,.o+p+q+r+s+t+h+i+i+j+u+v+w+x+y+z+,.@.+.P b+a+0+g . . . . . . ", +" . . . . . . f A+B+D y.+.@.,.,.,.,.C+%+2+D+4+5+E+F+G+H+I+J+K+,.L+M+N+O+B+A+f . . . . . . ", +" . . . . . . . P+Q+R+S+..@.,.,.,.G.T+U+V+W+X+Y+Z+`+ @.@_++@@@#@$@%@&@*@=@P+. . . . . . . ", +" . . . . . . . M.U -@;@Q @.,.,.u.>@,@'@)@8+!@~@G+{@]@p+9+0.,.^@/@(@(@_@:@M.. . . . . . . ", +" . . . . . . . <@[@v E P +.,.,.-+]@}@,@H.p+|@1@2@3@t.,.,.,.,.4@5@(@(@6@7@<@. . . . . . . ", +" . . . . . . f 8@9@0@N Y.@.,.,.-+]@a@a.,.b@c@d@d+e@,.,.,.,.f@g@(@(@h@i@f . . . . . . ", +" . . . . . . . j@k@l@E m@Y.@.,.,.-+-+,.,.n@J+o@9+p@,.,.,.@.Y.q@r@s@t@j@. . . . . . . ", +" . . . . . . . f V u@v@w@P ..@.,.,.,.,.,.o+p@o+@@,.,.,.@...P w@v@u@V f . . . . . . . ", +" . . . . . . . x@v.y@S w@P Y.@.,.,.,.,.,.,.,.,.,.,.@.Y.P w@S y@v.x@. . . . . . . ", +" . . . . . . . . z@A@B@S o.m@R ..@.@.@.@.@.@.@.@...R m@o.S B@A@z@. . . . . . . . ", +" . . . . . . . f C@A@D@E@F@$.y.P Y.........Y.P y.$.F@E@D@A@C@f . . . . . . . ", +" . . . . . . . . f j@G@t H@C F@w@N '.m@m@'.N w@F@C H@t G@j@f . . . . . . . . ", +" . . . . . . . . . p z I@J@K@L@i.M@>+>+M@i.L@K@J@I@z p . . . . . . . . . ", +" . . . . . . . . . f p K N@g.n.*.O@O@*.n.g.N@K p f . . . . . . . . . ", +" . . . . . . . . . . . f h <@z@(.z z (.z@<@h f . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . f f . . . . . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . . ", +" . . . . . . . . . . ", +" ", +" "}; diff --git a/flower/file-name.cc b/flower/file-name.cc index dd83ac68fc..ac9e6832e0 100644 --- a/flower/file-name.cc +++ b/flower/file-name.cc @@ -48,6 +48,21 @@ dos_to_posix (String file_name) } #endif /* __CYGWIN__ */ +#ifdef __MINGW32__ +/** Use slash as directory separator. On Windows, they can pretty + much be exchanged. */ +static String +slashify (String file_name) +{ + if (file_name.index ('/')) + return file_name; + file_name.substitute ('\\', '/'); + file_name.substitute ("\"", "\\\""); + file_name.substitute ("\'", "\\\'"); + return file_name; +} +#endif /* __MINGW32__ */ + /* Join components to full file_name. */ String File_name::to_string () const @@ -78,7 +93,7 @@ File_name::File_name (String file_name) file_name = dos_to_posix (file_name); #endif #ifdef __MINGW32__ - file_name.substitute ('\\', '/'); + file_name = slashify (file_name); #endif int i = file_name.index (ROOTSEP); diff --git a/flower/file-path.cc b/flower/file-path.cc index 07b278ce4a..3711cf7c2f 100644 --- a/flower/file-path.cc +++ b/flower/file-path.cc @@ -169,7 +169,7 @@ File_path::to_string () const { s = s + elem (i); if (i < n - 1) - s += ":"; + s += ::to_string (PATHSEP); } return s; } diff --git a/flower/include/string.hh b/flower/include/string.hh index dbe289b3ea..13d6dee460 100644 --- a/flower/include/string.hh +++ b/flower/include/string.hh @@ -144,8 +144,8 @@ public: /// convert to a double double to_double () const; - void substitute (String find, String replace); - void substitute (char find, char replace); + String substitute (String find, String replace); + String substitute (char find, char replace); }; /* diff --git a/flower/string.cc b/flower/string.cc index 0280508d67..32ac7fca60 100644 --- a/flower/string.cc +++ b/flower/string.cc @@ -382,17 +382,26 @@ String::print_on (ostream &os) const } #endif -void +String String::substitute (String find, String replace) { - int n = replace.length (); - for (int i = index (find); i > - 1; i = index (find)) - *this = left_string (i) + find + right_string (length () - i - n); + int n = find.length (); + int m = replace.length (); + for (int i = index (find), j = 0; i > -1; + i = right_string (length () - j).index (find)) + { + *this = left_string (i + j) + + replace + + right_string (length () - j - i - n); + j += i + m; + } + return *this; } -void +String String::substitute (char find, char replace) { for (int i = index (find); i > - 1; i = index (find)) (*this)[i] = replace; + return *this; } diff --git a/lily/GNUmakefile b/lily/GNUmakefile index 8d3fb024a0..1e07662bac 100644 --- a/lily/GNUmakefile +++ b/lily/GNUmakefile @@ -31,8 +31,10 @@ O_FILES += $(outdir)/lilypond.rc.o $(outdir)/lilypond: $(outdir)/lilypond.rc.o $(outdir)/lilypond.rc.o: $(outdir)/lilypond.ico -$(outdir)/lilypond.ico: $(abs-srcdir)/Documentation/pictures/lelie-logo.xpm - convert $< $@ +$(builddir)/Documentation/pictures/$(outbase)/lilypond.ico: + $(MAKE) -C $(abs-srcdir)/Documentation/pictures +$(outdir)/lilypond.ico: $(builddir)/Documentation/pictures/$(outbase)/lilypond.ico + cp $< $@ endif ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *(\([^,]+\)/\1/' @@ -45,7 +47,6 @@ $(outdir)/lily-parser.o: $(outdir)/parser.hh $(outdir)/lily-lexer.o: $(outdir)/parser.hh $(outdir)/lexer.o: $(outdir)/parser.hh $(outdir)/version.hh - $(outdir)/general-scheme.o: $(outdir)/version.hh $(outdir)/kpath.o: $(outdir)/version.hh $(outdir)/lily-guile.o: $(outdir)/version.hh diff --git a/lily/main.cc b/lily/main.cc index 093a8a69d6..7d490d8a6a 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -596,9 +596,8 @@ main (int argc, char **argv) setup_localisation (); setup_paths (); parse_argv (argc, argv); - /* FIXME: this still needs a terminal even when using gui-main after - booting guile. Maybe use a --quiet command line switch? */ - identify (stderr); + if (isatty (STDIN_FILENO)) + identify (stderr); scm_boot_guile (argc, argv, main_with_guile, 0); diff --git a/lily/slur.cc b/lily/slur.cc index 3e1ee4f126..060334d365 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -60,10 +60,7 @@ Slur::print (SCM smob) Real staff_thick = Staff_symbol_referencer::line_thickness (me); Real base_thick = robust_scm2double (me->get_property ("thickness"), 1); Real thick = base_thick * staff_thick; - - Real ss = Staff_symbol_referencer::staff_space (me); Bezier one = get_curve (me); - Stencil a; /* diff --git a/ly/Welcome_to_LilyPond.ly b/ly/Welcome_to_LilyPond.ly new file mode 100644 index 0000000000..f2ae9ab3d3 --- /dev/null +++ b/ly/Welcome_to_LilyPond.ly @@ -0,0 +1,31 @@ +%{ +Welcome to LilyPond +=================== + +Congratulations, LilyPond has been installed successfully. + +Now to take it for the first test run. + + 1. Safe this LilyPond file on your desktop. + + 2. Pick it up from the desktop with your mouse pointer, drag and drop + it onto the LilyPond LSD program. + + 3. LilyPond automatically produces a PDF file from the musical scale + below. + + 4. To print or view the result, click on the newly produced file called + + Welcome_to_LilyPond.PDF + + +That's it. For more information, visit http://lilypond.org . +%} + +\header{ + title = "A scale in LilyPond" +} + +\relative{ + c d e f g a b c +} diff --git a/scm/backend-library.scm b/scm/backend-library.scm index e08c93f1bf..a9367de7c2 100644 --- a/scm/backend-library.scm +++ b/scm/backend-library.scm @@ -42,9 +42,9 @@ -dNOPAUSE\ -dBATCH\ -sDEVICE=pdfwrite\ - -sOutputFile='~a'\ + -sOutputFile=~S\ -c .setpdfwrite\ - -f'~a'\ + -f ~S\ " (sanitize-command-option papersizename) pdf-name @@ -65,7 +65,7 @@ (format "~a/scripts/lilypond-ps2png.py" prefix) "lilypond-ps2png")) (cmd (format #f - "~a --resolution=~S --papersize=~a~a '~a'" + "~a --resolution=~S --papersize=~a~a ~S" (if (file-exists? ps2png-source) (format "python ~a" ps2png-source) "lilypond-ps2png") diff --git a/scm/lily.scm b/scm/lily.scm index 7a7e47cc56..63da7812d9 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -342,11 +342,11 @@ The syntax is the same as `define*-public'." (let* ((base (basename (car files) ".ly")) (log-name (string-append base ".log")) (log-file (open-file log-name "w"))) - (display "# -*-compilation-*-" log-file) - (newline log-file) - ;; Ugh, this opens a terminal - (ly:message (_ "Redirecting output to ~a...") log-name) + ;; Ugh, his opens a terminal + ;; Do this when invoked using --quiet, --log or something? + ;; (ly:message (_ "Redirecting output to ~a...") log-name) (ly:port-move (fileno (current-error-port)) log-file) + (ly:message "# -*-compilation-*-") (if (null? (lilypond-all files)) (exit 0) (begin @@ -354,31 +354,15 @@ The syntax is the same as `define*-public'." (exit 1))))) (define (gui-no-files-handler) - (let* ((input (string-append - (string-regexp-substitute - "share/lilypond/" "share/doc/lilypond-" - (getenv "LILYPONDPREFIX")) - "-1/input")) - (ly (string-append input "/" "Welcome to LilyPond.ly")) - (cmd (get-editor-command ly 0 0))) - (system cmd))) - - -;; Mingw -;; #(Windows XP HOSTNAME build 2600 5.01 Service Pack 1 i686) - -;; Cygwin -;; #(CYGWIN_NT-5.1 Hostname 1.5.12(0.116/4/2) 2004-11-10 08:34 i686) - -;; Debian -;; #(Linux hostname 2.4.27-1-686 #1 Fri Sep 3 06:28:00 UTC 2004 i686) - -(case (string->symbol - (string-downcase - (car (string-tokenize (vector-ref (uname) 0) char-set:letter)))) - ((linux) #t) - ;; On mingw, use gui-main - ((windows) (define lilypond-main gui-main))) - -;;(if (ly:get-option 'quiet) -;; (define lilypond-main gui-main)) + (let* ((ly (string-append (ly:effective-prefix) "/ly/")) + ;; FIXME: soft-code, localize + (welcome-ly (string-append ly "Welcome_to_LilyPond.ly")) + (cmd (get-editor-command welcome-ly 0 0))) + (ly:message (_ "Invoking `~a'...") cmd) + (system cmd) + (exit 1))) + +;; If no TTY and not using safe, assume running from GUI. +(or (isatty? (current-input-port)) + (ly:get-option 'safe) + (define lilypond-main gui-main)) diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 3d25be295d..6a6b2e3815 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -1175,14 +1175,23 @@ AC_DEFUN(STEPMAKE_WINDOWS, [ LN_S='cp -r' # Cygwin symbolic links do not work for native apps. program_suffix=.exe INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c" - elif test "$MINGW" == "yes"; then + elif test "$MINGW32" == "yes"; then LN='cp -r' LN_S='cp -r' program_suffix=.exe INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c" PATHSEP=';' fi - + + AC_SUBST(LN) + AC_SUBST(LN_S) + AC_SUBST(INSTALL) + AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}']) + AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}']) + AC_SUBST(DIRSEP) + AC_SUBST(PATHSEP) + AC_SUBST(program_suffix) + AC_MSG_CHECKING([for some flavor of Windows]) if test "$CYGWIN$MINGW32" == "nono"; then PLATFORM_WINDOWS=no -- 2.39.2