OSDN Git Service

portability: small code cleanup
[mypaint-anime/master.git] / README
1 MyPaint - drawing program with dynamic brushes for graphic tablets
2
3 The license is described in the file LICENSE.
4 Documentation can be found within the program and on the homepage:
5 http://mypaint.info/
6 A list of contributors can be found in the about dialog.
7
8 Building on Linux:
9
10     Compile and run:
11     scons && ./mypaint
12
13     Install:
14     scons prefix=/usr/local install
15
16     Required: pygtk, python, swig, gtk, numpy, pycairo(>=1.4), libpng
17     Debian users: apt-get install g++ python-dev libglib2.0-dev python-numpy swig scons gettext libpng12-dev
18
19     Recommended: a pressure sensitive input device (graphic tablet)
20
21 Building on Windows:
22
23     NOTE: This is still very experimental.
24     If you'd much rather simply have a semi-recent pre-build version of MyPaint for Windows,
25     downloads should be available on the website.
26
27     NOTE: This page might contain more up to date instructions:
28     http://opensourcepack.blogspot.com/2009/08/building-mypaint-in-windows.html
29
30     To build on a Windows platform there are a handful of things you need to setup before building.
31     As the very first step you should make sure you have the following things installed correctly on your system:
32         
33         Tools:
34             SCons
35             MinGW (or the like)
36             Python 2.5 (or possibly above)
37             SWIG
38             pkg-config
39         
40         Libs:
41             GTK+
42             (And for Python:)
43             PyGTK
44             PyGObject
45             PyCairo
46             PIL
47             Numpy
48             Numeric ( This is the predecessor to Numpy, and dependency might depend on your choice of other libs - you might actually not need it )
49         
50     When everything is installed you will most likely have to set the following Environmet Variables under Windows.
51     These will naturally need to reflect the way you installed the above mentioned tools and libs.
52     The variables and example values are given here:
53         
54         PATH                        =   "C:\MinGW\bin;C:\GTK\bin;C:\swig;C:\Python25;C:\Python25\Scripts;"
55         PYTHONPATH          =   "C:\Python25\Lib\site-packages"
56         PKG_CONFIG_PATH =   "C:\Python25\Lib\pkgconfig"
57
58         ( The following is handy for debugging purpose, but should only be use when needed - NOT required ! )
59         PYTHONVERBOSE       =   "1"
60     
61     Along the line you will most likely also have to make the missing ".pc" files for pkg-config.
62     These should be put in one of the locations specified in PKG_CONFIG_PATH.
63     Here you should have the following files:
64     
65         numpy.pc
66         pycairo.pc
67         pygobject-2.0.pc
68         pygtk-2.0.pc
69         python25.pc
70     
71     If they do not exist and are not found elsewhere in PKG_CONFIG_PATH, you have to write them yourself.
72     These files are rather simple, containing only a few lines.
73     If you're not able to create these yourself by trial'n'error, try Google some info on the format.
74
75     Fortunately once everything is set up building should be a smooth process.
76     Open the Command Prompt and simply follow these two steps:
77         
78         "cd \mypaint-trunk\"        To go the dir containing the downloaded source code.
79         "scons"                                 Start up SCons and have it read the SConstruct script.
80                                                         This is the where 'mypaint.dll' and 'mypaint.exe' (hopefully) are build.
81     
82     Now the remaining problem is to boil it all down to a reasonable clean set of files.
83     At this stage you will have to experiment a lot - and again utilize your trial'n'error skills.
84     Some of the files you'll most likely need to find are:
85     
86         ( in no particular order )
87     
88         libglib-2.0-0.dll,      libgobject-2.0-0.dll,           libpangowin32-1.0-0.dll,
89         libgmodule-2.0-0.dll,   libgdk_pixbuf-2.0-0.dll,    libgthread-2.0-0.dll,
90         libcairo-2.dll,             libpangocairo-1.0-0.dll,    libgdk-win32-2.0-0.dll,
91         libatk-1.0-0.dll,           libgio-2.0-0.dll,                   libgtk-win32-2.0-0.dll
92         libpng12-0.dll,             libpango-1.0-0.dll,
93         
94         zlib1.dll,  jpeg62.dll,     libtiff3.dll,
95         tk84.dll,       tcl84.dll,
96         
97         python25.dll,       MSVCR71.dll,    w9xpopen.exe,
98         
99         numpy.core.umath.pyd,               numpy.lib._compiled_base.pyd,
100         numpy.core.multiarray.pyd,  numpy.core.scalarmath.pyd,
101         numpy.fft.fftpack_lite.pyd, numpy.core._sort.pyd,
102         numpy.random.mtrand.pyd,        numpy.linalg.lapack_lite.pyd,
103         
104         gtk._gtk.pyd,       gobject._gobject.pyd,       cairo._cairo.pyd
105     
106     This stage is just insanity for you perfectinists out there. Noone will mind if you skip this step.
107     Likely MyPaint will run just fine, finding these files elsewhere on your system.
108     BUT! if it turns out it doesn't or if you need to run MyPaint on other systems than the one you build it on,
109     you'll still have to have these files in the directory you keep 'mypaint.exe'.
110     
111     Good luck !
112     
113     PS: If you give up along the way there should be semi-recent builds available on the website.
114     PPS: Much in line with all the shared libs metioned above,
115         the exe file is build to import two files 'python25.zip' and 'site-packages.zip'.
116         These files were ment to hold any addictional python scripts needed.
117         Examine the files from the recent Windows builds on the website for reference.