DMG Betas

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.

Open tickets can be found here: osxbugs, and hop on to IRC as the best way to report any issues and give feedback.

Installation from source

There are several methods of installing Padre from source. As such, they require some familiarity with command-line usage of OsX.

**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 "system" 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.

**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.

**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.

Option 1 - Installation with Citrus Perl

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.

- This has created a "CitrusPerl" 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.)
- Configure Cirtus Perl to work in its new location
#!sh

./CitrusPerl/bin/relocateperl
./CitrusPerl/bin/citrusvars.sh

- 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 .bash_profile. That will make any command line invocation of perl or cpan use Citrus Perl and not your system perl. Substitute /Users/joe/dev below with your chosen installation directory.
#!sh

export PATH=/Users/joe/dev/CitrusPerl/bin:$PATH

- Reload your .bash_profile to use the new path
#!sh

source ~/.bash_profile

- To install Padre, use cpan and run the command install Padre. This will build all required dependencies along the way, so it will take some time.
#!sh

Option 3 - Compiling a Perl with Perl Brew

We are attempting to automate the process using the bin/padre-brew.pl available here.

If you want to build on your own you should note the environment settings and build parameters used on OSX Lion, or refer to the bin/padre-brew.pl source for other OSX levels.

Installing on top of the system Perl

//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.//

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.
(OS X 10.4 has wxPerl 0.22, 10.5 has a more recent version (0.6x for some x))

We use Wx 0.87 and wxWidgets 2.8.8 so you probably should have those (or newer) too.

Installation from CPAN

The most straightforward method is to install everything from source. This will ignore any existing wxWidgets installation.

$ wxPerl -MCPAN -eshell

[cpan] $ install Alien::wxWidgets [choose install from source, which is NOT the default]

Go do something else while it compiles wxWidgets.

[cpan] $ install Wx

[cpan] $ install Padre

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.

Notes on building wxWdigets from source

When installing Alien::wxWidgets it will ask if you want to compile wxWidgets.
Do you want to fetch and build wxWidgets from sources?
If you don't have any installed or if you have an old version (< 2.8.8) then you should answer yes.
It will try to download the source code of wxWidgets which is big and the download often fails.

To get around that you can download the file manually and put it in the extracted directory of
Alien::wxWidgets.

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.

Variation 2 - Using a package manager for the Wx portion

Aside from building from source, you can also install newer versions of Wx on OS X using a package manager: