2006-12-15 Chris Toshok <toshok@ximian.com>
[mono.git] / mcs / class / Managed.Windows.Forms / build-csproj2k5
1 #!/bin/sh
2 #
3 # This script will generate SWF.cs.target from our System.Windows.Forms.dll.sources
4 #
5 #
6
7 OutFile=SWF2k5.csproj
8 Source=System.Windows.Forms.dll.sources
9 Resource=System.Windows.Forms.dll.resources
10
11 SWFhead()
12 {
13     cat <<EOF
14 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
15   <PropertyGroup>
16     <ProjectType>Local</ProjectType>
17     <ProductVersion>8.0.50727</ProductVersion>
18     <SchemaVersion>2.0</SchemaVersion>
19     <ProjectGuid>{5E6430B2-6B9F-4E76-802E-20207EF80391}</ProjectGuid>
20     <Configuration Condition=" '\$(Configuration)' == '' ">Debug</Configuration>
21     <Platform Condition=" '\$(Platform)' == '' ">AnyCPU</Platform>
22     <ApplicationIcon>
23     </ApplicationIcon>
24     <AssemblyKeyContainerName>
25     </AssemblyKeyContainerName>
26     <AssemblyName>System.Windows.Forms</AssemblyName>
27     <AssemblyOriginatorKeyFile>
28     </AssemblyOriginatorKeyFile>
29     <DefaultClientScript>JScript</DefaultClientScript>
30     <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
31     <DefaultTargetSchema>IE50</DefaultTargetSchema>
32     <DelaySign>false</DelaySign>
33     <OutputType>Library</OutputType>
34     <RootNamespace>
35     </RootNamespace>
36     <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
37     <StartupObject>
38     </StartupObject>
39     <FileUpgradeFlags>
40     </FileUpgradeFlags>
41     <UpgradeBackupLocation>
42     </UpgradeBackupLocation>
43   </PropertyGroup>
44   <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Debug|AnyCPU' ">
45     <OutputPath>bin\Debug\</OutputPath>
46     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
47     <BaseAddress>285212672</BaseAddress>
48     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
49     <ConfigurationOverrideFile>
50     </ConfigurationOverrideFile>
51     <DefineConstants>NET_1_1</DefineConstants>
52     <DocumentationFile>
53     </DocumentationFile>
54     <DebugSymbols>true</DebugSymbols>
55     <FileAlignment>4096</FileAlignment>
56     <NoStdLib>false</NoStdLib>
57     <NoWarn>
58     </NoWarn>
59     <Optimize>false</Optimize>
60     <RegisterForComInterop>false</RegisterForComInterop>
61     <RemoveIntegerChecks>false</RemoveIntegerChecks>
62     <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
63     <WarningLevel>1</WarningLevel>
64     <DebugType>full</DebugType>
65     <ErrorReport>prompt</ErrorReport>
66   </PropertyGroup>
67   <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Debug 2.0|AnyCPU' ">
68     <OutputPath>bin\Debug\</OutputPath>
69     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
70     <BaseAddress>285212672</BaseAddress>
71     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
72     <ConfigurationOverrideFile>
73     </ConfigurationOverrideFile>
74     <DefineConstants>NET_2_0</DefineConstants>
75     <DocumentationFile>
76     </DocumentationFile>
77     <DebugSymbols>true</DebugSymbols>
78     <FileAlignment>4096</FileAlignment>
79     <NoStdLib>false</NoStdLib>
80     <NoWarn>
81     </NoWarn>
82     <Optimize>false</Optimize>
83     <RegisterForComInterop>false</RegisterForComInterop>
84     <RemoveIntegerChecks>false</RemoveIntegerChecks>
85     <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
86     <WarningLevel>1</WarningLevel>
87     <DebugType>full</DebugType>
88     <ErrorReport>prompt</ErrorReport>
89   </PropertyGroup>
90   <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Release|AnyCPU' ">
91     <OutputPath>bin\Release\</OutputPath>
92     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
93     <BaseAddress>285212672</BaseAddress>
94     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
95     <ConfigurationOverrideFile>
96     </ConfigurationOverrideFile>
97     <DefineConstants>NET_1_1</DefineConstants>
98     <DocumentationFile>
99     </DocumentationFile>
100     <DebugSymbols>false</DebugSymbols>
101     <FileAlignment>4096</FileAlignment>
102     <NoStdLib>false</NoStdLib>
103     <NoWarn>
104     </NoWarn>
105     <Optimize>false</Optimize>
106     <RegisterForComInterop>false</RegisterForComInterop>
107     <RemoveIntegerChecks>false</RemoveIntegerChecks>
108     <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
109     <WarningLevel>1</WarningLevel>
110     <DebugType>none</DebugType>
111     <ErrorReport>prompt</ErrorReport>
112   </PropertyGroup>
113   <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Release 2.0|AnyCPU' ">
114     <OutputPath>bin\Release\</OutputPath>
115     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
116     <BaseAddress>285212672</BaseAddress>
117     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
118     <ConfigurationOverrideFile>
119     </ConfigurationOverrideFile>
120     <DefineConstants>NET_2_0</DefineConstants>
121     <DocumentationFile>
122     </DocumentationFile>
123     <DebugSymbols>false</DebugSymbols>
124     <FileAlignment>4096</FileAlignment>
125     <NoStdLib>false</NoStdLib>
126     <NoWarn>
127     </NoWarn>
128     <Optimize>false</Optimize>
129     <RegisterForComInterop>false</RegisterForComInterop>
130     <RemoveIntegerChecks>false</RemoveIntegerChecks>
131     <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
132     <WarningLevel>1</WarningLevel>
133     <DebugType>none</DebugType>
134     <ErrorReport>prompt</ErrorReport>
135   </PropertyGroup>
136   <ItemGroup>
137     <Reference Include="Accessibility">
138       <Name>Accessibility</Name>
139     </Reference>
140     <Reference Include="System">
141       <Name>System</Name>
142     </Reference>
143     <Reference Include="System.Data">
144       <Name>System.Data</Name>
145     </Reference>
146     <Reference Include="System.Data">
147       <Name>System.Data</Name>
148     </Reference>
149     <Reference Include="System.Drawing">
150       <Name>System.Drawing</Name>
151     </Reference>
152     <Reference Include="System.XML">
153       <Name>System.XML</Name>
154     </Reference>
155   </ItemGroup>
156 EOF
157 }
158
159 SWFtail()
160 {
161     cat <<EOF
162   <Import Project="\$(MSBuildBinPath)\Microsoft.CSharp.targets" />
163   <PropertyGroup>
164     <PreBuildEvent>
165     </PreBuildEvent>
166     <PostBuildEvent>
167     </PostBuildEvent>
168   </PropertyGroup>
169 </Project>
170 EOF
171 }
172
173 SWFfilelist()
174 {
175 echo "  <ItemGroup>"
176 cat $Source | while read SRC; do
177 # Don't do AssemblyInfo, it's got signing requests and such that we don't want
178 if [ "x$SRC" != "xAssembly/AssemblyInfo.cs" ] ; then
179 SRC=`echo $SRC | tr '/' '\\\\'`
180 cat <<EOF
181     <Compile Include="$SRC">
182       <SubType>Code</SubType>
183     </Compile>
184 EOF
185 fi
186 done
187 echo "  </ItemGroup>"
188 }
189
190 SWFresourcelist()
191 {
192 echo "  <ItemGroup>"
193     cat $Resource | while read SRC; do
194         CUSTOMTOOLNAMESPACE=""
195
196         # strip out that -resource:
197         SRC=`echo $SRC | sed 's/-resource://'`
198
199         CUSTOMTOOLNAMESPACE=`echo $SRC | awk -F, '{print $2}'`
200
201         INCLUDE=`echo $SRC | awk -F, '{print $1}'`
202
203         if test -f $INCLUDE.prebuilt; then
204             INCLUDE=$INCLUDE.prebuilt
205         fi
206
207         # convert all /'s to \\'s
208         INCLUDE=`echo $INCLUDE | tr '/' '\\\\'`
209
210         # strip off the path from the name of the resource
211         LOGICALNAME=`echo $INCLUDE | sed 's/resources\\\\//' | sed 's/.prebuilt//'`
212
213         echo "    <EmbeddedResource Include=\"$INCLUDE\">"
214         echo "      <LogicalName>$LOGICALNAME</LogicalName>"
215         if test "x$CUSTOMTOOLNAMESPACE" != "x"; then
216             echo "      <CustomToolNameSpace>$CUSTOMTOOLNAMESPACE</CustomToolNameSpace>"
217         fi
218         echo "    </EmbeddedResource>"
219     done
220 echo "  </ItemGroup>"
221 }
222
223 SWFhead > $OutFile
224 SWFfilelist >> $OutFile
225 SWFresourcelist >> $OutFile
226 SWFtail >> $OutFile