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

update net462 #411

Merged
merged 5 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
52 changes: 20 additions & 32 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ jobs:
with:
fetch-depth: 0
submodules: true

- name: Download 461 targeting pack
uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0
id: downloadfile
with:
url: "https://download.microsoft.com/download/F/1/D/F1DEB8DB-D277-4EF9-9F48-3A65D4D8F965/NDP461-DevPack-KB3105179-ENU.exe"
target: public/

- name: Install targeting pack
shell: cmd
working-directory: public
run: NDP461-DevPack-KB3105179-ENU.exe /q
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

Expand All @@ -58,7 +46,7 @@ jobs:
choco uninstall wixtoolset
choco install wixtoolset --version 3.11.2 --allow-downgrade --force
echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request'

# If we are just doing a CI build we don't need real localizations, but the location must exist
- name: Add Fake Localizations for CI
Expand Down Expand Up @@ -180,29 +168,29 @@ jobs:

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Download FlexBridge artifact
uses: actions/download-artifact@v4
with:
name: FlexBridge.msi
path: src/WiXInstaller/BaseInstallerBuild # Target directory for the downloaded artifact

- name: Build Bundles
id: build_bundles
working-directory: build
shell: cmd
run: |
msbuild FLExBridge.proj /t:RestoreBuildTasks;RestorePackages;GetDotNetFiles;CopyWixOverrides
msbuild FLExBridge.proj /t:BuildProductBaseBundles /p:Configuration=Release /p:Platform="Any CPU"

- name: Extract burn engines
id: extract_engines
working-directory: BuildDir
shell: cmd
run: |
insignia -ib FlexBridge_Offline.exe -o offline-engine.exe
insignia -ib FlexBridge_Online.exe -o online-engine.exe

- name: Upload Offline Engine
id: upload-offline-engine
uses: actions/upload-artifact@v4
Expand All @@ -211,8 +199,8 @@ jobs:
path: BuildDir/offline-engine.exe
if-no-files-found: error
overwrite: true
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request'

- name: Upload Offline Bundle(detatched)
id: upload-offline-bundle
uses: actions/upload-artifact@v4
Expand All @@ -221,8 +209,8 @@ jobs:
path: BuildDir/FlexBridge_Offline.exe
if-no-files-found: error
overwrite: true
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request'

- name: Upload Online Engine
id: upload-online-engine
uses: actions/upload-artifact@v4
Expand All @@ -231,8 +219,8 @@ jobs:
path: BuildDir/online-engine.exe
if-no-files-found: error
overwrite: true
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request'

- name: Upload Online Bundle(detached)
id: upload-online-bundle
uses: actions/upload-artifact@v4
Expand All @@ -242,7 +230,7 @@ jobs:
if-no-files-found: error
overwrite: true
if: github.event_name != 'pull_request'

sign-offline-engine:
name: Sign Offline Engine
needs: build-bundles
Expand All @@ -268,13 +256,13 @@ jobs:
reattach-engines:
runs-on: windows-latest
needs: [sign-offline-engine, sign-online-engine]
steps:
steps:
- name: Downgrade Wix Toolset - remove when runner has 3.14.2
run: |
choco uninstall wixtoolset
choco install wixtoolset --version 3.11.2 --allow-downgrade --force
echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Download signed online engine
uses: actions/download-artifact@v4
with:
Expand All @@ -291,7 +279,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: FlexBridge_Offline.exe

- name: Reattach Engines
shell: cmd
run: |
Expand All @@ -317,17 +305,17 @@ jobs:
if-no-files-found: error
overwrite: true
if: github.event_name != 'pull_request'
- name: Cleanup Offline Engine

- name: Cleanup Offline Engine
uses: geekyeggo/delete-artifact@v5
with:
name: offline-engine
- name: Cleanup Online Engine

- name: Cleanup Online Engine
uses: geekyeggo/delete-artifact@v5
with:
name: online-engine

