Merge pull request #440 from mono-soc-2012/garyb/resources
[mono.git] / mcs / class / Managed.Windows.Forms / build-csproj
index e34c02c7f2e053dc19c944c8e5816d2fb2977df6..abfee61e41859dd36716d41e1ecfca9d441540dd 100755 (executable)
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
 #
 # I got tired of editing the SWF.csproj
-# This script will generated it from our System.Windows.Forms.dll.sources
+# This script will generate it from our System.Windows.Forms.dll.sources
 #
 #
 
@@ -39,11 +39,31 @@ cat << EOT
             >
                 <Config
                     Name = "Debug"
-                    AllowUnsafeBlocks = "false"
+                    AllowUnsafeBlocks = "true"
                     BaseAddress = "285212672"
                     CheckForOverflowUnderflow = "false"
                     ConfigurationOverrideFile = ""
-                    DefineConstants = ""
+                    DefineConstants = "NET_1_1 ONLY_1_1"
+                    DocumentationFile = ""
+                    DebugSymbols = "true"
+                    FileAlignment = "4096"
+                    IncrementalBuild = "false"
+                    NoStdLib = "false"
+                    NoWarn = ""
+                    Optimize = "false"
+                    OutputPath = "bin\Debug\"
+                    RegisterForComInterop = "false"
+                    RemoveIntegerChecks = "false"
+                    TreatWarningsAsErrors = "false"
+                    WarningLevel = "1"
+                />                
+                <Config
+                    Name = "Debug 2.0"
+                    AllowUnsafeBlocks = "true"
+                    BaseAddress = "285212672"
+                    CheckForOverflowUnderflow = "false"
+                    ConfigurationOverrideFile = ""
+                    DefineConstants = "NET_2_0"
                     DocumentationFile = ""
                     DebugSymbols = "true"
                     FileAlignment = "4096"
@@ -59,11 +79,31 @@ cat << EOT
                 />
                 <Config
                     Name = "Release"
-                    AllowUnsafeBlocks = "false"
+                    AllowUnsafeBlocks = "true"
+                    BaseAddress = "285212672"
+                    CheckForOverflowUnderflow = "false"
+                    ConfigurationOverrideFile = ""
+                    DefineConstants = "NET_1_1 ONLY_1_1"
+                    DocumentationFile = ""
+                    DebugSymbols = "false"
+                    FileAlignment = "4096"
+                    IncrementalBuild = "false"
+                    NoStdLib = "false"
+                    NoWarn = ""
+                    Optimize = "false"
+                    OutputPath = "bin\Release\"
+                    RegisterForComInterop = "false"
+                    RemoveIntegerChecks = "false"
+                    TreatWarningsAsErrors = "false"
+                    WarningLevel = "1"
+                />
+                <Config
+                    Name = "Release 2.0"
+                    AllowUnsafeBlocks = "true"
                     BaseAddress = "285212672"
                     CheckForOverflowUnderflow = "false"
                     ConfigurationOverrideFile = ""
-                    DefineConstants = ""
+                    DefineConstants = "NET_2_0"
                     DocumentationFile = ""
                     DebugSymbols = "false"
                     FileAlignment = "4096"
@@ -89,11 +129,21 @@ cat << EOT
                     AssemblyName = "System"
                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
                 />
+                <Reference
+                    Name = "System.Data"
+                    AssemblyName = "System.Data"
+                    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
+                />
                 <Reference
                     Name = "System.Drawing"
                     AssemblyName = "System.Drawing"
                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
                 />
+                <Reference
+                    Name = "System.Data"
+                    AssemblyName = "System.Data"
+                    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
+                />
                 <Reference
                     Name = "System.XML"
                     AssemblyName = "System.XML"
@@ -126,10 +176,8 @@ done
 SWFresourcelist()
 {
 cat $Resource | while read SRC; do
-# Don't do AssemblyInfo, it's got signing requests and such that we don't want
-if [ "x$SRC" != "xAssembly/AssemblyInfo.cs" ] ; then
 SRC=`echo $SRC | $tr '/' '\\\\'`
-SRC=`echo $SRC | $tr '/' '\\\\' | sed 's/-resource://' | awk -F , '{print "                    RelPath = \"" $1 "\"\n                    CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
+SRC=`echo $SRC | sed 's/-resource://' | gawk -F , '{print "                    RelPath = \"" $1 "\"\n                    CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
 
 cat << EOT
                 <File
@@ -137,13 +185,24 @@ $SRC
                     BuildAction = "EmbeddedResource"
                 />
 EOT
-fi
 done
 }
 
 SWFtail()
 {
 cat << EOT
+                <File
+                    RelPath = "Consts.cs"
+                    Link = "common/Consts.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "MonoTODOAttribute.cs"
+                    Link = "common/MonoTODOAttribute.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
             </Include>
         </Files>
     </CSHARP>