Changes between Version 6 and Version 7 of Platforms/Windows

12/23/10 05:33:46 (11 years ago)

fix up the msvc parts a bit


  • Platforms/Windows

    v6 v7  
    99==== What to download and install ==== 
    1010 * [ Strawberry Perl] 
    11  * [ Git] 
     11 * [ Git] (pick a "Full installer for official Git" release) 
     12One of the following: 
     13 * [ Microsoft Windows SDK] 
    1214 * [ Microsoft Visual Studio 2008 Express Edition for C++]  
    1315 * [ Microsoft Visual C++ 2010 Express] 
     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. 
    1520==== Setting up Microsoft Visual Studio 2008 ==== 
    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: 
    2429git clone parrot_msvc 
    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 ``. 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". 
    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". 
    32 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: 
    33 {{{ 
    34 parrot_setup.bat 
    35 }}} 
    37 Your environment should now be set up so you can develop Parrot. 
    39 ==== Configuring and building Parrot ==== 
     35==== Configuring and Building Parrot (MingW) ==== 
    4036You should now be able to run these steps: 
    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 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 gets its settings from the perl used to run  See below for instructions on using the Microsoft compiler toolchain with Strawberry Perl. 
     45==== Configuring and Building Parrot (Strawberry/msvc) ==== 
     47Strawberry Perl is community-driven full featured Perl for Windows systems. Parrot's `` determines compiler options from Perl 
     48executable.  Strawberry Perl is compiled with gcc, so `` 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.   
     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: 
    50 perl --cc=cl --link=link --ld=link 
    51 nmake 
    52 nmake test 
     53perl --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" 
    55 ==== How to compile Parrot VM using Strawberry Perl and Microsoft Visual Studio 2010 ==== 
    57 Strawberry Perl is community-driven full featured Perl for Windows 
    58 systems. Parrot's `` determins compiler options from Perl 
    59 executable. Unfortunately, Strawberry Perl has been compiled with gcc, 
    60 so `` 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. 
    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.  
    69 I use the following options: 
    71 {{{ 
    72 perl --without-icu --cc=cl --link=link --ld=link \ 
    73     --ccflags="-nologo -GF -W4 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE \ 
    75     --linkflags="-nologo -nodefaultlib -debug" --verbose 
    76 }}} 
    78 This should create a Makefile for bare minimum Parrot install. 
    80 Now you can run `nmake`. Enjoy your parrot.exe. 
     56Now you can run `nmake`. Enjoy your parrot.exe!  Let  
    8258==== Setting up the cpan shell ====