]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/contributor/quick-start.itexi
Merge remote branch 'origin' into release/unstable
[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!  This chapter is
7 designed to let you do this as quickly and easily as possible.
8
9 It is not possible to compile LilyPond on Windows, and extremely
10 difficulty to compile it on MacOS X.  We have therefore made a
11 @q{remix} of Ubuntu which includes all necessary dependencies to
12 compile both LilyPond and the documentation.  This can be run
13 inside a virtual machine without disturbing your main operating
14 system.  The full name is @qq{Ubuntu LilyPond Developer Remix},
15 but we refer to it as @qq{lilydev} for short.
16
17 @advanced{experienced developers may prefer to use their own
18 development environment.  It may be instructive to skim over these
19 instructions, but be aware that this chapter is intended for
20 helpful users who may have never created a patch before.}
21
22 @menu
23 * Lilydev::
24 * Using lily-git::
25 * Compiling with lilydev::
26 * Now start work!::
27 @end menu
28
29 @node Lilydev
30 @section Lilydev
31
32 This section discusses how to install and use the Ubuntu LilyPond
33 Development Remix.
34
35 @menu
36 * Installing lilydev::
37 * Configuring lilydev in virtualbox::
38 * Using lilydev::
39 @end menu
40
41 @node Installing lilydev
42 @subsection Installing lilydev
43
44 @enumerate
45 @item
46 Install some virtualization software.
47
48 Any virtualization tool can be used, but we recommend VirtualBox:
49
50 @example
51 @uref{http://@/www.virtualbox.org/@/wiki/@/Downloads}
52 @end example
53
54 In virtualization terminology, your main operating system is the
55 @qq{host}, while lilydev is the @qq{guest}.
56
57 @item
58 Download the Ubuntu LilyPond Developer Remix disk image:
59 (approximately 1 GB)
60
61 @example
62 @uref{http://files.lilynet.net/ubuntu-lilydev-remix-1.1.iso}
63 @end example
64
65 @advanced{Some users might want these files, but if you don't
66 recognize what they are, then you don't want them:
67 @*
68 @uref{http://files.lilynet.net/ubuntu-lilydev-remix-1.1.iso.md5}
69 @c @*
70 @c @uref{http://files.lilynet.net/ubuntu-lilydev-remix-1.0.iso.torrent}
71 }
72
73 @item
74 Create a music new @qq{virtual machine} inside your virtualization
75 software.
76
77 If possible, use at least 700 MB of RAM (1GB would be better) for
78 the virtual machine, and use @qq{dynamically expanding storage}
79 for the virtual hard drive.  A complete compile of everything
80 (code, docs, regression tests) can reach 10 GB.
81
82 @item
83 Install @file{ubuntu-lilydev-remix-1.1.iso} as the @qq{guest}
84 operating system on your virtualized system.
85
86 @enumerate
87
88 @item
89 When @file{ubuntu-lilydev-remix-1.1.iso} boots, it shows an
90 ISOLINUX @code{boot:} prompt.  Type:
91
92 @example
93 install
94 @end example
95
96 @item
97 At the @qq{Prepare disk space} stage, do not be afraid to select
98 @qq{Erase and use the entire disk}, since this refers to your
99 @emph{virtual disk}, not your machine's actual hard drive.
100
101 @item
102 When prompted to remove the installation CD, go to
103 @clicksequence{Devices @click{} CD/DVD Devices} and de-select
104 @file{ubuntu-lilydev-remix-1.1.iso}.
105
106 @end enumerate
107
108 @advanced{
109 The latest version of lilydev is based on Ubuntu 10.04.1; if you
110 encounter any difficulties installing it, search for one of the
111 many tutorials for installing that particular version of Ubuntu as
112 a guest operating system.
113 }
114
115 @item
116 Do any extra configuration for your virtualization software.
117
118 There are additional instructions for VirtualBox in
119 @ref{Configuring lilydev in virtualbox}.
120
121 If you use other virtualization software, then follow the normal
122 procedures for your virtualization software with Ubuntu as the
123 client.
124
125 @end enumerate
126
127 @knownissues
128
129 Not all hardware is supported in all virtualization tools.  In
130 particular, some contributors have reported problems with USB
131 devices, for example USB network adapters.  If you have problems
132 with network connection (for example internet connection in the 
133 host system is lost when you launch virtual system), try installing
134 and running Lilydev with your computer's built-in network adapter 
135 used to connect to the network.
136 If you would like to investigate further, then look for
137 help for your virtualization tool using your normal OS as the
138 @qq{host} and Ubuntu as the @qq{client}.
139
140
141 @node Configuring lilydev in virtualbox
142 @subsection Configuring lilydev in virtualbox
143
144 VirtualBox has extra @qq{guest additions} which can make the
145 virtualization easier to use (full-screen, easy file sharing
146 between host and guest operating systems, shared clipboards, etc).
147
148 @enumerate
149
150 @item
151 In @emph{VirtualBox}, select @clicksequence{Devices @click{}
152 Install Guest Additions...}.
153
154 @item
155 In @emph{Ubuntu}, select @clicksequence{Places @click{}
156 VBOXADDITIONS_}.  A file-system window will open.
157
158 @item
159 Double-click on the @file{autorun.sh} file, then select @qq{Run in
160 Terminal}, and enter your password when prompted.
161
162 @item
163 Once the script is finished, @qq{eject} the virtual CD, and then
164 go to @clicksequence{Devices @click{} CD/DVD Devices} and
165 de-select @file{VBoxGuestAdditions.iso}.
166
167 @item
168 Restart Ubuntu to complete the installation.
169
170 @advanced{If you do any kernel upgrades, you may need to re-run
171 these VBOXADDITIONS instructions.}
172 @end enumerate
173
174 Some other steps may be helpful:
175
176 @itemize
177 @item
178 In the settings for the virtual machine, set the network to
179 Bridged mode to allow you to access shared folders on your Windows
180 host.
181
182 @item
183 Set up any additional features, such as @q{Shared Folders} between
184 your main operating system and ubuntu.  This is distinct from the
185 networked share folders in Windows.  Consult external
186 documentation for this step.
187
188 Some longtime contributors have reported that @q{shared folders}
189 are rarely useful and not worth the fuss, particularly since files
190 can be shared over a network instead.
191
192 @end itemize
193
194
195 @node Using lilydev
196 @subsection Using lilydev
197
198 If you are not familiar with Linux, it may be beneficial to read a
199 couple of @qq{introduction to Ubuntu} webpages.
200
201 @itemize
202 @item
203 One particular change from Windows and MacOS X is that most
204 software should be installed with your @qq{package manager}; this
205 vastly simplifies the process of installing and configuring
206 software.  Go to @clicksequence{Applications @click{} Ubuntu
207 Software Center}.
208
209 @item
210 The rest of this manual assumes that you are using the
211 command-line; double-click on the @q{Terminal} icon on the
212 desktop.
213
214 @item
215 Pasting into a terminal is done with @code{Ctrl+Shift+v}.
216
217 @item
218 The @qq{Places} top-menu has shortcuts to a graphical
219 @qq{navigator} like Windows Explorer or the MacOS X Finder.
220
221 @item
222 Right-click allows you to edit a file with gedit.  We recommend
223 using gedit.
224
225 @item
226 Some contributors have recommended: (pdf available for free)
227
228 @example
229 @uref{http://www.ubuntupocketguide.com/}
230 @end example
231
232 @end itemize
233
234
235 @node Using lily-git
236 @section Using lily-git
237
238 @command{lily-git.tcl} is a graphical tool to help you access and
239 share changes to the lilypond source code.
240
241 @menu
242 * Install and configuration of lily-git.tcl::
243 * Daily use of lily-git.tcl::
244 @end menu
245
246 @node Install and configuration of lily-git.tcl
247 @unnumberedsubsec Install and configuration of @command{lily-git.tcl}
248
249 @warning{The rest of this manual assumes that you are using the
250 command-line; double-click on the @q{Terminal} icon on the
251 desktop.}
252
253 @enumerate
254 @item
255 Type (or copy&paste) into the Terminal:
256
257 @example
258 lily-git.tcl
259 @end example
260
261 @item
262 Click on the @qq{Get source} button.
263
264 This will create a directory called @file{lilypond-git/} within
265 your home directory, and will download the source code into that
266 directory (around 55Mb).  When the process is finished, the
267 @qq{Command output} window will display @qq{Done}, and the button
268 label will change to say @qq{Update source}.
269
270 @warning{Some contributors have reported that nothing happens at
271 this step.  If this occurs, then try again in a few minutes -- we
272 suspect that this is an intermittant network problem.  If the
273 problem persists, please ask for help.}
274
275 @item
276 Navigate to the @file{lilypond-git/} directory to view the source
277 files.
278
279 @end enumerate
280
281 You should now progress to @ref{Compiling with lilydev}.
282
283 @warning{Throughout the rest of this manual, most command-line
284 input should be entered from @file{~/lilypond-git/}.  This is
285 referred to as the @emph{top source directory}.}
286
287 @advanced{the @qq{Get source} button does not fetch the entire
288 history of the git repository, so utilities like @command{gitk}
289 will only be able to display the most recent additions.  As you
290 continue to work with @command{lily-git.tcl}, the @qq{Update
291 source} button will take any new additions and add it to whatever
292 is currently in your repository's history.}
293
294
295 @node Daily use of lily-git.tcl
296 @unnumberedsubsec Daily use of @command{lily-git.tcl}
297
298 @warning{Only work on one set of changes at once.  Do not start
299 work on any new changes until your first set has been accepted.}
300
301 @subsubheading 1. Update source
302
303 At the beginning of each session of lilypond work, you should
304 click the @qq{Update source} button to get the latest changes to
305 the source code.
306
307 @warning{In some rare and unfortunate circumstances, this will
308 result in a @emph{merge conflict}.  If this occurs, follow the
309 instructions for @qq{Abort changes}, below.  Your work will not be
310 lost.}
311
312
313 @subsubheading 2a. New local commit
314
315 A single commit typically represents one logical set of related
316 changes (such as a bug-fix), and may incorporate changes to
317 multiple files at the same time.
318
319 When you're finished making the changes for a commit, click the
320 @qq{New local commit} button.  This will open the @qq{Git Commit
321 Message} window.  The message header is required, and the message
322 body is optional.
323
324 After entering a commit message, click @qq{OK} to finalize the
325 commit.
326
327 @advanced{for more information regarding commits and commit
328 messages, see @ref{Commits and patches}.}
329
330
331 @subsubheading 2b. Amend previous commit
332
333 You can go back and make changes to the most recent commit with
334 the @qq{Amend previous commit} button.  This is useful if a
335 mistake is found after you have clicked the @qq{New local commit}
336 button.
337
338 To amend the most recent commit, re-edit the source files as
339 needed and then click the @qq{Amend previous commit} button.  The
340 earlier version of the commit is not saved, but is replaced by the
341 new one.
342
343 @warning{This does not update the patch @strong{files}; if you
344 have a patch file from an earlier version of the commit, you will
345 need to make another patch set when using this feature.  The old
346 patch file will not be saved, but will be replaced by the new one
347 after you click on @qq{Make patch set}.}
348
349
350 @subsubheading 3. Make patch set
351
352 Before making a patch set from any commits, you should click the
353 @qq{Update source} button to make sure the commits are based on
354 the most recent remote snapshot.
355
356 When you click the @qq{Make patch set} button,
357 @command{lily-git.tcl} will produce patch files for any new
358 commits, saving them to the current directory.  The command output
359 will display the name of the new patch files near the end of the
360 output:
361
362 @example
363 0001-CG-add-lily-git-instructions.patch
364 Done.
365 @end example
366
367 Send patch files to the appropriate place:
368
369 @itemize
370 @item
371 If you have a mentor, send it to them via email.
372
373 @item
374 New contributors should send the patch attached to an email to
375 @email{frogs@@lilynet.net}.  Please add @qq{[PATCH]} to the
376 subject line.
377
378 @item
379 Translators should send patches to
380 @email{translations@@lilynet.net}.
381
382 @item
383 More experienced contributors should upload the patch for
384 web-based review.  This requires additional software and use of
385 the command-line; see @ref{Uploading a patch for review}.
386
387 @end itemize
388
389
390 @subsubheading The @qq{Abort changes -- Reset to origin} button
391
392 @warning{Only use this if your local commit history gets
393 hopelessly confused!}
394
395 The button labeled @qq{Abort changes -- Reset to origin} will copy
396 all changed files to a subdirectory of @file{lilypond-git/} named
397 @file{aborted_edits/}, and will reset the repository to the
398 current state of the remote repository (at @code{git.sv.gnu.org}).
399
400
401
402 @node Compiling with lilydev
403 @section Compiling with lilydev
404
405 Lilydev is our @q{remix} of Ubuntu which contains all the
406 necessary dependencies to do lilypond development; for more
407 information, see @rcontrib{Lilydev}.
408
409 @subsubheading Preparing the build
410
411 To prepare the build directory, enter (or copy&paste) the below
412 text.  This should take less than a minute.
413
414 @c we heavily recommend the out-of-tree build; do not change this!
415
416 @example
417 cd ~/lilypond-git/
418 sh autogen.sh --noconfigure
419 mkdir -p build/
420 cd build/
421 ../configure
422 @end example
423
424 @subsubheading Building @code{lilypond}
425
426 Compiling lilypond will likely take between 5 and 60 minutes,
427 depending on your computer's speed and available RAM.  We
428 recommend that you minimize the terminal window while it is
429 building; this can have a non-negligible effect on compilation
430 speed.
431
432 @example
433 cd ~/lilypond-git/build/
434 make
435 @end example
436
437 You may run the compiled @code{lilypond} with:
438
439 @example
440 cd ~/lilypond-git/build/
441 out/bin/lilypond my-file.ly
442 @end example
443
444 @subsubheading Building the documentation
445
446 Compiling the documentation is a much more involved process, and
447 will likely take 2 to 10 hours.
448
449 @example
450 cd ~/lilypond-git/build/
451 make
452 make doc
453 @end example
454
455 The documentation is put in @file{out-www/offline-root/}.  You may
456 view the html files by entering the below text; we recommend that
457 you bookmark the resulting page:
458
459 @example
460 firefox ~/lilypond-git/build/out-www/offline-root/index.html
461 @end example
462
463 @subsubheading Installing
464
465 Don't.  There is no reason to install lilypond within lilydev.
466 All development work can (and should) stay within the
467 @file{$HOME/lilypond-git/} directory, and any personal composition
468 or typesetting work should be done with an official GUB release.
469
470
471 @subsubheading Problems and other options
472
473 To select different build options, or isolate certain parts of the
474 build, or to use multiple CPUs while building, read
475 @ref{Compiling}.
476
477 In particular, contributors working on the documentation should be
478 aware of some bugs in the build system, and should read the
479 workarounds in @ref{Generating documentation}.
480
481
482 @node Now start work!
483 @section Now start work!
484
485 Lilydev users may now skip to the chapter which is aimed at
486 their intended contributions:
487
488 @itemize
489 @item @ref{Documentation work}
490 @item @ref{Translating the documentation}
491 @item @ref{Website work}
492 @item @ref{Regression tests}
493 @item @ref{Programming work}
494 @end itemize
495
496 These chapters are mainly intended for people not using LilyDev,
497 but they contain extra information about the
498 @qq{behind-the-scenes} activities.  We recommend that you read
499 these at your leisure, a few weeks after beginning work with
500 LilyDev.
501
502 @itemize
503 @item @ref{Working with source code}
504 @item @ref{Compiling}
505 @end itemize
506
507
508