Skip to content

Commit

Permalink
Merge pull request #10 from Mrcubix/build-cleanup
Browse files Browse the repository at this point in the history
Build Process Cleanup
  • Loading branch information
Mrcubix authored Oct 10, 2024
2 parents 5b2fee3 + 21b10ac commit bc101fc
Show file tree
Hide file tree
Showing 22 changed files with 78 additions and 131 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
path = .modules/OTD.EnhancedOutputMode
url = https://github.com/Mrcubix/OTD.EnhancedOutputMode.git
branch = master
[submodule ".modules/OpenTabletDriver.External-0.6.x"]
path = .modules/OpenTabletDriver.External-0.6.x
url = https://github.com/Mrcubix/OpenTabletDriver.External.git
branch = 0.6.x
[submodule ".modules/OTD.EnhancedOutputMode-0.6.x"]
path = .modules/OTD.EnhancedOutputMode-0.6.x
url = https://github.com/Mrcubix/OTD.EnhancedOutputMode.git
Expand Down
1 change: 0 additions & 1 deletion .modules/OpenTabletDriver.External-0.6.x
Submodule OpenTabletDriver.External-0.6.x deleted from 7dd970
12 changes: 10 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<Project>
<PropertyGroup>
<NoWarn>$(NoWarn); NETSDK1138; NU1902; NU1903</NoWarn>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn); NETSDK1138</NoWarn>
<NuGetAuditLevel>critical</NuGetAuditLevel>
<AvaloniaVersion>11.0.10</AvaloniaVersion>
</PropertyGroup>

<!-- Only Embed debug symbols for the Release configuration -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugType>embedded</DebugType>
</PropertyGroup>

<Import Project="Targets/FixPackageId.targets" />

</Project>
12 changes: 12 additions & 0 deletions Targets/FixPackageId.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project>

<Target Name="FixPackageId" BeforeTargets="_GenerateRestoreProjectPathWalk" Condition="$(AssemblyName.Contains('OpenTabletDriver'))">

<PropertyGroup>
<PackageId>$(AssemblyName)-$(TargetFramework)</PackageId>
</PropertyGroup>

<Message Importance="High" Text="changed PackageId in Assembly '$(AssemblyName)' to '$(PackageId)'." />
</Target>

</Project>
2 changes: 2 additions & 0 deletions Touch-Gestures-0.6.x/GesturesDaemon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public override Task<List<SerializablePlugin>> GetPlugins()
plugins.Add(serializablePlugin);
}

Log.Write("Gestures Daemon", $"Found {plugins.Count} Usable Bindings Plugins.");

return Task.FromResult(plugins);
}

Expand Down
16 changes: 3 additions & 13 deletions Touch-Gestures-0.6.x/Touch-Gestures.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,16 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn); NETSDK1138</NoWarn>
<RootNamespace>TouchGestures</RootNamespace>
<AssemblyName>Touch-Gestures</AssemblyName>
</PropertyGroup>

<!-- Only Embed debug symbols for the Release configuration -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugType>embedded</DebugType>
</PropertyGroup>

<ItemGroup Condition="'$(OTDVersion)' == 'OTD06'">
<ItemGroup>
<ProjectReference Include="../Touch-Gestures.Lib/Touch-Gestures.Lib.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(OTDVersion)' == ''">
<ProjectReference Include="../Touch-Gestures.Lib/Touch-Gestures.Lib-0.6.x.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../.modules/OpenTabletDriver.External-0.6.x/.modules/OpenTabletDriver/OpenTabletDriver.Desktop/OpenTabletDriver.Desktop.csproj" />
<ProjectReference Include="../.modules/OTD.EnhancedOutputMode-0.6.x/.modules/OpenTabletDriver/OpenTabletDriver.Desktop/OpenTabletDriver.Desktop.csproj" Nullable="disable" />
<ProjectReference Include="../.modules/OTD.EnhancedOutputMode-0.6.x/OTD.EnhancedOutputMode.Lib/OTD.EnhancedOutputMode.Lib.csproj" />
</ItemGroup>

Expand Down
19 changes: 0 additions & 19 deletions Touch-Gestures.Installer/Touch-Gestures.Installer-0.6.x.csproj

This file was deleted.

19 changes: 15 additions & 4 deletions Touch-Gestures.Installer/Touch-Gestures.Installer.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<Nullable>enable</Nullable>
<NoWarn>NETSDK1138</NoWarn>
</PropertyGroup>