sign-offline-bundle:
name: Sign Offline Bundle
needs: reattach-engines
Expand Down
8 changes: 4 additions & 4 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>Library that allows multiple FieldWorks users to collaborate remotely (i.e., not necessarily connected by a local network).</Description>
<Company>SIL</Company>
Expand All @@ -25,11 +25,11 @@ See full changelog at https://github.com/sillsdev/flexbridge/blob/develop/CHANGE
<ChangelogFile>../../CHANGELOG.md</ChangelogFile>
<UseFullSemVerForNuGet>false</UseFullSemVerForNuGet>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<ChorusVersion>6.0.0-beta*</ChorusVersion>
<LCModelVersion>10.2.0-beta*</LCModelVersion>
<ChorusVersion>6.0.0-beta0059</ChorusVersion>
<LCModelVersion>11.0.0-beta*</LCModelVersion>
</PropertyGroup>
<ItemGroup>
<!-- The only reason we depend directly on L10NSharp is because our dependencies can't agree which one they want -->
<PackageReference Include="L10NSharp" Version="6.0.0" />
<PackageReference Include="L10NSharp" Version="8.0.0-beta0005" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
their presence prevents L10nSharp from extracting strings for localization, since the Linux Geckofx DLL's can't be loaded.
Deleting them here fixes both developer builds in Visual Studio and installer builds on the server. -->
<ItemGroup>
<GeckofxDlls Include="$(MSBuildThisFiledirectory)/output/$(Configuration)/net461/Geckofx-*"/>
<GeckofxDlls Include="$(MSBuildThisFiledirectory)/output/$(Configuration)/$(TargetFramework)/Geckofx-*"/>
</ItemGroup>
<Delete Files="@(GeckofxDlls)"/>
</Target>
Expand Down
4 changes: 2 additions & 2 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ FLEx Bridge depends on several assemblies from Chorus and Palaso. Those are inst

```
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SIL\Flex Bridge\9]
"InstallationDir"="C:\Dev\flexbridge\output\Debug\net461"
"InstallationDir"="C:\Dev\flexbridge\output\Debug\net462"
```

- On **Linux**, `export FLEXBRIDGEDIR=${HOME}/fwrepo/flexbridge/output/Debug/net461`
- On **Linux**, `export FLEXBRIDGEDIR=${HOME}/fwrepo/flexbridge/output/Debug/net462`

### Build

Expand Down
32 changes: 17 additions & 15 deletions build/FLExBridge.proj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
<WriteVersionInfoToBuildLog Condition="'$(WriteVersionInfoToBuildLog)' == ''">true</WriteVersionInfoToBuildLog>
<TeamCity Condition="'$(teamcity_version)' != ''">true</TeamCity>
<TeamCity Condition="'$(teamcity_version)' == ''">false</TeamCity>
<!-- note this does not set the TargetFramework for the csproj files, it's just used as a variable to configure build paths-->
<TargetFramework Condition="'$(TargetFramework)' == ''">net462</TargetFramework>
</PropertyGroup>

<Import Project="$(MSBuildTasksTargets)" Condition="Exists('$(MSBuildTasksTargets)')"/>
Expand Down Expand Up @@ -98,8 +100,8 @@
<Target Name="CreateDirectories">
<MakeDir Directories="$(RootDir)/output/"/>
<MakeDir Directories="$(RootDir)/output/$(Configuration)/"/>
<MakeDir Directories="$(RootDir)/output/$(Configuration)/net461/"/>
<MakeDir Directories="$(RootDir)/output/$(Configuration)/net461/localizations/"/>
<MakeDir Directories="$(RootDir)/output/$(Configuration)/$(TargetFramework)/"/>
<MakeDir Directories="$(RootDir)/output/$(Configuration)/$(TargetFramework)/localizations/"/>
</Target>

