Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to net462 and update libpalaso #358

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/ci+cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
framework: [net461, net8.0]
framework: [net462, net8.0]
exclude:
# dotnet on Linux cannot build net461 without additional, unnecessary, work
- os: ubuntu-latest
framework: net461
framework: net462
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.framework }}
cancel-in-progress: true
Expand All @@ -45,7 +45,6 @@ jobs:
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: |
6.0.x
8.0.x

- name: Restore
Expand All @@ -60,11 +59,11 @@ jobs:

- name: Test Chorus
run: dotnet test src/Chorus.Tests/Chorus.Tests.csproj -f ${{ matrix.framework }} --no-build -c Release --filter TestCategory!=SkipOnBuildServer -- NUnit.TestOutputXml=TestResults
if: matrix.framework == 'net461'
if: matrix.framework == 'net462'

- name: Test Chorus Hub
run: dotnet test src/ChorusHubTests/ChorusHubTests.csproj -f ${{ matrix.framework }} --no-build -c Release --filter TestCategory!=SkipOnBuildServer -- NUnit.TestOutputXml=TestResults
if: matrix.framework == 'net461'
if: matrix.framework == 'net462'

- name: Test ChorusMerge
run: dotnet test src/ChorusMerge.Tests/ChorusMerge.Tests.csproj -f ${{ matrix.framework }} --no-build -c Release --filter TestCategory!=SkipOnBuildServer -- NUnit.TestOutputXml=TestResults
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net461</TargetFrameworks>
<TargetFrameworks>net462</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<Description>End-user collaboration library via 3-way xml merging and hg dvcs under the hood.</Description>
<Company>SIL International</Company>
Expand All @@ -27,7 +27,7 @@ See full changelog at https://github.com/sillsdev/chorus/blob/master/CHANGELOG.m
has platform dependent binaries, so msbuild decides that Chorus is platform specific,
regardless of the actual platform target. For the same reason we have to set
RuntimeIdentifiers when building with .NET 5 on AppVeyor. Otherwise the build
fails with an error that there is no target for'net461/win7-x86'. -->
fails with an error that there is no target for'net462/win7-x86'. -->
<PlatformTarget>AnyCPU</PlatformTarget>
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion l10n/l10n.proj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
Lines=" &lt;note xml:lang=&quot;en&quot;&gt;Not found in static scan of compiled code (version 0.0.0)&lt;/note&gt;"/>
<!-- Build and extract strings -->
<Exec Command="dotnet build -c Release" WorkingDirectory=".."/>
<Exec Command="&quot;$(PkgL10NSharp_ExtractXliff)\tools\ExtractXliff.exe&quot; -n SIL -o Chorus.dll -b Chorus.en.xlf -x Chorus.en.xlf -p $(GitVersion_NuGetVersion) -m SIL.Localizer.GetString -m SIL.Localizer.Localize -g ../Output/Release/net461/SIL.*.dll" />
<Exec Command="&quot;$(PkgL10NSharp_ExtractXliff)\tools\ExtractXliff.exe&quot; -n SIL -o Chorus.dll -b Chorus.en.xlf -x Chorus.en.xlf -p $(GitVersion_NuGetVersion) -m SIL.Localizer.GetString -m SIL.Localizer.Localize -g ../Output/Release/net462/SIL.*.dll" />
</Target>

<Target Name="PackageL10ns" DependsOnTargets="restore;GetVersion">
Expand Down
18 changes: 18 additions & 0 deletions src/Chorus.Tests/ChorusFixtureSetup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using L10NSharp;
using NUnit.Framework;

namespace Chorus.Tests
{
internal class ChorusFixtureSetup
{
[SetUpFixture]
public class SetupFixture
{
[OneTimeSetUp]
public void RunBeforeAnyTests()
{
LocalizationManager.StrictInitializationMode = false;
}
}
}
}
1 change: 0 additions & 1 deletion src/Chorus.Tests/clone/ClonerTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
Expand Down
4 changes: 2 additions & 2 deletions src/Chorus/Chorus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="SIL.ReleaseTasks" Version="2.5.0" PrivateAssets="All" />
<PackageReference Include="SIL.Windows.Forms" Version="12.0.0-*" />
<PackageReference Include="SIL.ReleaseTasks" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="SIL.Windows.Forms" Version="15.0.0-*" />
<PackageReference Include="Vulcan.Uczniowie.HelpProvider" Version="1.0.16" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/Chorus/ChorusSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ public static void SetUpLocalization(string desiredUiLangId,
var versionObj = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
// We don't need to reload strings for every "revision" (that might be every time we build).
var version = "" + versionObj.Major + "." + versionObj.Minor + "." + versionObj.Build;
LocalizationManager.Create(TranslationMemory.XLiff, desiredUiLangId, "Chorus",
LocalizationManager.Create(desiredUiLangId, "Chorus",
Application.ProductName, version, directoryOfInstalledXlfFiles,
directoryOfUserModifiedXlfFiles,
Icon.FromHandle(Properties.Resources.chorus32x32.GetHicon()), // should call DestroyIcon, but when?
"[email protected]", "Chorus");
"[email protected]", new [] {"Chorus"});
}

[Obsolete("Only one kind of TranslationMemory is supported: XLF; there is no need for the kind parameter.")]
Expand Down
2 changes: 1 addition & 1 deletion src/Chorus/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<section name="Chorus.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup><userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup><userSettings>
<Chorus.Properties.Settings>
<setting name="PathToRepository" serializeAs="String">
<value/>
Expand Down
4 changes: 2 additions & 2 deletions src/ChorusHub/ChorusHub.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="SIL.ReleaseTasks" Version="2.5.0" PrivateAssets="All" />
<PackageReference Include="SIL.BuildTasks" Version="2.5.0" PrivateAssets="All" />
<PackageReference Include="SIL.ReleaseTasks" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="SIL.BuildTasks" Version="3.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ChorusHub/app.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
4 changes: 2 additions & 2 deletions src/ChorusHubApp/ChorusHubApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="SIL.ReleaseTasks" Version="2.5.0" PrivateAssets="All" />
<PackageReference Include="SIL.Windows.Forms" Version="12.0.0-*" />
<PackageReference Include="SIL.ReleaseTasks" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="SIL.Windows.Forms" Version="15.0.0-*" />
<PackageReference Include="Vulcan.Uczniowie.HelpProvider" Version="1.0.16" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/ChorusHubApp/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<configuration>
<configSections>
</configSections>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
15 changes: 15 additions & 0 deletions src/ChorusHubTests/ChorusHubFixtureSetup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using L10NSharp;
using NUnit.Framework;

namespace ChorusHubTests
{
[SetUpFixture]
public class ChorusHubFixtureSetup
{
[OneTimeSetUp]
public void RunBeforeAnyTests()
{
LocalizationManager.StrictInitializationMode = false;
}
}
}
4 changes: 2 additions & 2 deletions src/ChorusMerge.Tests/ChorusMerge.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>ChorusMerge.Tests</RootNamespace>
<AssemblyTitle>ChorusMerge.Tests</AssemblyTitle>
<Description>Unit tests for LibChorus.dll</Description>
<TargetFrameworks>net461;net8.0</TargetFrameworks>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -16,7 +16,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.2"/>
<PackageReference Include="SIL.TestUtilities" Version="12.0.0-*" />
<PackageReference Include="SIL.TestUtilities" Version="15.0.0-*" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 15 additions & 0 deletions src/ChorusMerge.Tests/ChorusMergeFixtureSetup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using L10NSharp;
using NUnit.Framework;

namespace ChorusMerge.Tests
{
[SetUpFixture]
public class ChorusMergeFixtureSetup
{
[OneTimeSetUp]
public void RunBeforeAnyTests()
{
LocalizationManager.StrictInitializationMode = false;
}
}
}
4 changes: 2 additions & 2 deletions src/ChorusMerge/ChorusMerge.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<AssemblyTitle>ChorusMerge</AssemblyTitle>
<PackageId>SIL.Chorus.ChorusMerge</PackageId>
<OutputType>Exe</OutputType>
<TargetFrameworks>net461;net8.0</TargetFrameworks>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<RepositoryUrl>https://github.com/sillsdev/chorus.git</RepositoryUrl>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="SIL.ReleaseTasks" Version="2.5.0" PrivateAssets="All" />
<PackageReference Include="SIL.ReleaseTasks" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.0.1" />
</ItemGroup>
Expand Down
5 changes: 2 additions & 3 deletions src/ChorusMerge/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using Chorus.FileTypeHandlers;
using Chorus.merge;
using Chorus.merge.xml.generic;
using SIL.PlatformUtilities;
using L10NSharp;