<!-- NET 5 Only -->
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<!-- OpenTabletDriver.Plugin -->
<ProjectReference Include="../.modules/OpenTabletDriver.External/.modules/OpenTabletDriver/OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj" />
<ProjectReference Include="../.modules/OTD.EnhancedOutputMode/.modules/OpenTabletDriver/OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj" Private="False" />
</ItemGroup>

<!-- NET 6 Only -->
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<!-- OpenTabletDriver.Plugin -->
<ProjectReference Include="../.modules/OTD.EnhancedOutputMode-0.6.x/.modules/OpenTabletDriver/OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj" Private="False" />
</ItemGroup>

<!-- embed ressource /build/plugin/Wheel-Addon.zip -->
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<EmbeddedResource Include="../build/plugin/0.5.x/Touch-Gestures-0.5.x.zip" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<EmbeddedResource Include="../build/plugin/0.6.x/Touch-Gestures-0.6.x.zip" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Touch-Gestures.Lib/Entities/Gestures/HoldGesture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace TouchGestures.Lib.Entities.Gestures
[JsonObject(MemberSerialization.OptIn)]
public partial class HoldGesture : TapGesture
{
private bool _deadlineStarted = false;
//private bool _deadlineStarted = false;

#region Constructors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public static bool SetBindingValue(this PluginSettingStore store, TypeInfo plugi
return SetBindingValueCore06(store, plugin, value);
#else
store.Settings.Single(s => s.Property == "Property").SetValue(value!);
#endif
return true;
#endif
}
}

Expand Down
21 changes: 0 additions & 21 deletions Touch-Gestures.Lib/Touch-Gestures.Lib-0.6.x.csproj

This file was deleted.

40 changes: 13 additions & 27 deletions Touch-Gestures.Lib/Touch-Gestures.Lib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,31 @@
<!-- Do not build the solution, it won't work with multi-targetting -->

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<LangVersion>preview</LangVersion>
<RootNamespace>TouchGestures.Lib</RootNamespace>
<NoWarn>$(NoWarn); NETSDK1138; VSTHRD200</NoWarn>
<Nullable>enable</Nullable>
<OTDVersion>$(OTDVersion)</OTDVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(OTDVersion)' == ''">
<OTDVersion>OTD05</OTDVersion>
</PropertyGroup>

<!-- Target Frameworks -->

<PropertyGroup Condition="'$(OTDVersion)' == 'OTD05' Or '$(OTDVersion)' == ''">
<TargetFramework>net5.0</TargetFramework>
<LangVersion>preview</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(OTDVersion)' == 'OTD06'">
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<!-- Debug Symbols -->

<!-- Only Embed debug symbols for the Release configuration -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugType>embedded</DebugType>
</PropertyGroup>

<!-- Dependencies -->

<!-- Only for OTD 0.5.x (Running on .NET 5) -->
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<ProjectReference Include="../.modules/OpenTabletDriver.External/.modules/OpenTabletDriver/OpenTabletDriver.Desktop/OpenTabletDriver.Desktop.csproj" PrivateAssets="all" />
<ProjectReference Include="../.modules/OpenTabletDriver.External/OpenTabletDriver.External.Common/OpenTabletDriver.External.Common.csproj" />
<ProjectReference Include="../.modules/OTD.EnhancedOutputMode/.modules/OpenTabletDriver/OpenTabletDriver.Desktop/OpenTabletDriver.Desktop.csproj" PrivateAssets="all" Nullable="disable">
<SetTargetFramework>TargetFramework=net5.0</SetTargetFramework>
</ProjectReference>
</ItemGroup>

<!-- Only for OTD 0.6.x (Running on .NET 6) -->
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<ProjectReference Include="../.modules/OpenTabletDriver.External-0.6.x/.modules/OpenTabletDriver/OpenTabletDriver.Desktop/OpenTabletDriver.Desktop.csproj" PrivateAssets="all" />
<ProjectReference Include="../.modules/OpenTabletDriver.External-0.6.x/OpenTabletDriver.External.Common/OpenTabletDriver.External.Common.csproj" />
<ProjectReference Include="../.modules/OTD.EnhancedOutputMode-0.6.x/.modules/OpenTabletDriver/OpenTabletDriver.Desktop/OpenTabletDriver.Desktop.csproj" PrivateAssets="all" Nullable="disable">
<SetTargetFramework>TargetFramework=net6.0</SetTargetFramework>
</ProjectReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../.modules/OpenTabletDriver.External/OpenTabletDriver.External.Common/OpenTabletDriver.External.Common.csproj" Nullable="disable" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion Touch-Gestures.Tests/Touch-Gestures.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>TouchGestures.Tests</RootNamespace>
<NoWarn>$(NoWarn); NETSDK1138; VSTHRD200; NU1902; NU1903;</NoWarn>

Expand All @@ -23,7 +24,7 @@

<ItemGroup>
<ProjectReference Include="../Touch-Gestures.Lib/Touch-Gestures.Lib.csproj" />
<ProjectReference Include="../.modules/OpenTabletDriver.External/.modules/OpenTabletDriver/OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj" />
<ProjectReference Include="../.modules/OTD.EnhancedOutputMode-0.6.x/.modules/OpenTabletDriver/OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj" />
</ItemGroup>

</Project>
4 changes: 0 additions & 4 deletions Touch-Gestures.UX.Desktop/Touch-Gestures.UX.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugType>embedded</DebugType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
Expand Down
11 changes: 1 addition & 10 deletions Touch-Gestures.UX/Touch-Gestures.UX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>Link</TrimMode>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugType>embedded</DebugType>
</PropertyGroup>

<ItemGroup>
<AvaloniaResource Include="Assets\**" />
Expand All @@ -34,15 +30,10 @@
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="StreamJsonRpc" Version="2.6.121" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../Touch-Gestures.Lib/Touch-Gestures.Lib.csproj" />
<ProjectReference Include="../.modules/OpenTabletDriver.External/OpenTabletDriver.External.Avalonia/OpenTabletDriver.External.Avalonia.csproj" />
<ProjectReference Include="../.modules/OTD.EnhancedOutputMode/.modules/OpenTabletDriver/OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj" />
<ProjectReference Include="../.modules/OTD.EnhancedOutputMode-0.6.x/.modules/OpenTabletDriver/OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj" />
</ItemGroup>

</Project>
4 changes: 0 additions & 4 deletions Touch-Gestures.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Touch-Gestures-0.6.x", "Tou
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Touch-Gestures.Installer", "Touch-Gestures.Installer\Touch-Gestures.Installer.csproj", "{C0D3603B-06B8-4B88-9122-EB1B9D401E85}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Touch-Gestures.Installer-0.6.x", "Touch-Gestures.Installer\Touch-Gestures.Installer-0.6.x.csproj", "{723927FA-2CC1-4944-81F8-42B1F4C9E80D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Touch-Gestures.Lib", "Touch-Gestures.Lib\Touch-Gestures.Lib.csproj", "{D305D418-F65C-4335-8996-140E383894B0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Touch-Gestures.Lib-0.6.x", "Touch-Gestures.Lib\Touch-Gestures.Lib-0.6.x.csproj", "{8BBE54A7-CF26-414B-AE8E-E34E2D40F654}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Touch-Gestures.Tests", "Touch-Gestures.Tests\Touch-Gestures.Tests.csproj", "{FE73A8D2-F3C5-4A5E-98D9-9EFE0F4FAFA3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Touch-Gestures.UX", "Touch-Gestures.UX\Touch-Gestures.UX.csproj", "{EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}"
Expand Down
2 changes: 2 additions & 0 deletions Touch-Gestures/GesturesDaemon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public override Task<List<SerializablePlugin>> GetPlugins()
plugins.Add(serializablePlugin);
}

Log.Write("Gestures Daemon", $"Found {plugins.Count} Usable Bindings Plugins.");

return Task.FromResult(plugins);
}

Expand Down
9 changes: 3 additions & 6 deletions Touch-Gestures/Touch-Gestures.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn); NETSDK1138</NoWarn>
<RootNamespace>TouchGestures</RootNamespace>
</PropertyGroup>

<!-- Only Embed debug symbols for the Release configuration -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugType>embedded</DebugType>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../Touch-Gestures.Lib/Touch-Gestures.Lib.csproj" />
<ProjectReference Include="../.modules/OpenTabletDriver.External/.modules/OpenTabletDriver/OpenTabletDriver.Desktop/OpenTabletDriver.Desktop.csproj" />

<ProjectReference Include="../.modules/OTD.EnhancedOutputMode/.modules/OpenTabletDriver/OpenTabletDriver.Desktop/OpenTabletDriver.Desktop.csproj" Nullable="disable" />
<ProjectReference Include="../.modules/OTD.EnhancedOutputMode/OTD.EnhancedOutputMode.Lib/OTD.EnhancedOutputMode.Lib.csproj" />
</ItemGroup>

Expand Down
Loading

0 comments on commit bc101fc

Please sign in to comment.