29 | | ==== Environment setup ==== |
30 | | Actually, it seems this step is no longer necessary, so you might not need to worry anymore with the current version of Visual Studio. When using MSVC 2010 it should be enough to run "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat". |
31 | | |
32 | | Download the Parrot setup script for Windows [https://trac.parrot.org/parrot/attachment/wiki/Platforms/Windows/parrot_setup.bat 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: |
33 | | {{{ |
34 | | parrot_setup.bat |
35 | | }}} |
36 | | |
37 | | Your environment should now be set up so you can develop Parrot. |
38 | | |
39 | | ==== Configuring and building Parrot ==== |
| 35 | ==== Configuring and Building Parrot (MingW) ==== |
47 | | 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). |
| 43 | This will build parrot with MingW. This is because Strawberry Perl is built with gcc and Configure.pl gets its settings from the perl used to run Configure.pl. See below for instructions on using the Microsoft compiler toolchain with Strawberry Perl. |
| 44 | |
| 45 | ==== Configuring and Building Parrot (Strawberry/msvc) ==== |
| 46 | |
| 47 | Strawberry Perl is community-driven full featured Perl for Windows systems. Parrot's `Configure.pl` determines compiler options from Perl |
| 48 | executable. Strawberry Perl is compiled with gcc, so `Configure.pl` will try to use gcc's options on VS compiler and linker, which will result in nothing - you won't be able to compile/test Parrot. In order to fix that you have to set up compiler's options manually. |
| 49 | |
| 50 | First of all, open a Visual Studio Command Prompt (Windows->Microsoft Visual Studio 2010->Visual Studio Tools) or Windows SDK Command Prompt (depending on which you installed) and navigate to directory with your git clone of Parrot. The following options should get you a workable Makefile: |
55 | | ==== How to compile Parrot VM using Strawberry Perl and Microsoft Visual Studio 2010 ==== |
56 | | |
57 | | Strawberry Perl is community-driven full featured Perl for Windows |
58 | | systems. Parrot's `Configure.pl` determins compiler options from Perl |
59 | | executable. Unfortunately, Strawberry Perl has been compiled with gcc, |
60 | | so `Configure.pl` will try to use gcc's options on VS compiler and |
61 | | linker, which will result in nothing - you won't be able to |
62 | | compile/test Parrot. In oreder to fix that you have to set up |
63 | | compiler's options manually. |
64 | | |
65 | | First of all, open Visual Studio Command Prompt (Windows->Microsoft |
66 | | Visual Studio 2010->Visual Studio Tools), then navigate to directory, |
67 | | where you have Parrot's sources. |
68 | | |
69 | | I use the following options: |
70 | | |
71 | | {{{ |
72 | | perl Configure.pl --without-icu --cc=cl --link=link --ld=link \ |
73 | | --ccflags="-nologo -GF -W4 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE \ |
74 | | -DNO_STRICT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC" \ |
75 | | --linkflags="-nologo -nodefaultlib -debug" --verbose |
76 | | }}} |
77 | | |
78 | | This should create a Makefile for bare minimum Parrot install. |
79 | | |
80 | | Now you can run `nmake`. Enjoy your parrot.exe. |
| 56 | Now you can run `nmake`. Enjoy your parrot.exe! Let |