summaryrefslogtreecommitdiff
path: root/tutorial
diff options
context:
space:
mode:
authorJens Geyer <jensg@apache.org>2021-03-29 20:35:41 +0200
committerJens Geyer <jensg@apache.org>2021-03-29 22:59:59 +0200
commit66f9536e2cd3899a9dbbb740eff44ec0271787c3 (patch)
tree5b09204b4a5bd4c6c899c49fc32b24000b4a2784 /tutorial
parent036665edc1b1567e521472f295ce039a10d06b73 (diff)
downloadthrift-66f9536e2cd3899a9dbbb740eff44ec0271787c3.tar.gz
THRIFT-5387 Improved and simplified Delphi test setup
Client: Delphi Patch: Jens Geyer
Diffstat (limited to 'tutorial')
-rw-r--r--tutorial/delphi/DelphiClient/DelphiClient.dpr4
-rw-r--r--tutorial/delphi/DelphiClient/DelphiClient.dproj32
-rw-r--r--tutorial/delphi/DelphiServer/DelphiServer.dpr4
-rw-r--r--tutorial/delphi/DelphiServer/DelphiServer.dproj29
4 files changed, 59 insertions, 10 deletions
diff --git a/tutorial/delphi/DelphiClient/DelphiClient.dpr b/tutorial/delphi/DelphiClient/DelphiClient.dpr
index 64d7d6857..e44ae3b5c 100644
--- a/tutorial/delphi/DelphiClient/DelphiClient.dpr
+++ b/tutorial/delphi/DelphiClient/DelphiClient.dpr
@@ -36,8 +36,8 @@ uses
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 47262e3b7..1e2ab3dae 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 41a3514d0..5f2dc454d 100644
--- a/tutorial/delphi/DelphiServer/DelphiServer.dpr
+++ b/tutorial/delphi/DelphiServer/DelphiServer.dpr
@@ -36,8 +36,8 @@ uses
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 2624f9243..b1b7f480a 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/>