]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/contributor/quick-start.itexi
DOC: CG: Add information on texlive-lang-cyrillic (Issue 3774)
[lilypond.git] / Documentation / contributor / quick-start.itexi
1 @c -*- coding: utf-8; mode: texinfo; -*-
2
3 @node Quick start
4 @chapter Quick start
5
6 Want to submit a patch for LilyPond?  Great!  Never created a patch
7 before? Never compiled software before? No problem!  This chapter is
8 for you and will help you do this as quickly and easily as possible.
9
10 @menu
11 * LilyDev::
12 * lily-git::
13 * Compiling with LilyDev::
14 * Now start work!::
15 @end menu
16
17 @node LilyDev
18 @section LilyDev
19
20 There is a disk image of a @q{remix} of Ubuntu GNU/Linux available for
21 download which includes all the necessary software and tools to compile
22 both LilyPond and the documentation.  Called the
23 @qq{Ubuntu LilyPond Developer Remix}, but known simply as @qq{LilyDev}
24 for short.  Although it is not possible to compile LilyPond on Windows
25 and extremely difficult on MacOS, LilyDev can be installed and run
26 inside a @q{virtual machine} on any of these operating systems without
27 disturbing your main operating system.  The LilyDev disk image can also
28 be burnt to a DVD and installed like any other Ubuntu GNU/Linux
29 distribution.
30
31 Most virtualization software can be used but we recommend VirtualBox as
32 it is available for all major operating systems and is easy to install
33 & configure.
34
35 If you are not familiar with GNU/Linux, it may be beneficial to read a
36 couple of @qq{introduction to Ubuntu} web pages.
37
38 For those interested, the LilyDev remix is currently based on a 32bit
39 version of 10.04 LTS Ubuntu (Lucid Lynx).
40
41 @warning{Apart from installing and configuring LilyDev in VirtualBox,
42 the rest of the chapter assumes that you are comfortable using the
43 command-line.  While this chapter is intended for users who may have
44 never created a patch or compiled software before, experienced
45 developers (who prefer to use their own development environment) may
46 still find it instructive to skim over this section.}
47
48 @menu
49 * Where to get LilyDev::
50 * Installing LilyDev in VirtualBox::
51 * Configuring LilyDev in VirtualBox::
52 @end menu
53
54
55 @node Where to get LilyDev
56 @unnumberedsubsec Where to get LilyDev
57
58 Download the Ubuntu LilyPond Developer Remix CD image file
59 (approximately 1 GB) from here:
60
61 @smallexample
62 @uref{http://www.philholmes.net/lilypond/LilyDev/ubuntu-LilyDev-remix-2.6.iso}
63 @end smallexample
64
65 Some advanced users might want this file too:
66 @smallexample
67 @uref{http://www.philholmes.net/lilypond/LilyDev/ubuntu-LilyDev-remix-2.6.iso.md5}
68 @end smallexample
69 (If you don't recognize what this file is, then you don't need it.)
70
71
72 @node Installing LilyDev in VirtualBox
73 @unnumberedsubsec Installing LilyDev in VirtualBox
74
75 This section discusses how to install and use LilyDev with VirtualBox.
76
77 @warning{If you already know how to install a virtual machine using a
78 disc image inside VirtualBox (or your own virtualization software) then
79 you can skip this section and go straight to @ref{lily-git}.}
80
81 @enumerate
82 @item
83 Download Virtualbox from here:
84
85 @example
86 @uref{http://@/www.virtualbox.org/@/wiki/@/Downloads}
87 @end example
88
89 @warning{In virtualization terminology, the operating system where
90 Virtualbox is installed is known as the @strong{host}.  LilyDev
91 will be installed @q{inside} Virtualbox as a @strong{guest}.}
92
93 @item
94 Start the VirtualBox software and click @q{New} to create a new
95 @qq{virtual machine}.
96
97 The @q{New Virtual Machine Wizard} will walk you through setting up your
98 guest virtual machine.  Choose an appropriate name for your LilyDev
99 installation and select the @q{Linux} operating system.  When selecting
100 the @q{version} use @q{Ubuntu} if available (but not the @q{64 bit}
101 option).  If you do not have that specific option choose @q{Linux 2.6}
102 (again do not choose any option that has 64 bit next to it).
103
104 @item
105 Select the amount of RAM you will allow the LilyDev guest to use from
106 your host operating system when it is running.  If possible, use at
107 least 700 MB of RAM; the more RAM you can spare from your host the
108 better, although LilyDev will currently use no more than 4 GB (4096 MB)
109 even if you are able to assign more.
110
111 @item
112 For your @q{Virtual Hard Disk}, leave the @q{Create new hard disk}
113 option checked, use the default @q{VDI} and
114 @qq{Dynamically allocated} options for the virtual hard drive.  A
115 complete compile of everything (code, docs, regression tests) can reach
116 10 GB so size your virtual disk and its location accordingly.
117
118 @item
119 Verify the summary details and click @q{Create}, when you are satisfied.
120 Your new guest will be displayed in the Virtualbox window.  Click the
121 @q{Start} button and the @q{First Run Wizard} will prompt you for
122 the installation media.  Click the browse icon and locate the LilyDev
123 disk image and click through the wizard to start the installation
124 process.
125
126 @item
127 When the LilyDev disk image boots, it shows a prompt:
128
129 @example
130 ISOLINUX @code{boot:}
131 @end example
132
133 Hit the Return key (or wait 30 seconds) and then when the installer
134 screen loads, using the arrow keys select
135 @q{Install - start the installer directly} to begin the install process
136 of LilyDev on your virtual hard disk.  The Ubuntu software will walk you
137 through the complete installation process.
138
139 @item
140 At the @qq{Prepare disk space} stage, do not be afraid to select
141 @qq{Erase and use the entire disk}, since this refers to your
142 @strong{@emph{virtual disk}}, not your machine's actual hard
143 disk.
144
145 @item
146 Click through the rest of the wizard, filling in any appropriate details
147 when asked and wait for the install to complete.
148
149 @warning{This will take anywhere from 10 minutes to up to an hour
150 depending on the speed of your computer and if Ubuntu detects you are
151 connected to the internet and needs to download any additional
152 security updates or patches, although these updates are not required to
153 compile LilyPond and it is possible to skip the additional downloads to
154 speed up the install process.}
155
156 @item
157 When prompted by the Ubuntu installer wizard, restart the virtual
158 machine and then when prompted to @q{eject the CD} by virtual box, just
159 click inside the virtual machine window and hit the return key to
160 reboot the virtual machine.  It will not try to restart the installer
161 but start the virtual machine proper. LilyDev is now installed and
162 running!
163
164 @item
165 The current version of LilyPond requires the texlive-lang-cyrillic
166 package.  This package is not part of LilyDev 2.6.  Add the package
167 to LilyDev with:
168
169 @example
170 sudo apt-get install texlive-lang-cyrillic
171 @end example
172
173
174 @end enumerate
175
176 @knownissues
177 Not all hardware is supported in all virtualization tools.  In
178 particular, some contributors have reported problems with USB network
179 adapters.  If you have problems with network connection (for example
180 Internet connection in the host system is lost when you launch virtual
181 system), try installing and running LilyDev with your computer's
182 built-in network adapter used to connect to the network.  Refer to the
183 help documentation that comes with your virtualization software.
184
185
186 @node Configuring LilyDev in VirtualBox
187 @unnumberedsubsec Configuring LilyDev in VirtualBox
188
189 VirtualBox has extra @q{guest additions} which although are not
190 necessary to use LilyDev or compile Lilypond, do provide some additional
191 features to your Virtual Machine to make it easier to work with.  Such
192 as being able to dynamically resize the LilyDev window, allow seamless
193 interaction with your mouse pointer on both the host and guest and let
194 you copy/paste between your host and guest if needed.
195
196 @enumerate
197
198 @item
199 Select the @q{Devices} menu from the virtual machine window and choose
200 @q{Install Guest Additions...}.  This will automount a CD which will
201 prompt you to autorun it.  Click OK and follow the instructions.  It is
202 recommended to reboot the guest when the installation is complete.
203
204 Other virtualization software will also have their own @q{guest}
205 additions, follow the normal procedures for your virtualization software
206 with Ubuntu as the client.
207
208 @item
209 Restart Ubuntu to complete the installation of the guest additions.
210
211 @advanced{If you do any kernel upgrades, you may need to reinstall
212 the additional software.  Just follow the step above again and reboot
213 when the reinstallation is complete.}
214
215 @end enumerate
216
217 @noindent
218 Other items that may be helpful:
219
220 @itemize
221
222 @item
223 In the settings for the virtual machine, set the network to
224 Bridged mode to allow you to access shared folders when using Windows
225 hosts.
226
227 @item
228 Set up any additional features, such as @q{Shared Folders} between
229 your main operating system and Ubuntu.  This is distinct from the
230 networked share folders in Windows.  Consult the external
231 documentation for this.
232
233 Some longtime contributors have reported that @q{shared folders}
234 are rarely useful and not worth the fuss, particularly since files
235 can be shared over a network instead.
236
237 @item
238 Pasting into a terminal is done with @code{Ctrl+Shift+v}.
239
240 @item
241 The @qq{Places} top-menu has shortcuts to a graphical
242 @qq{navigator} like Windows Explorer or the MacOS X Finder.
243
244 @item
245 Right-click allows you to edit a file with gedit.  We recommend
246 using gedit.
247
248 @item
249 One particular change from Windows and MacOS X is that most
250 software should be installed with your @qq{package manager}; this
251 vastly simplifies the process of installing and configuring
252 software.  Go to @clicksequence{Applications @click{} Ubuntu
253 Software Center}.
254
255 @end itemize
256
257
258 @node lily-git
259 @section lily-git
260
261 The @q{LilyPond Contributor's Git Interface} (otherwise known as
262 @command{lily-git.tcl}) is a simple-to-use GUI to help you download and
263 update the LilyPond source code as well as an aid to making software
264 patches.
265
266 @menu
267 * Where to get lily-git::
268 * Configuring lily-git and downloading the source code::
269 * How to use lily-git::
270 @end menu
271
272 @node Where to get lily-git
273 @unnumberedsubsec Where to get lily-git
274
275 Depending on your development environment, lily-git may already be
276 installed on your computer.
277
278 @itemize
279 @item
280 If you are using LilyDev (see @ref{LilyDev}) then lily-git is already
281 installed and ready to run.
282
283 @item
284 For those not using LilyDev then lily-git can be obtained by downloading
285 the software directly. See @ref{Manually installing lily-git.tcl}.
286
287 @item
288 Finally, lily-git is always part of the LilyPond source code and is
289 located in @file{$LILYPOND_GIT/scripts/auxillar/lily-git.tcl}.
290
291 @end itemize
292
293
294 @node Configuring lily-git and downloading the source code
295 @unnumberedsubsec Configuring lily-git and downloading the source code
296
297 @warning{The rest of this manual assumes that you are using the
298 command-line within a terminal.}
299
300 @enumerate
301 @item
302 Type (or copy&paste) into the Terminal:
303
304 @example
305 lily-git.tcl
306 @end example
307
308 @noindent
309 You will be prompted to enter your name and your email address.  This
310 information is used only to identify and label any patches you create.
311 This information can be edited if required later.  See
312 @ref{Configuring Git}.  Click on the @emph{Submit} button to update
313 lily-git with this information.
314
315 @item
316 Click on the @qq{Get source} button.
317
318 A directory called @file{$LILYPOND_GIT} is now created within
319 your home directory and the complete source code will start to be
320 downloaded into it.
321
322 @warning{Be patient! The complete source is around 150@tie{}Mb.}
323
324 @noindent
325 When the source code has been downloaded, the @qq{Command output} window
326 in lily-git will update and display @qq{Done} on the very last line.
327 The button label will change to say @qq{Update source}.
328
329 @warning{Some contributors have reported that occasionally nothing
330 happens at this step at all.  If this occurs, then try again in a few
331 minutes -- it could be an intermittant network problem.  If the
332 problem persists, please ask for help.}
333
334 @item
335 Close the lily-git GUI and navigate to the @file{$LILYPOND_GIT}
336 directory to view and edit the source files.
337
338 @end enumerate
339
340 @noindent
341 If this is the first time you have compiled LilyPond then please go
342 to @ref{Compiling with LilyDev} before reading on.
343
344
345 @node How to use lily-git
346 @unnumberedsubsec How to use lily-git
347
348 @warning{Throughout the rest of this manual, most command-line
349 input should be entered from @file{~/lilypond-git/}.  This is
350 known as the @emph{top source directory} and is often referred to as
351 @var{$LILYPOND_GIT}.}
352
353 @warning{Only work on one set of changes at once.  Do not start
354 work on any new changes until your first set has been accepted.}
355
356 @subsubheading 1. Update source
357
358 At the beginning of each session of lilypond work, you should
359 click the @qq{Update source} button to get the latest changes to
360 the source code.
361
362 @warning{In some rare and unfortunate circumstances, this will
363 result in a @emph{merge conflict}.  If this occurs, follow the
364 instructions for @qq{Abort changes}, below.  Your work will not be
365 lost.}
366
367
368 @subsubheading 2a. New local commit
369
370 A single commit typically represents one logical set of related
371 changes (such as a bug-fix), and may incorporate changes to
372 multiple files at the same time.
373
374 When you're finished making the changes for a commit, click the
375 @qq{New local commit} button.  This will open the @qq{Git Commit
376 Message} window.  The message header is required, and the message
377 body is optional.
378
379 After entering a commit message, click @qq{OK} to finalize the
380 commit.
381
382 @advanced{for more information regarding commits and commit
383 messages, see @ref{Commits and patches}.}
384
385
386 @subsubheading 2b. Amend previous commit
387
388 You can go back and make changes to the most recent commit with
389 the @qq{Amend previous commit} button.  This is useful if a
390 mistake is found after you have clicked the @qq{New local commit}
391 button.
392
393 To amend the most recent commit, re-edit the source files as
394 needed and then click the @qq{Amend previous commit} button.  The
395 earlier version of the commit is not saved, but is replaced by the
396 new one.
397
398 @warning{This does not update the patch @strong{files}; if you
399 have a patch file from an earlier version of the commit, you will
400 need to make another patch set when using this feature.  The old
401 patch file will not be saved, but will be replaced by the new one
402 after you click on @qq{Make patch set}.}
403
404
405 @subsubheading 3. Make patch set
406
407 Before making a patch set from any commits, you should click the
408 @qq{Update source} button to make sure the commits are based on
409 the most recent remote snapshot.
410
411 When you click the @qq{Make patch set} button,
412 @command{lily-git.tcl} will produce patch files for any new
413 commits, saving them to the current directory.  The command output
414 will display the name of the new patch files near the end of the
415 output:
416
417 @example
418 0001-CG-add-lily-git-instructions.patch
419 Done.
420 @end example
421
422 Send patch files to the appropriate place:
423
424 @itemize
425 @item
426 If you have a mentor, send it to them via email.
427
428 @item
429 Translators should send patches to
430 @email{translations@@lilynet.net}.
431
432 @item
433 More experienced contributors should upload the patch for
434 web-based review.  This requires additional software and use of
435 the command-line; see @ref{Uploading a patch for review}.
436
437 @item
438 If you have trouble uploading the patch for review,
439 ask for help on @email{lilypond-devel@@gnu.org}.
440
441 @end itemize
442
443
444 @subsubheading The @qq{Abort changes -- Reset to origin} button
445
446 @warning{Only use this if your local commit history gets
447 hopelessly confused!}
448
449 The button labeled @qq{Abort changes -- Reset to origin} will copy
450 all changed files to a subdirectory of @file{$LILYPOND_GIT} named
451 @file{aborted_edits/}, and will reset the repository to the
452 current state of the remote repository (at @code{git.sv.gnu.org}).
453
454
455
456 @node Compiling with LilyDev
457 @section Compiling with LilyDev
458
459 LilyDev is our @q{remix} of Ubuntu which contains all the
460 necessary dependencies to do lilypond development; for more
461 information, see @rcontrib{LilyDev}.
462
463 @subsubheading Preparing the build
464
465 To prepare the build directory, enter (or copy&paste) the below
466 text.  This should take less than a minute.
467
468 @c we heavily recommend the out-of-tree build; do not change this!
469
470 @example
471 cd $LILYPOND_GIT
472 sh autogen.sh --noconfigure
473 mkdir -p build/
474 cd build/
475 ../configure
476 @end example
477
478 @subsubheading Building @code{lilypond}
479
480 Compiling lilypond will likely take between 5 and 60 minutes,
481 depending on your computer's speed and available RAM.  We
482 recommend that you minimize the terminal window while it is
483 building; this can have a non-negligible effect on compilation
484 speed.
485
486 @example
487 cd $LILYPOND_GIT/build/
488 make
489 @end example
490
491 You may run the compiled @code{lilypond} with:
492
493 @example
494 cd $LILYPOND_GIT/build/
495 out/bin/lilypond my-file.ly
496 @end example
497
498 @subsubheading Building the documentation
499
500 Compiling the documentation is a much more involved process, and
501 will likely take 2 to 10 hours.
502
503 @example
504 cd $LILYPOND_GIT/build/
505 make
506 make doc
507 @end example
508
509 The documentation is put in @file{out-www/offline-root/}.  You may
510 view the html files by entering the below text; we recommend that
511 you bookmark the resulting page:
512
513 @example
514 firefox $LILYPOND_GIT/build/out-www/offline-root/index.html
515 @end example
516
517 @subsubheading Installing
518
519 Don't.  There is no reason to install lilypond within LilyDev.
520 All development work can (and should) stay within the
521 @file{$LILYPOND_GIT} directory, and any personal composition
522 or typesetting work should be done with an official GUB release.
523
524
525 @subsubheading Problems and other options
526
527 To select different build options, or isolate certain parts of the
528 build, or to use multiple CPUs while building, read
529 @ref{Compiling}.
530
531 In particular, contributors working on the documentation should be
532 aware of some bugs in the build system, and should read the
533 workarounds in @ref{Generating documentation}.
534
535
536 @node Now start work!
537 @section Now start work!
538
539 LilyDev users may now skip to the chapter which is aimed at
540 their intended contributions:
541
542 @itemize
543 @item @ref{Documentation work}
544 @item @ref{Translating the documentation}
545 @item @ref{Website work}
546 @item @ref{Regression tests}
547 @item @ref{Programming work}
548 @end itemize
549
550 These chapters are mainly intended for people not using LilyDev,
551 but they contain extra information about the
552 @qq{behind-the-scenes} activities.  We recommend that you read
553 these at your leisure, a few weeks after beginning work with
554 LilyDev.
555
556 @itemize
557 @item @ref{Working with source code}
558 @item @ref{Compiling}
559 @end itemize
560
561
562