blob: 19312118260443677500da24de98856072e1498a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/perl -w
use strict;
use warnings;
use File::Temp qw/tempfile/;
use FindBin;
my ($fh, $path) = tempfile(UNLINK => 0, SUFFIX => '.cmd') or die;
chomp(my $vcBin = `cygpath -w "$FindBin::Bin/../vcbin"`);
print $fh "\@echo off\n\n";
print $fh "call \"\%VS80COMNTOOLS\%\\vsvars32.bat\"\n\n";
print $fh "set PATH=$vcBin;\%PATH\%\n\n";
print $fh "IF EXIST \"\%VSINSTALLDIR\%\\Common7\\IDE\\devenv.com\" (devenv.com /useenv " . join(" ", @ARGV) . ") ELSE ";
print $fh "VCExpress.exe /useenv " . join(" ", @ARGV) . "\n";
close $fh;
chmod 0755, $path;
chomp($path = `cygpath -w -s '$path'`);
exec("cmd /c \"call $path\"");
|