Changes between Initial Version and Version 1 of Platforms/Windows

Show
Ignore:
Timestamp:
12/16/08 09:17:04 (13 years ago)
Author:
gaurav
Comment:

Moved content  from the old wiki

Legend:

Unmodified
Added
Removed
Modified
  • Platforms/Windows

    v1 v1  
     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 ==== 
     16Now 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 ==== 
     19Open 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{{{ 
     21svn co https://svn.perl.org/parrot/trunk parrot_msvc 
     22}}} 
     23 
     24I 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 ==== 
     27Actually, it seems this step is no longer necessary, so you might not need to worry anymore with the current version of Visual Studio. 
     28 
     29Download 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{{{ 
     31parrot_setup.bat 
     32}}} 
     33 
     34Your environment should now be set up so you can develop Parrot. 
     35 
     36==== Configuring and building Parrot ==== 
     37You should now be able to run these steps: 
     38{{{ 
     39perl Configure.pl 
     40nmake 
     41nmake test 
     42}}} 
     43 
     44Interestingly 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{{{ 
     47perl Configure.pl --cc=cl --link=link --ld=link 
     48nmake 
     49nmake test 
     50}}} 
     51 
     52==== Setting up the cpan shell ==== 
     53The 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 
     60After you have done this, add `C:\programs\gnuwin32\bin` to your Windows PATH environment variable. 
     61 
     62Then 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{{{ 
     64c:\programs\gnuwin32\bin\gzip.exe 
     65}}} 
     66 
     67Also 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 ==== 
     70In 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{{{ 
     72cpan> install Test::TAP::HTMLMatrix 
     73}}} 
     74To install the module so that you can run the smoke tests. 
     75 
     76==== Cygwin ==== 
     77Read `README_cygwin.pod` first. 
     78 
     79Install the following cygwin packages: 
     80 * `parrot` 
     81 * `subversion` 
     82 * `make`  
     83 * `gcc`  
     84 * `perl` (v5.10) 
     85 
     86and optionally: `libgmp-devel` `libgdbm-devel` `m4` `ctags` `readline` `gettext` `gettext-devel` `icu` `libicu-devel` `pcre` `pcre-devel` 
     87`libaio-devel` 
     88 
     89Then 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 
     93As of Nov 2008, these instructions work for a fresh cygwin install using perl 5.10.5 
     94You 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 
     96Finally, 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 
     98The NCI postgresql test will fail because of the wrong pg.dll name. Everything else should pass.