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