Changes between Version 6 and Version 7 of Platforms/Windows

Show
Ignore:
Timestamp:
12/23/10 05:33:46 (11 years ago)
Author:
cotto
Comment:

fix up the msvc parts a bit

Legend:

Unmodified
Added
Removed
Modified
  • Platforms/Windows

    v6 v7  
    99==== What to download and install ==== 
    1010 * [http://strawberryperl.com Strawberry Perl] 
    11  * [http://code.google.com/p/msysgit/downloads/list Git] 
     11 * [http://code.google.com/p/msysgit/downloads/list Git] (pick a "Full installer for official Git" release) 
     12One of the following: 
     13 * [http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en Microsoft Windows SDK] 
    1214 * [http://www.microsoft.com/express/download/ Microsoft Visual Studio 2008 Express Edition for C++]  
    1315 * [http://www.microsoft.com/express/Downloads/#2010-Visual-CPP Microsoft Visual C++ 2010 Express] 
     16 
     17==== Setting up Microsoft Windows SDK ==== 
     18The free download of Microsoft's Windows SDK doesn't require registration and comes with the C compiler tools needed to build Parrot using a Microsoft toolchain.  The latest version (7.1 as of this writing) requires the .Net framework 4.0, which may take some time to download and install.  Neither the Windows SDK nor the .Net framework 4.0 require a reboot. 
    1419 
    1520==== Setting up Microsoft Visual Studio 2008 ==== 
     
    2025 
    2126==== Get Parrot ==== 
    22 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: 
     27Open up the Visual Studio 2008 or Windows SDK command prompt, and create a clone of Parrot's repository in a suitable location: 
    2328{{{ 
    2429git clone https://github.com/parrot/parrot.git parrot_msvc 
    2530}}} 
    2631 
    27 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. 
     32==== Environment setup ==== 
     33When using MSVC 2010, run "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat". 
    2834 
    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) ==== 
    4036You should now be able to run these steps: 
    4137{{{ 
     
    4541}}} 
    4642 
    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). 
     43This 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 
     47Strawberry Perl is community-driven full featured Perl for Windows systems. Parrot's `Configure.pl` determines compiler options from Perl 
     48executable.  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 
     50First 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: 
    4851 
    4952{{{ 
    50 perl Configure.pl --cc=cl --link=link --ld=link 
    51 nmake 
    52 nmake test 
     53perl Configure.pl --without-icu --cc=cl --link=link --ld=link --ccflags="-nologo -GF -W4 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE     -DNO_STRICT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC" --linkflags="-nologo -nodefaultlib -debug" 
    5354}}} 
    5455 
    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. 
     56Now you can run `nmake`. Enjoy your parrot.exe!  Let  
    8157 
    8258==== Setting up the cpan shell ====