| 1 | == Windows == |
| 2 | |
| 3 | === Developers working on Windows === |
| 4 | || François Perrad || Win2000-SP4 || MinGW/GCC 3.4.2 || |
| 5 | || Ronald Blaschke || Windows XP, Windows XP x64 || Visual C++ 9.0 || |
| 6 | || Paul Cochrane || Windows XP || Visual C++ 2005 Express Edition || |
| 7 | |
| 8 | === Development on Windows === |
| 9 | ==== What to download and install ==== |
| 10 | * [http://strawberryperl.com Strawberry Perl] |
| 11 | * [http://subversion.tigris.org/project_packages.html Subversion] |
| 12 | * Scroll down to Windows section, and get the command-line binaries (probably easiest to grab the "Friendly Installer Program" versions) |
| 13 | * [http://www.microsoft.com/express/download/ Microsoft Visual Studio 2008 Express Edition for C++] |
| 14 | |
| 15 | ==== Setting up Microsoft Visual Studio ==== |
| 16 | Now you will need to register the software, otherwise you can only use it for 30 days. To register, start up the `Visual C++ Express` program directly from the Start Menu. Go to the Help menu and select "Register Product". Then click on the "Register now" link in the window which appears. You'll need to get a Hotmail email account so that you can log in and eventually get the registration number. Once you've done that, sign in and you should be presented with a web form to fill out. Fill this information out and you should then be given a registration key. Copy and paste this key into the relevant field in `Visual C++ Express`. You can now close the program; you'll be developing Parrot from within the command line interface anyway :-) |
| 17 | |
| 18 | ==== Get Parrot ==== |
| 19 | Open up the Visual Studio 2008 Command Prompt, go to the directory where you would like to check Parrot out and then enter the command: |
| 20 | {{{ |
| 21 | svn co https://svn.perl.org/parrot/trunk parrot_msvc |
| 22 | }}} |
| 23 | |
| 24 | I usually check out Parrot to the `parrot_msvc` directory because I also have a directory for the Cygwin version of Parrot. If you're not going to be building Parrot with Cygwin you can just use `parrot` instead of `parrot_msvc`. You should get a prompt asking you to accept the certificate from `svn.perl.org`. Accept this and then you should see Subversion checking out your brand new working copy of Parrot. |
| 25 | |
| 26 | ==== Environment setup ==== |
| 27 | Actually, it seems this step is no longer necessary, so you might not need to worry anymore with the current version of Visual Studio. |
| 28 | |
| 29 | Download the Parrot setup script for Windows `parrot_setup.bat` (attached to this page), and put it into your newly checked out working copy. This file sets up the relevant paths etc for the Visual Studio Command Prompt to see all its own information and so you can just call nmake (Microsoft's version of make) and cl (the Visual Studio C/C++ compiler) from the command line. This file was developed on a German version of Windows so you'll probably need to change Programme to Programs to get the paths correct. Run the .bat file like so: |
| 30 | {{{ |
| 31 | parrot_setup.bat |
| 32 | }}} |
| 33 | |
| 34 | Your environment should now be set up so you can develop Parrot. |
| 35 | |
| 36 | ==== Configuring and building Parrot ==== |
| 37 | You should now be able to run these steps: |
| 38 | {{{ |
| 39 | perl Configure.pl |
| 40 | nmake |
| 41 | nmake test |
| 42 | }}} |
| 43 | |
| 44 | Interestingly enough, this will build parrot with MingW (this is because Strawberry Perl is built with `gcc`, I think...). If you wish to build Parrot with Visual C++ (after all, you went to all the trouble of installing the program, didn't you?) then you'll need to run these steps: (for some reason this isn't working atm... Parrot's Configure.pl is finding too many of the Strawberry Perl default settings, and so one can't yet build Parrot with this setup yet). |
| 45 | |
| 46 | {{{ |
| 47 | perl Configure.pl --cc=cl --link=link --ld=link |
| 48 | nmake |
| 49 | nmake test |
| 50 | }}} |
| 51 | |
| 52 | ==== Setting up the cpan shell ==== |
| 53 | The great thing about Strawberry Perl is that it's just like using Perl in almost every other Perl environment, so if you go from Solaris to Linux, and with Strawberry Perl, even to Windows, the way you interact with Perl will be exactly the same. Therefore, to install new modules from CPAN, you need to set up the cpan shell. But first, you'll need to install some helper programs for the cpan shell. There is an awesome site hosting many of the standard GNU utilities bundled for use on Windows systems at [http://sourceforge.net/projects/gnuwin32]. You will need to download and install the following programs: |
| 54 | * `bzip2` |
| 55 | * `gzip` |
| 56 | * `unzip` |
| 57 | * `tar` |
| 58 | * `wget` |
| 59 | |
| 60 | After you have done this, add `C:\programs\gnuwin32\bin` to your Windows PATH environment variable. |
| 61 | |
| 62 | Then run `cpan` from within your Visual Studio Command Prompt and you should then be asked for lots of configuration information. If the cpan shell doesn't find some of your programs, just enter the full path to it when prompted to do so. For instance, when asked for your `gzip` program location, enter: |
| 63 | {{{ |
| 64 | c:\programs\gnuwin32\bin\gzip.exe |
| 65 | }}} |
| 66 | |
| 67 | Also note that when you are asked if the CPAN mirror sites should be downloaded anew, then enter y (i.e. yes) rather than the default option of no (sometimes the previous setup of the cpan shell hasn't got the list properly, and you won't be able to enter a relevant continent, country, and CPAN mirror location, which means you can't actually use CPAN which would be bad). |
| 68 | |
| 69 | ==== Running the smoke tests ==== |
| 70 | In order to run tests such as `make smoke` and `make languages-smoke` (both really important and helpful things you can do to contribute to Parrot, even if you don't have lots of time to hack the source) you will need to install the [http://search.cpan.org/perldoc?Test::TAP::HTMLMatrix Test::TAP::HTMLMatrix] module. To do this, you can use the cpan shell from within your Visual Studio Command Prompt. Once at the prompt, enter cpan to go to the cpan shell, then you just need to do: |
| 71 | {{{ |
| 72 | cpan> install Test::TAP::HTMLMatrix |
| 73 | }}} |
| 74 | To install the module so that you can run the smoke tests. |
| 75 | |
| 76 | ==== Cygwin ==== |
| 77 | Read `README_cygwin.pod` first. |
| 78 | |
| 79 | Install the following cygwin packages: |
| 80 | * `parrot` |
| 81 | * `subversion` |
| 82 | * `make` |
| 83 | * `gcc` |
| 84 | * `perl` (v5.10) |
| 85 | |
| 86 | and optionally: `libgmp-devel` `libgdbm-devel` `m4` `ctags` `readline` `gettext` `gettext-devel` `icu` `libicu-devel` `pcre` `pcre-devel` |
| 87 | `libaio-devel` |
| 88 | |
| 89 | Then install the following CPAN modules: |
| 90 | * `Test::Base` for some APL language tests |
| 91 | * `Test::TAP::HTMLMatrix` if you want to run the language smoke tests (make languages-smoke) |
| 92 | |
| 93 | As of Nov 2008, these instructions work for a fresh cygwin install using perl 5.10.5 |
| 94 | You may need to force install `Test::TAP::HTMLMatrix` from within cpan depends on (but does not 'use') `Test::Harness::Straps`, which may have problems installing under cygwin perl 5.10.5 cpan -- you may need to tweak around a `/usr/share/man/man3` error to make things work. |
| 95 | |
| 96 | Finally, make sure `<YOUR_PARROT_SRC_DIR>/blib/lib` is in your `PATH` (this may or may not be explicitly necessary by the time you read this) so `miniparrot.exe` can find `libparrot.dll`. There is [http://rt.perl.org/rt3/Ticket/Display.html?id=39742 a patch available]. |
| 97 | |
| 98 | The NCI postgresql test will fail because of the wrong pg.dll name. Everything else should pass. |