Skip to content

Commit a7b21fb

Browse files
committed
COH-29457 Create .msi for .NET Core based Client
[git-p4: depot-paths = "//dev/main.net/": change = 107274]
1 parent ca24a18 commit a7b21fb

File tree

9 files changed

+1558
-2
lines changed

9 files changed

+1558
-2
lines changed

Diff for: Coherence.msbuild

+230
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
4+
5+
Licensed under the Universal Permissive License v 1.0 as shown at
6+
http://oss.oracle.com/licenses/upl.
7+
-->
8+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
9+
<!-- MSBuild distribution build script for Oracle Coherence for .NET -->
10+
<!-- -->
11+
<!-- Usage: -->
12+
<!-- MsBuild Coherence.msbuild /t:dist /p:buildofficial=true \ -->
13+
<!-- /p:buildnumber=%P4_CHANGELIST% -->
14+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
15+
16+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
17+
18+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
19+
<!-- Global properties -->
20+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
21+
22+
<Import Project="Coherence.properties"/>
23+
24+
<PropertyGroup>
25+
<BuildTargetVersion Condition="'$(BuildTargetVersion)'==''">net6.0</BuildTargetVersion>
26+
<TargetFrameworkVersion>v$(BuildTargetVersion)</TargetFrameworkVersion>
27+
<BuildVersion>$(AssemblyMajorVersion).$(AssemblyMinorVersion).$(AssemblyServicePack).$(AssemblyPatch)</BuildVersion>
28+
<BuildDescription Condition="'$(BuildOfficial)' != ''">$(AssemblyDescriptions)</BuildDescription>
29+
<BuildNumber Condition="'$(BuildOfficial)' == ''" >0</BuildNumber>
30+
<BuildOracleVersion>$(AssemblyMajorVersion).$(AssemblyMinorVersion).$(AssemblyServicePack).$(ComponentVersion).$(Patch)</BuildOracleVersion>
31+
32+
<ProjectDir>$(MSBuildProjectDirectory)</ProjectDir>
33+
<BuildDir>$(ProjectDir)\build</BuildDir>
34+
35+
<BinDir>$(ProjectDir)\bin</BinDir>
36+
37+
<DistDir>$(ProjectDir)\dist</DistDir>
38+
<DistPatchesDir>$(DistDir)\patches\$(BuildVersion)</DistPatchesDir>
39+
<DistVersionDir>$(DistDir)\$(BuildVersion)b$(BuildNumber)</DistVersionDir>
40+
41+
<DocDir>$(ProjectDir)\doc</DocDir>
42+
<SetupDir>$(ProjectDir)\setup</SetupDir>
43+
<SrcDir>$(ProjectDir)\src</SrcDir>
44+
<ToolsDir>$(ProjectDir)\tools</ToolsDir>
45+
46+
<PropertiesDir>$(SrcDir)\Coherence\Properties</PropertiesDir>
47+
48+
<ExtensionTasksPath>$(ToolsDir)\internal\msbuild\build\net40</ExtensionTasksPath>
49+
</PropertyGroup>
50+
51+
<!-- Import the MSBuild extensions -->
52+
<Import Project="$(ExtensionTasksPath)\MSBuild.Extension.Pack.targets"/>
53+
54+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
55+
<!-- Global project Targets -->
56+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
57+
58+
<!-- Remove all build artifacts -->
59+
<Target Name="Clean">
60+
<ItemGroup>
61+
<Files Include="$(BuildDir)"/>
62+
<Files Include="$(SrcDir)\Coherence\bin"/>
63+
<Files Include="$(SrcDir)\Coherence\obj"/>
64+
65+
<Dist Include="$(DistVersionDir)"/>
66+
<Dist Include="$(DistDir)\coherence-net-$(BuildOracleVersion)b$(BuildNumber).zip"/>
67+
</ItemGroup>
68+
69+
<RemoveDir ContinueOnError="true" Directories="@(Files)"/>
70+
<Delete Condition="'$(ClearDist)' != ''" ContinueOnError="true" Files="@(Dist)"/>
71+
<Delete ContinueOnError="true" Files="$(ProjectDir)\AssemblyInfo.cs" />
72+
</Target>
73+
74+
<!-- Main distribution target -->
75+
<Target Name="Dist">
76+
<MakeDir Directories="$(DistDir)"/>
77+
<MakeDir Directories="$(DistVersionDir)"/>
78+
79+
<MSBuild.ExtensionPack.Framework.Guid TaskAction="Create">
80+
<Output TaskParameter="FormattedGuidString" PropertyName="ProductGuid"/>
81+
</MSBuild.ExtensionPack.Framework.Guid>
82+
83+
<MSBuild.ExtensionPack.Framework.TextString TaskAction="ToUpper" OldString="$(ProductGuid)">
84+
<Output PropertyName="ProductGuid" TaskParameter="NewString"/>
85+
</MSBuild.ExtensionPack.Framework.TextString>
86+
87+
<PropertyGroup>
88+
<ProductName Condition="'$(BuildOfficial)' == ''">coherence-net-$(BuildDescription)</ProductName>
89+
<ProductName Condition="'$(BuildOfficial)' != ''">coherence-net-$(BuildOracleVersion)</ProductName>
90+
<OutFileName>Coherence.msi</OutFileName>
91+
<LogFileName>Coherence.msi.log</LogFileName>
92+
<MsiFileName>$(ProductName).msi</MsiFileName>
93+
<ZipFileName>$(ProductName)b$(BuildNumber).zip</ZipFileName>
94+
<OutFile>$(BuildDir)\$(OutFileName)</OutFile>
95+
<LogFile>$(BuildDir)\$(LogFileName)</LogFile>
96+
<MsiFile>$(DistVersionDir)\$(MsiFileName)</MsiFile>
97+
<ZipFile>$(DistDir)\$(ZipFileName)</ZipFile>
98+
</PropertyGroup>
99+
100+
<Delete Files="$(OutFile);$(LogFile);$(ZipFile)"/>
101+
102+
<ItemGroup>
103+
<MetaDataFile Include="$(SrcDir)\Coherence\product.xml"/>
104+
<MetaDataFileDest Include="$(BuildDir)\product.xml"/>
105+
<SetupFile Include="$(SetupDir)\Coherence.Setup\Coherence.Setup.Template.vdproj"/>
106+
<SetupFileDest Include="$(SetupDir)\Coherence.Setup\Coherence.Setup.vdproj" />
107+
</ItemGroup>
108+
109+
<ItemGroup>
110+
<TokenValues Include="VERSION">
111+
<Replacement>$(BuildOracleVersion)</Replacement>
112+
</TokenValues>
113+
<TokenValues Include="DESCRIPTION">
114+
<Replacement>$(AssemblyDescription)</Replacement>
115+
</TokenValues>
116+
<SetupTokens Include="INSTALLER_VERSION">
117+
<Replacement>$(AssemblyMajorVersion).$(AssemblyMinorVersion).$(AssemblyServicePack)$(AssemblyPatch)</Replacement>
118+
</SetupTokens>
119+
<SetupTokens Include="PRODUCT_VERSION">
120+
<Replacement>$(BuildVersion)</Replacement>
121+
</SetupTokens>
122+
<SetupTokens Include="PRODUCT_GUID">
123+
<Replacement>$(ProductGuid)</Replacement>
124+
</SetupTokens>
125+
</ItemGroup>
126+
127+
<!-- Copy the OPatch product metadata file -->
128+
<Copy SourceFiles="@(MetaDataFile)" DestinationFiles="@(MetaDataFileDest)"/>
129+
130+
<MSBuild.ExtensionPack.FileSystem.Detokenise TaskAction="Detokenise"
131+
TargetFiles="@(MetaDataFileDest)" ReplacementValues="@(TokenValues)"/>
132+
133+
<!-- Parameterize the setup project -->
134+
<Delete Files="@(SetupFileDest)"/>
135+
136+
<Copy SourceFiles="@(SetupFile)" DestinationFiles="@(SetupFileDest)"/>
137+
138+
<MSBuild.ExtensionPack.FileSystem.Detokenise TaskAction="Detokenise"
139+
TargetFiles="@(SetupFileDest)" ReplacementValues="@(SetupTokens)"/>
140+
141+
<Exec Command="devenv.exe @(SetupFileDest) /build $(BuildType) /out $(LogFile)"/>
142+
143+
<Error Condition="!Exists($(OutFile))" Text="The MSI failed to build. See $(LogFile) for more details."/>
144+
145+
<Copy SourceFiles="$(OutFile)" DestinationFiles="$(MsiFile)"/>
146+
147+
<!-- Copy the metalink readme and update it with the appropriate information -->
148+
<PropertyGroup>
149+
<ReadmeFileName>readme.txt</ReadmeFileName>
150+
<ReadmeFileName Condition=" '$(BuildDescription)'=='prerelease' ">readme-prerelease.txt</ReadmeFileName>
151+
</PropertyGroup>
152+
153+
<ItemGroup>
154+
<ReadmeFile Include="$(DocDir)\build\$(ReadmeFileName)"/>
155+
<ReadmeFileDest Include="$(DistVersionDir)\README.txt"/>
156+
</ItemGroup>
157+
158+
<Copy SourceFiles="@(ReadmeFile)" DestinationFiles="@(ReadmeFileDest)"/>
159+
160+
<MSBuild.ExtensionPack.FileSystem.Detokenise TaskAction="Detokenise"
161+
TargetFiles="@(ReadmeFileDest)" ReplacementValues="@(TokenValues)"/>
162+
163+
<ItemGroup>
164+
<ZipFiles Include="@(ReadmeFileDest)"/>
165+
<ZipFiles Include="$(MsiFile)"/>
166+
</ItemGroup>
167+
168+
<MSBuild.ExtensionPack.Compression.Zip TaskAction="Create" CompressFiles="@(ZipFiles)"
169+
RemoveRoot="$(DistVersionDir)" ZipFileName="$(ZipFile)" />
170+
</Target>
171+
172+
<!-- Escrow target -->
173+
<Target Name="Escrow" DependsOnTargets="Clean" >
174+
<ItemGroup>
175+
<EscrowFile Include="$(DistDir)\escrow-net-$(BuildOracleVersion).zip"/>
176+
<ZipFiles Include="$(ProjectDir)\**\*"
177+
Exclude="$(DistDir)\**\*; $(ProjectDir)\**\*.suo; $(ProjectDir)\**\*.user; $(ProjectDir)\**\*.xsx; $(ProjectDir)\**\_ReSharper*\**; $(ProjectDir)\**\obj\**; $(ProjectDir)\**\bin\**"/>
178+
</ItemGroup>
179+
180+
<Delete Files="@(EscrowFile)"/>
181+
182+
<MSBuild.ExtensionPack.Compression.Zip TaskAction="Create" CompressFiles="@(ZipFiles)"
183+
CompressPath="$(ProjectDir)" RemoveRoot="$(ProjectDir)"
184+
ZipFileName="@(EscrowFile)" />
185+
</Target>
186+
187+
<!-- Patch target -->
188+
<Target Name="Patch" >
189+
<!-- Make sure this is a patch build -->
190+
<PropertyGroup>
191+
<BuildVersionPatch>$(AssemblyPatch)</BuildVersionPatch>
192+
</PropertyGroup>
193+
194+
<Error Condition="'$(BuildVersionPatch)' == '0'" Text="Not a patch build: $(BuildVersion)"/>
195+
<Error Condition="'$(BuildVersionPatch)' == ''" Text="Not a patch build: $(BuildVersion)"/>
196+
197+
<PropertyGroup>
198+
<PatchName>cohnet-$(AssemblyMajorVersion)$(AssemblyMinorVersion)$(AssemblyServicePack)-patch-$(BuildVersionPatch)</PatchName>
199+
<PatchDir>$(DistPatchesDir)</PatchDir>
200+
<PatchFile>$(PatchDir)\$(PatchName).zip</PatchFile>
201+
<BinDir>$(PatchDir)\bin</BinDir>
202+
<Root>$(PatchDir)\</Root>
203+
</PropertyGroup>
204+
205+
<Message Text="Building patch: $(PatchName) in $(PatchDir)"/>
206+
207+
<Error Condition="!Exists($(PatchDir))" Text="Missing patch directory: $(PatchDir)"/>
208+
209+
<!-- Create the patch -->
210+
211+
<Delete Files="@(PatchFile)"/>
212+
<MakeDir Directories="$(BinDir)"/>
213+
<ItemGroup>
214+
<BinFiles Include="$(BuildDir)\Coherence.2010\$(BuildType)\Coherence.*" />
215+
</ItemGroup>
216+
217+
<Copy SourceFiles="@(BinFiles)" DestinationFolder="$(BinDir)"/>
218+
219+
<ItemGroup>
220+
<ZipFiles Include="$(DistPatchesDir)\$(ReadmeFileName)"/>
221+
<ZipFiles Include="$(BinDir)\**"/>
222+
</ItemGroup>
223+
224+
<MSBuild.ExtensionPack.Compression.Zip TaskAction="Create"
225+
CompressFiles="@(ZipFiles)" ZipFileName="$(PatchFile)" RemoveRoot="$(Root)" />
226+
227+
<RemoveDir Directories="$(BinDir)" />
228+
</Target>
229+
230+
</Project>