<ItemGroup>
Expand All @@ -109,31 +111,31 @@
<NDeskDBusFiles Include="$(RootDir)/lib/$(Configuration)/NDesk.DBus.dll*"/>
<ChorusHubFiles Include="$(RootDir)/lib/$(Configuration)/ChorusHub.*"/>
<ConfigFiles Include="$(RootDir)/lib/$(Configuration)/*.dll.config"/>
<GeckoBrowserFiles Include="$(RootDir)/packages/SIL.Windows.Forms.GeckoBrowserAdapter.$(PalasoVer4LinuxGecko)/lib/net461/SIL.Windows.Forms.GeckoBrowserAdapter.dll*"/>
<GeckoBrowserFiles Include="$(RootDir)/packages/SIL.Windows.Forms.GeckoBrowserAdapter.$(PalasoVer4LinuxGecko)/lib/$(TargetFramework)/SIL.Windows.Forms.GeckoBrowserAdapter.dll*"/>
<LinuxLauncherFiles Include="$(RootDir)/flexbridge"/>
</ItemGroup>

<Target Name="CopyExtraFilesToOutput" DependsOnTargets="CopyExtraFilesToOutputLinux">
<Error Text="Localization Files Missing" Condition="'@(LocalizeFiles)' == '' AND '$(Configuration)' != 'Debug'" />
<Copy SourceFiles="@(LocalizeFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/net461/localizations"/>
<Copy SourceFiles="@(LocalizeFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/$(TargetFramework)/localizations"/>
</Target>

<Target Name="CopyExtraFilesToOutputLinux" Condition="'$(OS)'!='Windows_NT'">
<Error Text="GeckoBrowserAdapter Missing" Condition="'@(GeckoBrowserFiles)' == ''" />
<Copy SourceFiles="@(LinuxLauncherFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/net461"/>
<Copy SourceFiles="@(EnchantFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/net461"/>
<Copy SourceFiles="@(NDeskDBusFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/net461"/>
<Copy SourceFiles="@(ChorusHubFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/net461"/>
<Copy SourceFiles="@(ConfigFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/net461"/>
<Copy SourceFiles="@(GeckoBrowserFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/net461"/>
<Copy SourceFiles="@(LinuxLauncherFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/$(TargetFramework)"/>
<Copy SourceFiles="@(EnchantFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/$(TargetFramework)"/>
<Copy SourceFiles="@(NDeskDBusFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/$(TargetFramework)"/>
<Copy SourceFiles="@(ChorusHubFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/$(TargetFramework)"/>
<Copy SourceFiles="@(ConfigFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/$(TargetFramework)"/>
<Copy SourceFiles="@(GeckoBrowserFiles)" DestinationFolder="$(RootDir)/output/$(Configuration)/$(TargetFramework)"/>
</Target>

<Target Name="Compile" DependsOnTargets="CopyExtraFilesToOutput; RestorePackages">
<MSBuild Projects="$(RootDir)/$(Solution)" Targets="Build" Properties="Configuration=$(Configuration);GetVersion=$(GetVersion);WriteVersionInfoToBuildLog=$(WriteVersionInfoToBuildLog)"/>
</Target>

<Target Name="CopyAbout" DependsOnTargets="SetAssemblyVersion">
<Copy SourceFiles="$(RootDir)/output/Installer/about.htm" DestinationFolder="$(RootDir)/output/$(Configuration)/net461"/>
<Copy SourceFiles="$(RootDir)/output/Installer/about.htm" DestinationFolder="$(RootDir)/output/$(Configuration)/$(TargetFramework)"/>
</Target>

<Target Name="VersionNumbers" DependsOnTargets="RestoreBuildTasks;GetVersion" Condition="$(GetVersion)">
Expand Down Expand Up @@ -199,20 +201,20 @@
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="TestOnly" Properties="Configuration=$(Configuration);GetVersion=$(GetVersion);WriteVersionInfoToBuildLog=$(WriteVersionInfoToBuildLog)" Condition="$(RestartBuild)" />
</Target>

<Target Name="TestOnly" >
<Target Name="TestOnly">
<ItemGroup>
<TestAssemblies Include="$(RootDir)/output/$(Configuration)/net461/*Tests.dll" />
<TestAssemblies Include="$(RootDir)/output/$(Configuration)/$(TargetFramework)/*Tests.dll" />
</ItemGroup>

