红联Linux门户
Linux帮助

下了个PainTown,是源码的,不知如何安装,求助

发布时间:2011-03-05 16:18:11来源:红联作者:灯火辉煌
系统是ubuntu10.10
下面是readme,求命令
Paintown
Version 3.4.0
Jon Rafkind
?/??/2010

Topics:
Get Source
Compilation
Linux
Windows
Cygwin
OSX
Install
Linux
Scripting
Requirements to build
Thanks


* Get Source:

If you are reading this you might already have the source. If not get it from here
Game engine: $ svn co https://paintown.svn.sourceforge.net/svnroot/paintown/trunk

You need the svn program, which is part of subversion - http://subversion.tigris.org/, to do this. Put the data directory inside the trunk directory, trunk/data.

As of r1124 the data/ directory is an external resource for trunk, so you only have to check out trunk and svn will automatically get data/ for you.

Data: $ svn co https://paintown.svn.sourceforge.net/svnroot/paintown/data

* Compilation:

--------------------------------------
Ubuntu users: There is a script that will install the necessary packages and then
invoke the compilation scripts.

Type this:
$ ./easy-compile-ubuntu
--------------------------------------

You can use scons or cmake.

If the scons build fails because it cannot find hawknl/nl.h it may be because of this problem, http://scons.tigris.org/issues/show_bug.cgi?id=2121. This error will manifest itself like so:

build/network/network.h: 5:23: error: hawknl/nl.h: No such file or directory

Try the patch listed on this page, http://scons.tigris.org/nonav/issues/showattachment.cgi/448/bug2121_proposed_patch.
Upgrading to scons 1.1.0 also fixes this issue. http://www.scons.org

To change the data directory using scons, give the data= argument.
$ scons data=my/own/path

* Linux

$ scons

* Windows

To use mingw type

$ scons env=mingw

Otherwise

$ scons

Or you can use cmake

paintown $ md b
paintown $ cd b
paintown/b $ cmakesetup ..
paintown/b $ make

The executable will end up in bin/paintown.exe

To build a statically linked binary give the 'static' target
$ scons static

* Cygwin

Don't use cygwin's tools. Install python/scons/mingw for regular windows and use that.
$ export CYGWIN=1
$ c:\progra~1\Python24\Scripts\scons

* OSX
$ scons

How to build a .dmg file of paintown:
$ scons static
$ misc/make-osx-bundle

This will create paintown-x-y.app/ and paintown-x-y.dmg.

You need buildDmg.pl: http://www.objectpark.org/buildDMG.html
I have placed the perl script in the misc directory, misc/buildDMG.pl, so just put
that in a directory that is part of your path.

* Install:

* Linux

$ ./install.sh -d -b

Copy the data directory to and put a script in .
Default directory is '/usr/share/games/paintown-x.x' where x.x is the version.
Default directory is '/usr/games'

The script will prompt you to input these directories if you do not
give -d and/or -b.

After running install.sh (assuming default values for and ) you can run
$ /usr/games/paintown

* Anything other than Linux
Copy the binary and data somewhere. Otherwise use the prepackaged installers.

* Scripting

A python engine has been added to paintown so you can script a level. See
scripting.txt for more details.

* Requirements to build:

You need the following things to compile Paintown:
* gcc - http://www.gnu.org/software/gcc/
Either * scons - http://www.scons.org
* python - http://www.python.org
Or
* cmake - http://www.cmake.org
* Allegro - 4.1 or higher. http://alleg.sf.net
* zlib - http://www.zlib.net/
* libpng - http://www.libpng.org/pub/png/libpng.html
* pthreads - If you are on Unix you should have this or you can install glibc and you will get it. Windows people: http://sources.redhat.com/pthreads-win32/
* freetype - Installed on most Unix systems along with X11. Windows people: http://gnuwin32.sourceforge.net/packages/freetype.htm.
* Python headers, usually this comes with python

* Quick instructions for ubuntu
$ sudo apt-get install python-dev libfreetype6-dev liballegro4.2 zlib1g-dev

* Detailed windows instructions
Get unxutils for things like mv, rm, cp - http://www.sf.net/projects/unxutils
Find the .zip. It unzips as usr\local\wbin, so put that in your path or just
copy all the files in usr\local\wbin to your c:\mingw\bin directory.
For libpng/zlib see here: http://tjaden.strangesoft.net/loadpng/mingw.html
Python 2.4.4 (yes this is old but the game is hardcoded to use it):
http://www.python.org/download/releases/2.4.4/
Add c:\python24 to your PATH
Copy libs\libpython24.a to c:\mingw\lib
Scons - http://www.scons.org
Then add c:\python24\scripts to your PATH
pthreads - http://sources.redhat.com/pthreads-win32/
get pthreads-win32-2-8-0-release.exe, let it unzip somewhere, then copy
the stuff in prebuilt\include to your mingw\include directory. copy the
.a files to c:\mingw\lib
allegro - http://alleg.sf.net
get the 4.2.3 package and dx70_mgw.zip
Get freetype from http://gnuwin32.sourceforge.net/packages/freetype.htm. Copy
the resulting headers into your include path. Dont copy in freetype2, just the
path underneath it, freetype2\freetype.
Gnu regex: http://gnuwin32.sourceforge.net/packages/regex.htm
Use the dependancy walker: http://www.dependencywalker.com/ to check that
all required dlls are around.

* Thanks:
Rain sound - by inchadney. http://freesound.iua.upf.edu/usersViewSingle.php?id=28867
DUMB - http://dumb.sf.net
loadpng - http://tjaden.strangesoft.net/loadpng/
文章评论

共有 3 条评论

  1. deepwhite 于 2011-03-07 09:00:19发表:

    README 里面不是说的很清楚了么?

  2. hcc 于 2011-03-05 16:51:33发表:

    看置顶的faq,三楼有源码安装的链接

  3. yehg01 于 2011-03-05 16:41:49发表:

    有configure和makefile的就用linux程序安装传说中的三部曲-配置、编译、安装!
    没有这个只有源代码的话)3):o。。。你再去参考下automake和atuoconf两个软件的用法吧!
    这两个软件可以帮你手工制作出configure和makefile,然后就还是老三步安装吧。。。