Merge pull request #530 from jmp75/visualstudio-build
[mono.git] / mcs / class / Managed.Windows.Forms / build-csproj
1 #!/bin/bash
2 #
3 # I got tired of editing the SWF.csproj
4 # This script will generate 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 = "true"
43                     BaseAddress = "285212672"
44                     CheckForOverflowUnderflow = "false"
45                     ConfigurationOverrideFile = ""
46                     DefineConstants = "NET_1_1 ONLY_1_1"
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 = "Debug 2.0"
62                     AllowUnsafeBlocks = "true"
63                     BaseAddress = "285212672"
64                     CheckForOverflowUnderflow = "false"
65                     ConfigurationOverrideFile = ""
66                     DefineConstants = "NET_2_0"
67                     DocumentationFile = ""
68                     DebugSymbols = "true"
69                     FileAlignment = "4096"
70                     IncrementalBuild = "false"
71                     NoStdLib = "false"
72                     NoWarn = ""
73                     Optimize = "false"
74                     OutputPath = "bin\Debug\"
75                     RegisterForComInterop = "false"
76                     RemoveIntegerChecks = "false"
77                     TreatWarningsAsErrors = "false"
78                     WarningLevel = "1"
79                 />
80                 <Config
81                     Name = "Release"
82                     AllowUnsafeBlocks = "true"
83                     BaseAddress = "285212672"
84                     CheckForOverflowUnderflow = "false"
85                     ConfigurationOverrideFile = ""
86                     DefineConstants = "NET_1_1 ONLY_1_1"
87                     DocumentationFile = ""
88                     DebugSymbols = "false"
89                     FileAlignment = "4096"
90                     IncrementalBuild = "false"
91                     NoStdLib = "false"
92                     NoWarn = ""
93                     Optimize = "false"
94                     OutputPath = "bin\Release\"
95                     RegisterForComInterop = "false"
96                     RemoveIntegerChecks = "false"
97                     TreatWarningsAsErrors = "false"
98                     WarningLevel = "1"
99                 />
100                 <Config
101                     Name = "Release 2.0"
102                     AllowUnsafeBlocks = "true"
103                     BaseAddress = "285212672"
104                     CheckForOverflowUnderflow = "false"
105                     ConfigurationOverrideFile = ""
106                     DefineConstants = "NET_2_0"
107                     DocumentationFile = ""
108                     DebugSymbols = "false"
109                     FileAlignment = "4096"
110                     IncrementalBuild = "false"
111                     NoStdLib = "false"
112                     NoWarn = ""
113                     Optimize = "false"
114                     OutputPath = "bin\Release\"
115                     RegisterForComInterop = "false"
116                     RemoveIntegerChecks = "false"
117                     TreatWarningsAsErrors = "false"
118                     WarningLevel = "1"
119                 />
120             </Settings>
121             <References>
122                 <Reference
123                     Name = "Accessibility"
124                     AssemblyName = "Accessibility"
125                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Accessibility.dll"
126                 />
127                 <Reference
128                     Name = "System"
129                     AssemblyName = "System"
130                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
131                 />
132                 <Reference
133                     Name = "System.Data"
134                     AssemblyName = "System.Data"
135                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
136                 />
137                 <Reference
138                     Name = "System.Drawing"
139                     AssemblyName = "System.Drawing"
140                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
141                 />
142                 <Reference
143                     Name = "System.Data"
144                     AssemblyName = "System.Data"
145                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
146                 />
147                 <Reference
148                     Name = "System.XML"
149                     AssemblyName = "System.XML"
150                     HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
151                 />
152             </References>
153         </Build>
154         <Files>
155             <Include>
156 EOT
157 }
158
159 SWFfilelist()
160 {
161 cat $Source | while read SRC; do
162 # Don't do AssemblyInfo, it's got signing requests and such that we don't want
163 if [ "x$SRC" != "xAssembly/AssemblyInfo.cs" ] ; then
164 SRC=`echo $SRC | $tr '/' '\\\\'`
165 cat << EOT
166                 <File
167                     RelPath = "$SRC"
168                     SubType = "Code"
169                     BuildAction = "Compile"
170                 />
171 EOT
172 fi
173 done
174 }
175
176 SWFresourcelist()
177 {
178 cat $Resource | while read SRC; do
179 SRC=`echo $SRC | $tr '/' '\\\\'`
180 SRC=`echo $SRC | sed 's/-resource://' | gawk -F , '{print "                    RelPath = \"" $1 "\"\n                    CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
181
182 cat << EOT
183                 <File
184 $SRC
185                     BuildAction = "EmbeddedResource"
186                 />
187 EOT
188 done
189 }
190
191 SWFtail()
192 {
193 cat << EOT
194                 <File
195                     RelPath = "Consts.cs"
196                     Link = "common/Consts.cs"
197                     SubType = "Code"
198                     BuildAction = "Compile"
199                 />
200                 <File
201                     RelPath = "MonoTODOAttribute.cs"
202                     Link = "common/MonoTODOAttribute.cs"
203                     SubType = "Code"
204                     BuildAction = "Compile"
205                 />
206             </Include>
207         </Files>
208     </CSHARP>
209 </VisualStudioProject>
210 EOT
211 }
212
213 SWFhead > $OutFile
214 SWFfilelist >> $OutFile
215 SWFresourcelist >> $OutFile
216 SWFtail >> $OutFile
217