LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1689|回复: 23

FC5编译XGL+COMPIZ(版本二)

[复制链接]
发表于 2006-3-31 14:01:15 | 显示全部楼层 |阅读模式
前几天按照论坛里兄弟的方法编译的XGL,尽管成功使用[gnome-window-decorator没有编译成功],但感觉言语上有些错乱,于是我又在网上仔细查了一些关于如何在FC5中编译XGL+COMPIZ的方法,最终在FedoraForum上找到了一篇思路比较清晰的文章,特此将之贴出来[尽管原文为英文,但是却是一般的日常用语,于是在此就不做翻译了,一些地方需要强调的地方除外]。
  我暂将这篇文档称之为版本二,希望前面发过编译XGL+COMPIZ的那位兄弟能够原谅我的擅做决定。
  由于原文中某些部分,特别是使用/utils目录中那个buiild工具时,那一行命令我也并不是很清楚,我给出的修改后的命令在我机器上测试成功,但不保证是不是有问题,因为我已经用前面兄弟的方法编译成功了,之所以再次用这种方法编译,是因为我的gnome-window-decorator没有编译成功。
  希望大家都能够享受到XGL带来的快乐。
  另,我的机器配置为:
  c4d 2.13G
  512
  gf 5200 fx
  编译完成后,比我直接用dapper 6.04里边的效果要好很多,而且相当流畅。
  原文如下:
First, you need to follow the modular building instructions for Xorg which can be found at:
http://xorg.freedesktop.org/wiki/ModularDevelopersGuide

The important note is when checking out the xorg server component to use the tag xgl-0-0-1 or you will be getting the wrong server. You also need the latest Mesa source from CVS @sourceforge.

Ok make a build dir:  [我个人认为,做者在这一点上做的很不错,需要用的代码全部放在一个指定的位置,因而显得十分有条理]

mkdir ~/usr/src/Xorg-devel                                                                                         [此句为我所加]
cd ~/usr/src/Xorg-devel
mkdir depends
cd depends
cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa login
cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa co Mesa
cd Mesa/
# make the thing CHANGE TARGET for your machine
make linux-x86              [此步在我机器上常出错,多试几次即可编译成功,小弟并不知道为什么]
#now copy libs to Mesa lib area
# this is needed by compiz @ runtime
mkdir -p /opt/Xorg-devel/lib/Mesa
cp lib/* /opt/Xorg-devel/lib/Mesa/.

# ok lets grap the proper Xorg stuff    [此步下载新的X所需要的一些文件]
cd ../../
cvs -d :pserver:anoncvs@anoncvs.freedesktop.org:/cvs/xorg login
cvs -d :pserver:anoncvs@anoncvs.freedesktop.org:/cvs/xorg co app data doc driver font lib proto util
# get the correct version of Xgl
cvs -d :pserver:anoncvs@anoncvs.freedesktop.org:/cvs/xorg co -r xgl-0-0-1 xserver

Now follow the instructions to build the myriad of libs, fonts, etc in the entire build. I used the build script format so for me this was:
./util/modular/build.sh -m /full/path/to/Mesa/CVS/Root -s /usr/bin/sudo /opt/Xorg-devel

[作者可能没有考虑到前面已经建过目录了,而且Mesa的源码我们已经下载好了,所以此处的命令实际上应是]:
./util/modular/build.sh -m /usr/src/Xorg-devel/depends/Mesa -s /usr/bin/sudo /opt/Xorg-devel


MAKE SURE YOU HAVE THE LATEST GLITZ/CAIRO AND DEVEL PKGS OR XGL WILL NOT BE BUILT
[这句话是指我们必须要有最新的glitz和cairo开发包,至于glitz的安装,我并不知道这个包的具体名称,前面写如何安装xgl+compiz的兄弟已经给出了方法,此不赘述]

Sorry to yell. Go have cofee, tea, whiskey, or whatever floats your boat.
[作者意识到,编译可能需要较长的时间,因此建议你去喝杯咖啡,或者威士忌,我们还是二锅头就好:)]

The errors cited above re: missing reqs like
[作者列出了一些常见错误,并给出了一些如何解决错误的办法,这些错误前面那位兄弟的帖子及回帖中已经有了相关的解决方法]
checking for XSERVERCFLAGS... configure: error: Package requirements (randrproto renderproto fixesproto damageproto xcmiscproto xextproto xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto scrnsaverproto bigreqsproto resourceproto fontsproto inputproto xf86dgaproto videoproto compositeproto trapproto recordproto resourceproto xineramaproto evieproto printproto xkbfile xfont xau fontenc xdmcp) were not met:

No package 'xkbfile' found
No package 'xfont' found
No package 'fontenc' found
stem from not having all the stuff you need either installed or failing to have your PKG_CONFIG_PATH updated to reflect where these libs are found.
For me:

export PKG_CONFIG_PATH=/opt/Xorg-devel/lib/pkgconfigPKG_CONFIG_PATH.

Ok say everything worked and all the stuff installed. Getting closer

[确认是否Xgl二进制可执行程序已经生成成功,如查没有生成,请检查是否是相关包未安装]

Make sure there is a /opt/Xorg-devel/bin/Xgl installed. If not, you likely don't have the latest cairo/glitz combo or their -devel packages. if not, install them, cd to xserver/xorg, run configure w/ the proper switches (you figure that out because you didn't listen above )

Ok, were getting close.
[下边这段话是关于旧版本gnome用户的一些指示,即然是FC5了,也就不需关注了。]
If you are still lagin' back on FC4, you will need a garnome or other update to your system to a recent gnome desktop that uses cairo for rendering. I used garnome2.12.3, and after a few easily solved problems had a gnome 2.12 desktop.

[开始下载及编译compiz]
Ok, now you can get compiz:

cd ~/usr/src/Xorg-devel/
cvs -d :pserver:anonymous@cvs.freedesktop.org:/cvs/xorg login
cvs -d :pserver:anonymous@cvs.freedesktop.org:/cvs/xorg co compiz
cd compiz
./autogen.sh --prefix=/opt/Xorg-devel
# the output at the end will indicate if it found everything you need to build both
# the composite mgr and the gnome-window-decorator
make
sudo make install


You may need to adjust PATH, PKG_CONFIG_PATH, and LD_LIBRARY_PATH depending on your target dir. If anyone has ?'s about this, post and i'll clarify. Any daring sole doing this should probably already understand these things...check man/info pages

Ok, now you can log out to test. (if garnome make sure you use a different user as the settings in Gnome 2.10 will NOT work for 2.12+! )


console log in as the root user and init to level 3:

init 3
#or
telinit 3


Ok, become the new user or console login in another vty and try something like this:

# update PATH, LD_LIBRARY_PATH
export PATH=/opt/Xorg-devel/binPATH
export LD_LIBRARY_PATH=/opt/Xorg-devel/libLD_LIBRARY_PATH

xinit /path/to/gnome-session -- /opt/Xorg-devel/bin/Xgl :0

# You need to add the appropriate settings after the :0 depending on your video card
# for me (NVIDIA 6800) the line looked like:
xinit /opt/garnome/bin/gnome-session -- /opt/Xorg-devel/bin/Xgl -fullscreen -ac -accel glx:pbuffer -accel xv:pbo :0

#then start the compiz daemon making sure it finds the MESA LIBS!~!!
LD_LIBRARY_PATH=/opt/Xorg-devel/lib/MesaLD_LIBRARY_PATH compiz --replace gconf decoration wobbly fade minimize cube rotate zoom scale move resize place switcher

# if it doesn't find out where Mesa is it won't find the GL_EXT_texture_from_pixmap which is only available in the latest source!!!

#finally
gnome-window-decorator


Ok, this was from memory, and CTRL-R'ing the command line. There were some small bugs along the way, and likely small ommisions above...but the way-cool results are worth the effort - if you like fast fonts, and wicked cool effects and have some evenings to burn.
 楼主| 发表于 2006-3-31 14:03:07 | 显示全部楼层
我不是很熟悉论坛里的笑脸符号,却发现它让有些命令中的目录分隔符给掩盖掉了,希望大家注意一下。
回复 支持 反对

使用道具 举报

发表于 2006-3-31 15:30:31 | 显示全部楼层
顶一下。。
:P就是那个笑脸

另外,有没有不用cvs的??俺cvs死活是连不上对方的服务器。。
回复 支持 反对

使用道具 举报

发表于 2006-3-31 16:19:41 | 显示全部楼层
cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa login

它需要密码??密码是多少?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-31 17:34:10 | 显示全部楼层
没有密码,要你输入密码时,按entre即可。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-31 17:35:32 | 显示全部楼层
不过,另外要告诉大家的是,这种方法需要编译的东西比较多,如果机器慢的话,就还是用前面那位兄弟的办法吧。
回复 支持 反对

使用道具 举报

发表于 2006-3-31 17:54:18 | 显示全部楼层
楼上己经成功装上啦
在安装的过程中有什么需要注意的??
回复 支持 反对

使用道具 举报

发表于 2006-3-31 18:26:42 | 显示全部楼层
那个粉色的笑脸应该替换成什么?
回复 支持 反对

使用道具 举报

发表于 2006-3-31 18:26:43 | 显示全部楼层
那个粉色的笑脸应该替换成什么?
回复 支持 反对

使用道具 举报

发表于 2006-3-31 18:26:44 | 显示全部楼层
那个粉色的笑脸应该替换成什么?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表