?? z68.html
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html> <head> <title> Source Tree Checklist </title> <meta name="GENERATOR" content= "Modular DocBook HTML Stylesheet Version 1.45"> <link rel="HOME" title="GTK+ / Gnome Application Development" href="ggad.html"> <link rel="UP" title="Creating Your Source Tree" href= "cha-source.html"> <link rel="PREVIOUS" title="Creating Your Source Tree" href= "cha-source.html"> <link rel="NEXT" title="configure.in" href="z69.html"> </head> <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink= "#840084" alink="#0000FF"> <div class="NAVHEADER"> <table width="100%" border="0" bgcolor="#ffffff" cellpadding= "1" cellspacing="0"> <tr> <th colspan="4" align="center"> <font color="#000000" size="2">GTK+ / Gnome Application Development</font> </th> </tr> <tr> <td width="25%" bgcolor="#ffffff" align="left"> <a href="cha-source.html"><font color="#0000ff" size= "2"><b><<< Previous</b></font></a> </td> <td width="25%" colspan="2" bgcolor="#ffffff" align= "center"> <font color="#0000ff" size="2"><b><a href="ggad.html"> <font color="#0000ff" size="2"><b> Home</b></font></a></b></font> </td> <td width="25%" bgcolor="#ffffff" align="right"> <a href="z69.html"><font color="#0000ff" size="2"><b> Next >>></b></font></a> </td> </tr> </table> </div> <div class="SECT1"> <h1 class="SECT1"> <a name="Z68">Source Tree Checklist</a> </h1> <p> As an initial overview, here are the important steps in creating a skeletal Gnome source tree. If you are starting a new program, you can simply follow this list and you won't forget anything. The rest of this chapter explains the checklist in more detail. It might also be helpful to download a Gnome package or two to look at as you follow the discussion (in particular, the "GnomeHello" source tree is intended to illustrate a proper build setup). </p> <ol type="1"> <li> <p> Create a toplevel directory to hold all the components of your application, including build files, documentation, and translations. </p> </li> <li> <p> It's often nice to create a <tt class="FILENAME"> src</tt> subdirectory of this toplevel directory to keep source code separate from everything else. </p> </li> <li> <p> In the toplevel directory, create <tt class="FILENAME"> AUTHORS</tt>, <tt class="FILENAME">NEWS</tt>, <tt class="FILENAME">COPYING</tt>, and <tt class= "FILENAME">README</tt> files. If desired, also create an empty <tt class="FILENAME">ChangeLog</tt>. </p> </li> <li> <p> Write a <tt class="FILENAME">configure.in</tt>; the main purpose of <tt class="FILENAME">configure.in</tt> is to determine which compiler, compiler flags, and linker flags to use. <tt class="FILENAME"> configure.in</tt> can also <span class="STRUCTNAME"> #define</span> symbols to reflect features of the current platform, placing these definitions in the automatically-generated file <tt class="FILENAME"> config.h</tt>. </p> </li> <li> <p> Write <tt class="FILENAME">acconfig.h</tt>, which is a template for <tt class="FILENAME">config.h.in</tt>. This file should <span class="STRUCTNAME">#undef</span> each symbol you will potentially <span class= "STRUCTNAME">#define</span> in <tt class="FILENAME"> config.h</tt>. The <tt class="APPLICATION"> autoheader</tt> program creates <tt class="FILENAME"> config.h.in</tt> based on <tt class="FILENAME"> acconfig.h</tt>, and <tt class="APPLICATION"> autoconf</tt> creates <tt class="FILENAME"> config.h</tt>. <tt class="APPLICATION">autoheader</tt> comes with <tt class="APPLICATION">autoconf</tt>. </p> </li> <li> <p> Create an empty file, <tt class="FILENAME"> stamp.h.in</tt>; this is used by the <span class= "SYMBOL">AM_CONFIG_HEADER</span> macro in <tt class= "FILENAME">configure.in</tt>. </p> </li> <li> <p> Write a <tt class="FILENAME">Makefile.am</tt> in the toplevel directory listing each subdirectory which contains source code; in each subdirectory, also write a <tt class="FILENAME">Makefile.am</tt>. </p> </li> <li> <p> Run the <tt class="APPLICATION">gettextize</tt> program that comes with the <tt class="APPLICATION"> gettext</tt> package. This creates the <tt class= "APPLICATION">intl</tt> and <tt class="APPLICATION"> po</tt> directories, needed for internationalization (<tt class="APPLICATION">gettextize</tt> is documented in the <tt class="APPLICATION">gettext</tt> manual). The <tt class="FILENAME">intl</tt> contains the GNU <tt class="APPLICATION">gettext</tt> source code; if users compiling the program do not have <tt class= "APPLICATION">gettext</tt>, they can pass the <tt class="APPLICATION">--with-included-gettext</tt> option to <tt class="FILENAME">configure</tt> to automatically compile a static version in the <tt class="FILENAME"> intl</tt> directory. The <tt class="FILENAME">po</tt> directory holds the translation files; <tt class= "APPLICATION">gettextize</tt> will also create a file called <tt class="FILENAME">po/Makefile.in.in</tt>, used to build the translations. </p> </li> <li> <p> Create a file called <tt class="FILENAME"> po/POTFILES.in</tt> listing source files which should be scanned for strings to translate. <tt class= "FILENAME">POTFILES.in</tt> can be empty at first. </p> </li> <li> <p> Copy <tt class="FILENAME">autogen.sh</tt> and the <tt class="FILENAME">macros</tt> directory from another Gnome module. You must modify <tt class="FILENAME"> autogen.sh</tt> to reflect the name of your package. Running <tt class="FILENAME">autogen.sh</tt> will invoke <tt class="APPLICATION">libtoolize</tt>, <tt class="APPLICATION">aclocal</tt>, <tt class= "APPLICATION">autoheader</tt>, <tt class="APPLICATION"> automake</tt>, and <tt class="APPLICATION"> autoconf</tt>. </p> </li> <li> <p> <tt class="FILENAME">autogen.sh</tt> invokes <tt class= "APPLICATION">automake</tt> with the <tt class= "APPLICATION">--add-missing</tt> argument. This will add some files, such as <tt class="FILENAME"> INSTALL</tt> with generic installation instructions. You can (and should) edit <tt class="FILENAME"> INSTALL</tt> to include any specific instructions for your application. <tt class="FILENAME">autogen.sh</tt> will also create a <tt class="FILENAME">Makefile</tt> in each directory. </p> </li> </ol> </div> <div class="NAVFOOTER"> <br> <br> <table width="100%" border="0" bgcolor="#ffffff" cellpadding= "1" cellspacing="0"> <tr> <td width="25%" bgcolor="#ffffff" align="left"> <a href="cha-source.html"><font color="#0000ff" size= "2"><b><<< Previous</b></font></a> </td> <td width="25%" colspan="2" bgcolor="#ffffff" align= "center"> <font color="#0000ff" size="2"><b><a href="ggad.html"> <font color="#0000ff" size="2"><b> Home</b></font></a></b></font> </td> <td width="25%" bgcolor="#ffffff" align="right"> <a href="z69.html"><font color="#0000ff" size="2"><b> Next >>></b></font></a> </td> </tr> <tr> <td colspan="2" align="left"> <font color="#000000" size="2"><b>Creating Your Source Tree</b></font> </td> <td colspan="2" align="right"> <font color="#000000" size="2"><b><tt class="FILENAME"> configure.in</tt></b></font> </td> </tr> </table> </div> </body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -