Skip to content

Commit aad31c1

Browse files
build(indicators): align Indicators.csproj with current Cross/Windows build structure.
Updates the local-build project (Indicators.csproj) to better reflect the current build structure used by Indicators.Technical.csproj. Key changes: - Introduce platform-based split between Windows and Cross builds: - Windows → net10.0-windows with WPF enabled - Cross → net10.0 with CROSS_PLATFORM constant - Normalize assembly references using a platform-specific base path (ATAS installation vs ATAS X installation). - Add Avalonia references for Cross builds so that Avalonia.Input types used in GlobalUsings.cs resolve correctly. - Update System.Drawing.Common to 10.0.0 since three indicators still reference types such as Image and DashStyle (ExternalChart, Logo, TradesOnChart). - Ensure platform-specific source files are excluded appropriately: - *.Windows.cs and XAML files excluded from Cross builds The goal of this change is to keep Indicators.csproj usable for local external builds while aligning it with the Cross/Windows split already present in the technical project, without introducing internal GitLab project references.
1 parent f8f3f04 commit aad31c1

1 file changed

Lines changed: 49 additions & 15 deletions

File tree

Technical/Indicators.csproj

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,70 @@
77
<SignAssembly>true</SignAssembly>
88
<Configurations>Debug;Release;Publish</Configurations>
99
<Platforms>AnyCPU;Cross</Platforms>
10+
</PropertyGroup>
11+
12+
<PropertyGroup Condition=" '$(Platform)' == 'Cross' ">
13+
<UseWPF>False</UseWPF>
14+
<DefineConstants>$(DefineConstants);CROSS_PLATFORM</DefineConstants>
15+
<TargetFramework>net10.0</TargetFramework>
16+
</PropertyGroup>
17+
18+
<PropertyGroup Condition=" '$(Platform)' != 'Cross' ">
1019
<UseWPF>True</UseWPF>
11-
<TargetFramework>net8.0-windows</TargetFramework>
20+
<TargetFramework>net10.0-windows</TargetFramework>
21+
<NoWarn>$(NoWarn);CA1416</NoWarn>
1222
</PropertyGroup>
1323

1424
<PropertyGroup Condition=" '$(Configuration)' == 'Publish' ">
1525
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
1626
</PropertyGroup>
1727

28+
<PropertyGroup Condition=" '$(Platform)' == 'Cross' ">
29+
<ATAS_BASE>C:\Program Files\ATAS X</ATAS_BASE>
30+
</PropertyGroup>
31+
32+
<PropertyGroup Condition=" '$(Platform)' != 'Cross' ">
33+
<ATAS_BASE>C:\Program Files (x86)\ATAS Platform</ATAS_BASE>
34+
</PropertyGroup>
35+
1836
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.WindowsDesktop" Condition=" '$(Platform)' != 'Cross' " />
1937
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk.WindowsDesktop" Condition=" '$(Platform)' != 'Cross' " />
2038

2139
<ItemGroup>
22-
<Reference Include="Newtonsoft.Json">
23-
<HintPath>C:\Program Files (x86)\ATAS Platform\Newtonsoft.Json.dll</HintPath>
24-
</Reference>
2540
<Reference Include="OFT.Attributes">
26-
<HintPath>C:\Program Files (x86)\ATAS Platform\OFT.Attributes.dll</HintPath>
41+
<HintPath>$(ATAS_BASE)\OFT.Attributes.dll</HintPath>
2742
</Reference>
28-
<Reference Include="OFT.Editors">
29-
<HintPath>C:\Program Files (x86)\ATAS Platform\OFT.Editors.dll</HintPath>
43+
<Reference Include="OFT.Editors" Condition=" '$(Platform)' != 'Cross' ">
44+
<HintPath>$(ATAS_BASE)\OFT.Editors.dll</HintPath>
3045
</Reference>
3146

3247
<Reference Include="ATAS.DataFeedsCore">
33-
<HintPath>C:\Program Files (x86)\ATAS Platform\ATAS.DataFeedsCore.dll</HintPath>
48+
<HintPath>$(ATAS_BASE)\ATAS.DataFeedsCore.dll</HintPath>
3449
</Reference>
3550
<Reference Include="ATAS.Indicators">
36-
<HintPath>C:\Program Files (x86)\ATAS Platform\ATAS.Indicators.dll</HintPath>
51+
<HintPath>$(ATAS_BASE)\ATAS.Indicators.dll</HintPath>
3752
</Reference>
3853
<Reference Include="OFT.Rendering">
39-
<HintPath>C:\Program Files (x86)\ATAS Platform\OFT.Rendering.dll</HintPath>
54+
<HintPath>$(ATAS_BASE)\OFT.Rendering.dll</HintPath>
4055
</Reference>
4156
<Reference Include="Utils.Common">
42-
<HintPath>C:\Program Files (x86)\ATAS Platform\Utils.Common.dll</HintPath>
57+
<HintPath>$(ATAS_BASE)\Utils.Common.dll</HintPath>
4358
</Reference>
44-
<Reference Include="Utils.Windows">
45-
<HintPath>C:\Program Files (x86)\ATAS Platform\Utils.Windows.dll</HintPath>
59+
<Reference Include="Utils.Windows" Condition=" '$(Platform)' != 'Cross' ">
60+
<HintPath>$(ATAS_BASE)\Utils.Windows.dll</HintPath>
4661
</Reference>
4762
<Reference Include="OFT.Localization">
48-
<HintPath>C:\Program Files (x86)\ATAS Platform\OFT.Localization.dll</HintPath>
63+
<HintPath>$(ATAS_BASE)\OFT.Localization.dll</HintPath>
64+
</Reference>
65+
<Reference Include="DevExpress.Data.v25.2" Condition=" '$(Platform)' != 'Cross' ">
66+
<HintPath>$(ATAS_BASE)\DevExpress.Data.v25.2.dll</HintPath>
67+
</Reference>
68+
<Reference Include="Avalonia" Condition=" '$(Platform)' == 'Cross' ">
69+
<HintPath>$(ATAS_BASE)\Avalonia.Base.dll</HintPath>
4970
</Reference>
5071
</ItemGroup>
5172
<ItemGroup>
52-
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
73+
<PackageReference Include="System.Drawing.Common" Version="10.0.0" />
5374
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
5475
</ItemGroup>
5576
<ItemGroup Condition=" '$(Platform)' != 'Cross' ">
@@ -69,4 +90,17 @@
6990
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
7091
</EmbeddedResource>
7192
</ItemGroup>
93+
94+
<!-- File exclusions -->
95+
<ItemGroup Condition=" '$(Platform)' == 'Cross' ">
96+
<Compile Remove="**\*.Windows.cs" />
97+
<None Include="**\*.Windows.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
98+
99+
<Compile Remove="**\*.xaml.cs" />
100+
<None Include="**\*.xaml.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
101+
102+
<Compile Remove="**\*.xaml" />
103+
<None Include="**\*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
104+
</ItemGroup>
105+
72106
</Project>

0 commit comments

Comments
 (0)