Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / docs / INSTALL.pod
1 If you read this file _as_is_, just ignore the funny characters you see.
2 It is written in the POD format (see pod/perlpod.pod) which is specially
3 designed to be readable as is.
4
5 =head1 NAME
6
7 Install - Build and install wxPerl
8
9 =head1 wxPerl installation
10
11     ************************************************************************
12     You need to install wxWidgets 2.5.3 or later before you can compile wxPerl.
13     For UNIX systems look at the section "INSTALL wxWidgets"; for Win32
14     systems, detailed build instructions for wxWidgets + wxPerl are included
15     in the section "COMPILING UNDER WIN32"; for Mac OS X, refer to
16     "INSTALL wxWidgets", and then to "USING wxPerl on MAC OS X"
17     ************************************************************************
18
19 =head1 Quick installation
20
21 This applies to UN*X systems, and only if wxWidgets 2.5.3 or later is already
22 compiled and installed.
23
24     # unpack the wxPerl archive
25     tar xzvf Wx-0.xx.tar.gz
26     cd Wx-0.xx
27     perl Makefile.PL   # (1)
28     make               # (2)
29     make test          # (3)
30     make install       # (4)
31
32 1) see below for a way to specify a different installation directory
33
34 2) under Windows you may need to use nmake, or another *make
35
36 3) you may also want to do
37
38      perl run minimal
39      perl run controls
40      ...
41
42 against the samples in the 'samples' subdirectory, and
43
44    perl demo/demo.pl
45
46 before installing
47
48 4) you may need Administrator/root privileges to install
49
50 =head1 Additional flags to Makefile.PL
51
52 In addition to ExtUtils::MakeMaker flags wxPerl Makefile.PL accepts
53
54   --debug
55
56 Currently only under Win32 or GCC
57 adds debugging information to the library
58
59   --extra-libs={extra libraries}
60
61 Adds extra libraries to the link command line
62
63   --extra-cflags={extra compiler flags}
64
65 Adds extra compiler flags to compiler line
66
67   --help
68
69 Show the full list of options
70
71 =head1 Installing wxWidgets (on UNIX systems and Mac OS X)
72
73 wxWidgets 2.5.3 or later is required for wxPerl to work.
74
75 For UNIX systems only. If you are using prepackaged wxWidgets binaries you
76 need to install the -dev and -contrib-dev packages in order to compile
77 wxPerl, otherwise you just need the main package and the -contrib package.
78 If you are compiling wxWidgets yourself, the quick way is:
79
80   ./configure
81   make
82   make install
83   cd contrib/src/stc
84   make
85   make install
86
87 If something goes wrong, please refer to the wxWidgets
88 installation instructions.
89
90 =head1 Installing under Win32
91
92 This wxPerl version was tested with MinGW 3.0 and MS Visual C++ 5.
93 Older MinGW versions (from 1.1 onwards) and newer versions will likely work.
94 For the remainder of this section I'll assume that your Perl is installed
95 in C:\Perl
96
97 =head2 MS Visual C++ 5 (wxWidgets 2.5.x), MS Visual C++ 6 SP4 (wxWidgets 2.5.x)
98
99 wxWidgets 2.5.3 or later is required for wxPerl to work.
100
101 Build wxWidgets as a dll
102
103   cd z:\path\to\wx\build\msw
104   nmake -f makefile.vc SHARED=1 BUILD=release
105   cd ..\..\contrib\build\stc
106   nmake -f makefile.vc SHARED=1 BUILD=release
107
108   # build wxPerl
109   set WXDIR=z:\path\to\wx
110   set WXWIN=z:\path\to\wx
111
112   perl Makefile.PL
113   nmake
114   nmake test
115   nmake install
116
117 To build a debugging wxPerl, follow the instructions above passing
118 BUILD=debug DEBUG_RUNTIME_LIBS=0 to wxWidgets makefile and --debug
119 to Makefile.PL.
120
121 =head2 MinGW 1.1 or later (wxWidgets 2.5.x)
122
123 wxWidgets 2.5.3 or later is required for wxPerl to work.
124
125 Get MinGW from http://www.mingw.org/ ; choose the all-in-one
126 package (downloading the individual packages will work but requires
127 you knowing how to install them). MSYS is not required.
128
129 If you want to compile wxPerl against ActivePerl using MinGW,
130 you ned to first download and install ExtUtils::FakeConfig from
131 http://wxperl.sourceforge.net/ap_mingw/ ; then just replace the
132 "perl Makefile.PL" with "perl -MConfig_m Makefile.PL". If you built
133 Perl from sources, you don't need this additional step.
134
135 Build wxWidgets as a dll
136
137   cd z:\path\to\wx\build\msw
138   make -f makefile.gcc SHARED=1 BUILD=release
139   cd ..\..\contrib\src\stc
140   make -f makefile.gcc SHARED=1 BUILD=release
141
142   # now build wxPerl
143   # get dmake from http://www.cpan.org/authors/id/GSAR/dmake-4.1pl1-win32.zip
144   set WXDIR=z:\path\to\wx
145   set WXWIN=z:\path\to\wx
146
147   perl Makefile.PL
148   dmake
149   dmake test
150   dmake install
151
152 To build a debugging wxPerl, follow the instructions above passing
153 BUILD=debug to wxWidgets makefile and --debug to Makefile.PL.
154
155 =head1 Specifying the installation path
156
157 If you don't want to install wxPerl as a system module, you must
158 specify a different installation path. With recent ExtUtils::MakeMaker
159 you can do this by using
160
161   perl Makefile.PL PREFIX=path
162
163 On older ExtUtils::MakeMaker version the correct incantation
164 might be different.
165
166 =head1 Using wxPerl on Mac OS X
167
168 The 'perl' executable shipped with your OS can't be used to run executables
169 that interact with the GUI, hence you need to use the special 'wxPerl'
170 executable created by wxPerl.
171
172 =head1 FAQ
173
174 =head2 Problems compiling XRC and/or STC
175
176 Usually they start like this:
177
178   STC.c:33:24: wx/stc/stc.h: No such file or directory
179
180 and go ahead with many compilation errors.
181 This usually means you did not install wxWidgets' 'contrib' libraries;
182 either install them or disable STC/XRC passing --disable-stc --disable-xrc
183 to Makefile.PL.
184
185 =head2 C++ compiler
186
187 wxPerl needs a C++ compiler to build. By default it will use
188 the C++ compiler that was used to compile wxWidgets; this can cause
189 problems if Perl was compiled with a C compiler of a different brand.
190 For example if you compile Perl with GCC and wxWidgets with ICC or
191 Perl with Sun C compiler and wxWidgets with G++ you will most likely
192 not be able to compile wxPerl. Exceptions are: under Windows you can
193 use ActivePerl (compiled with MS Visual Studio) and wxWidgets compiled
194 with MinGW by using ExtUtils::FakeConfig, under Solaris a similar
195 tool exists for Sun C Compiler -> GCC/G++ compilation.