vs9-to-vs8.php 958 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. // Visual Studio 9 to Visual Studio 8 project file converter
  3. // author : theultramage
  4. // version: 4. august 2008
  5. ?>
  6. <?php
  7. echo "VS9 to VS8 project file converter"."\n";
  8. echo "---------------------------------"."\n";
  9. if( @$_SERVER["argc"] < 2 )
  10. {
  11. echo "Usage: {$_SERVER["argv"][0]} file.vcproj"."\n";
  12. exit();
  13. }
  14. $input = @$_SERVER["argv"][1];
  15. $data = file($input);
  16. if( $data === FALSE )
  17. die("invalid input file '".$input."'");
  18. echo "Converting {$input}...";
  19. foreach( $data as $line )
  20. {
  21. if( strstr($line,'Version="9,00"') !== FALSE )
  22. echo "\t".'Version="8,00"'."\n";
  23. else
  24. if( strstr($line,'Version="9.00"') !== FALSE )
  25. echo "\t".'Version="8.00"'."\n";
  26. else
  27. if( strstr($line,'TargetFrameworkVersion') !== FALSE )
  28. ;
  29. else
  30. if( strstr($line,'RandomizedBaseAddress') !== FALSE )
  31. ;
  32. else
  33. if( strstr($line,'DataExecutionPrevention') !== FALSE )
  34. ;
  35. else // default
  36. echo $line;
  37. }
  38. echo "done."."\n";
  39. ?>