⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 installation.docbook

📁 LINUX 下, 以 QT/KDE 写的档案管理员
💻 DOCBOOK
📖 第 1 页 / 共 3 页
字号:
<sect2 id="sourcedownload"><title>I have downloaded the sources for &krusader;. What now?</title><para>Check the environment variables &kdeqtdir_lnk;.</para><para>In order to compile and install &krusader; on your system, type the following in the base directory of the &krusader; package:</para><screen><prompt>$</prompt> <userinput><command>./configure</command></userinput><prompt>$</prompt> <userinput><command>make</command></userinput><prompt>$</prompt> <userinput><command>su -c 'make</command> <option>install'</option></userinput></screen>&krusaderui_rc_text; <para>Since &krusader; uses <command>autoconf</command> and <command>automake</command> you should have no trouble compiling it. Should you run into problems please read the detailed installation instructions below.</para></sect2><sect2 id="install_tutorial"><title>Installation Tutorial</title><para>The next section will explain step by step, in detail, how to install &krusader;. This question has been asked many times and especially users new to &Linux; often have problems compiling software from source. Therefore, we are trying to keep the explanations as detailed as possible even if they are mostly not &krusader; specific. Experienced users may easily skip most of the steps.</para><para>Because not all &Linux; distributions do follow the &fhs_url; it's unfortunately impossible to write a tutorial that always works in all circumstances, but with these guidelines will be a big help in the right direction.</para><note><para>If you encounter problems, please read first this installation procedure and the &faq_lnk;, if this does not solve your problem then feel free to ask for help with an &help_request_lnk;. </para></note><orderedlist><listitem>   <para>Install all needed packages and libraries that you need for the compilation, please read the &faq_lnk;. <tip><para>If you install &kdevelop; then (almost) everything that you need to compile &krusader; will be installed on your computer, BUT please don't use &kdevelop; to compile &krusader; if you are not a developer (possible automake hell), just follow the next instructions.</para></tip>          </para>     <!-- Empty line to make it more readable --></listitem><listitem>   <para>Open your favourite terminal emulator (&eg; &konsole;).</para>     <!-- Empty line to make it more readable --></listitem><listitem><para>We recommend you create a separate directory to keep all the sources you compile in. This will give you a better overview of installed programs and makes it easier to uninstall them later. <screen><prompt>$</prompt> <userinput><command>mkdir</command> ~/source</userinput></screen> The chosen directory is just an example, any other will work.</para>       <!-- Empty line to make it more readable -->       <!-- Empty line to make it more readable (second line is needed) --></listitem><listitem>  <para>Copy the sources to the <filename>~/source</filename> directory and unpack them. <screen><prompt>$</prompt> <userinput><command>cp</command> /<replaceable>"your_dir"</replaceable>/krusader-x.xx.tar.gz ~/source</userinput></screen>  <screen><prompt>$</prompt> <userinput><command>cd</command> ~/source</userinput></screen>  <screen><prompt>$</prompt> <userinput><command>tar</command> <option>-xzvf</option> krusader-x.xx.tar.gz</userinput></screen></para>    <!-- Empty line to make it more readable --></listitem><listitem><para>Optional step: the tarball is no longer needed at this point, you can delete it if you want or you can keep it if you like. <screen><prompt>$</prompt> <userinput><command>rm</command>  krusader-x.xx.tar.gz</userinput></screen></para>        <!-- Empty line to make it more readable --></listitem><listitem> <para>Change to the directory containing the sources. <screen><prompt>$</prompt> <userinput><command>cd</command>  krusader-x.xx</userinput></screen></para>   <!-- Empty line to make it more readable --></listitem><listitem id="kde_qt_dir"><para>Check the environment variables <envar>QTDIR</envar> and <envar>KDEDIR</envar>. &krusader;'s <command>./configure</command> script needs to know where the &Qt; and &kde; directories are. </para><para><envar>QTDIR</envar> : <replaceable>&lt;path to your Qt installation&gt;</replaceable> &eg; <filename>/usr/lib/qt3</filename> or <filename>/usr/qt3</filename></para><para><envar>KDEDIR</envar> : <replaceable>&lt;path to your KDE installation&gt;</replaceable> &eg; <filename>/usr</filename> or <filename>/opt/kde3</filename></para><para>Normally your distribution will set them for you, but experience has shown that some don't. You can easily check the values with the <command>echo</command> command. <screen><prompt>$</prompt> <userinput><command>echo</command> $QTDIR</userinput>/usr/lib/qt3<prompt>$</prompt> <userinput><command>echo</command> $KDEDIR</userinput>/usr</screen> If both commands give an output, the enviroment variables are set (the above example are the settings of &mandriva;-&Linux;). In case you just receive empty lines, the variables are not set and you have to set them it manually. If you have no idea what to set the variables to, or if you want to check if the variables are correctly set, ask your distributor or use the <command>find</command> command. <screen><prompt>$</prompt> <userinput><command>find</command> <option>/usr /opt -name</option> qtconfig <option>-type f 2>/dev/null</option></userinput>/usr/lib/qt3/bin/qtconfig<prompt>$</prompt> <userinput><command>find</command> <option>/usr /opt -name</option> kdeinit <option>-type f 2>/dev/null</option></userinput>/usr/bin/kdeinit</screen> In this case <filename>/usr/lib/qt3</filename> is your <envar>QTDIR</envar> and <filename>/usr</filename> is your <envar>KDEDIR</envar>. The installed binaries will go to <filename>/usr/bin</filename>. Now we will set the enviroment variables with the <command>export</command> command. <screen><prompt>$</prompt> <userinput><command>export</command> QTDIR=<replaceable>&lt;replace with your QTDIR&gt;</replaceable></userinput></screen><screen><prompt>$</prompt> <userinput><command>export</command> KDEDIR=<replaceable>&lt;replace with your KDEDIR&gt;</replaceable></userinput></screen></para>  <note><para>These enviroment variables are only set for the lifetime of your current shell. When you close your terminal and open a new one they will be gone. Assuming &krusader; is not the only &Qt;/&kde; program you want to compile, we recommend to make these settings permanent (&eg; append both export commands to your <filename class="directory">/etc/profile</filename>) file.</para></note><para>If you can't determine your KDEDIR than <command>kde-config --prefix</command> might help you.</para>     <!-- Empty line to make it more readable -->     <!-- Empty line to make it more readable (second line is needed) --></listitem><listitem>  <para>If you have downloaded a stable version <filename>"krusader-x.xx.tar.gz"</filename> or a beta version <filename>"krusader-x.xx-betax.tar.gz"</filename>, you can skip this step, in this case the <filename>./configure</filename> script is provided.</para>  <para>If you have downloaded a CVS build or nightly tarball <filename>"krusader-cvs-yyyy-mm-dd.tar.gz"</filename>", you will have to run the following command to create the <filename>./configure</filename> script: <screen><prompt>$</prompt> <userinput><command>make</command> <option>-f</option>  Makefile.cvs</userinput></screen></para>  <para>If everything is OK you will see the following output on your screen: <screen><prompt>$</prompt> <userinput><command>make</command> <option>-f</option> Makefile.cvs</userinput>This Makefile is only for the CVS repositoryThis will be deleted before making the distribution*** Creating acinclude.m4*** Creating list of subdirectories*** Creating configure.in*** Creating aclocal.m4*** Creating configure*** Creating config.h template*** Creating Makefile templates*** Postprocessing Makefile templates*** Creating date/time stamp*** FinishedDon't forget to run ./configureIf you haven't done so in a while, run ./configure --help<prompt>$</prompt></screen></para>   <note><para>You will need to have: <application>autoconf 2.52, 2.53 or 2.54</application> and <application>automake 1.6</application> (or higher) to run the <command>make -f Makefile.cvs</command> command</para></note>   <tip><para>If you encounter problems with this command click <link linkend="krusader_cvs">here</link>. &krusader; provides 2 nightly builds (snapshots) one with a <filename>./configure</filename> script and one without.</para></tip>     <!-- Empty line to make it more readable -->     <!-- Empty line to make it more readable (second line is needed) --></listitem><listitem>  <para>Your &Linux; distro &krusader; RPM or DEB package will usually install &krusader; in the <filename>KDEDIR/bin</filename> directory. According to the &fhs_url;, any user installed files should go to the <filename>/usr/local</filename> directory, but in some cases you might want that &krusader; will be installed in an other directory, this behaviour can be determed with the prefix option. If you don't have root access <filename>/home/YOUR_USERNAME/.kde</filename> is probably a good choice. <screen><prompt>$</prompt> <userinput><command>./configure</command> <option>--prefix=/usr/local</option></userinput></screen></para>  <para>This will take about 1 minute, if everything goes well it will &eg; end with the following messages: </para><para><screen>fooKrusader Project:-----------------Source code location: .C Compiler:           gccC Compiler flags:     -ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith-Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2-Wformat-security -Wmissing-format-attributeC++ Compiler:         g++prefix:               /usr/localkde_libraries:        /usr/includekde_includes:         /usr/libkde_locale:           /usr/share/localeqt_libraries:         /usr/lib/qt3/libqt_includes:          /usr/lib/qt3/includeKDEDIR:               /usrQTDIR:                /usr/lib/qt3Install path:         /usr/local/binkrusader version:     1.51krusader binary:      /usr/local/bin/krusader     (after 'make install')Thank you for using KrusaderGood - your configure finished. Start make now<prompt>bash$</prompt></screen></para><para>This is the output for &Mandrake;-&Linux; 10, other distributions may give a different output.</para><tip><para>At the end of the <command>./configure</command> script you will find a summary of the most important settings, &eg; where the &krusader; binary will be installed (after the 'make install' command). This part will also display a warning if the environment variables &kdeqtdir_lnk; are empty. </para></tip>  <!-- Empty line to make it more readable -->  <para>Since &krusader;-1.70.0 <command>./configure</command> has two specific &krusader; options: <itemizedlist> <listitem> <para><userinput><command>./configure</command> <option>--without-konqueror</option></userinput>: build Krusader without support &konqueror;'s servicemenus, default=with. This means that &konqueror;'s right-click menu entries will not be available.</para> </listitem> <listitem> <para><userinput><command>./configure</command> <option>--without-javascript</option></userinput>: build Krusader without JavaScript support, default=with. This means that the &javascript_console_lnk; will not be available.</para> </listitem> </itemizedlist> In the past the support was always compiled in when the headers where found, now you have the choice. </para><para>Use <userinput><command>./configure</command> <option>--help</option></userinput> to see more options or read the <filename>INSTALL</filename> file in the &krusader; sources.</para><para>If you dit use the an other --prefix= than <filename>$KDEDIR or /usr/local</filename> , then it can't hurt to do an extra check: <screen><prompt>$</prompt> <userinput><command>kde-config</command> <option>--path exe</option></userinput>/home/frank/.kde/bin/:/usr/bin/:/usr/local/bin/   <prompt>$</prompt></screen> If the &lt;prefix_dir/bin&gt; directory is not shown, you need to use e.g. <command>export KDEDIRS=/usr/local:/usr</command>. To make these settings permanent you can &eg; append this export command to your <filename>/etc/profile</filename> file. Than you need to restart &kde;, and check again. </para>  <note><para>If <command>./configure</command> fails, take a look at &missing_libs_lnk;.</para></note>    <!-- Empty line to make it more readable --></listitem><listitem>  <para>Start the compilation process with the <command>make</command> command. <screen><prompt>$</prompt> <userinput><command>make</command></userinput></screen> This will take about 10 to 40 minutes, if everything goes well it will &eg; end with the following messages: <screen>foomake[2]: Leaving directory `/home/source/krusader_kde3/tar'make[2]: Entering directory `/home/source/krusader_kde3'make[2]: Leaving directory `/home/source/krusader_kde3'make[1]: Leaving directory `/home/source/krusader_kde3'<prompt>bash$</prompt></screen></para>    <!-- Empty line to make it more readable -->  <para

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -