Debian Codegraph @

t/expected/padre_download_osx_noclass_noid_nospan.html

raw
1 <p>
2 [[PageOutline(1-5, Table of Contents, floated)]]
3 = DMG Betas =
4 </p>
5 <p>
6 As a beta release, Padre is available as a packaged Application for OsX.
7 </p>
8 <p>
9 See this page for the latest DMG: <a href="http://wildperl.com/padreonosx/">http://wildperl.com/padreonosx/</a>
10 </p>
11 <p>
12 This is a beta and we could really use your help. We need more OSX testers, and any help you can give us, even saying it runs fine for you, is important.
13 </p>
14 <p>
15 Open tickets can be found here: <a href="/wiki/osxbugs">osxbugs</a>, and <a href="http://widget.mibbit.com/?server=irc.perl.org&channel=%23padre">hop on to IRC</a> as the best way to report any issues and give feedback.
16 </p>
17 <h1>Installation from source</h1>
18 <p>
19 There are several methods of installing Padre from source. As such, they require some familiarity with command-line usage of OsX.
20 </p>
21 <p>
22 **System Perl vs User Perl:** Padre requires a 32bit version of Perl and wxWidgets 2.8.12. These are not the default on OsX. Additionally, the default &quot;system&quot; perl on OsX may be altered or changed in the course of software updates from Apple. Consequently, building Padre requires creating a self-contained perl, wxWidgets, and Padre.
23 </p>
24 <p>
25 **Xcode:** On OsX most of the common development utilities that are referenced by perl (gcc, make, etc) are provided by installing Xcode. The instruction sets below assume that you have installed these or reasonable substitutes on your system, that they are properly in your path, etc.
26 </p>
27 <p>
28 **Wx Tests:** There will be a point where you are compiling Wx. The tests for Wx involve generating many window primitives. These tests will fail if they are run inside of a gnu-screen or ssh session. (The error message might be a bit strange: stating issues creating the clipboard because of permissions.) Additionally, during the test cycle many of the tests will grab focus on the UI. This will make your system unusable for a short period of time. Let the tests run. If you try to quit out of them, you will cause the tests to fail and it will halt the compile.
29 </p>
30 <h2>Option 1 - Installation with Citrus Perl</h2>
31 <p>
32 Cirtus Perl is a portable distribution of perl that has pre-built Wx binaries and integration. A shortened form of installation instructions is below. Refer to the installation instructions on the download page below if you want full details.
33 </p>
34 <p>
35 - Download Citrus Perl from <a href="http://www.citrusperl.com/platform/macosx.html">http://www.citrusperl.com/platform/macosx.html</a>
36 - Unpack Citrus Perl into your favorite dev location:
37 <tt>#!sh
38 </p>
39 <blockquote>
40 <p>
41 cd ~/dev
42 tar xzvf ~/Downloads/citrusperl-standard-51402-20903-osx-i32-014.tar.gz
43 </p>
44 </blockquote>
45 <p>
46 <tt>
47 - This has created a &quot;</tt>CitrusPerl<tt>&quot; directory that has a fully isolated install of perl, including Wx. You can also use CPAN to add to this perl without polluting your system's install of perl with additional modules. (Also meaning that an apple update will not break your version of perl if you use this.)
48 - Configure Cirtus Perl to work in its new location
49 </tt>#!sh
50 </p>
51 <blockquote>
52 <p>
53 ./CitrusPerl/bin/relocateperl
54 ./CitrusPerl/bin/citrusvars.sh
55 </p>
56 </blockquote>
57 <p>
58 <tt>
59 - At this point you can put Citrus Perl in your path. Set it ahead of other entries by putting the line below as the last line in your </tt>.bash_profile<tt>. That will make any command line invocation of </tt>perl<tt> or </tt>cpan<tt> use Citrus Perl and not your system perl. Substitute </tt>/Users/joe/dev<tt> below with your chosen installation directory.
60 </tt>#!sh
61 </p>
62 <blockquote>
63 <p>
64 export PATH=/Users/joe/dev/CitrusPerl/bin:$PATH
65 </p>
66 </blockquote>
67 <p>
68 <tt>
69 - Reload your </tt>.bash_profile<tt> to use the new path
70 </tt>#!sh
71 </p>
72 <blockquote>
73 <p>
74 source ~/.bash_profile
75 </p>
76 </blockquote>
77 <p>
78 <tt>
79 - To install Padre, use </tt>cpan<tt> and run the command </tt>install Padre<tt>. This will build all required dependencies along the way, so it will take some time.
80 </tt>#!sh
81 </p>
82 <blockquote>
83 <p>
84 cpan
85 &gt; install Padre
86 &gt; exit
87 </p>
88 </blockquote>
89 <p>
90 <tt>
91 - Padre should now be in your path and usable on the command line
92 </tt>#!sh
93 </p>
94 <blockquote>
95 <p>
96 padre
97 </p>
98 </blockquote>
99 <p>
100 <tt>
101 </p>
102 padre
103 cpan
104 source ~/.bash_profile
105 export PATH=/Users/joe/dev/CitrusPerl/bin:$PATH
106 ./CitrusPerl/bin/relocateperl
107 <h2>Option 2 - Installation with Mac Ports</h2>
108 <p>
109 Mac Ports is a project to provide many GNU and Open Source utilities to OsX. It packages and installs them in <tt>/opt/local</tt>.
110 </p>
111 <p>
112 - Mac Ports can be downloaded and installed as a package from <a href="http://www.macports.org/install.php">http://www.macports.org/install.php</a> and configured:
113 <tt>#!sh
114 </p>
115 <blockquote>
116 <p>
117 sudo port -f selfupdate
118 </p>
119 </blockquote>
120 <p>
121 <tt>
122 - Remember to follow the instructions to put Mac Ports first in your path so the Ports version of perl will execute when called on the command line:
123 </tt>#!sh
124 </p>
125 <blockquote>
126 <p>
127 export PATH=/opt/local/bin:/opt/local/sbin:$PATH
128 </p>
129 </blockquote>
130 <p>
131 <tt>
132 - Install Perl and Wx (This will include many dependencies and take some time to compile and complete.)
133 </tt>#!sh
134 </p>
135 <blockquote>
136 <p>
137 sudo port install perl5 +threads
138 sudo port install wxWidgets
139 </p>
140 </blockquote>
141 <p>
142 <tt>
143 - Install Padre via CPAN
144 </tt>#!sh
145 </p>
146 <blockquote>
147 <p>
148 sudo /opt/local/bin/cpan
149 &gt; install Padre
150 </p>
151 </blockquote>
152 <p>
153 <tt>
154 - Padre should now be in your path and usable on the command line
155 </tt>#!sh
156 </p>
157 <blockquote>
158 <p>
159 padre
160 </p>
161 </blockquote>
162 <p>
163 <tt>
164 </p>
165 padre
166 sudo /opt/local/bin/cpan
167 sudo port install perl5 +threads
168 export PATH=/opt/local/bin:/opt/local/sbin:$PATH
169 <h2>Option 3 - Compiling a Perl with Perl Brew</h2>
170 <p>
171 We are attempting to automate the process using the bin/padre-brew.pl <a href="http://bit.ly/oiME1I">available here</a>.
172 </p>
173 <p>
174 If you want to build on your own you should note the environment settings and build parameters used on <a href="http://wildperl.com/2011/07/padre-on-osx-dmg-now-on-leopard-snow-leopard-and-lion/">OSX Lion</a>, or refer to the bin/padre-brew.pl source for other OSX levels.
175 </p>
176 <h1>Installing on top of the system Perl</h1>
177 <p>
178 //As stated above, this is not recommended. You are manipulating portions of the system OS which may be changed in the future by Apple and/or you may cause unintended side-effects in your OS.//
179 </p>
180 <p>
181 Pre-Lion versions of OsX had varying levels of Perl, Wx and sometimes wxPerl installed. Sometimes with a minimum of effort, a functioning wxPerl and Padre could be made to work.
182 (OS X 10.4 has wxPerl 0.22, 10.5 has a more recent version (0.6x for some x))
183 </p>
184 <p>
185 Generally, you do not use the system 'perl' executable, but build a 'wxPerl' executable (see this <a href="http://www.nntp.perl.org/group/perl.wxperl.users/2008/07/msg5978.html">thread regarding wxPerl invocation</a>).
186 </p>
187 <p>
188 Reading up on installation using <a href="/wiki/DownloadNetBSD">pkgsrc</a> may also help.
189 </p>
190 <h3>Checking what versions you currently have</h3>
191 <p>
192 If you have trouble you can check which version of wxWidgets you have:
193 <tt>#!perl
194 $ perl -MWx -le'print &quot;Wx Version: $Wx::VERSION &quot; . Wx::wxVERSION_STRING()'
195 </tt>
196 and on Mac:
197 <tt>#!perl
198 $ wxPerl -MWx -le'print &quot;Wx Version: $Wx::VERSION &quot; . Wx::wxVERSION_STRING()'
199 </tt>
200 We use Wx 0.87 and wxWidgets 2.8.8 so you probably should have those (or newer) too.
201 </p>
202 <h2>Installation from CPAN</h2>
203 <p>
204 The most straightforward method is to install everything from source. This will ignore any existing wxWidgets installation.
205 </p>
206 <ol><li>$ wxPerl -MCPAN -eshell
207 </li><li>[cpan] $ install Alien::wxWidgets [choose install from source, which is NOT the default]
208 </li><li>Go do something else while it compiles wxWidgets.
209 </li><li>[cpan] $ install Wx
210 </li><li>[cpan] $ install Padre</li></ol>
211 <p>
212 Padre has a LOT of prerequisites. You're likely to run into some problems with tests failing. IPC::Run3 was a particular problem due to its prerequisites, but a later individual install worked fine. Just make your way through them all, and 'force notest install $module' as needed. Once you've got padre installed you start it by running /usr/local/bin/padre.
213 </p>
214 <h3>Notes on building wxWdigets from source</h3>
215 <p>
216 When installing Alien::wxWidgets it will ask if you want to compile wxWidgets.
217 <strong>Do you want to fetch and build wxWidgets from sources?</strong>
218 If you don't have any installed or if you have an old version (&lt; 2.8.8) then you should answer yes.
219 It will try to download the source code of wxWidgets which is big and the download often fails.
220 </p>
221 <p>
222 To get around that you can download the file manually and put it in the extracted directory of
223 Alien::wxWidgets.
224 </p>
225 <p>
226 Something like this:
227 <tt>#!sh
228 </p>
229 <blockquote>
230 <p>
231 $ cd /tmp
232 $ wget <a href="http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.8.tar.gz">http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.8.tar.gz</a>
233 $ cpan
234 cpan&gt; look Alien::wxWidgets
235 $ cp /tmp/wxWidgets-2.8.8.tar.gz .
236 $ perl Makefile.PL
237 $ make
238 $ make test
239 $ make install
240 $ exit
241 cpan&gt;quit
242 $
243 </p>
244 </blockquote>
245 <p>
246 <tt>
247 </p>
248 <h2>Variation 1 - Taking the lazy way</h2>
249 <p>
250 If you're lazy and enjoy taking risks... the easiest way to install on OSX may be (there will be some test failures - which you'll have to force install, including Padre itself, due to wxPerl issues):
251 </p>
252 <p>
253 <tt>#!sh
254 cpan Alien::wxWidgets
255 wxPerl -MCPAN -eshell
256 </p>
257 <blockquote>
258 <p>
259 $ install Padre
260 </p>
261 </blockquote>
262 <p>
263 <tt>
264 and then replace the /usr/local/bin/padre script with the updated version at <a href="http://padre.perlide.org/trac/browser/trunk/Padre/script/padre">http://padre.perlide.org/trac/browser/trunk/Padre/script/padre</a>
265 </p>
266 <p>
267 After installing Alien::wxWidget there are new versions of wx-config and wxrc somewhere in your Perl Library Path, (mine went under site_perl/darwin-thread-multi-2level/Alien/wxWidgets/mac_2_8_10_uni/bin), which need to be first in your PATH, otherwise Wx might build against the wrong Library. As an alternative you can set an environment variable WX_CONFIG which has to point to the new wx-config executable. See the Wx docs for more info.
268 </p>
269 <h2>Variation 2 - Using a package manager for the Wx portion</h2>
270 <p>
271 Aside from building from source, you can also install newer versions of Wx on OS X using a package manager:
272 </p>
273 <p>
274 <a href="http://www.finkproject.org/">Fink</a>
275 <tt>#!sh
276 fink install wxmac28
277 </tt>
278 </p>
279 <p>
280 <a href="http://www.macports.org/">Mac Ports</a>
281 <tt>#!sh
282 port install wxWidgets
283 </tt>
284 </p>
285 <h1>Creating an App Icon for your command-line Padre</h1>
286 <p>
287 It is possible to create an Application icon to launch your command-line version of Padre. You can create an Applescript application to do this.
288 </p>
289 <p>
290 Launch the Applescript Editor from the Utilities folder in the Applications folder.
291 </p>
292 <p>
293 You will enter a line to launch padre which which uses the full path of your preferred perl and padre.
294 </p>
295 <p>
296 For Mac ports:
297 <tt>#!sh
298 </p>
299 <blockquote>
300 <p>
301 do shell script &quot;/opt/local/bin/perl /opt/local/bin/padre&quot;
302 </p>
303 </blockquote>
304 <p>
305 <tt>
306 </p>
307 <p>
308 For Citrus Perl: (change <tt>/Users/joe/dev/</tt> to your path for Citrus Perl)
309 <tt>#!sh
310 </p>
311 <blockquote>
312 <p>
313 do shell script &quot;/Users/joe/dev/CitrusPerl/i32/5-12/bin/perl /Users/joe/dev/CitrusPerl/i32/5-12/site/bin/padre&quot;
314 </p>
315 </blockquote>
316 <p>
317 <tt>
318 </p>
319 <p>
320 Select &quot;Save As&quot; under the file menu. Select the format of &quot;Application.&quot; Name it what you'd like and install it where you'd like it to be. (IE: the Applications folder)
321 </p>
322 <p>
323 Clicking on this icon should now launch Padre.
324 </p>
325 <hr />
326 <p>
327 = Links
328 * <a href="http://www.perlmonks.org/?node_id=910271">http://www.perlmonks.org/?node_id=910271</a>
329 </p>