Diff for: Coherence.properties

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
4+
5+
Licensed under the Universal Permissive License v 1.0 as shown at
6+
http://oss.oracle.com/licenses/upl.
7+
-->
8+
<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
9+
<PropertyGroup>
10+
<AssemblyMajorVersion>14</AssemblyMajorVersion>
11+
<AssemblyMinorVersion>1</AssemblyMinorVersion>
12+
<AssemblyServicePack>2</AssemblyServicePack>
13+
<!--
14+
The AssemblyPatch is a combination of 4th and 5th Oracle version numbers.
15+
The 5th Oracle version number has 3 digits.
16+
This is the mapping scheme:
17+
18+
AssemblyPatch = 4th Oracle number * 1000 + 5th Oracle number;
19+
20+
e.g:
21+
12.2.1.0.0 (Oracle) ==> 12.2.1.0 (.NET), AssemblyPatch = 0 * 1000 + 0 = 0
22+
12.2.1.0.1 (Oracle) ==> 12.2.1.1 (.NET), AssemblyPatch = 0 * 1000 + 1 = 1
23+
12.2.1.1.0 (Oracle) ==> 12.2.1.1000 (.NET), AssemblyPatch = 1 * 1000 + 0 = 1000
24+
12.2.1.1.1 (Oracle) ==> 12.2.1.1001 (.NET), AssemblyPatch = 1 * 1000 + 1 = 1001
25+
-->
26+
<AssemblyPatch>0</AssemblyPatch>
27+
<AssemblyDescription></AssemblyDescription>
28+
<BuildType>Release</BuildType>
29+
<!--
30+
ComponentVersion is the 4th Oracle version number.
31+
Patch is the 5th Oracle version number.
32+
-->
33+
<ComponentVersion>0</ComponentVersion>
34+
<Patch>0</Patch>
35+
</PropertyGroup>
36+
</Project>

Diff for: doc/build/readme-prerelease.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Oracle Coherence $(VERSION) for .NET
2+
3+
The content of this pre-release represents our general product direction. It is intended for information
4+
purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any
5+
material, code, or functionality, and should not be relied upon in making purchasing decisions.
6+
The development, release, and timing of any features or functionality described for Oracles products
7+
remains at the sole discretion of Oracle.

Diff for: doc/build/readme.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Oracle Coherence 14.1.2.0 for .NET

Diff for: doc/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Oracle® Coherence Client for .NET Documentation
22

3-
This is documentation for the .NET Core 3.1 and .NET Standard 2.0-compatible implementation of Oracle Coherence Client for .NET.
3+
This is documentation for the .NET 6.0 or later implementation of Oracle Coherence Client for .NET.
44

55
> [!Note]
66
> The documentation for the .NET Framework 4.0 (or later) compatible implementation of Oracle Coherence Client for .NET is available [here](https://coherence.community/14.1.1.0/api/dotnet/).

0 commit comments

Comments
 (0)