THRIFT-5387 Improved and simplified Delphi test setup
Client: Delphi
Patch: Jens Geyer
diff --git a/tutorial/delphi/DelphiClient/DelphiClient.dpr b/tutorial/delphi/DelphiClient/DelphiClient.dpr
index 64d7d68..e44ae3b 100644
--- a/tutorial/delphi/DelphiClient/DelphiClient.dpr
+++ b/tutorial/delphi/DelphiClient/DelphiClient.dpr
@@ -36,8 +36,8 @@
   Thrift.Transport.WinHTTP in '..\..\..\lib\delphi\src\Thrift.Transport.WinHTTP.pas',
   Thrift.Transport.MsxmlHTTP in '..\..\..\lib\delphi\src\Thrift.Transport.MsxmlHTTP.pas',
   Thrift.WinHTTP in '..\..\..\lib\delphi\src\Thrift.WinHTTP.pas',
-  Shared in '..\..\gen-delphi\Shared.pas',
-  Tutorial in '..\..\gen-delphi\Tutorial.pas';
+  Shared in '..\gen-delphi\Shared.pas',
+  Tutorial in '..\gen-delphi\Tutorial.pas';
 
 
 type
diff --git a/tutorial/delphi/DelphiClient/DelphiClient.dproj b/tutorial/delphi/DelphiClient/DelphiClient.dproj
index 47262e3..1e2ab3d 100644
--- a/tutorial/delphi/DelphiClient/DelphiClient.dproj
+++ b/tutorial/delphi/DelphiClient/DelphiClient.dproj
@@ -1,4 +1,22 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
 			<ProjectGuid>{2B8FB3A1-2F9E-4883-8C53-0F56220B34F6}</ProjectGuid>
 			<MainSource>DelphiClient.dpr</MainSource>
@@ -62,8 +80,8 @@
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.Transport.WinHTTP.pas"/>
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.Transport.MsxmlHTTP.pas"/>
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.WinHTTP.pas"/>
-			<DCCReference Include="..\..\gen-delphi\Shared.pas"/>
-			<DCCReference Include="..\..\gen-delphi\Tutorial.pas"/>
+			<DCCReference Include="..\gen-delphi\Shared.pas"/>
+			<DCCReference Include="..\gen-delphi\Tutorial.pas"/>
 			<BuildConfiguration Include="Release">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
@@ -78,6 +96,11 @@
 		</ItemGroup>
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
+		<PropertyGroup>
+			<PreBuildEvent><![CDATA[pushd ..
+thrift.exe -r -gen delphi ..\tutorial.thrift
+popd]]></PreBuildEvent>
+		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
 			<Borland.ProjectType/>
@@ -113,6 +136,9 @@
 					<Source>
 						<Source Name="MainSource">DelphiClient.dpr</Source>
 					</Source>
+					<Parameters>
+						<Parameters Name="RunParams">--transport framed --http http://example.org</Parameters>
+					</Parameters>
 				</Delphi.Personality>
 				<Platforms>
 					<Platform value="Win32">True</Platform>
diff --git a/tutorial/delphi/DelphiServer/DelphiServer.dpr b/tutorial/delphi/DelphiServer/DelphiServer.dpr
index 41a3514..5f2dc45 100644
--- a/tutorial/delphi/DelphiServer/DelphiServer.dpr
+++ b/tutorial/delphi/DelphiServer/DelphiServer.dpr
@@ -36,8 +36,8 @@
   Thrift.Server in '..\..\..\lib\delphi\src\Thrift.Server.pas',
   Thrift.Transport in '..\..\..\lib\delphi\src\Thrift.Transport.pas',
   Thrift.WinHTTP in '..\..\..\lib\delphi\src\Thrift.WinHTTP.pas',
-  Shared in '..\..\gen-delphi\Shared.pas',
-  Tutorial in '..\..\gen-delphi\Tutorial.pas';
+  Shared in '..\gen-delphi\Shared.pas',
+  Tutorial in '..\gen-delphi\Tutorial.pas';
 
 
 type
diff --git a/tutorial/delphi/DelphiServer/DelphiServer.dproj b/tutorial/delphi/DelphiServer/DelphiServer.dproj
index 2624f92..b1b7f48 100644
--- a/tutorial/delphi/DelphiServer/DelphiServer.dproj
+++ b/tutorial/delphi/DelphiServer/DelphiServer.dproj
@@ -1,4 +1,22 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
 			<ProjectGuid>{2B8FB3A1-2F9E-4883-8C53-0F56220B34F6}</ProjectGuid>
 			<MainSource>DelphiServer.dpr</MainSource>
@@ -59,8 +77,8 @@
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.Server.pas"/>
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.Transport.pas"/>
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.WinHTTP.pas"/>
-			<DCCReference Include="..\..\gen-delphi\Shared.pas"/>
-			<DCCReference Include="..\..\gen-delphi\Tutorial.pas"/>
+			<DCCReference Include="..\gen-delphi\Shared.pas"/>
+			<DCCReference Include="..\gen-delphi\Tutorial.pas"/>
 			<BuildConfiguration Include="Release">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
@@ -75,6 +93,11 @@
 		</ItemGroup>
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
+		<PropertyGroup>
+			<PreBuildEvent><![CDATA[pushd ..
+thrift.exe -r -gen delphi ..\tutorial.thrift
+popd]]></PreBuildEvent>
+		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
 			<Borland.ProjectType/>