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