?? user.dbk
字號:
See the <link linkend="get-src-cvs">CVS instructions</link> for details.</para></section> <!-- End of Installation:Downloading Bochs section --><section id="get-src-cvs"><title>Tracking the source code with CVS</title><para>CVS, or Concurrent Version System, is a software development tool that helpsto keep track of the different revisions of each file. It is used by manyopen source (and commercial) projects to allow multiple developers to sharetheir changes to the source code. The Bochs source code and documentation are available using CVS<footnote><para>You can download CVS software and documentation from <ulink url="http://www.cvshome.org">www.cvshome.org</ulink>.</para></footnote>.</para><section><title>Checking out Bochs</title><para>When you have CVS installed, the first step is to do a login and checkout. Theinitial checkout command is long and ugly, but usually you only have to do itonce. The example below shows the CVS checkout process in Unix. On theWindows platform, you can download a CVS client from cvshome.com, oruse CVS within Cygwin<footnote><para>Cygwin is an open source Unix-like environment for Windows platforms,available at <ulink url="http://www.cygwin.com">www.cygwin.com</ulink>.</para></footnote>.<figure><title>Checking out Bochs in CVS</title><screen> user$ <command>cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/bochs login</command> (Logging in to anonymous@cvs.sourceforge.net) CVS password: <replaceable>(there is no password, just press Enter)</replaceable> user$ <command>cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/bochs checkout bochs</command> cvs server: Updating bochs U bochs/.bochsrc U bochs/.conf.AIX.4.3.1 U bochs/.conf.beos-x86-R4 U bochs/.conf.macos . . <lineannotation>(This might take a few minutes, depending on your network connection.)</lineannotation> . U bochs/patches/patch.seg-limit-real user$ <command>cd bochs</command> user$ <command>ls</command> Bochs.proj.hqx bxversion.h fpu/ osdep.cc CHANGES config.h.in gui/ osdep.h COPYING configure* install-x11-fonts* patches/ CVS/ configure.in instrument/ pc_system.cc Makefile.in cpu/ iodev/ pc_system.h README bx_debug/ load32bitOShack.cc state_file.cc TESTFORM.txt disasm/ logio.cc state_file.h bios/ doc/ macintosh.txt win32.txt bochs.h docs-html/ main.cc bochs.rsrc.hqx dynamic/ memory/ build/ font/ misc/ user$ _</screen></figure></para><note><para> This is just an example output of a checkout of an older version of Bochs. You most likely will see more/other files.</para></note><tip><para>If you have write access to the Bochs CVS tree, the checkoutcommand is different for you. See the Developers Guide<footnote><para>See the <ulink url="../development/resources.html">Developers Guide</ulink>and/or look at <ulink url="http://sourceforge.net/cvs/?group_id=12580">CVS repository information</ulink>,section "Developer CVS Access via SSH", for instructions.</para></footnote> for details.</para></tip><tip><para>If you use remote CVS for other projects, you might have already setthe environment variable <varname>CVS_RSH</varname> in your configurationfiles. For the CVS checkout to work as shown above, the<varname>CVS_RSH</varname> variable should either be empty or set to<constant>rsh</constant>.</para></tip><para>The CVS checkout process (above) gives you a directory called bochs thatcontains the very latest source code. I will refer to this directoryas &bochsdir;. In each subdirectory directory there's also adirectory called "CVS" which tells the cvs software where the code was checkedout, what version you have, and where to go for future updates.</para></section><section><title>Getting the Latest Version</title><para>Most developers use CVS to always give them the latest source code. The minutethat any developer checks in a change, they are available to everyone elsethrough CVS. You just have to type <command>cvs update -d -A</command> in the&bochsdir; directory, and CVS will retrieve any files and directories that havebeen changed since you did a checkout. If you update regularly, each updatetakes a short time because it downloads only the files that changed. The<command>-d</command> option tells cvs to download new directories thathave been checked in, not just files. The <command>-A</command> option meansto get the most recent version of each file, as opposed to a release version.See <link linkend="cvs-release-version">Getting a release version</link>Both <command>-d</command> and <command>-A</command> can be omitted in manycases, once you are familiar with the process. </para><para>The <command>cvs update -A -d</command> command tells you if any new files havebeen downloaded from the server, and it also tells you if you have modified anyof the CVS-controlled files. As it checks through the source directories, itwill list files that have changed, with a single letter before the name thattells the status of that file. The most common status letters are listedbelow.<table frame="all"><title>Status letters in a CVS update</title> <tgroup cols="3"> <thead> <row> <entry>Letter</entry> <entry>Meaning</entry> <entry>Description</entry> </row> </thead> <tbody> <row> <entry>?</entry> <entry>unknown</entry> <entry> This file is in your bochs directory, but CVS does not know anything about it. For example, when you compile Bochs, any files created during the build process appear as ?. </entry> </row> <row> <entry>U</entry> <entry>update</entry> <entry> cvs downloaded a new version of this file because it changed on the server, usually because someone else did a checkin. </entry> </row> <row> <entry>P</entry> <entry>patch</entry> <entry> This does the same as U, but instead of sending the whole file (update), only a diff/patch is sent, thus, less bandwidth is used. </entry> </row> <row> <entry>M</entry> <entry>modified</entry> <entry> You have changed this file on your disk, so it no longer matches the version on the server. This is not a problem; it's just for your information. If you want, you can discard your changes and get a fresh copy by deleting the file and running cvs update again. </entry> </row> <row> <entry>C</entry> <entry>conflict</entry> <entry> You have changed this file on your disk, but this change conflicts with a change that was checked in. Conflicts occur when two people change the same line of code in different ways. You need to edit the conflicting file(s) and clean it up by hand. Or, sometimes it's easiest to discard your own edits and download a fresh copy, by deleting the conflicting file and running cvs update again. </entry> </row> </tbody> </tgroup></table></para><para>If you have been using <command>cvs update</command> with "sticky tags" toretrieve other versions, as described later, cvs will remember which versionyou were looking at. In this case, a <command>cvs update</command> will keepyour sources consistent with that version. If you want to get back to lookingat the latest code again, be sure to use the <command>-A</command> option toclears the sticky tags. </para></section><section id="cvs-release-version"><title>Getting a Release Version</title><para>Once you have a CVS checkout, you can also use the update command toget the Bochs source code for any release since March 2000. The commandis <command>cvs update -d -r <replaceable>tagname</replaceable></command>.The tag tells which release you want, and it can be one of the following:<table frame="all"><title>CVS Release Tags</title> <tgroup cols="2"> <thead> <row> <entry>Bochs version</entry> <entry>Release tag for CVS</entry> </row> </thead> <tbody> <row> <entry>2.2</entry> <entry>REL_2_2_FINAL</entry> </row> <row> <entry>2.1.1 (bugfix1)</entry> <entry>REL_2_1_1_FINAL</entry> </row> <row> <entry>2.1</entry> <entry>REL_2_1_FINAL</entry> </row> <row> <entry>2.0.2 (bugfix2)</entry> <entry>REL_2_0_2_FINAL</entry> </row> <row> <entry>2.0.1 (bugfix1)</entry> <entry>REL_2_0_1_FINAL</entry> </row> <row> <entry>2.0</entry> <entry>REL_2_0_FINAL</entry> </row> <row> <entry>1.4.1 (bugfix1)</entry> <entry>REL_1_4_1_FINAL</entry> </row> <row> <entry>1.4</entry> <entry>REL_1_4_FINAL</entry> </row> <row> <entry>1.3</entry> <entry>REL_1_3_FINAL</entry> </row> <row> <entry>1.2.1 (bugfix1)</entry> <entry>REL_1_2_1_FINAL</entry> </row> <row> <entry>1.2</entry> <entry>REL_1_2_FINAL</entry> </row> <row> <entry>1.1.2 (bugfix3)</entry> <entry>REL_1_1_2_BASE</entry> </row> <row> <entry>1.1.1 (bugfix2)</entry> <entry>REL_1_1_1_BASE</entry> </row> <row> <entry>1.1 (bugfix1)</entry> <entry>REL_1_1_BASE</entry> </row> <row> <entry>March 25, 2000</entry> <entry>REL-bochs-2000-03-25</entry> </row> </tbody> </tgroup></table><tip><para>To get a complete list of allowed tags, type <command>cvs stat -v README</command>. Many of the tags are not generally useful.</para></tip>Once you have done an update with <command>-r <replaceable>tagname</replaceable></command>, you have made a "sticky tag." The stickiness refers to the factthat CVS remembers which tag you have used most recently. The tag is storedin the CVS subdirectory, so it stays around even if you log off andreturn later. After creating a sticky tag, any future cvs updates willtry to keep your directory in sync with the version you chose. In otherwords, when developers check in changes you will notsee them because your directory is "stuck" looking at an old version.To clear the sticky tag, use <command>cvs update -A</command>.</para><para>A variation on the sticky tag concept is a sticky date<footnote><para>According to some sources, this is when you eat dinner with someone, andaccidentally spill a drink on him/her.</para></footnote>. If some feature was working at some time in the past, butis no longer working, you can ask CVS to give you the sources from anydate. <command>cvs update -D 2001-06-14</command> will download theBochs source as they were on June 14, 2001. Again, use <command>-A</command>to clear the sticky date and track the current sources.</para></section><section><title>More about CVS</title><para>Entire books have been written on CVS, so there's no sense in duplicatingit all here in the Bochs documentation. Some sources of additionalinformation are listed below.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -