瀏覽代碼

Merge pull request #135 from DavidWyand-GG/issue134-VS2010RCFiles

Fix for Issue #134 for VS2010 RC Files
David Wyand 13 年之前
父節點
當前提交
e2f0404a05

+ 11 - 0
Tools/projectGenerator/classes/BuildTarget.php

@@ -203,6 +203,17 @@ class BuildTarget
 		
         return false;
     }
+
+    function isResourceFile( $file )
+    {
+        $ext 			= ".rc";
+        $extLen 		= strlen( $ext );
+        $possibleMatch	= substr( $file, -$extLen, $extLen );
+        if( $possibleMatch == $ext )
+            return true; 
+
+        return false;
+    }
 }
 
 ?>

+ 2 - 0
Tools/projectGenerator/templates/vc2010_fileRecurse.tpl

@@ -36,6 +36,8 @@
          </CustomBuild>
       {elseif $projOutput->isSourceFile( $dirWalk->path ) }
          <ClCompile Include="{$dirWalk->path|replace:'//':'/'|replace:'/':'\\'}" />      
+      {elseif $projOutput->isResourceFile( $dirWalk->path ) }
+         <ResourceCompile Include="{$dirWalk->path|replace:'//':'/'|replace:'/':'\\'}" />      
       {else}
          <ClInclude Include="{$dirWalk->path|replace:'//':'/'|replace:'/':'\\'}" />      
       {/if}{* if path == "*.asm" *}