cross-plat-dev-utils/fix_epoc32_win.pl
changeset 2 39c28ec933dd
child 6 787612182dd0
equal deleted inserted replaced
1:820b22e13ff1 2:39c28ec933dd
       
     1 #!/usr/bin/perl
       
     2 # Copyright (c) 2010 Symbian Foundation Ltd
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of the License "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Initial Contributors:
       
     9 # Mike Kinghan, mikek@symbian.org for Symbian Foundation Ltd - initial contribution.
       
    10 
       
    11 # Script to patch the epoc32 tree on Windows, so that it provides a valid
       
    12 # pre-include header file to enable compiling of the tools code with gcc 3.4.5
       
    13 
       
    14 use strict;
       
    15 use apply_patch_file;
       
    16 use usage;
       
    17 use check_os;
       
    18 use File::Spec;
       
    19 
       
    20 require_os_windows();
       
    21 usage(\@ARGV,"This script makes required fixes to epoc32 tree in Windows");
       
    22 set_epocroot();
       
    23 my $epocroot = $ENV{'EPOCROOT'};
       
    24 my $gcc_mingw_include_dir = File::Spec->catfile("$epocroot","epoc32","include","gcc_mingw");
       
    25 
       
    26 if (! -d $gcc_mingw_include_dir) { 
       
    27 	print ">>> Creating \"$gcc_mingw_include_dir\"\n";
       
    28 	mkdir $gcc_mingw_include_dir or die $!;
       
    29 }
       
    30 my $gcc_mingw_preinclude = File::Spec->catfile("epoc32","include","gcc_mingw","gcc_mingw_3_4_2.h");
       
    31 my $libwsock32_deb = File::Spec->catfile("epoc32","release","tools2","deb","libwsock32.a");
       
    32 my $libwsock32_rel = File::Spec->catfile("epoc32","release","tools2","rel","libwsock32.a");
       
    33 apply_patch_file($gcc_mingw_preinclude);
       
    34 apply_patch_file($libwsock32_deb);
       
    35 apply_patch_file($libwsock32_rel);
       
    36 exit 0;
       
    37