// Allow redirecting Console.Error for unit tests (Avoid spurious build failures)
[assembly: InternalsVisibleTo("ChorusMerge.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001005f4452c387d979e3cba05fd73bb9aebe8f8830874663d66a7869f614a8f5e8def658d5c5920fae609d28aa005d5a9af5bd758ca8f19ad0347b7aa76e1f723f8994792136f5ceff9fb6f719d4337f65da2e1d66a85cc5e28e4656a1a30c2ff513440393177625c725d3fb156dc3c11610ea5936b9404ab9d51f7eb71ac0aa27bd")]
Expand Down Expand Up @@ -35,6 +33,7 @@ public static int Main(string[] args)
{
try
{
LocalizationManager.StrictInitializationMode = false;
string ourFilePath = args[0];
string commonFilePath = args[1];
string theirFilePath = args[2];
Expand Down
30 changes: 15 additions & 15 deletions src/Installer/ChorusHub.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ http://blogs.msdn.com/robmen/archive/2003/10/04/56479.aspx -->
<!-- -->
<MajorUpgrade AllowDowngrades="no" DowngradeErrorMessage="A newer version of Chorus Hub is already installed. Setup will now exit." Schedule="afterInstallValidate"/>

<PropertyRef Id="WIX_IS_NETFRAMEWORK_461_OR_LATER_INSTALLED"/>
<Condition Message="Before [ProductName] can install, you need to install Microsoft's free .NET Framework 4.6.1 or later.">
<![CDATA[Installed OR WIX_IS_NETFRAMEWORK_461_OR_LATER_INSTALLED]]>
<PropertyRef Id="WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED"/>
<Condition Message="Before [ProductName] can install, you need to install Microsoft's free .NET Framework 4.6.2 or later.">
<![CDATA[Installed OR WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED]]>
</Condition>

<!--because of bug, this needs to be 1 (now set with "'InstallScope="perMachine"' in Package element, above.
Expand Down Expand Up @@ -55,7 +55,7 @@ http://blogs.msdn.com/robmen/archive/2003/10/04/56479.aspx -->

<!-- Main assemblies -->
<Component Id="ChorusHub.exe" Guid="C1EEF458-E382-11DE-8A39-0800200C9A66">
<File Id="ChorusHub.exe" Name="ChorusHub.exe" Source="..\..\output\Release\net461\ChorusHub.exe" KeyPath="yes" />
<File Id="ChorusHub.exe" Name="ChorusHub.exe" Source="..\..\output\Release\net462\ChorusHub.exe" KeyPath="yes" />
<!-- http://codeblog.vurdalakov.net/2013/06/wix-how-to-install-and-start-windows-service.html -->
<ServiceInstall Id="ChorusHub" Type="ownProcess" Name="ChorusHub" DisplayName="Chorus Hub Sharing Service"
Description="ChorusHub Sharing Service" Start="auto" Account="LocalSystem" ErrorControl="normal">
Expand All @@ -73,46 +73,46 @@ http://blogs.msdn.com/robmen/archive/2003/10/04/56479.aspx -->
</RegistryKey>
</Component>
<Component Id="LibChorus.dll" Guid="C1EECD54-E382-11DE-8A39-0800200C9A66">
<File Id="LibChorus.dll" Name="LibChorus.dll" KeyPath="yes" Source="..\..\output\Release\net461\LibChorus.dll" />
<File Id="LibChorus.dll" Name="LibChorus.dll" KeyPath="yes" Source="..\..\output\Release\net462\LibChorus.dll" />
</Component>

<!-- used by chorus -->
<Component Id="Autofac.dll" Guid="C1EECD55-E382-11DE-8A39-0800200C9A66">
<File Id="Autofac.dll" Name="Autofac.dll" KeyPath="yes" Source="..\..\output\Release\net461\Autofac.dll" />
<File Id="Autofac.dll" Name="Autofac.dll" KeyPath="yes" Source="..\..\output\Release\net462\Autofac.dll" />
</Component>
<Component Id="chorushelp.chm" Guid="C1EECD56-E382-11DE-8A39-0800200C9A66">
<File Id="chorushelp.chm" Name="Chorus_Help.chm" KeyPath="yes" Source="..\..\DistFiles\Help\Chorus_Help.chm"/>
</Component>
<!-- used by chorus help -->
<Component Id="Vulcan.Uczniowie.HelpProvider.dll" Guid="C1EEF450-E382-11DE-8A39-0800200C9A66">
<File Id="Vulcan.Uczniowie.HelpProvider.dll" Name="Vulcan.Uczniowie.HelpProvider.dll" KeyPath="yes" Source="..\..\output\Release\net461\Vulcan.Uczniowie.HelpProvider.dll" />
<File Id="Vulcan.Uczniowie.HelpProvider.dll" Name="Vulcan.Uczniowie.HelpProvider.dll" KeyPath="yes" Source="..\..\output\Release\net462\Vulcan.Uczniowie.HelpProvider.dll" />
</Component>

<Component Id="SIL.Core.dll" Guid="C1EEF451-E382-11DE-8A39-0800200C9A66">
<File Id="SIL.Core.dll" Name="SIL.Core.dll" KeyPath="yes" Source="..\..\output\Release\net461\SIL.Core.dll" />
<File Id="SIL.Core.dll" Name="SIL.Core.dll" KeyPath="yes" Source="..\..\output\Release\net462\SIL.Core.dll" />
</Component>

<Component Id="SIL.Core.Desktop.dll" Guid="923331FA-197B-4844-930C-21FFDBC480BE">
<File Id="SIL.Core.Desktop.dll" Name="SIL.Core.Desktop.dll" KeyPath="yes" Source="..\..\output\Release\net461\SIL.Core.Desktop.dll" />
<File Id="SIL.Core.Desktop.dll" Name="SIL.Core.Desktop.dll" KeyPath="yes" Source="..\..\output\Release\net462\SIL.Core.Desktop.dll" />
</Component>

<!-- ICU assemblies used by chorus/palaso -->
<Component Id="icu.net.dll" Guid="C1EEF452-E382-11DE-8A39-0800200C9A66">
<File Id="icu.net.dll" Name="icu.net.dll" KeyPath="yes" Source="..\..\output\Release\net461\icu.net.dll" />
<File Id="icu.net.dll" Name="icu.net.dll" KeyPath="yes" Source="..\..\output\Release\net462\icu.net.dll" />
</Component>
<Component Id="icudt59.dll" Guid="C1EEF453-E382-11DE-8A39-0800200C9A66">
<File Id="icudt59.dll" Name="icudt59.dll" KeyPath="yes" Source="..\..\output\Release\net461\lib\win-x86\icudt59.dll" />
<File Id="icudt59.dll" Name="icudt59.dll" KeyPath="yes" Source="..\..\output\Release\net462\lib\win-x86\icudt59.dll" />
</Component>
<Component Id="icuin59.dll" Guid="C1EEF454-E382-11DE-8A39-0800200C9A66">
<File Id="icuin59.dll" Name="icuin59.dll" KeyPath="yes" Source="..\..\output\Release\net461\lib\win-x86\icuin59.dll" />
<File Id="icuin59.dll" Name="icuin59.dll" KeyPath="yes" Source="..\..\output\Release\net462\lib\win-x86\icuin59.dll" />
</Component>
<Component Id="icuuc59.dll" Guid="C1EEF455-E382-11DE-8A39-0800200C9A66">
<File Id="icuuc59.dll" Name="icuuc59.dll" KeyPath="yes" Source="..\..\output\Release\net461\lib\win-x86\icuuc59.dll" />
<File Id="icuuc59.dll" Name="icuuc59.dll" KeyPath="yes" Source="..\..\output\Release\net462\lib\win-x86\icuuc59.dll" />
</Component>

<!-- L10NSharp assembly used by chorus/palaso -->
<Component Id="L10NSharp.dll" Guid="C1EEF456-E382-11DE-8A39-0800200C9A66">
<File Id="L10NSharp.dll" Name="L10NSharp.dll" KeyPath="yes" Source="..\..\output\Release\net461\L10NSharp.dll"/>
<File Id="L10NSharp.dll" Name="L10NSharp.dll" KeyPath="yes" Source="..\..\output\Release\net462\L10NSharp.dll"/>
</Component>
</Directory>
</Directory>
Expand Down Expand Up @@ -149,7 +149,7 @@ http://blogs.msdn.com/robmen/archive/2003/10/04/56479.aspx -->
<MergeRef Id="CRT90Policy"/>
</Feature>

<Icon Id="chorusHubIcon.ico" SourceFile="..\..\output\Release\net461\ChorusHub.exe"/>
<Icon Id="chorusHubIcon.ico" SourceFile="..\..\output\Release\net462\ChorusHub.exe"/>
<!-- what you see in add/remove programs control panel -->
<Property Id="ARPPRODUCTICON" Value="chorusHubIcon.ico"/>
</Product>
Expand Down
Loading
Loading