diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 6d94ecc3e..75431d654 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -113,75 +113,25 @@ jobs: # All the following are used only when building an installer after a merge - name: Build Msi + if: github.event_name != 'pull_request' id: build_msi shell: cmd run: | msbuild build/FLExBridge.proj /t:CleanMasterOutputDir;PreparePublishingArtifactsInternal;BuildProductBaseMsi /p:UploadFolder=${{ inputs.environment || 'Alpha' }} - if: github.event_name != 'pull_request' - - # REVIEW: The .msi file is named with the version, there is probably a cleaner way to generate the correct filename - # and after completing the work to do signing of the bundles it became clear that capturing the files in the signtool wasn't necessary - - name: Prepare for msi signing - shell: bash - run: | - echo "FILES_TO_SIGN=$(cat $FILESTOSIGNLATER)" >> $GITHUB_OUTPUT - id: gathered_files - if: github.event_name != 'pull_request' - - name: upload-msi - id: upload - uses: actions/upload-artifact@v4 - with: - name: FlexBridge.msi - path: ${{ steps.gathered_files.outputs.FILES_TO_SIGN }} - if-no-files-found: error - overwrite: true + - name: Sign FlexBridge msi + uses: sillsdev/codesign/trusted-signing-action@v3 if: github.event_name != 'pull_request' - - sign-msi: - name: Sign FlexBridge Installer - needs: build_and_test - if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@v2.1 - with: - artifact: FlexBridge.msi - description: 'FLEx Bridge Installer' - secrets: - certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} - - build-bundles: - name: Build Installer Bundles - needs: sign-msi - if: github.event_name != 'pull_request' - runs-on: windows-latest - env: - FILESTOSIGNLATER: "${{ github.workspace }}\\filesToSign" - steps: - - name: Checkout Files - uses: actions/checkout@v4 - id: checkout - with: - fetch-depth: 0 - submodules: true - - - name: Downgrade Wix Toolset - remove when runner has 3.14.2 - # See: https://github.com/actions/runner-images/issues/9667 - 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: 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 + credentials: ${{ secrets.TRUSTED_SIGNING_CREDENTIALS }} + files-folder: src/WiXInstaller/BaseInstallerBuild + files-folder-filter: FlexBridge*.msi + description: 'FLExBridge Installer' + description-url: 'https://software.sil.org/fieldworks/help/using-sendreceive/flex-bridge/' - name: Build Bundles id: build_bundles + if: github.event_name != 'pull_request' working-directory: build shell: cmd run: | @@ -190,156 +140,45 @@ jobs: - name: Extract burn engines id: extract_engines + if: github.event_name != 'pull_request' 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 - with: - name: offline-engine - path: BuildDir/offline-engine.exe - if-no-files-found: error - overwrite: true - if: github.event_name != 'pull_request' - - - name: Upload Offline Bundle(detatched) - id: upload-offline-bundle - uses: actions/upload-artifact@v4 - with: - name: FlexBridge_Offline.exe - path: BuildDir/FlexBridge_Offline.exe - if-no-files-found: error - overwrite: true + - name: Sign Engines if: github.event_name != 'pull_request' - - - name: Upload Online Engine - id: upload-online-engine - uses: actions/upload-artifact@v4 - with: - name: online-engine - path: BuildDir/online-engine.exe - if-no-files-found: error - overwrite: true - if: github.event_name != 'pull_request' - - - name: Upload Online Bundle(detached) - id: upload-online-bundle - uses: actions/upload-artifact@v4 - with: - name: FlexBridge_Online.exe - path: BuildDir/FlexBridge_Online.exe - if-no-files-found: error - overwrite: true - if: github.event_name != 'pull_request' - - sign-offline-engine: - name: Sign Offline Engine - needs: build-bundles - if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@v2.1 - with: - artifact: offline-engine - description: 'FLEx Bridge Installer' - secrets: - certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} - - sign-online-engine: - name: Sign Online Engine - needs: build-bundles - if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@v2.1 - with: - artifact: online-engine - description: 'FLEx Bridge Installer' - secrets: - certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} - - reattach-engines: - runs-on: windows-latest - needs: [sign-offline-engine, sign-online-engine] - 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: - name: online-engine - - name: Download signed offline engine - uses: actions/download-artifact@v4 - with: - name: offline-engine - - name: Download Online Bundle - uses: actions/download-artifact@v4 - with: - name: FlexBridge_Online.exe - - name: Download Offline Bundle - uses: actions/download-artifact@v4 - with: - name: FlexBridge_Offline.exe - + uses: sillsdev/codesign/trusted-signing-action@v3 + with: + credentials: ${{ secrets.TRUSTED_SIGNING_CREDENTIALS }} + files-folder: BuildDir + files-folder-filter: '*-engine.exe' + description: 'FLExBridge installer burn engine - SIL Global' + description-url: 'https://software.sil.org/fieldworks/help/using-sendreceive/flex-bridge/' + - name: Reattach Engines + if: github.event_name != 'pull_request' + working-directory: BuildDir shell: cmd run: | insignia -ab online-engine.exe FlexBridge_Online.exe -o FlexBridge_Online.exe insignia -ab offline-engine.exe FlexBridge_Offline.exe -o FlexBridge_Offline.exe - - name: Upload Online Bundle(attached) - id: upload-online-bundle - uses: actions/upload-artifact@v4 - with: - name: FlexBridge_Online.exe - path: FlexBridge_Online.exe - if-no-files-found: error - overwrite: true + - name: Sign Bundles if: github.event_name != 'pull_request' - - - name: Upload Offline Bundle(attached) - id: upload-offline-bundle + uses: sillsdev/codesign/trusted-signing-action@v3 + with: + credentials: ${{ secrets.TRUSTED_SIGNING_CREDENTIALS }} + files-folder: BuildDir + files-folder-filter: FlexBridge_*.exe + description: 'FLExBridge installer - SIL Global' + description-url: 'https://software.sil.org/fieldworks/help/using-sendreceive/flex-bridge/' + + - name: Upload Signed Installers uses: actions/upload-artifact@v4 - with: - name: FlexBridge_Offline.exe - path: FlexBridge_Offline.exe - if-no-files-found: error - overwrite: true if: github.event_name != 'pull_request' - - - name: Cleanup Offline Engine - uses: geekyeggo/delete-artifact@v5 - with: - name: offline-engine - - - name: Cleanup Online Engine - uses: geekyeggo/delete-artifact@v5 with: - name: online-engine - - sign-offline-bundle: - name: Sign Offline Bundle - needs: reattach-engines - if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@v2.1 - with: - artifact: FlexBridge_Offline.exe - description: 'FLEx Bridge Installer' - secrets: - certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} - - sign-online-bundle: - name: Sign Online Bundle - needs: reattach-engines - if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@v2.1 - with: - artifact: FlexBridge_Online.exe - description: 'FLEx Bridge Installer' - secrets: - certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} - + name: FlexBridgeInstallers + path: BuildDir/FlexBridge_*.exe + if-no-files-found: warn diff --git a/Directory.Build.props b/Directory.Build.props index 30e1b2fcd..f667ec092 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,14 +6,12 @@ SIL SIL International FLExBridge - Copyright © 2010-2021 SIL International + Copyright © 2010-2025 SIL International MIT https://github.com/sillsdev/flexbridge false ../../output/$(Configuration) ../../output - true - $(MSBuildThisFileDirectory)/Flexbridge.snk None true snupkg diff --git a/Flexbridge.snk b/Flexbridge.snk deleted file mode 100644 index e68d1e082..000000000 Binary files a/Flexbridge.snk and /dev/null differ diff --git a/build/WixPatchableInstaller.targets b/build/WixPatchableInstaller.targets index f5eaf8e82..b157b22f0 100644 --- a/build/WixPatchableInstaller.targets +++ b/build/WixPatchableInstaller.targets @@ -95,7 +95,6 @@ - + + + + + @@ -219,6 +224,8 @@ are trying to support, you're better off using non-advertised shortcuts. "--> + + diff --git a/src/LfMergeBridge/Properties/AssemblyInfo.cs b/src/LfMergeBridge/Properties/AssemblyInfo.cs index f1b221819..22d5b1f55 100644 --- a/src/LfMergeBridge/Properties/AssemblyInfo.cs +++ b/src/LfMergeBridge/Properties/AssemblyInfo.cs @@ -4,4 +4,4 @@ using System.Runtime.InteropServices; using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("LfMergeBridgeTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] +[assembly: InternalsVisibleTo("LfMergeBridgeTests")] diff --git a/src/LibFLExBridge-ChorusPlugin/Handling/ConfigLayout/DictionaryConfigurationHandlerStrategy.cs b/src/LibFLExBridge-ChorusPlugin/Handling/ConfigLayout/DictionaryConfigurationHandlerStrategy.cs index 8b5a2028d..1230ec2fd 100644 --- a/src/LibFLExBridge-ChorusPlugin/Handling/ConfigLayout/DictionaryConfigurationHandlerStrategy.cs +++ b/src/LibFLExBridge-ChorusPlugin/Handling/ConfigLayout/DictionaryConfigurationHandlerStrategy.cs @@ -1,4 +1,4 @@ -// -------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------- // Copyright (C) 2015-2017 SIL International. All rights reserved. // // Distributable under the terms of the MIT License. @@ -15,9 +15,7 @@ using Chorus.merge; using Chorus.merge.xml.generic; using Chorus.VcsDrivers.Mercurial; -using LibFLExBridgeChorusPlugin.Handling; using LibFLExBridgeChorusPlugin.Infrastructure; -using LibTriboroughBridgeChorusPlugin; using SIL.IO; namespace LibFLExBridgeChorusPlugin.Handling.ConfigLayout diff --git a/src/LibFLExBridge-ChorusPlugin/Infrastructure/FlexBridgeSynchronizerAdjunct.cs b/src/LibFLExBridge-ChorusPlugin/Infrastructure/FlexBridgeSynchronizerAdjunct.cs index 8e1149cac..a757f6500 100644 --- a/src/LibFLExBridge-ChorusPlugin/Infrastructure/FlexBridgeSynchronizerAdjunct.cs +++ b/src/LibFLExBridge-ChorusPlugin/Infrastructure/FlexBridgeSynchronizerAdjunct.cs @@ -101,27 +101,27 @@ private bool RunFixFwData(IProgress progress) { using (var process = new Process()) { - var startInfo = process.StartInfo; - startInfo.FileName = _fixitPathname.Replace("\"", null); - startInfo.Arguments = "\"" + _fwdataPathname.Replace("\"", null) + "\""; - startInfo.CreateNoWindow = false; - startInfo.UseShellExecute = false; - startInfo.WorkingDirectory = Path.GetDirectoryName(_fixitPathname) ?? string.Empty; - startInfo.RedirectStandardOutput = true; - process.Start(); - var mergeOutput = process.StandardOutput.ReadToEnd(); - process.WaitForExit(); - // If the user requests verbose output they can see all the fixup reports. - // Unfortunately this includes sequences of dots intended to show progress on the console. - // They always occur at the start of a line. The Replace gets rid of them. - progress.WriteVerbose(new Regex(@"(?<=(^|\n|\r))\.+").Replace(mergeOutput, "")); - // 0 means fixup ran but fixed nothing, 1 means it ran and fixed something, anything else is a problem - if(process.ExitCode != 0 && process.ExitCode != 1) - { - throw new Exception("Merge fixing program has crashed."); + var startInfo = process.StartInfo; + startInfo.FileName = _fixitPathname.Replace("\"", null); + startInfo.Arguments = "\"" + _fwdataPathname.Replace("\"", null) + "\""; + startInfo.CreateNoWindow = false; + startInfo.UseShellExecute = false; + startInfo.WorkingDirectory = Path.GetDirectoryName(_fixitPathname) ?? string.Empty; + startInfo.RedirectStandardOutput = true; + process.Start(); + var mergeOutput = process.StandardOutput.ReadToEnd(); + process.WaitForExit(); + // If the user requests verbose output they can see all the fixup reports. + // Unfortunately this includes sequences of dots intended to show progress on the console. + // They always occur at the start of a line. The Replace gets rid of them. + progress.WriteVerbose(new Regex(@"(?<=(^|\n|\r))\.+").Replace(mergeOutput, "")); + // 0 means fixup ran but fixed nothing, 1 means it ran and fixed something, anything else is a problem + if(process.ExitCode != 0 && process.ExitCode != 1) + { + throw new Exception("Merge fixing program has crashed."); + } + return process.ExitCode == 1; } - return process.ExitCode == 1; - } } /// diff --git a/src/LibFLExBridge-ChorusPlugin/Properties/AssemblyInfo.cs b/src/LibFLExBridge-ChorusPlugin/Properties/AssemblyInfo.cs index f2641911e..e50ca82fa 100644 --- a/src/LibFLExBridge-ChorusPlugin/Properties/AssemblyInfo.cs +++ b/src/LibFLExBridge-ChorusPlugin/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.InteropServices; using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("LibFLExBridge-ChorusPluginTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("FLEx-ChorusPlugin, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("FLEx-ChorusPluginTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("LfMergeBridge, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("RepositoryUtility, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("FwdataTestApp, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("TheTurtle, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("TheTurtleTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] +[assembly: InternalsVisibleTo("LibFLExBridge-ChorusPluginTests")] +[assembly: InternalsVisibleTo("FLEx-ChorusPlugin")] +[assembly: InternalsVisibleTo("FLEx-ChorusPluginTests")] +[assembly: InternalsVisibleTo("LfMergeBridge")] +[assembly: InternalsVisibleTo("RepositoryUtility")] +[assembly: InternalsVisibleTo("FwdataTestApp")] +[assembly: InternalsVisibleTo("TheTurtle")] +[assembly: InternalsVisibleTo("TheTurtleTests")] diff --git a/src/LibTriboroughBridge-ChorusPlugin/Properties/AssemblyInfo.cs b/src/LibTriboroughBridge-ChorusPlugin/Properties/AssemblyInfo.cs index 6ceb8f966..7277c7c91 100644 --- a/src/LibTriboroughBridge-ChorusPlugin/Properties/AssemblyInfo.cs +++ b/src/LibTriboroughBridge-ChorusPlugin/Properties/AssemblyInfo.cs @@ -3,17 +3,17 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("FLEx-ChorusPlugin, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("LibFLExBridge-ChorusPlugin, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("LiftBridge-ChorusPlugin, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("TriboroughBridge-ChorusPlugin, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("TriboroughBridge-ChorusPlugin, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("FLExBridge, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("RepositoryUtility, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("FwdataTestApp, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("LibTriboroughBridge-ChorusPluginTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("TriboroughBridge-ChorusPluginTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("LibFLExBridge-ChorusPluginTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("LiftBridge-ChorusPluginTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("LfMergeBridge, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("LfMergeBridgeTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] +[assembly: InternalsVisibleTo("FLEx-ChorusPlugin")] +[assembly: InternalsVisibleTo("LibFLExBridge-ChorusPlugin")] +[assembly: InternalsVisibleTo("LiftBridge-ChorusPlugin")] +[assembly: InternalsVisibleTo("TriboroughBridge-ChorusPlugin")] +[assembly: InternalsVisibleTo("TriboroughBridge-ChorusPlugin")] +[assembly: InternalsVisibleTo("FLExBridge")] +[assembly: InternalsVisibleTo("RepositoryUtility")] +[assembly: InternalsVisibleTo("FwdataTestApp")] +[assembly: InternalsVisibleTo("LibTriboroughBridge-ChorusPluginTests")] +[assembly: InternalsVisibleTo("TriboroughBridge-ChorusPluginTests")] +[assembly: InternalsVisibleTo("LibFLExBridge-ChorusPluginTests")] +[assembly: InternalsVisibleTo("LiftBridge-ChorusPluginTests")] +[assembly: InternalsVisibleTo("LfMergeBridge")] +[assembly: InternalsVisibleTo("LfMergeBridgeTests")] diff --git a/src/LiftBridge-ChorusPlugin/Properties/AssemblyInfo.cs b/src/LiftBridge-ChorusPlugin/Properties/AssemblyInfo.cs index 7ef83cf9f..d07b50ce4 100644 --- a/src/LiftBridge-ChorusPlugin/Properties/AssemblyInfo.cs +++ b/src/LiftBridge-ChorusPlugin/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: InternalsVisibleTo("LiftBridge-ChorusPluginTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] +[assembly: InternalsVisibleTo("LiftBridge-ChorusPluginTests")] diff --git a/src/LiftBridge-ChorusPluginTests/Properties/AssemblyInfo.cs b/src/LiftBridge-ChorusPluginTests/Properties/AssemblyInfo.cs index fef72f326..a58c5df25 100644 --- a/src/LiftBridge-ChorusPluginTests/Properties/AssemblyInfo.cs +++ b/src/LiftBridge-ChorusPluginTests/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: InternalsVisibleTo("TheTurtleTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] +[assembly: InternalsVisibleTo("TheTurtleTests")] diff --git a/src/RepositoryUtility/Program.cs b/src/RepositoryUtility/Program.cs index ba04fb4b3..67036dde0 100644 --- a/src/RepositoryUtility/Program.cs +++ b/src/RepositoryUtility/Program.cs @@ -2,12 +2,14 @@ // This software is licensed under the MIT License (http://opensource.org/licenses/MIT) using System; +using System.Collections.Generic; using System.ComponentModel.Composition.Hosting; using System.IO; using System.Reflection; using System.Windows.Forms; using Chorus.VcsDrivers.Mercurial; using Gecko; +using L10NSharp; using RepositoryUtility.Properties; using SIL.IO; using SIL.PlatformUtilities; @@ -39,7 +41,10 @@ static void Main() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - + TriboroughBridgeUtilities.SetupLocalization(new Dictionary + { + { CommandLineProcessor.locale, "en" } + }); using (var hotspot = new HotSpotProvider()) { // This is a kludge to make sure we have a real reference to PalasoUIWindowsForms. diff --git a/src/RepositoryUtility/Properties/Settings.Designer.cs b/src/RepositoryUtility/Properties/Settings.Designer.cs index 719c972b4..aeb97b3a9 100644 --- a/src/RepositoryUtility/Properties/Settings.Designer.cs +++ b/src/RepositoryUtility/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace RepositoryUtility.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -72,5 +72,18 @@ public bool CallUpgrade { this["CallUpgrade"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(RepositoryUtility.Properties.SettingsProvider))] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string OpenLocalStartFolder { + get { + return ((string)(this["OpenLocalStartFolder"])); + } + set { + this["OpenLocalStartFolder"] = value; + } + } } } diff --git a/src/RepositoryUtility/Properties/Settings.settings b/src/RepositoryUtility/Properties/Settings.settings index 12e833456..7b6c4938c 100644 --- a/src/RepositoryUtility/Properties/Settings.settings +++ b/src/RepositoryUtility/Properties/Settings.settings @@ -14,5 +14,8 @@ True + + + \ No newline at end of file diff --git a/src/RepositoryUtility/RepositoryUtility.csproj b/src/RepositoryUtility/RepositoryUtility.csproj index 93c46b3af..aa598610e 100644 --- a/src/RepositoryUtility/RepositoryUtility.csproj +++ b/src/RepositoryUtility/RepositoryUtility.csproj @@ -21,7 +21,7 @@ - <_Parameter1>$(AssemblyName)Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788 + <_Parameter1>$(AssemblyName)Tests diff --git a/src/RepositoryUtility/RepositoryUtilityForm.cs b/src/RepositoryUtility/RepositoryUtilityForm.cs index c32ba33cf..09d58a37e 100644 --- a/src/RepositoryUtility/RepositoryUtilityForm.cs +++ b/src/RepositoryUtility/RepositoryUtilityForm.cs @@ -22,6 +22,7 @@ using LibFLExBridgeChorusPlugin.DomainServices; using LibTriboroughBridgeChorusPlugin; using LibTriboroughBridgeChorusPlugin.Infrastructure.ActionHandlers; +using RepositoryUtility.Properties; using SIL.PlatformUtilities; using SIL.Progress; @@ -123,14 +124,17 @@ private void HandleOpenLocalRepositoryClick(object sender, EventArgs e) // Get some selected folder that hopefully has a repo in it. using (var folderDlg = new FolderBrowserDialog()) { + var openLocalStartLoc = Settings.Default.OpenLocalStartFolder; folderDlg.ShowNewFolderButton = false; - folderDlg.SelectedPath = _repoHoldingFolder; + folderDlg.SelectedPath = string.IsNullOrEmpty(openLocalStartLoc) ? _repoHoldingFolder : openLocalStartLoc; if (folderDlg.ShowDialog(this) != DialogResult.OK) { _repoFolder = null; return; } _repoFolder = folderDlg.SelectedPath; + Settings.Default.OpenLocalStartFolder = _repoFolder; + Settings.Default.Save(); } if (!HasRepo) @@ -256,6 +260,17 @@ private void HandleSendBackToSourceMenuClick(object sender, EventArgs e) : Path.Combine(_repoFolder, Path.GetFileName(_repoFolder) + LibTriboroughBridgeSharedConstants.FwXmlExtension), repoType); syncDlg.SetSynchronizerAdjunct(syncAdjunt); + var versionString = LibFLExBridgeUtilities.GetFlexModelVersion(_repoFolder); + var versionNumbers = versionString.Split(new[] { "{", ":", "}" }, + StringSplitOptions.RemoveEmptyEntries); + if (versionNumbers.Length == 0) + throw new Exception("Invalid version number in branch name"); + var version = Int32.Parse(versionNumbers.Length > 1 ? versionNumbers[1] : versionNumbers[0]); + + MetadataCache.MdCache.UpgradeToVersion(version); + // Use Lexicon location to build up custom properties in support of validating a commit outside of a merge context + var mergeOrderFolder = Path.Combine(_repoFolder, FlexBridgeConstants.Lexicon); + MetadataCache.MdCache.AddCustomPropInfo(new MergeOrder(mergeOrderFolder, mergeOrderFolder, mergeOrderFolder, new NullMergeSituation())); // Chorus does it in this order: // Local Commit diff --git a/src/RepositoryUtility/app.config b/src/RepositoryUtility/app.config index 02cdadfa6..429bf3b55 100644 --- a/src/RepositoryUtility/app.config +++ b/src/RepositoryUtility/app.config @@ -1,4 +1,4 @@ - + @@ -13,6 +13,9 @@ True + + + \ No newline at end of file diff --git a/src/TriboroughBridge-ChorusPlugin/Properties/AssemblyInfo.cs b/src/TriboroughBridge-ChorusPlugin/Properties/AssemblyInfo.cs index d8215ad1d..a9d615888 100644 --- a/src/TriboroughBridge-ChorusPlugin/Properties/AssemblyInfo.cs +++ b/src/TriboroughBridge-ChorusPlugin/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: InternalsVisibleTo("FLEx-ChorusPlugin, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("LiftBridge-ChorusPlugin, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("FLExBridge, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("RepositoryUtility, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("FwdataTestApp, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("TriboroughBridge-ChorusPluginTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("LiftBridge-ChorusPluginTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] -[assembly: InternalsVisibleTo("FwdataTestApp, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b511304f05af0a01cbc5408cdbdf742aa1664db0e1157235bb2619e7fb5e705bd3534a7157a088a458ec3136e46ebd2b73519fb07dffd2daa40a7b9aa340675d926ab918d2e0183b8613320529b8a490028c8e1b40b980f3724928455d447d8f93d459be3c55a4e3f2ef5119c3393fd25adba301cbff8a3ffbce2e181d143788")] \ No newline at end of file +[assembly: InternalsVisibleTo("FLEx-ChorusPlugin")] +[assembly: InternalsVisibleTo("LiftBridge-ChorusPlugin")] +[assembly: InternalsVisibleTo("FLExBridge")] +[assembly: InternalsVisibleTo("RepositoryUtility")] +[assembly: InternalsVisibleTo("FwdataTestApp")] +[assembly: InternalsVisibleTo("TriboroughBridge-ChorusPluginTests")] +[assembly: InternalsVisibleTo("LiftBridge-ChorusPluginTests")] +[assembly: InternalsVisibleTo("FwdataTestApp")] \ No newline at end of file