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