Skip to content

Commit

Permalink
upgrade all references to net462, remove net 461 workaround from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Nov 27, 2024
1 parent 8680485 commit 208d1f6
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 53 deletions.
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
2 changes: 1 addition & 1 deletion 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 Down
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
28 changes: 14 additions & 14 deletions build/FLExBridge.proj
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,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 +109,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 @@ -201,18 +201,18 @@

<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
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 @@ -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

0 comments on commit 208d1f6

Please sign in to comment.