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