summaryrefslogtreecommitdiff
path: root/tools/vs9-to-vs8.php
blob: aa88379ff81592023c31eb6b2fae5b2c26900283 (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
	// Visual Studio 9 to Visual Studio 8 project file converter
	// author : theultramage
	// version: 4. august 2008
?>
<?php
	echo "VS9 to VS8 project file converter"."\n";
	echo "---------------------------------"."\n";
	if( @$_SERVER["argc"] < 2 )
	{
		echo "Usage: {$_SERVER["argv"][0]} file.vcproj"."\n";
		exit();
	}

	$input = @$_SERVER["argv"][1];
	$data = file($input);
	if( $data === FALSE )
		die("invalid input file '".$input."'");

	echo "Converting {$input}...";
	
	foreach( $data as $line )
	{
		if( strstr($line,'Version="9,00"') !== FALSE )
			echo "\t".'Version="8,00"'."\n";
		else
		if( strstr($line,'Version="9.00"') !== FALSE )
			echo "\t".'Version="8.00"'."\n";
		else
		if( strstr($line,'TargetFrameworkVersion') !== FALSE )
			;
		else
		if( strstr($line,'RandomizedBaseAddress') !== FALSE )
			;
		else
		if( strstr($line,'DataExecutionPrevention') !== FALSE )
			;
		else // default
			echo $line;
	}

	echo "done."."\n";
?>