<NUnit3 Assemblies="@(TestAssemblies)"
ToolPath="$(NUnitToolsDir)"
TestInNewThread="false"
ExcludeCategory="$(ExtraExcludeCategories)"
WorkingDirectory="$(RootDir)/output/$(Configuration)/net461"
WorkingDirectory="$(RootDir)/output/$(Configuration)/$(TargetFramework)"
Process="single"
Verbose="true"
UseNUnit3Xml="false"
OutputXmlFile="$(RootDir)/output/$(Configuration)/net461/TestResults.xml"
OutputXmlFile="$(RootDir)/output/$(Configuration)/$(TargetFramework)/TestResults.xml"
TeamCity="$(TeamCity)"/>
</Target>

Expand Down
5 changes: 4 additions & 1 deletion src/FLEx-ChorusPluginTests/FLEx-ChorusPluginTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
<AssemblyName>FLEx-ChorusPluginTests</AssemblyName>
<Description>Unit tests for FLEx-ChorusPlugin</Description>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<AppConfig>..\AppForTests.config</AppConfig>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3" PrivateAssets="all" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1"/>
<PackageReference Include="NUnit" Version="3.13.3"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.3.2"/>
<PackageReference Include="SIL.Chorus.ChorusMerge" Version="$(ChorusVersion)" />
<PackageReference Include="SIL.Chorus.LibChorus.TestUtilities" Version="$(ChorusVersion)" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/LfMergeBridge/LfMergeBridge.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>LfMergeBridge</RootNamespace>
<AssemblyTitle>LfMergeBridge</AssemblyTitle>
<PackageId>SIL.ChorusPlugin.LfMergeBridge</PackageId>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>LibFLExBridgeChorusPlugin</RootNamespace>
<AssemblyTitle>LibFLExBridge-ChorusPlugin</AssemblyTitle>
<PackageId>SIL.ChorusPlugin.LibFLExBridge</PackageId>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
<AssemblyName>LibFLExBridge-ChorusPluginTests</AssemblyName>
<Description>Unit tests for LibFLExBridge-ChorusPlugin</Description>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<AppConfig>..\AppForTests.config</AppConfig>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3" PrivateAssets="all" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1"/>
<PackageReference Include="NUnit" Version="3.13.3"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.3.2"/>
<PackageReference Include="SIL.Chorus.LibChorus.TestUtilities" Version="$(ChorusVersion)" />
<PackageReference Include="SIL.Chorus.Mercurial" Version="6.*" IncludeAssets="build" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>LibTriboroughBridgeChorusPlugin</RootNamespace>
<AssemblyTitle>LibTriboroughBridge-ChorusPlugin</AssemblyTitle>
<PackageId>SIL.ChorusPlugin.LibTriboroughBridge</PackageId>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
<AssemblyName>TriboroughBridge-ChorusPluginTests</AssemblyName>
<Description>Unit tests for LibTriboroughBridge-ChorusPlugin</Description>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1"/>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.2"/>
<PackageReference Include="SIL.LCModel.Utils.Tests" Version="$(LCModelVersion)" />
<PackageReference Include="SIL.LCModel.Utils" Version="$(LCModelVersion)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
<AssemblyName>LiftBridge-ChorusPluginTests</AssemblyName>
<Description>Unit tests for LiftBridge-ChorusPlugin</Description>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3" PrivateAssets="all" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1"/>
<PackageReference Include="NUnit" Version="3.13.3"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.3.2"/>
<PackageReference Include="SIL.Chorus.LibChorus.TestUtilities" Version="$(ChorusVersion)" />
</ItemGroup>

Expand Down
5 changes: 4 additions & 1 deletion src/RepositoryUtilityTests/RepositoryUtilityTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
<PropertyGroup>
<Description>Unit tests for the FLEx Bridge Repository Utility</Description>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1"/>
<PackageReference Include="NUnit" Version="3.13.3"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.3.2"/>
</ItemGroup>

<ItemGroup>
Expand Down
Loading