merge -r 58060:58217
[mono.git] / mcs / class / Managed.Windows.Forms / build-csproj
1 #!/bin/sh
2 #
3 # I got tired of editing the SWF.csproj
4 # This script will generated it from our System.Windows.Forms.dll.sources
5 #
6 #
7
8 tr=tr
9 OutFile=SWF.csproj
10 Source=System.Windows.Forms.dll.sources
11 Resource=System.Windows.Forms.dll.resources
12
13 SWFhead()
14 {
15 cat << EOT
16 <VisualStudioProject>
17     <CSHARP
18         ProjectType = "Local"
19         ProductVersion = "7.10.3077"
20         SchemaVersion = "2.0"
21         ProjectGuid = "{5E6430B2-6B9F-4E76-802E-20207EF80391}"
22     >
23         <Build>
24             <Settings
25                 ApplicationIcon = ""
26                 AssemblyKeyContainerName = ""
27                 AssemblyName = "System.Windows.Forms"
28                 AssemblyOriginatorKeyFile = ""
29                 DefaultClientScript = "JScript"
30                 DefaultHTMLPageLayout = "Grid"
31                 DefaultTargetSchema = "IE50"
32                 DelaySign = "false"
33                 OutputType = "Library"
34                 PreBuildEvent = ""
35                 PostBuildEvent = ""
36                 RootNamespace = ""
37                 RunPostBuildEvent = "OnBuildSuccess"
38                 StartupObject = ""
39             >
40                 <Config
41                     Name = "Debug"
42                     AllowUnsafeBlocks = "false"
43                     BaseAddress = "285212672"
44                     CheckForOverflowUnderflow = "false"
45                     ConfigurationOverrideFile = ""
46                     DefineConstants = ""
47                     DocumentationFile = ""
48                     DebugSymbols = "true"
49                     FileAlignment = "4096"
50                     IncrementalBuild = "false"
51                     NoStdLib = "false"
52                     NoWarn = ""
53                     Optimize = "false"
54                     OutputPath = "bin\Debug\"
55                     RegisterForComInterop = "false"
56                     RemoveIntegerChecks = "false"
57                     TreatWarningsAsErrors = "false"
58                     WarningLevel = "1"
59                 />
60                 <Config
61                     Name = "Release"
62                     AllowUnsafeBlocks = "false"
63                     BaseAddress = "285212672"
64                     CheckForOverflowUnderflow = "false"
65                     ConfigurationOverrideFile = ""
66                     DefineConstants = ""
67                     DocumentationFile = ""
68                     DebugSymbols = "false"
69                     FileAlignment = "4096"
70                     IncrementalBuild = "false"
71                     NoStdLib = "false"
72                     NoWarn = ""
73                     Optimize = "false"
74                     OutputPath = "bin\Release\"
75                     RegisterForComInterop = "false"
76                     RemoveIntegerChecks = "false"
77                     TreatWarningsAsErrors = "false"
78                     WarningLevel = "1"
79                 />
80             </Settings>
81             <References>
82                 <Reference
83                     Name = "Accessibility"
84                     AssemblyName = "Accessibility"
85                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Accessibility.dll"
86                 />
87                 <Reference
88                     Name = "System"
89                     AssemblyName = "System"
90                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
91                 />
92                 <Reference
93                     Name = "System.Drawing"
94                     AssemblyName = "System.Drawing"
95                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
96                 />
97                 <Reference
98                     Name = "System.XML"
99                     AssemblyName = "System.XML"
100                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
101                 />
102             </References>
103         </Build>
104         <Files>
105             <Include>
106 EOT
107 }
108
109 SWFfilelist()
110 {
111 cat $Source | while read SRC; do
112 # Don't do AssemblyInfo, it's got signing requests and such that we don't want
113 if [ "x$SRC" != "xAssembly/AssemblyInfo.cs" ] ; then
114 SRC=`echo $SRC | $tr '/' '\\\\'`
115 cat << EOT
116                 <File
117                     RelPath = "$SRC"
118                     SubType = "Code"
119                     BuildAction = "Compile"
120                 />
121 EOT
122 fi
123 done
124 }
125
126 SWFresourcelist()
127 {
128 cat $Resource | while read SRC; do
129 # Don't do AssemblyInfo, it's got signing requests and such that we don't want
130 if [ "x$SRC" != "xAssembly/AssemblyInfo.cs" ] ; then
131 SRC=`echo $SRC | $tr '/' '\\\\'`
132 SRC=`echo $SRC | $tr '/' '\\\\' | sed 's/-resource://' | awk -F , '{print "                    RelPath = \"" $1 "\"\n                    CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
133
134 cat << EOT
135                 <File
136 $SRC
137                     BuildAction = "EmbeddedResource"
138                 />
139 EOT
140 fi
141 done
142 }
143
144 SWFtail()
145 {
146 cat << EOT
147             </Include>
148         </Files>
149     </CSHARP>
150 </VisualStudioProject>
151 EOT
152 }
153
154 SWFhead > $OutFile
155 SWFfilelist >> $OutFile
156 SWFresourcelist >> $OutFile
157 SWFtail >> $OutFile
158