Changeset 1219


Ignore:
Timestamp:
15/12/2006 00:10:51 (5 years ago)
Author:
chris
Message:

Added a script to determine the build version on Win32 MSVC (merges [1078])

File:
1 copied

Legend:

Unmodified
Added
Removed
  • box/trunk/infrastructure/msvc/getversion.pl

    r1078 r1219  
    22 
    33$basedir = $0; 
    4 $basedir =~ s/\\[^\\]*$//; 
    5 $basedir =~ s/\\[^\\]*$//; 
    6 $basedir =~ s/\\[^\\]*$//; 
    7 $basedir =~ s/\\[^\\]*$//; 
    8 $basedir =~ s/\\[^\\]*$//; 
    9 -d $basedir or die "$basedir: $!"; 
    10 chdir $basedir or die "$basedir: $!"; 
     4$basedir =~ s/(\\[^\\]*){5}$// or die "failed to remove last five ". 
     5        "directories from $basedir"; 
     6-d $basedir or die "$basedir: not a directory"; 
     7chdir $basedir or die "cannot change to directory $basedir: $!"; 
    118 
    129require "$basedir\\infrastructure\\BoxPlatform.pm.in"; 
    1310 
    14 open VERSIONFILE, "> $basedir/lib/common/BoxVersion.h"  
    15         or die "BoxVersion.h: $!"; 
     11my $verfile = "$basedir\\lib\\common\\BoxVersion.h"; 
     12open VERSIONFILE, "> $verfile" or die "opening $verfile: $!"; 
    1613print VERSIONFILE "#define BOX_VERSION \"$BoxPlatform::product_version\"\n"; 
    1714close VERSIONFILE; 
Note: See TracChangeset for help on using the changeset viewer.