diff --git a/.azure-pipelines/continuous-integration.yml b/.azure-pipelines/continuous-integration.yml
deleted file mode 100644
index a3f0d5c48b..0000000000
--- a/.azure-pipelines/continuous-integration.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-name: $(date:yy)$(DayOfYear)$(rev:.r)
-
-trigger:
- - master
- - releases/shipped
-
-variables:
- majorAndMinorVersion: '0.5'
- revision: '$(Build.BuildNumber)'
-
-jobs:
- - job: Build_Windows
- variables:
- platformFriendlyName: Windows
- strategy:
- maxParallel: 2
- matrix:
- debug:
- configuration: Debug
- release:
- configuration: Release
- pool:
- vmImage: vs2017-win2016
- steps:
- - template: templates/windows-build-and-unit-test.yml
-
- - job: Build_macOS
- variables:
- platformFriendlyName: macOS
- strategy:
- maxParallel: 2
- matrix:
- debug:
- configuration: Debug
- release:
- configuration: Release
- pool:
- vmImage: macOS 10.13
- steps:
- - template: templates/macos-build-and-unit-test.yml
-
- - job: FunctionalTests_Windows
- timeoutInMinutes: 240
- variables:
- platformFriendlyName: Windows
- configuration: Release
- pool:
- name: FunctionalTests
- dependsOn: Build_Windows
- condition: succeeded()
- steps:
- - checkout: none # We'll get the build drop from Build_Windows job
- - template: templates/windows-functional-test.yml
-
- - job: FunctionalTests_macOS
- timeoutInMinutes: 240
- variables:
- platformFriendlyName: macOS
- configuration: Release
- pool:
- name: MacFunctionalTests
- dependsOn: Build_macOS
- condition: succeeded()
- steps:
- - checkout: none # Use the drop from Build_macOS job
- - template: templates/macos-functional-test.yml
diff --git a/.azure-pipelines/pull-request.yml b/.azure-pipelines/pull-request.yml
deleted file mode 100644
index 719ab58f62..0000000000
--- a/.azure-pipelines/pull-request.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: $(date:yy)$(DayOfYear)$(rev:.r)
-
-trigger: none
-
-variables:
- majorAndMinorVersion: '0.4'
- revision: '$(Build.BuildNumber)'
- platform: 'x64'
- configuration: release
-
-jobs:
- - job: Windows
- pool:
- vmImage: vs2017-win2016
- steps:
- - template: templates/windows-build-and-unit-test.yml
-
- - job: macOS
- pool:
- vmImage: macOS 10.13
- steps:
- - template: templates/macos-build-and-unit-test.yml
diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml
new file mode 100644
index 0000000000..d098c5a70f
--- /dev/null
+++ b/.azure-pipelines/release.yml
@@ -0,0 +1,93 @@
+# NOTE: this pipeline definition is not currently used to build releases of VFS for Git.
+# This is still done in the GVFS-Release-RealSign "classic" pipeline.
+
+name: $(date:yy)$(DayOfYear)$(rev:.r)
+
+variables:
+ signType: test
+ teamName: GVFS
+ configuration: Release
+ signPool: VSEng-MicroBuildVS2019
+ GVFSMajorAndMinorVersion: 1.0
+ GVFSRevision: $(Build.BuildNumber)
+
+jobs:
+- job: build
+ displayName: Windows Build and Sign
+
+ pool:
+ name: $(signPool)
+
+ steps:
+ - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@2
+ displayName: Install signing plugin
+ inputs:
+ signType: '$(SignType)'
+
+ - task: UseDotNet@2
+ displayName: Install .NET SDK
+ inputs:
+ packageType: sdk
+ version: 5.0.201
+
+ - task: CmdLine@2
+ displayName: Build VFS for Git
+ inputs:
+ script: $(Build.Repository.LocalPath)\scripts\Build.bat $(configuration) $(GVFSMajorAndMinorVersion).$(GVFSRevision) detailed
+
+ - task: CmdLine@2
+ displayName: Run unit tests
+ inputs:
+ script: $(Build.Repository.LocalPath)\scripts\RunUnitTests.bat $(configuration)
+
+ - task: CmdLine@2
+ displayName: Create build artifacts
+ inputs:
+ script: $(Build.Repository.LocalPath)\scripts\CreateBuildArtifacts.bat $(configuration) $(Build.ArtifactStagingDirectory)
+
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish Artifact: Installer'
+ inputs:
+ PathtoPublish: $(Build.ArtifactStagingDirectory)\NuGetPackages
+ ArtifactName: Installer
+
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish Artifact: FastFetch'
+ inputs:
+ PathtoPublish: $(Build.ArtifactStagingDirectory)\FastFetch
+ ArtifactName: FastFetch
+
+ - task: PublishSymbols@1
+ displayName: Enable Source Server
+ condition: eq(succeeded(), eq(variables['signType'], 'real'))
+ inputs:
+ SearchPattern: '**\*.pdb'
+ SymbolsFolder: $(Build.ArtifactStagingDirectory)\Symbols
+
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish Artifact: Symbols'
+ inputs:
+ PathtoPublish: $(Build.ArtifactStagingDirectory)\Symbols
+ ArtifactName: Symbols
+
+ - task: ms-vscs-artifact.build-tasks.artifactSymbolTask-1.artifactSymbolTask@0
+ displayName: Publish to Symbols on Symweb
+ condition: eq(succeeded(), eq(variables['signType'], 'real'))
+ inputs:
+ symbolServiceURI: https://microsoft.artifacts.visualstudio.com/DefaultCollection
+ sourcePath: $(Build.ArtifactStagingDirectory)/Symbols
+ expirationInDays: 2065
+ usePat: false
+
+ - task: NuGetCommand@2
+ displayName: Push GVFS.Installers package
+ condition: eq(succeeded(), eq(variables['signType'], 'real'))
+ inputs:
+ command: push
+ packagesToPush: $(Build.ArtifactStagingDirectory)\NuGetPackages\GVFS.Installers.*.nupkg
+ nuGetFeedType: external
+ publishFeedCredentials: '1essharedassets GVFS [PUBLISH]'
+
+ - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
+ displayName: Send MicroBuild Telemetry
+ condition: always()
diff --git a/.azure-pipelines/templates/windows-build-and-unit-test.yml b/.azure-pipelines/templates/windows-build-and-unit-test.yml
deleted file mode 100644
index 80cfc30b0a..0000000000
--- a/.azure-pipelines/templates/windows-build-and-unit-test.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-steps:
-
- - script: $(Build.Repository.LocalPath)\\Scripts\\NukeBuildOutputs.bat
- displayName: Delete previous build outputs
- continueOnError: true
-
- - powershell: |
- & 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\sn.exe' -Vr *,31bf3856ad364e35
- & 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\sn.exe' -Vr *,31bf3856ad364e35
- displayName: Disable strong name validation for MS delay-signed assemblies
-
- - script: $(Build.Repository.LocalPath)\Scripts\BuildGVFSForWindows.bat $(configuration) $(majorAndMinorVersion).$(revision)
- displayName: Run VFSForGit build script ($(configuration))
-
- - script: $(Build.Repository.LocalPath)\MirrorProvider\Scripts\Windows\Build.bat $(configuration)
- displayName: Build MirrorProvider ($(configuration))
-
- - script: $(Build.Repository.LocalPath)\Scripts\RunUnitTests.bat $(configuration)
- displayName: Run unit tests
-
- - task: PublishTestResults@2
- displayName: Publish unit test results
- inputs:
- testRunner: NUnit
- testResultsFiles: "**\\TestResult.xml"
- searchFolder: $(System.DefaultWorkingDirectory)
- testRunTitle: Windows $(configuration) Unit Tests
- publishRunAttachments: true
-
- - script: $(Build.Repository.LocalPath)\Scripts\CI\CreateBuildDrop.bat $(configuration) $(Build.ArtifactStagingDirectory)\Tests
- displayName: Create functional test drop.
-
- - task: PublishBuildArtifacts@1
- displayName: Publish functional test drop artifact.
- inputs:
- pathtoPublish: $(Build.ArtifactStagingDirectory)\Tests
- artifactName: "FunctionalTests_$(platformFriendlyName)_$(configuration)"
- parallel: true
- parallelCount: 8
- condition: succeededOrFailed()
diff --git a/.azure-pipelines/templates/windows-functional-test.yml b/.azure-pipelines/templates/windows-functional-test.yml
deleted file mode 100644
index e221ddfc67..0000000000
--- a/.azure-pipelines/templates/windows-functional-test.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-steps:
-
- - task: DownloadBuildArtifacts@0
- displayName: Download functional test drop
- inputs:
- buildType: current
- downloadType: specific
- artifactName: FunctionalTests_$(platformFriendlyName)_$(configuration)
- downloadPath: $(Build.BinariesDirectory)
-
- - script: $(Build.BinariesDirectory)/FunctionalTests_$(platformFriendlyName)_$(configuration)/src/Scripts/ReinstallGVFS.bat $(configuration)
- displayName: Run VFSForGit and G4W installers
-
- - script: git config --global credential.interactive never
- displayName: Disable interactive auth
-
- - script: $(Build.BinariesDirectory)/FunctionalTests_$(platformFriendlyName)_$(configuration)/src/Scripts/RunFunctionalTests.bat $(configuration) --test-gvfs-on-path --replace-inbox-projfs
- displayName: Run functional tests
-
- - task: PublishTestResults@2
- displayName: Publish functional test results
- inputs:
- testRunner: NUnit
- testResultsFiles: "**\\TestResult*.xml"
- searchFolder: $(System.DefaultWorkingDirectory)
- testRunTitle: Windows $(configuration) Functional Tests
- publishRunAttachments: true
- condition: succeededOrFailed()
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 0000000000..8dca590066
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,133 @@
+name: VFS for Git
+
+on:
+ pull_request:
+ branches: [ master, releases/shipped ]
+ push:
+ branches: [ master, releases/shipped ]
+
+jobs:
+ build:
+ runs-on: windows-2019
+ name: Build and Unit Test
+
+ strategy:
+ matrix:
+ configuration: [ Debug, Release ]
+
+ steps:
+ - name: Checkout source
+ uses: actions/checkout@v2
+ with:
+ path: src
+
+ - name: Install .NET SDK
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 5.0.201
+
+ - name: Add MSBuild to PATH
+ uses: microsoft/setup-msbuild@v1.0.2
+
+ - name: Build VFS for Git
+ shell: cmd
+ run: src\scripts\Build.bat ${{ matrix.configuration }}
+
+ - name: Run unit tests
+ shell: cmd
+ run: src\scripts\RunUnitTests.bat ${{ matrix.configuration }}
+
+ - name: Create build artifacts
+ shell: cmd
+ run: src\scripts\CreateBuildArtifacts.bat ${{ matrix.configuration }} artifacts
+
+ - name: Upload functional tests drop
+ uses: actions/upload-artifact@v2
+ with:
+ name: FunctionalTests_${{ matrix.configuration }}
+ path: artifacts\GVFS.FunctionalTests
+
+ - name: Upload FastFetch drop
+ uses: actions/upload-artifact@v2
+ with:
+ name: FastFetch_${{ matrix.configuration }}
+ path: artifacts\FastFetch
+
+ - name: Upload installers
+ uses: actions/upload-artifact@v2
+ with:
+ name: Installers_${{ matrix.configuration }}
+ path: artifacts\GVFS.Installers
+
+ - name: Upload NuGet packages
+ uses: actions/upload-artifact@v2
+ with:
+ name: NuGetPackages_${{ matrix.configuration }}
+ path: artifacts\NuGetPackages
+
+ functional_test:
+ runs-on: windows-2019
+ name: Functional Tests
+ needs: build
+
+ strategy:
+ matrix:
+ configuration: [ Debug, Release ]
+
+ steps:
+ - name: Download installers
+ uses: actions/download-artifact@v2
+ with:
+ name: Installers_${{ matrix.configuration }}
+ path: install
+
+ - name: Download functional tests drop
+ uses: actions/download-artifact@v2
+ with:
+ name: FunctionalTests_${{ matrix.configuration }}
+ path: ft
+
+ - name: ProjFS details (pre-install)
+ shell: cmd
+ run: install\info.bat
+
+ - name: Install product
+ shell: cmd
+ run: install\install.bat
+
+ - name: ProjFS details (post-install)
+ shell: cmd
+ run: install\info.bat
+
+ - name: Upload installation logs
+ if: always()
+ uses: actions/upload-artifact@v2
+ with:
+ name: InstallationLogs_${{ matrix.configuration }}
+ path: install\logs
+
+ - name: Run functional tests
+ shell: cmd
+ run: |
+ SET PATH=C:\Program Files\GVFS;%PATH%
+ SET GIT_TRACE2_PERF=C:\temp\git-trace2.log
+ ft\GVFS.FunctionalTests.exe /result:TestResult.xml --ci
+
+ - name: Upload functional test results
+ if: always()
+ uses: actions/upload-artifact@v2
+ with:
+ name: FunctionalTests_Results_${{ matrix.configuration }}
+ path: TestResult.xml
+
+ - name: Upload Git trace2 output
+ if: always()
+ uses: actions/upload-artifact@v2
+ with:
+ name: GitTrace2_${{ matrix.configuration }}
+ path: C:\temp\git-trace2.log
+
+ - name: ProjFS details (post-test)
+ if: always()
+ shell: cmd
+ run: install\info.bat
diff --git a/.github/workflows/release-winget.yaml b/.github/workflows/release-winget.yaml
new file mode 100644
index 0000000000..710bc94e70
--- /dev/null
+++ b/.github/workflows/release-winget.yaml
@@ -0,0 +1,39 @@
+name: "release-winget"
+on:
+ release:
+ types: [released]
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - id: update-winget
+ name: Update winget repository
+ uses: mjcheetham/update-winget@v1.2.2
+ with:
+ id: Microsoft.VFSforGit
+ token: ${{ secrets.WINGET_TOKEN }}
+ releaseAsset: SetupGVFS.([0-9.]*)\.exe
+ manifestText: |
+ PackageIdentifier: {{id}}
+ PackageVersion: {{version}}
+ PackageName: VFS for Git
+ Publisher: Microsoft Corporation
+ Moniker: vfs-for-git
+ PackageUrl: https://aka.ms/vfs-for-git
+ Tags:
+ - vfs for git
+ - vfs-for-git
+ - vfsforgit
+ - gvfs
+ License: Copyright (C) Microsoft Corporation
+ ShortDescription: Virtual File System for Git - a tool to scale Git for monorepo scenarios.
+ Installers:
+ - Architecture: x64
+ InstallerUrl: {{url}}
+ InstallerType: inno
+ InstallerSha256: {{sha256}}
+ PackageLocale: en-US
+ ManifestType: singleton
+ ManifestVersion: 1.0.0
+ alwaysUsePullRequest: true
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000000..61e42400d6
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+ $(MSBuildThisFileDirectory)
+ $(RepoPath)
+ $(RepoPath)..\out\
+ $(RepoOutPath)$(MSBuildProjectName)\
+ $(RepoPath)..\packages\
+
+
+ true
+
+
+
+
+ win-x64
+ x64
+ $(ProjectOutPath)bin\
+ $(ProjectOutPath)obj\
+
+
+
+
+ x64
+ $(ProjectOutPath)bin\$(Platform)\$(Configuration)\
+ $(ProjectOutPath)intermediate\$(Platform)\$(Configuration)\
+ $(IntDir)include\
+
+
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
new file mode 100644
index 0000000000..94263857eb
--- /dev/null
+++ b/Directory.Build.targets
@@ -0,0 +1,11 @@
+
+
+
+
+ $(GVFSVersion)
+
+
+
+
+
+
diff --git a/Directory.Solution.props b/Directory.Solution.props
new file mode 100644
index 0000000000..6ec70d7ef3
--- /dev/null
+++ b/Directory.Solution.props
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/GVFS.sln b/GVFS.sln
index b79f30d251..80a2cbf0e8 100644
--- a/GVFS.sln
+++ b/GVFS.sln
@@ -1,398 +1,157 @@
+
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
-VisualStudioVersion = 16.0.30509.20
+VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DCE11095-DA5F-4878-B58D-2702765560F5}"
- ProjectSection(SolutionItems) = preProject
- .editorconfig = .editorconfig
- .gitattributes = .gitattributes
- .gitignore = .gitignore
- AuthoringTests.md = AuthoringTests.md
- nuget.config = nuget.config
- Protocol.md = Protocol.md
- Readme.md = Readme.md
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastFetch", "GVFS\FastFetch\FastFetch.csproj", "{642D14C3-0332-4C95-8EE0-0EAC54CBF918}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GVFS", "GVFS", "{2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}"
- ProjectSection(SolutionItems) = preProject
- GVFS\LibGit2Sharp.NativeBinaries.props = GVFS\LibGit2Sharp.NativeBinaries.props
- GVFS\ProjectedFSLib.NativeBinaries.props = GVFS\ProjectedFSLib.NativeBinaries.props
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS", "GVFS\GVFS\GVFS.csproj", "{DADCDF10-E38D-432E-9684-CE029DEE1D07}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.GVFlt", "GVFS\GVFS.GVFlt\GVFS.GVFlt.csproj", "{1118B427-7063-422F-83B9-5023C8EC5A7A}"
- ProjectSection(ProjectDependencies) = postProject
- {A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Common", "GVFS\GVFS.Common\GVFS.Common.csproj", "{77C8EC7B-4166-4F01-81C4-D9AB924021C0}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Common", "GVFS\GVFS.Common\GVFS.Common.csproj", "{374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}"
- ProjectSection(ProjectDependencies) = postProject
- {A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.FunctionalTests", "GVFS\GVFS.FunctionalTests\GVFS.FunctionalTests.csproj", "{963F33D0-09EE-42CB-9E5A-37A4F4F1BFAB}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FastFetch", "GVFS\FastFetch\FastFetch.csproj", "{07F2A520-2AB7-46DD-97C0-75D8E988D55B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.FunctionalTests.LockHolder", "GVFS\GVFS.FunctionalTests.LockHolder\GVFS.FunctionalTests.LockHolder.csproj", "{B26985C3-250A-4805-AA97-AD0604331AC7}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Tests", "GVFS\GVFS.Tests\GVFS.Tests.csproj", "{72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC}"
- ProjectSection(ProjectDependencies) = postProject
- {A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.GVFlt", "GVFS\GVFS.GVFlt\GVFS.GVFlt.csproj", "{B366D3B6-1E85-4015-8DB0-D5FA4331ECE4}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GVFS Tests", "GVFS Tests", "{C41F10F9-1163-4CFA-A465-EA728F75E9FA}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Hooks", "GVFS\GVFS.Hooks\GVFS.Hooks.csproj", "{EDB4A40E-CFC9-486A-BDC5-AB2951FD8EDC}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.UnitTests.Windows", "GVFS\GVFS.UnitTests.Windows\GVFS.UnitTests.Windows.csproj", "{8E0D0989-21F6-4DD8-946C-39F992523CC6}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Mount", "GVFS\GVFS.Mount\GVFS.Mount.csproj", "{F96089C2-6D09-4349-B65D-9CCA6160C6A5}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GVFS.NativeTests", "GVFS\GVFS.NativeTests\GVFS.NativeTests.vcxproj", "{3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}"
- ProjectSection(ProjectDependencies) = postProject
- {A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Hooks.Windows", "GVFS\GVFS.Hooks\GVFS.Hooks.Windows.csproj", "{BDA91EE5-C684-4FC5-A90A-B7D677421917}"
- ProjectSection(ProjectDependencies) = postProject
- {A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Service.Windows", "GVFS\GVFS.Service\GVFS.Service.Windows.csproj", "{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}"
- ProjectSection(ProjectDependencies) = postProject
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB} = {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}
- {5A6656D5-81C7-472C-9DC8-32D071CB2258} = {5A6656D5-81C7-472C-9DC8-32D071CB2258}
- {BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535} = {24D161E9-D1F0-4299-BBD3-5D940BEDD535}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GVFS.ReadObjectHook.Windows", "GVFS\GVFS.ReadObjectHook\GVFS.ReadObjectHook.Windows.vcxproj", "{5A6656D5-81C7-472C-9DC8-32D071CB2258}"
- ProjectSection(ProjectDependencies) = postProject
- {A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{28674A4B-1223-4633-A460-C8CC39B09318}"
- ProjectSection(SolutionItems) = preProject
- Scripts\CreateCommonAssemblyVersion.bat = Scripts\CreateCommonAssemblyVersion.bat
- Scripts\CreateCommonCliAssemblyVersion.bat = Scripts\CreateCommonCliAssemblyVersion.bat
- Scripts\CreateCommonVersionHeader.bat = Scripts\CreateCommonVersionHeader.bat
- Scripts\RunFunctionalTests.bat = Scripts\RunFunctionalTests.bat
- Scripts\RunUnitTests.bat = Scripts\RunUnitTests.bat
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.PerfProfiling", "GVFS\GVFS.PerfProfiling\GVFS.PerfProfiling.csproj", "{C5D3CA26-562F-4CA4-A378-B93E97A730E3}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.MSBuild", "GVFS\GVFS.MSBuild\GVFS.MSBuild.csproj", "{39361E20-C7D3-43E5-A90E-5135457EABC0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Service.UI", "GVFS\GVFS.Service.UI\GVFS.Service.UI.csproj", "{93B403FD-DAFB-46C5-9636-B122792A548A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.PreBuild", "GVFS\GVFS.Build\GVFS.PreBuild.csproj", "{A4984251-840E-4622-AD0C-66DFCE2B2574}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{AB0D9230-3893-4486-8899-F9C871FB5D5F}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GitHooksLoader", "GitHooksLoader\GitHooksLoader.vcxproj", "{798DE293-6EDA-4DC4-9395-BE7A71C563E3}"
- ProjectSection(ProjectDependencies) = postProject
- {A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Installer.Windows", "GVFS\GVFS.Installer.Windows\GVFS.Installer.Windows.csproj", "{3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}"
- ProjectSection(ProjectDependencies) = postProject
- {2F63B22B-EE26-4266-BF17-28A9146483A1} = {2F63B22B-EE26-4266-BF17-28A9146483A1}
- EndProjectSection
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GVFS.NativeTests", "GVFS\GVFS.NativeTests\GVFS.NativeTests.vcxproj", "{3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.SignFiles", "GVFS\GVFS.SignFiles\GVFS.SignFiles.csproj", "{2F63B22B-EE26-4266-BF17-28A9146483A1}"
- ProjectSection(ProjectDependencies) = postProject
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5} = {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}
- {AECEC217-2499-403D-B0BB-2962B9BE5970} = {AECEC217-2499-403D-B0BB-2962B9BE5970}
- {1118B427-7063-422F-83B9-5023C8EC5A7A} = {1118B427-7063-422F-83B9-5023C8EC5A7A}
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB} = {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}
- {F468B05A-95E5-46BC-8C67-B80A78527B7D} = {F468B05A-95E5-46BC-8C67-B80A78527B7D}
- {32220664-594C-4425-B9A0-88E0BE2F3D2A} = {32220664-594C-4425-B9A0-88E0BE2F3D2A}
- {798DE293-6EDA-4DC4-9395-BE7A71C563E3} = {798DE293-6EDA-4DC4-9395-BE7A71C563E3}
- {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B} = {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}
- {5A6656D5-81C7-472C-9DC8-32D071CB2258} = {5A6656D5-81C7-472C-9DC8-32D071CB2258}
- {BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
- {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09} = {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}
- {4CE404E7-D3FC-471C-993C-64615861EA63} = {4CE404E7-D3FC-471C-993C-64615861EA63}
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535} = {24D161E9-D1F0-4299-BBD3-5D940BEDD535}
- {93B403FD-DAFB-46C5-9636-B122792A548A} = {93B403FD-DAFB-46C5-9636-B122792A548A}
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.PerfProfiling", "GVFS\GVFS.PerfProfiling\GVFS.PerfProfiling.csproj", "{26B5D74F-972B-4B54-98C3-15958616E56D}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GVFS.VirtualFileSystemHook.Windows", "GVFS\GVFS.VirtualFileSystemHook\GVFS.VirtualFileSystemHook.Windows.vcxproj", "{2D23AB54-541F-4ABC-8DCA-08C199E97ABB}"
- ProjectSection(ProjectDependencies) = postProject
- {A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Platform.Windows", "GVFS\GVFS.Platform.Windows\GVFS.Platform.Windows.csproj", "{41A25DAD-698D-47AB-8BB1-7E622FE6FAAC}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Virtualization", "GVFS\GVFS.Virtualization\GVFS.Virtualization.csproj", "{F468B05A-95E5-46BC-8C67-B80A78527B7D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GVFS.PostIndexChangedHook", "GVFS\GVFS.PostIndexChangedHook\GVFS.PostIndexChangedHook.vcxproj", "{24D161E9-D1F0-4299-BBD3-5D940BEDD535}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Platform.POSIX", "GVFS\GVFS.Platform.POSIX\GVFS.Platform.POSIX.csproj", "{15FAE44C-0D21-4312-9FD3-28F05A5AB7A6}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GVFS.ReadObjectHook", "GVFS\GVFS.ReadObjectHook\GVFS.ReadObjectHook.vcxproj", "{5A6656D5-81C7-472C-9DC8-32D071CB2258}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.UnitTests", "GVFS\GVFS.UnitTests\GVFS.UnitTests.csproj", "{0D434FA7-6D8C-481E-B0CE-779B59EAEF53}"
- ProjectSection(ProjectDependencies) = postProject
- {93B403FD-DAFB-46C5-9636-B122792A548A} = {93B403FD-DAFB-46C5-9636-B122792A548A}
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Service", "GVFS\GVFS.Service\GVFS.Service.csproj", "{5E236AF3-31D7-4313-A129-F080FF058283}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Platform.Windows", "GVFS\GVFS.Platform.Windows\GVFS.Platform.Windows.csproj", "{4CE404E7-D3FC-471C-993C-64615861EA63}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Service.UI", "GVFS\GVFS.Service.UI\GVFS.Service.UI.csproj", "{D8FB16E2-EAE0-4E05-A993-940062CD7CA7}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Windows", "GVFS\GVFS\GVFS.Windows.csproj", "{32220664-594C-4425-B9A0-88E0BE2F3D2A}"
- ProjectSection(ProjectDependencies) = postProject
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB} = {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}
- {798DE293-6EDA-4DC4-9395-BE7A71C563E3} = {798DE293-6EDA-4DC4-9395-BE7A71C563E3}
- {5A6656D5-81C7-472C-9DC8-32D071CB2258} = {5A6656D5-81C7-472C-9DC8-32D071CB2258}
- {BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535} = {24D161E9-D1F0-4299-BBD3-5D940BEDD535}
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Tests", "GVFS\GVFS.Tests\GVFS.Tests.csproj", "{FE70E0D6-B0A6-421D-AA12-F28F822F09A0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Mount.Windows", "GVFS\GVFS.Mount\GVFS.Mount.Windows.csproj", "{17498502-AEFF-4E70-90CC-1D0B56A8ADF5}"
- ProjectSection(ProjectDependencies) = postProject
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB} = {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}
- {5A6656D5-81C7-472C-9DC8-32D071CB2258} = {5A6656D5-81C7-472C-9DC8-32D071CB2258}
- {BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535} = {24D161E9-D1F0-4299-BBD3-5D940BEDD535}
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.UnitTests", "GVFS\GVFS.UnitTests\GVFS.UnitTests.csproj", "{1A46C414-7F39-4EF0-B216-A88033D18678}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.FunctionalTests.Windows", "GVFS\GVFS.FunctionalTests.Windows\GVFS.FunctionalTests.Windows.csproj", "{0F0A008E-AB12-40EC-A671-37A541B08C7F}"
- ProjectSection(ProjectDependencies) = postProject
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5} = {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B} = {07F2A520-2AB7-46DD-97C0-75D8E988D55B}
- {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5} = {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}
- {FA273F69-5762-43D8-AEA1-B4F08090D624} = {FA273F69-5762-43D8-AEA1-B4F08090D624}
- {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B} = {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}
- {BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
- EndProjectSection
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GVFS.VirtualFileSystemHook", "GVFS\GVFS.VirtualFileSystemHook\GVFS.VirtualFileSystemHook.vcxproj", "{2D23AB54-541F-4ABC-8DCA-08C199E97ABB}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.FunctionalTests", "GVFS\GVFS.FunctionalTests\GVFS.FunctionalTests.csproj", "{BD7C5776-82F2-40C6-AF01-B3CC1E2D83AF}"
- ProjectSection(ProjectDependencies) = postProject
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5} = {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B} = {07F2A520-2AB7-46DD-97C0-75D8E988D55B}
- {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5} = {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}
- {32220664-594C-4425-B9A0-88E0BE2F3D2A} = {32220664-594C-4425-B9A0-88E0BE2F3D2A}
- {FA273F69-5762-43D8-AEA1-B4F08090D624} = {FA273F69-5762-43D8-AEA1-B4F08090D624}
- {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B} = {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}
- {BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Virtualization", "GVFS\GVFS.Virtualization\GVFS.Virtualization.csproj", "{EC90AF5D-E018-4248-85D6-9DB1898D710E}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.FunctionalTests.LockHolder", "GVFS\GVFS.FunctionalTests.LockHolder\GVFS.FunctionalTests.LockHolder.csproj", "{FA273F69-5762-43D8-AEA1-B4F08090D624}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GitHooksLoader", "GVFS\GitHooksLoader\GitHooksLoader.vcxproj", "{798DE293-6EDA-4DC4-9395-BE7A71C563E3}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Upgrader", "GVFS\GVFS.Upgrader\GVFS.Upgrader.csproj", "{AECEC217-2499-403D-B0BB-2962B9BE5970}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Payload", "GVFS\GVFS.Payload\GVFS.Payload.csproj", "{A40DD1DC-2D35-4215-9FA0-3990FB7182FD}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GVFS.PostIndexChangedHook.Windows", "GVFS\GVFS.PostIndexChangedHook\GVFS.PostIndexChangedHook.Windows.vcxproj", "{24D161E9-D1F0-4299-BBD3-5D940BEDD535}"
- ProjectSection(ProjectDependencies) = postProject
- {A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
- EndProjectSection
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Installers", "GVFS\GVFS.Installers\GVFS.Installers.csproj", "{258FEAC0-5E2D-408A-9652-9E9653219F3B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug.Mac|x64 = Debug.Mac|x64
- Debug.Windows|x64 = Debug.Windows|x64
- Release.Mac|x64 = Release.Mac|x64
- Release.Windows|x64 = Release.Windows|x64
+ Debug|x64 = Debug|x64
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {1118B427-7063-422F-83B9-5023C8EC5A7A}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {1118B427-7063-422F-83B9-5023C8EC5A7A}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {1118B427-7063-422F-83B9-5023C8EC5A7A}.Debug.Windows|x64.Build.0 = Debug|x64
- {1118B427-7063-422F-83B9-5023C8EC5A7A}.Release.Mac|x64.ActiveCfg = Release|x64
- {1118B427-7063-422F-83B9-5023C8EC5A7A}.Release.Windows|x64.ActiveCfg = Release|x64
- {1118B427-7063-422F-83B9-5023C8EC5A7A}.Release.Windows|x64.Build.0 = Release|x64
- {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Debug.Mac|x64.Build.0 = Debug|x64
- {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Debug.Windows|x64.Build.0 = Debug|x64
- {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Release.Mac|x64.ActiveCfg = Release|x64
- {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Release.Mac|x64.Build.0 = Release|x64
- {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Release.Windows|x64.ActiveCfg = Release|x64
- {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09}.Release.Windows|x64.Build.0 = Release|x64
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B}.Debug.Mac|x64.Build.0 = Debug|x64
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B}.Debug.Windows|x64.Build.0 = Debug|x64
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B}.Release.Mac|x64.ActiveCfg = Release|x64
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B}.Release.Mac|x64.Build.0 = Release|x64
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B}.Release.Windows|x64.ActiveCfg = Release|x64
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B}.Release.Windows|x64.Build.0 = Release|x64
- {72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC}.Debug.Mac|x64.Build.0 = Debug|x64
- {72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC}.Debug.Windows|x64.Build.0 = Debug|x64
- {72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC}.Release.Mac|x64.ActiveCfg = Release|x64
- {72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC}.Release.Mac|x64.Build.0 = Release|x64
- {72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC}.Release.Windows|x64.ActiveCfg = Release|x64
- {72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC}.Release.Windows|x64.Build.0 = Release|x64
- {8E0D0989-21F6-4DD8-946C-39F992523CC6}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {8E0D0989-21F6-4DD8-946C-39F992523CC6}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {8E0D0989-21F6-4DD8-946C-39F992523CC6}.Debug.Windows|x64.Build.0 = Debug|x64
- {8E0D0989-21F6-4DD8-946C-39F992523CC6}.Release.Mac|x64.ActiveCfg = Release|x64
- {8E0D0989-21F6-4DD8-946C-39F992523CC6}.Release.Windows|x64.ActiveCfg = Release|x64
- {8E0D0989-21F6-4DD8-946C-39F992523CC6}.Release.Windows|x64.Build.0 = Release|x64
- {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}.Debug.Windows|x64.Build.0 = Debug|x64
- {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}.Release.Mac|x64.ActiveCfg = Release|x64
- {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}.Release.Windows|x64.ActiveCfg = Release|x64
- {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}.Release.Windows|x64.Build.0 = Release|x64
- {BDA91EE5-C684-4FC5-A90A-B7D677421917}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {BDA91EE5-C684-4FC5-A90A-B7D677421917}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {BDA91EE5-C684-4FC5-A90A-B7D677421917}.Debug.Windows|x64.Build.0 = Debug|x64
- {BDA91EE5-C684-4FC5-A90A-B7D677421917}.Release.Mac|x64.ActiveCfg = Release|x64
- {BDA91EE5-C684-4FC5-A90A-B7D677421917}.Release.Windows|x64.ActiveCfg = Release|x64
- {BDA91EE5-C684-4FC5-A90A-B7D677421917}.Release.Windows|x64.Build.0 = Release|x64
- {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}.Debug.Windows|x64.Build.0 = Debug|x64
- {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}.Release.Mac|x64.ActiveCfg = Release|x64
- {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}.Release.Windows|x64.ActiveCfg = Release|x64
- {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}.Release.Windows|x64.Build.0 = Release|x64
- {5A6656D5-81C7-472C-9DC8-32D071CB2258}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {5A6656D5-81C7-472C-9DC8-32D071CB2258}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {5A6656D5-81C7-472C-9DC8-32D071CB2258}.Debug.Windows|x64.Build.0 = Debug|x64
- {5A6656D5-81C7-472C-9DC8-32D071CB2258}.Release.Mac|x64.ActiveCfg = Release|x64
- {5A6656D5-81C7-472C-9DC8-32D071CB2258}.Release.Windows|x64.ActiveCfg = Release|x64
- {5A6656D5-81C7-472C-9DC8-32D071CB2258}.Release.Windows|x64.Build.0 = Release|x64
- {C5D3CA26-562F-4CA4-A378-B93E97A730E3}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {C5D3CA26-562F-4CA4-A378-B93E97A730E3}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {C5D3CA26-562F-4CA4-A378-B93E97A730E3}.Debug.Windows|x64.Build.0 = Debug|x64
- {C5D3CA26-562F-4CA4-A378-B93E97A730E3}.Release.Mac|x64.ActiveCfg = Release|x64
- {C5D3CA26-562F-4CA4-A378-B93E97A730E3}.Release.Windows|x64.ActiveCfg = Release|x64
- {C5D3CA26-562F-4CA4-A378-B93E97A730E3}.Release.Windows|x64.Build.0 = Release|x64
- {93B403FD-DAFB-46C5-9636-B122792A548A}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {93B403FD-DAFB-46C5-9636-B122792A548A}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {93B403FD-DAFB-46C5-9636-B122792A548A}.Debug.Windows|x64.Build.0 = Debug|x64
- {93B403FD-DAFB-46C5-9636-B122792A548A}.Release.Mac|x64.ActiveCfg = Release|x64
- {93B403FD-DAFB-46C5-9636-B122792A548A}.Release.Windows|x64.ActiveCfg = Release|x64
- {93B403FD-DAFB-46C5-9636-B122792A548A}.Release.Windows|x64.Build.0 = Release|x64
- {A4984251-840E-4622-AD0C-66DFCE2B2574}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {A4984251-840E-4622-AD0C-66DFCE2B2574}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {A4984251-840E-4622-AD0C-66DFCE2B2574}.Debug.Windows|x64.Build.0 = Debug|x64
- {A4984251-840E-4622-AD0C-66DFCE2B2574}.Release.Mac|x64.ActiveCfg = Release|x64
- {A4984251-840E-4622-AD0C-66DFCE2B2574}.Release.Windows|x64.ActiveCfg = Release|x64
- {A4984251-840E-4622-AD0C-66DFCE2B2574}.Release.Windows|x64.Build.0 = Release|x64
- {798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Debug.Windows|x64.Build.0 = Debug|x64
- {798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Release.Mac|x64.ActiveCfg = Release|x64
- {798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Release.Windows|x64.ActiveCfg = Release|x64
- {798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Release.Windows|x64.Build.0 = Release|x64
- {3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Debug.Windows|x64.Build.0 = Debug|x64
- {3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Release.Mac|x64.ActiveCfg = Release|x64
- {3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Release.Windows|x64.ActiveCfg = Release|x64
- {3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Release.Windows|x64.Build.0 = Release|x64
- {2F63B22B-EE26-4266-BF17-28A9146483A1}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {2F63B22B-EE26-4266-BF17-28A9146483A1}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {2F63B22B-EE26-4266-BF17-28A9146483A1}.Debug.Windows|x64.Build.0 = Debug|x64
- {2F63B22B-EE26-4266-BF17-28A9146483A1}.Release.Mac|x64.ActiveCfg = Release|x64
- {2F63B22B-EE26-4266-BF17-28A9146483A1}.Release.Windows|x64.ActiveCfg = Release|x64
- {2F63B22B-EE26-4266-BF17-28A9146483A1}.Release.Windows|x64.Build.0 = Release|x64
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}.Debug.Windows|x64.Build.0 = Debug|x64
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}.Release.Mac|x64.ActiveCfg = Release|x64
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}.Release.Windows|x64.ActiveCfg = Release|x64
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}.Release.Windows|x64.Build.0 = Release|x64
- {F468B05A-95E5-46BC-8C67-B80A78527B7D}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {F468B05A-95E5-46BC-8C67-B80A78527B7D}.Debug.Mac|x64.Build.0 = Debug|x64
- {F468B05A-95E5-46BC-8C67-B80A78527B7D}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {F468B05A-95E5-46BC-8C67-B80A78527B7D}.Debug.Windows|x64.Build.0 = Debug|x64
- {F468B05A-95E5-46BC-8C67-B80A78527B7D}.Release.Mac|x64.ActiveCfg = Release|x64
- {F468B05A-95E5-46BC-8C67-B80A78527B7D}.Release.Mac|x64.Build.0 = Release|x64
- {F468B05A-95E5-46BC-8C67-B80A78527B7D}.Release.Windows|x64.ActiveCfg = Release|x64
- {F468B05A-95E5-46BC-8C67-B80A78527B7D}.Release.Windows|x64.Build.0 = Release|x64
- {15FAE44C-0D21-4312-9FD3-28F05A5AB7A6}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {15FAE44C-0D21-4312-9FD3-28F05A5AB7A6}.Debug.Mac|x64.Build.0 = Debug|x64
- {15FAE44C-0D21-4312-9FD3-28F05A5AB7A6}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {15FAE44C-0D21-4312-9FD3-28F05A5AB7A6}.Debug.Windows|x64.Build.0 = Debug|x64
- {15FAE44C-0D21-4312-9FD3-28F05A5AB7A6}.Release.Mac|x64.ActiveCfg = Release|x64
- {15FAE44C-0D21-4312-9FD3-28F05A5AB7A6}.Release.Mac|x64.Build.0 = Release|x64
- {15FAE44C-0D21-4312-9FD3-28F05A5AB7A6}.Release.Windows|x64.ActiveCfg = Release|x64
- {15FAE44C-0D21-4312-9FD3-28F05A5AB7A6}.Release.Windows|x64.Build.0 = Release|x64
- {0D434FA7-6D8C-481E-B0CE-779B59EAEF53}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {0D434FA7-6D8C-481E-B0CE-779B59EAEF53}.Debug.Mac|x64.Build.0 = Debug|x64
- {0D434FA7-6D8C-481E-B0CE-779B59EAEF53}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {0D434FA7-6D8C-481E-B0CE-779B59EAEF53}.Debug.Windows|x64.Build.0 = Debug|x64
- {0D434FA7-6D8C-481E-B0CE-779B59EAEF53}.Release.Mac|x64.ActiveCfg = Release|x64
- {0D434FA7-6D8C-481E-B0CE-779B59EAEF53}.Release.Mac|x64.Build.0 = Release|x64
- {0D434FA7-6D8C-481E-B0CE-779B59EAEF53}.Release.Windows|x64.ActiveCfg = Release|x64
- {0D434FA7-6D8C-481E-B0CE-779B59EAEF53}.Release.Windows|x64.Build.0 = Release|x64
- {4CE404E7-D3FC-471C-993C-64615861EA63}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {4CE404E7-D3FC-471C-993C-64615861EA63}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {4CE404E7-D3FC-471C-993C-64615861EA63}.Debug.Windows|x64.Build.0 = Debug|x64
- {4CE404E7-D3FC-471C-993C-64615861EA63}.Release.Mac|x64.ActiveCfg = Release|x64
- {4CE404E7-D3FC-471C-993C-64615861EA63}.Release.Windows|x64.ActiveCfg = Release|x64
- {4CE404E7-D3FC-471C-993C-64615861EA63}.Release.Windows|x64.Build.0 = Release|x64
- {32220664-594C-4425-B9A0-88E0BE2F3D2A}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {32220664-594C-4425-B9A0-88E0BE2F3D2A}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {32220664-594C-4425-B9A0-88E0BE2F3D2A}.Debug.Windows|x64.Build.0 = Debug|x64
- {32220664-594C-4425-B9A0-88E0BE2F3D2A}.Release.Mac|x64.ActiveCfg = Release|x64
- {32220664-594C-4425-B9A0-88E0BE2F3D2A}.Release.Windows|x64.ActiveCfg = Release|x64
- {32220664-594C-4425-B9A0-88E0BE2F3D2A}.Release.Windows|x64.Build.0 = Release|x64
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}.Debug.Windows|x64.Build.0 = Debug|x64
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}.Release.Mac|x64.ActiveCfg = Release|x64
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}.Release.Windows|x64.ActiveCfg = Release|x64
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}.Release.Windows|x64.Build.0 = Release|x64
- {0F0A008E-AB12-40EC-A671-37A541B08C7F}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {0F0A008E-AB12-40EC-A671-37A541B08C7F}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {0F0A008E-AB12-40EC-A671-37A541B08C7F}.Debug.Windows|x64.Build.0 = Debug|x64
- {0F0A008E-AB12-40EC-A671-37A541B08C7F}.Release.Mac|x64.ActiveCfg = Release|x64
- {0F0A008E-AB12-40EC-A671-37A541B08C7F}.Release.Windows|x64.ActiveCfg = Release|x64
- {0F0A008E-AB12-40EC-A671-37A541B08C7F}.Release.Windows|x64.Build.0 = Release|x64
- {BD7C5776-82F2-40C6-AF01-B3CC1E2D83AF}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {BD7C5776-82F2-40C6-AF01-B3CC1E2D83AF}.Debug.Mac|x64.Build.0 = Debug|x64
- {BD7C5776-82F2-40C6-AF01-B3CC1E2D83AF}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {BD7C5776-82F2-40C6-AF01-B3CC1E2D83AF}.Debug.Windows|x64.Build.0 = Debug|x64
- {BD7C5776-82F2-40C6-AF01-B3CC1E2D83AF}.Release.Mac|x64.ActiveCfg = Release|x64
- {BD7C5776-82F2-40C6-AF01-B3CC1E2D83AF}.Release.Mac|x64.Build.0 = Release|x64
- {BD7C5776-82F2-40C6-AF01-B3CC1E2D83AF}.Release.Windows|x64.ActiveCfg = Release|x64
- {BD7C5776-82F2-40C6-AF01-B3CC1E2D83AF}.Release.Windows|x64.Build.0 = Release|x64
- {FA273F69-5762-43D8-AEA1-B4F08090D624}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {FA273F69-5762-43D8-AEA1-B4F08090D624}.Debug.Mac|x64.Build.0 = Debug|x64
- {FA273F69-5762-43D8-AEA1-B4F08090D624}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {FA273F69-5762-43D8-AEA1-B4F08090D624}.Debug.Windows|x64.Build.0 = Debug|x64
- {FA273F69-5762-43D8-AEA1-B4F08090D624}.Release.Mac|x64.ActiveCfg = Release|x64
- {FA273F69-5762-43D8-AEA1-B4F08090D624}.Release.Mac|x64.Build.0 = Release|x64
- {FA273F69-5762-43D8-AEA1-B4F08090D624}.Release.Windows|x64.ActiveCfg = Release|x64
- {FA273F69-5762-43D8-AEA1-B4F08090D624}.Release.Windows|x64.Build.0 = Release|x64
- {AECEC217-2499-403D-B0BB-2962B9BE5970}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {AECEC217-2499-403D-B0BB-2962B9BE5970}.Debug.Mac|x64.Build.0 = Debug|x64
- {AECEC217-2499-403D-B0BB-2962B9BE5970}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {AECEC217-2499-403D-B0BB-2962B9BE5970}.Debug.Windows|x64.Build.0 = Debug|x64
- {AECEC217-2499-403D-B0BB-2962B9BE5970}.Release.Mac|x64.ActiveCfg = Release|x64
- {AECEC217-2499-403D-B0BB-2962B9BE5970}.Release.Mac|x64.Build.0 = Release|x64
- {AECEC217-2499-403D-B0BB-2962B9BE5970}.Release.Windows|x64.ActiveCfg = Release|x64
- {AECEC217-2499-403D-B0BB-2962B9BE5970}.Release.Windows|x64.Build.0 = Release|x64
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535}.Debug.Mac|x64.ActiveCfg = Debug|x64
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535}.Debug.Windows|x64.ActiveCfg = Debug|x64
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535}.Debug.Windows|x64.Build.0 = Debug|x64
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535}.Release.Mac|x64.ActiveCfg = Release|x64
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535}.Release.Windows|x64.ActiveCfg = Release|x64
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535}.Release.Windows|x64.Build.0 = Release|x64
+ {642D14C3-0332-4C95-8EE0-0EAC54CBF918}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {642D14C3-0332-4C95-8EE0-0EAC54CBF918}.Debug|x64.Build.0 = Debug|Any CPU
+ {642D14C3-0332-4C95-8EE0-0EAC54CBF918}.Release|x64.ActiveCfg = Release|Any CPU
+ {642D14C3-0332-4C95-8EE0-0EAC54CBF918}.Release|x64.Build.0 = Release|Any CPU
+ {DADCDF10-E38D-432E-9684-CE029DEE1D07}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {DADCDF10-E38D-432E-9684-CE029DEE1D07}.Debug|x64.Build.0 = Debug|Any CPU
+ {DADCDF10-E38D-432E-9684-CE029DEE1D07}.Release|x64.ActiveCfg = Release|Any CPU
+ {DADCDF10-E38D-432E-9684-CE029DEE1D07}.Release|x64.Build.0 = Release|Any CPU
+ {77C8EC7B-4166-4F01-81C4-D9AB924021C0}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {77C8EC7B-4166-4F01-81C4-D9AB924021C0}.Debug|x64.Build.0 = Debug|Any CPU
+ {77C8EC7B-4166-4F01-81C4-D9AB924021C0}.Release|x64.ActiveCfg = Release|Any CPU
+ {77C8EC7B-4166-4F01-81C4-D9AB924021C0}.Release|x64.Build.0 = Release|Any CPU
+ {963F33D0-09EE-42CB-9E5A-37A4F4F1BFAB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {963F33D0-09EE-42CB-9E5A-37A4F4F1BFAB}.Debug|x64.Build.0 = Debug|Any CPU
+ {963F33D0-09EE-42CB-9E5A-37A4F4F1BFAB}.Release|x64.ActiveCfg = Release|Any CPU
+ {963F33D0-09EE-42CB-9E5A-37A4F4F1BFAB}.Release|x64.Build.0 = Release|Any CPU
+ {B26985C3-250A-4805-AA97-AD0604331AC7}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B26985C3-250A-4805-AA97-AD0604331AC7}.Debug|x64.Build.0 = Debug|Any CPU
+ {B26985C3-250A-4805-AA97-AD0604331AC7}.Release|x64.ActiveCfg = Release|Any CPU
+ {B26985C3-250A-4805-AA97-AD0604331AC7}.Release|x64.Build.0 = Release|Any CPU
+ {B366D3B6-1E85-4015-8DB0-D5FA4331ECE4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B366D3B6-1E85-4015-8DB0-D5FA4331ECE4}.Debug|x64.Build.0 = Debug|Any CPU
+ {B366D3B6-1E85-4015-8DB0-D5FA4331ECE4}.Release|x64.ActiveCfg = Release|Any CPU
+ {B366D3B6-1E85-4015-8DB0-D5FA4331ECE4}.Release|x64.Build.0 = Release|Any CPU
+ {EDB4A40E-CFC9-486A-BDC5-AB2951FD8EDC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {EDB4A40E-CFC9-486A-BDC5-AB2951FD8EDC}.Debug|x64.Build.0 = Debug|Any CPU
+ {EDB4A40E-CFC9-486A-BDC5-AB2951FD8EDC}.Release|x64.ActiveCfg = Release|Any CPU
+ {EDB4A40E-CFC9-486A-BDC5-AB2951FD8EDC}.Release|x64.Build.0 = Release|Any CPU
+ {F96089C2-6D09-4349-B65D-9CCA6160C6A5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F96089C2-6D09-4349-B65D-9CCA6160C6A5}.Debug|x64.Build.0 = Debug|Any CPU
+ {F96089C2-6D09-4349-B65D-9CCA6160C6A5}.Release|x64.ActiveCfg = Release|Any CPU
+ {F96089C2-6D09-4349-B65D-9CCA6160C6A5}.Release|x64.Build.0 = Release|Any CPU
+ {39361E20-C7D3-43E5-A90E-5135457EABC0}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {39361E20-C7D3-43E5-A90E-5135457EABC0}.Debug|x64.Build.0 = Debug|Any CPU
+ {39361E20-C7D3-43E5-A90E-5135457EABC0}.Release|x64.ActiveCfg = Release|Any CPU
+ {39361E20-C7D3-43E5-A90E-5135457EABC0}.Release|x64.Build.0 = Release|Any CPU
+ {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}.Debug|x64.ActiveCfg = Debug|x64
+ {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}.Debug|x64.Build.0 = Debug|x64
+ {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}.Release|x64.ActiveCfg = Release|x64
+ {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}.Release|x64.Build.0 = Release|x64
+ {26B5D74F-972B-4B54-98C3-15958616E56D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {26B5D74F-972B-4B54-98C3-15958616E56D}.Debug|x64.Build.0 = Debug|Any CPU
+ {26B5D74F-972B-4B54-98C3-15958616E56D}.Release|x64.ActiveCfg = Release|Any CPU
+ {26B5D74F-972B-4B54-98C3-15958616E56D}.Release|x64.Build.0 = Release|Any CPU
+ {41A25DAD-698D-47AB-8BB1-7E622FE6FAAC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {41A25DAD-698D-47AB-8BB1-7E622FE6FAAC}.Debug|x64.Build.0 = Debug|Any CPU
+ {41A25DAD-698D-47AB-8BB1-7E622FE6FAAC}.Release|x64.ActiveCfg = Release|Any CPU
+ {41A25DAD-698D-47AB-8BB1-7E622FE6FAAC}.Release|x64.Build.0 = Release|Any CPU
+ {24D161E9-D1F0-4299-BBD3-5D940BEDD535}.Debug|x64.ActiveCfg = Debug|x64
+ {24D161E9-D1F0-4299-BBD3-5D940BEDD535}.Debug|x64.Build.0 = Debug|x64
+ {24D161E9-D1F0-4299-BBD3-5D940BEDD535}.Release|x64.ActiveCfg = Release|x64
+ {24D161E9-D1F0-4299-BBD3-5D940BEDD535}.Release|x64.Build.0 = Release|x64
+ {5A6656D5-81C7-472C-9DC8-32D071CB2258}.Debug|x64.ActiveCfg = Debug|x64
+ {5A6656D5-81C7-472C-9DC8-32D071CB2258}.Debug|x64.Build.0 = Debug|x64
+ {5A6656D5-81C7-472C-9DC8-32D071CB2258}.Release|x64.ActiveCfg = Release|x64
+ {5A6656D5-81C7-472C-9DC8-32D071CB2258}.Release|x64.Build.0 = Release|x64
+ {5E236AF3-31D7-4313-A129-F080FF058283}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5E236AF3-31D7-4313-A129-F080FF058283}.Debug|x64.Build.0 = Debug|Any CPU
+ {5E236AF3-31D7-4313-A129-F080FF058283}.Release|x64.ActiveCfg = Release|Any CPU
+ {5E236AF3-31D7-4313-A129-F080FF058283}.Release|x64.Build.0 = Release|Any CPU
+ {D8FB16E2-EAE0-4E05-A993-940062CD7CA7}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D8FB16E2-EAE0-4E05-A993-940062CD7CA7}.Debug|x64.Build.0 = Debug|Any CPU
+ {D8FB16E2-EAE0-4E05-A993-940062CD7CA7}.Release|x64.ActiveCfg = Release|Any CPU
+ {D8FB16E2-EAE0-4E05-A993-940062CD7CA7}.Release|x64.Build.0 = Release|Any CPU
+ {FE70E0D6-B0A6-421D-AA12-F28F822F09A0}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FE70E0D6-B0A6-421D-AA12-F28F822F09A0}.Debug|x64.Build.0 = Debug|Any CPU
+ {FE70E0D6-B0A6-421D-AA12-F28F822F09A0}.Release|x64.ActiveCfg = Release|Any CPU
+ {FE70E0D6-B0A6-421D-AA12-F28F822F09A0}.Release|x64.Build.0 = Release|Any CPU
+ {1A46C414-7F39-4EF0-B216-A88033D18678}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1A46C414-7F39-4EF0-B216-A88033D18678}.Debug|x64.Build.0 = Debug|Any CPU
+ {1A46C414-7F39-4EF0-B216-A88033D18678}.Release|x64.ActiveCfg = Release|Any CPU
+ {1A46C414-7F39-4EF0-B216-A88033D18678}.Release|x64.Build.0 = Release|Any CPU
+ {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}.Debug|x64.ActiveCfg = Debug|x64
+ {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}.Debug|x64.Build.0 = Debug|x64
+ {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}.Release|x64.ActiveCfg = Release|x64
+ {2D23AB54-541F-4ABC-8DCA-08C199E97ABB}.Release|x64.Build.0 = Release|x64
+ {EC90AF5D-E018-4248-85D6-9DB1898D710E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {EC90AF5D-E018-4248-85D6-9DB1898D710E}.Debug|x64.Build.0 = Debug|Any CPU
+ {EC90AF5D-E018-4248-85D6-9DB1898D710E}.Release|x64.ActiveCfg = Release|Any CPU
+ {EC90AF5D-E018-4248-85D6-9DB1898D710E}.Release|x64.Build.0 = Release|Any CPU
+ {798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Debug|x64.ActiveCfg = Debug|x64
+ {798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Debug|x64.Build.0 = Debug|x64
+ {798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Release|x64.ActiveCfg = Release|x64
+ {798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Release|x64.Build.0 = Release|x64
+ {A40DD1DC-2D35-4215-9FA0-3990FB7182FD}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A40DD1DC-2D35-4215-9FA0-3990FB7182FD}.Debug|x64.Build.0 = Debug|Any CPU
+ {A40DD1DC-2D35-4215-9FA0-3990FB7182FD}.Release|x64.ActiveCfg = Release|Any CPU
+ {A40DD1DC-2D35-4215-9FA0-3990FB7182FD}.Release|x64.Build.0 = Release|Any CPU
+ {258FEAC0-5E2D-408A-9652-9E9653219F3B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {258FEAC0-5E2D-408A-9652-9E9653219F3B}.Debug|x64.Build.0 = Debug|Any CPU
+ {258FEAC0-5E2D-408A-9652-9E9653219F3B}.Release|x64.ActiveCfg = Release|Any CPU
+ {258FEAC0-5E2D-408A-9652-9E9653219F3B}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {1118B427-7063-422F-83B9-5023C8EC5A7A} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {374BF1E5-0B2D-4D4A-BD5E-4212299DEF09} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {07F2A520-2AB7-46DD-97C0-75D8E988D55B} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC} = {C41F10F9-1163-4CFA-A465-EA728F75E9FA}
- {8E0D0989-21F6-4DD8-946C-39F992523CC6} = {C41F10F9-1163-4CFA-A465-EA728F75E9FA}
- {3771C555-B5C1-45E2-B8B7-2CEF1619CDC5} = {C41F10F9-1163-4CFA-A465-EA728F75E9FA}
- {BDA91EE5-C684-4FC5-A90A-B7D677421917} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {5A6656D5-81C7-472C-9DC8-32D071CB2258} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {28674A4B-1223-4633-A460-C8CC39B09318} = {DCE11095-DA5F-4878-B58D-2702765560F5}
- {C5D3CA26-562F-4CA4-A378-B93E97A730E3} = {C41F10F9-1163-4CFA-A465-EA728F75E9FA}
- {93B403FD-DAFB-46C5-9636-B122792A548A} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {A4984251-840E-4622-AD0C-66DFCE2B2574} = {AB0D9230-3893-4486-8899-F9C871FB5D5F}
- {3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {2F63B22B-EE26-4266-BF17-28A9146483A1} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {2D23AB54-541F-4ABC-8DCA-08C199E97ABB} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {F468B05A-95E5-46BC-8C67-B80A78527B7D} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {15FAE44C-0D21-4312-9FD3-28F05A5AB7A6} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {0D434FA7-6D8C-481E-B0CE-779B59EAEF53} = {C41F10F9-1163-4CFA-A465-EA728F75E9FA}
- {4CE404E7-D3FC-471C-993C-64615861EA63} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {32220664-594C-4425-B9A0-88E0BE2F3D2A} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {0F0A008E-AB12-40EC-A671-37A541B08C7F} = {C41F10F9-1163-4CFA-A465-EA728F75E9FA}
- {BD7C5776-82F2-40C6-AF01-B3CC1E2D83AF} = {C41F10F9-1163-4CFA-A465-EA728F75E9FA}
- {FA273F69-5762-43D8-AEA1-B4F08090D624} = {C41F10F9-1163-4CFA-A465-EA728F75E9FA}
- {AECEC217-2499-403D-B0BB-2962B9BE5970} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- {24D161E9-D1F0-4299-BBD3-5D940BEDD535} = {2EF2EC94-3A68-4ED7-9A58-B7057ADBA01C}
- EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {A025908B-DAB1-46CB-83A3-56F3B863D8FA}
+ SolutionGuid = {C506C09B-011F-491F-9D17-D0E2BA0B3467}
EndGlobalSection
EndGlobal
diff --git a/GVFS/Directory.Build.props b/GVFS/Directory.Build.props
deleted file mode 100644
index 42fff15fbd..0000000000
--- a/GVFS/Directory.Build.props
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
- $(MSBuildThisFileDirectory)\..\..\BuildOutput\$(MSBuildProjectName)\obj
-
-
\ No newline at end of file
diff --git a/GVFS/FastFetch/FastFetch.csproj b/GVFS/FastFetch/FastFetch.csproj
index 90aac7cc48..52bb94654f 100644
--- a/GVFS/FastFetch/FastFetch.csproj
+++ b/GVFS/FastFetch/FastFetch.csproj
@@ -1,55 +1,31 @@
-
-
-
-
- Exe
- FastFetch
- netcoreapp2.1
- x64
- osx-x64;win-x64
- true
- true
- true
-
-
-
- $(GVFSVersion)
-
-
- $(GVFSVersion)
-
-
-
-
-
-
-
-
-
-
-
-
-
- PlatformLoader.Windows.cs
-
-
-
-
-
-
-
- PlatformLoader.Mac.cs
-
-
-
-
-
-
-
-
-
- all
-
-
-
+
+
+
+ Exe
+ net461
+ x64
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft400
+ false
+
+
+
+
diff --git a/GVFS/FastFetch/NativeMethods.cs b/GVFS/FastFetch/NativeMethods.cs
index a8f0ebc746..c71c2907b4 100644
--- a/GVFS/FastFetch/NativeMethods.cs
+++ b/GVFS/FastFetch/NativeMethods.cs
@@ -1,4 +1,8 @@
using GVFS.Common.Tracing;
+using Microsoft.Win32.SafeHandles;
+using System;
+using System.ComponentModel;
+using System.IO;
using System.IO.MemoryMappedFiles;
using System.Runtime.InteropServices;
@@ -6,30 +10,115 @@ namespace FastFetch
{
internal static class NativeMethods
{
- public static bool isUnixOS = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
+ private const int AccessDeniedWin32Error = 5;
public static unsafe void WriteFile(ITracer tracer, byte* originalData, long originalSize, string destination, ushort mode)
{
- if (isUnixOS)
+ try
{
- NativeUnixMethods.WriteFile(tracer, originalData, originalSize, destination, mode);
+ using (SafeFileHandle fileHandle = OpenForWrite(tracer, destination))
+ {
+ if (fileHandle.IsInvalid)
+ {
+ throw new Win32Exception(Marshal.GetLastWin32Error());
+ }
+
+ byte* data = originalData;
+ long size = originalSize;
+ uint written = 0;
+ while (size > 0)
+ {
+ uint toWrite = size < uint.MaxValue ? (uint)size : uint.MaxValue;
+ if (!WriteFile(fileHandle, data, toWrite, out written, IntPtr.Zero))
+ {
+ throw new Win32Exception(Marshal.GetLastWin32Error());
+ }
+
+ size -= written;
+ data = data + written;
+ }
+ }
}
- else
+ catch (Exception e)
{
- NativeWindowsMethods.WriteFile(tracer, originalData, originalSize, destination);
+ EventMetadata metadata = new EventMetadata();
+ metadata.Add("destination", destination);
+ metadata.Add("exception", e.ToString());
+ tracer.RelatedError(metadata, "Error writing file.");
+ throw;
}
}
public static bool TryStatFileAndUpdateIndex(ITracer tracer, string path, MemoryMappedViewAccessor indexView, long offset)
{
- if (isUnixOS)
+ try
+ {
+ FileInfo file = new FileInfo(path);
+ if (file.Exists)
+ {
+ Index.IndexEntry indexEntry = new Index.IndexEntry(indexView, offset);
+ indexEntry.Mtime = file.LastWriteTimeUtc;
+ indexEntry.Ctime = file.CreationTimeUtc;
+ indexEntry.Size = (uint)file.Length;
+ return true;
+ }
+ }
+ catch (System.Security.SecurityException)
{
- return NativeUnixMethods.TryStatFileAndUpdateIndex(tracer, path, indexView, offset);
+ // Skip these.
}
- else
+ catch (System.UnauthorizedAccessException)
{
- return NativeWindowsMethods.TryStatFileAndUpdateIndex(tracer, path, indexView, offset);
+ // Skip these.
}
+
+ return false;
}
+
+ private static SafeFileHandle OpenForWrite(ITracer tracer, string fileName)
+ {
+ SafeFileHandle handle = CreateFile(fileName, FileAccess.Write, FileShare.None, IntPtr.Zero, FileMode.Create, FileAttributes.Normal, IntPtr.Zero);
+ if (handle.IsInvalid)
+ {
+ // If we get a access denied, try reverting the acls to defaults inherited by parent
+ if (Marshal.GetLastWin32Error() == AccessDeniedWin32Error)
+ {
+ tracer.RelatedEvent(
+ EventLevel.Warning,
+ "FailedOpenForWrite",
+ new EventMetadata
+ {
+ { TracingConstants.MessageKey.WarningMessage, "Received access denied. Attempting to delete." },
+ { "FileName", fileName }
+ });
+
+ File.SetAttributes(fileName, FileAttributes.Normal);
+ File.Delete(fileName);
+
+ handle = CreateFile(fileName, FileAccess.Write, FileShare.None, IntPtr.Zero, FileMode.Create, FileAttributes.Normal, IntPtr.Zero);
+ }
+ }
+
+ return handle;
+ }
+
+ [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
+ private static extern SafeFileHandle CreateFile(
+ [MarshalAs(UnmanagedType.LPTStr)] string filename,
+ [MarshalAs(UnmanagedType.U4)] FileAccess access,
+ [MarshalAs(UnmanagedType.U4)] FileShare share,
+ IntPtr securityAttributes, // optional SECURITY_ATTRIBUTES struct or IntPtr.Zero
+ [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition,
+ [MarshalAs(UnmanagedType.U4)] FileAttributes flagsAndAttributes,
+ IntPtr templateFile);
+
+ [DllImport("kernel32.dll", SetLastError = true)]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ private static unsafe extern bool WriteFile(
+ SafeFileHandle file,
+ byte* buffer,
+ uint numberOfBytesToWrite,
+ out uint numberOfBytesWritten,
+ IntPtr overlapped);
}
}
diff --git a/GVFS/FastFetch/NativeUnixMethods.cs b/GVFS/FastFetch/NativeUnixMethods.cs
deleted file mode 100644
index 1cf33db32e..0000000000
--- a/GVFS/FastFetch/NativeUnixMethods.cs
+++ /dev/null
@@ -1,153 +0,0 @@
-using GVFS.Common.Tracing;
-using System;
-using System.ComponentModel;
-using System.IO.MemoryMappedFiles;
-using System.Runtime.InteropServices;
-
-namespace FastFetch
-{
- public class NativeUnixMethods
- {
- public const int ReadOnly = 0x0000;
- public const int WriteOnly = 0x0001;
-
- public const int Create = 0x0200;
- public const int Truncate = 0x0400;
- private const int InvalidFileDescriptor = -1;
- private const ushort SymLinkMode = 0xA000;
-
- public static unsafe void WriteFile(ITracer tracer, byte* originalData, long originalSize, string destination, ushort mode)
- {
- int fileDescriptor = InvalidFileDescriptor;
- try
- {
- if (mode == SymLinkMode)
- {
- string linkTarget = Marshal.PtrToStringUTF8(new IntPtr(originalData));
- int result = CreateSymLink(linkTarget, destination);
- if (result == -1)
- {
- throw new Win32Exception(Marshal.GetLastWin32Error(), $"Failed to create symlink({linkTarget}, {destination}).");
- }
- }
- else
- {
- fileDescriptor = Open(destination, WriteOnly | Create | Truncate, mode);
- if (fileDescriptor == InvalidFileDescriptor)
- {
- throw new Win32Exception(Marshal.GetLastWin32Error(), $"Failed to open({destination}.)");
- }
-
- IntPtr result = Write(fileDescriptor, originalData, (IntPtr)originalSize);
- if (result.ToInt32() == -1)
- {
- throw new Win32Exception(Marshal.GetLastWin32Error(), $"Failed to write contents into {destination}.");
- }
- }
- }
- catch (Win32Exception e)
- {
- EventMetadata metadata = new EventMetadata();
- metadata.Add("filemode", mode);
- metadata.Add("destination", destination);
- metadata.Add("exception", e.ToString());
- tracer.RelatedError(metadata, $"Failed to properly create {destination}");
- throw;
- }
- finally
- {
- Close(fileDescriptor);
- }
- }
-
- public static bool TryStatFileAndUpdateIndex(ITracer tracer, string path, MemoryMappedViewAccessor indexView, long offset)
- {
- try
- {
- NativeStat.StatBuffer st = StatFile(path);
- Index.IndexEntry indexEntry = new Index.IndexEntry(indexView, offset);
- indexEntry.MtimeSeconds = (uint)st.MTimespec.Sec;
- indexEntry.MtimeNanosecondFraction = (uint)st.MTimespec.Nsec;
- indexEntry.CtimeSeconds = (uint)st.CTimespec.Sec;
- indexEntry.CtimeNanosecondFraction = (uint)st.CTimespec.Nsec;
- indexEntry.Size = (uint)st.Size;
- indexEntry.Dev = (uint)st.Dev;
- indexEntry.Ino = (uint)st.Ino;
- indexEntry.Uid = st.UID;
- indexEntry.Gid = st.GID;
- return true;
- }
- catch (Win32Exception e)
- {
- EventMetadata metadata = new EventMetadata();
- metadata.Add("path", path);
- metadata.Add("exception", e.ToString());
- tracer.RelatedError(metadata, "Error stat-ing file.");
- return false;
- }
- }
-
- [DllImport("libc", EntryPoint = "open", SetLastError = true)]
- public static extern int Open(string path, int flag, ushort creationMode);
-
- [DllImport("libc", EntryPoint = "close", SetLastError = true)]
- public static extern int Close(int fd);
-
- [DllImport("libc", EntryPoint = "write", SetLastError = true)]
- private static unsafe extern IntPtr Write(int fileDescriptor, void* buf, IntPtr count);
-
- [DllImport("libc", EntryPoint = "symlink", SetLastError = true)]
- private static extern int CreateSymLink(string linkTarget, string newLinkPath);
-
- private static NativeStat.StatBuffer StatFile(string fileName)
- {
- NativeStat.StatBuffer statBuffer = new NativeStat.StatBuffer();
- if (NativeStat.Stat(fileName, out statBuffer) != 0)
- {
- throw new Win32Exception(Marshal.GetLastWin32Error(), $"Failed to stat {fileName}");
- }
-
- return statBuffer;
- }
-
- private static class NativeStat
- {
- [DllImport("libc", EntryPoint = "stat$INODE64", SetLastError = true)]
- public static extern int Stat(string path, [Out] out StatBuffer statBuffer);
-
- [StructLayout(LayoutKind.Sequential)]
- public struct TimeSpec
- {
- public long Sec;
- public long Nsec;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct StatBuffer
- {
- public int Dev; /* ID of device containing file */
- public ushort Mode; /* Mode of file (see below) */
- public ushort NLink; /* Number of hard links */
- public ulong Ino; /* File serial number */
- public uint UID; /* User ID of the file */
- public uint GID; /* Group ID of the file */
- public int RDev; /* Device ID */
-
- public TimeSpec ATimespec; /* time of last access */
- public TimeSpec MTimespec; /* time of last data modification */
- public TimeSpec CTimespec; /* time of last status change */
- public TimeSpec BirthTimespec; /* time of file creation(birth) */
-
- public long Size; /* file size, in bytes */
- public long Blocks; /* blocks allocated for file */
- public int BlkSize; /* optimal blocksize for I/O */
- public uint Glags; /* user defined flags for file */
- public uint Gen; /* file generation number */
- public int LSpare; /* RESERVED: DO NOT USE! */
-
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
- public long[] QSpare; /* RESERVED: DO NOT USE! */
- }
- }
- }
-}
diff --git a/GVFS/FastFetch/NativeWindowsMethods.cs b/GVFS/FastFetch/NativeWindowsMethods.cs
deleted file mode 100644
index 321abf3124..0000000000
--- a/GVFS/FastFetch/NativeWindowsMethods.cs
+++ /dev/null
@@ -1,124 +0,0 @@
-using GVFS.Common.Tracing;
-using Microsoft.Win32.SafeHandles;
-using System;
-using System.ComponentModel;
-using System.IO;
-using System.IO.MemoryMappedFiles;
-using System.Runtime.InteropServices;
-
-namespace FastFetch
-{
- public class NativeWindowsMethods
- {
- private const int AccessDeniedWin32Error = 5;
-
- public static unsafe void WriteFile(ITracer tracer, byte* originalData, long originalSize, string destination)
- {
- try
- {
- using (SafeFileHandle fileHandle = OpenForWrite(tracer, destination))
- {
- if (fileHandle.IsInvalid)
- {
- throw new Win32Exception(Marshal.GetLastWin32Error());
- }
-
- byte* data = originalData;
- long size = originalSize;
- uint written = 0;
- while (size > 0)
- {
- uint toWrite = size < uint.MaxValue ? (uint)size : uint.MaxValue;
- if (!WriteFile(fileHandle, data, toWrite, out written, IntPtr.Zero))
- {
- throw new Win32Exception(Marshal.GetLastWin32Error());
- }
-
- size -= written;
- data = data + written;
- }
- }
- }
- catch (Exception e)
- {
- EventMetadata metadata = new EventMetadata();
- metadata.Add("destination", destination);
- metadata.Add("exception", e.ToString());
- tracer.RelatedError(metadata, "Error writing file.");
- throw;
- }
- }
-
- public static bool TryStatFileAndUpdateIndex(ITracer tracer, string path, MemoryMappedViewAccessor indexView, long offset)
- {
- try
- {
- FileInfo file = new FileInfo(path);
- if (file.Exists)
- {
- Index.IndexEntry indexEntry = new Index.IndexEntry(indexView, offset);
- indexEntry.Mtime = file.LastWriteTimeUtc;
- indexEntry.Ctime = file.CreationTimeUtc;
- indexEntry.Size = (uint)file.Length;
- return true;
- }
- }
- catch (System.Security.SecurityException)
- {
- // Skip these.
- }
- catch (System.UnauthorizedAccessException)
- {
- // Skip these.
- }
-
- return false;
- }
-
- private static SafeFileHandle OpenForWrite(ITracer tracer, string fileName)
- {
- SafeFileHandle handle = CreateFile(fileName, FileAccess.Write, FileShare.None, IntPtr.Zero, FileMode.Create, FileAttributes.Normal, IntPtr.Zero);
- if (handle.IsInvalid)
- {
- // If we get a access denied, try reverting the acls to defaults inherited by parent
- if (Marshal.GetLastWin32Error() == AccessDeniedWin32Error)
- {
- tracer.RelatedEvent(
- EventLevel.Warning,
- "FailedOpenForWrite",
- new EventMetadata
- {
- { TracingConstants.MessageKey.WarningMessage, "Received access denied. Attempting to delete." },
- { "FileName", fileName }
- });
-
- File.SetAttributes(fileName, FileAttributes.Normal);
- File.Delete(fileName);
-
- handle = CreateFile(fileName, FileAccess.Write, FileShare.None, IntPtr.Zero, FileMode.Create, FileAttributes.Normal, IntPtr.Zero);
- }
- }
-
- return handle;
- }
-
- [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- private static extern SafeFileHandle CreateFile(
- [MarshalAs(UnmanagedType.LPTStr)] string filename,
- [MarshalAs(UnmanagedType.U4)] FileAccess access,
- [MarshalAs(UnmanagedType.U4)] FileShare share,
- IntPtr securityAttributes, // optional SECURITY_ATTRIBUTES struct or IntPtr.Zero
- [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition,
- [MarshalAs(UnmanagedType.U4)] FileAttributes flagsAndAttributes,
- IntPtr templateFile);
-
- [DllImport("kernel32.dll", SetLastError = true)]
- [return: MarshalAs(UnmanagedType.Bool)]
- private static unsafe extern bool WriteFile(
- SafeFileHandle file,
- byte* buffer,
- uint numberOfBytesToWrite,
- out uint numberOfBytesWritten,
- IntPtr overlapped);
- }
-}
diff --git a/GVFS/FastFetch/Properties/AssemblyInfo.cs b/GVFS/FastFetch/Properties/AssemblyInfo.cs
deleted file mode 100644
index b4aa706f75..0000000000
--- a/GVFS/FastFetch/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("FastFetch")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("FastFetch")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("07f2a520-2ab7-46dd-97c0-75d8e988d55b")]
diff --git a/GVFS/FastFetch/package.nuspec b/GVFS/FastFetch/package.nuspec
deleted file mode 100644
index ec291a94c0..0000000000
--- a/GVFS/FastFetch/package.nuspec
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- FastFetch
- 0.1.0
- Microsoft
- https://github.com/Microsoft/GVFS
- false
-
- An internal tool for quickly pulling large git repos from a GVFS-enabled git server.
- This application will be deprecated once this same functionality is added to the gvfs prefetch verb.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.Build/.gitignore b/GVFS/GVFS.Build/.gitignore
deleted file mode 100644
index 761f8ceb83..0000000000
--- a/GVFS/GVFS.Build/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-packages.config
\ No newline at end of file
diff --git a/GVFS/GVFS.Build/GVFS.PreBuild.csproj b/GVFS/GVFS.Build/GVFS.PreBuild.csproj
deleted file mode 100644
index 6f66a14dda..0000000000
--- a/GVFS/GVFS.Build/GVFS.PreBuild.csproj
+++ /dev/null
@@ -1,215 +0,0 @@
-
-
-
-
-
- {A4984251-840E-4622-AD0C-66DFCE2B2574}
- Library
- Properties
- GVFS.PreBuild
- GVFS.PreBuild
- v4.6.1
- 512
-
-
- true
- DEBUG;TRACE
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- TRACE
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
- Designer
-
-
- Designer
-
-
-
- Designer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SetupGVFS.$(GVFSVersion).exe
- $(BuildOutputDir)\GVFS.Installer.Windows\bin\x64\$(Configuration)\SetupGVFS.$(GVFSVersion).exe
- $(BuildOutputDir)\GVFS.Build\
- $(OutDir)GVFSConstants.GitVersion.cs
- $(OutDir)InstallG4W.bat
- $(OutDir)InstallGVFS.bat
- $(OutDir)InstallProduct.bat
- $(OutDir)GVFS.Installers.nuspec
- $(BuildOutputDir)\CommonAssemblyVersion.cs
- $(BuildOutputDir)\CommonVersionHeader.h
- $(BuildOutputDir)\restore.timestamp
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GVFS/GVFS.Build/GVFS.cpp.props b/GVFS/GVFS.Build/GVFS.cpp.props
deleted file mode 100644
index b299c87266..0000000000
--- a/GVFS/GVFS.Build/GVFS.cpp.props
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
- $(BuildOutputDir)\$(MSBuildProjectName)\bin\$(Platform)\$(Configuration)\
- $(BuildOutputDir)\$(MSBuildProjectName)\intermediate\$(Platform)\$(Configuration)\
-
-
-
diff --git a/GVFS/GVFS.Build/GVFS.cs.props b/GVFS/GVFS.Build/GVFS.cs.props
deleted file mode 100644
index 6b7cf63d88..0000000000
--- a/GVFS/GVFS.Build/GVFS.cs.props
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
- $(BuildOutputDir)\$(MSBuildProjectName)\bin\$(Platform)\$(Configuration)\
- $(BuildOutputDir)\$(MSBuildProjectName)\obj\$(Platform)\$(Configuration)\
- $(BuildOutputDir)\$(MSBuildProjectName)\intermediate\$(Platform)\$(Configuration)\
-
-
-
- true
- $(MSBuildThisFileDirectory)\GVFS.ruleset
- false
-
-
-
-
- CommonAssemblyVersion.cs
-
-
-
-
- $(DefaultItemExcludes);StyleCop.Cache;TestResults.xml
-
-
-
- NU1603
- NU1603
-
-
diff --git a/GVFS/GVFS.Build/GVFS.props b/GVFS/GVFS.Build/GVFS.props
deleted file mode 100644
index fec1183cbc..0000000000
--- a/GVFS/GVFS.Build/GVFS.props
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- 0.2.173.2
- 2.20210322.1
-
-
-
- Debug
- x64
- ..\..\
- $(SolutionDir)..\BuildOutput
- $(SolutionDir)..\packages
-
-
-
diff --git a/GVFS/GVFS.Build/GVFS.ruleset b/GVFS/GVFS.Build/GVFS.ruleset
deleted file mode 100644
index 67842e3104..0000000000
--- a/GVFS/GVFS.Build/GVFS.ruleset
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GVFS/GVFS.Build/GenerateG4WNugetReference.cs b/GVFS/GVFS.Build/GenerateG4WNugetReference.cs
deleted file mode 100644
index 448654dcb7..0000000000
--- a/GVFS/GVFS.Build/GenerateG4WNugetReference.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using System;
-using System.IO;
-
-namespace GVFS.PreBuild
-{
- public class GenerateG4WNugetReference : Task
- {
- [Required]
- public string GitPackageVersion { get; set; }
-
- public override bool Execute()
- {
- this.Log.LogMessage(MessageImportance.High, "Creating packages.config for G4W package version " + this.GitPackageVersion);
-
- File.WriteAllText(
- Path.Combine(Environment.CurrentDirectory, "packages.config"),
- string.Format(
-@"
-
-
-
-
-",
- this.GitPackageVersion));
-
- return true;
- }
- }
-}
diff --git a/GVFS/GVFS.Build/GenerateGVFSInstallersNuspec.cs b/GVFS/GVFS.Build/GenerateGVFSInstallersNuspec.cs
deleted file mode 100644
index 4813866b5a..0000000000
--- a/GVFS/GVFS.Build/GenerateGVFSInstallersNuspec.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using System.IO;
-
-namespace GVFS.PreBuild
-{
- public class GenerateGVFSInstallersNuspec : Task
- {
- [Required]
- public string GVFSSetupPath { get; set; }
-
- [Required]
- public string GitPackageVersion { get; set; }
-
- [Required]
- public string PackagesPath { get; set; }
-
- [Required]
- public string OutputFile { get; set; }
-
- public override bool Execute()
- {
- this.Log.LogMessage(MessageImportance.High, "Generating GVFS.Installers.nuspec");
-
- this.GVFSSetupPath = Path.GetFullPath(this.GVFSSetupPath);
- this.PackagesPath = Path.GetFullPath(this.PackagesPath);
-
- File.WriteAllText(
- this.OutputFile,
- string.Format(
-@"
-
-
- GVFS.Installers
- $GVFSVersion$
- Microsoft
- false
- GVFS and G4W installers
-
-
-
-
-
-
-",
- this.GVFSSetupPath,
- this.PackagesPath,
- this.GitPackageVersion));
-
- return true;
- }
- }
-}
diff --git a/GVFS/GVFS.Build/GenerateGitVersionConstants.cs b/GVFS/GVFS.Build/GenerateGitVersionConstants.cs
deleted file mode 100644
index 71caf79c7c..0000000000
--- a/GVFS/GVFS.Build/GenerateGitVersionConstants.cs
+++ /dev/null
@@ -1,190 +0,0 @@
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using System;
-using System.IO;
-using System.Linq;
-
-namespace GVFS.PreBuild
-{
- public class GenerateGitVersionConstants : Task
- {
- [Required]
- public string GitPackageVersion { get; set; }
-
- [Required]
- public string PackagesPath { get; set; }
-
- [Required]
- public string OutputFile {get; set; }
-
- [Output]
- public string LatestInstaller { get; set; }
-
- [Output]
- public string LatestInstallerFilename { get; set; }
-
- public override bool Execute()
- {
- this.Log.LogMessage(MessageImportance.High, "Creating constants for Git package " + this.GitPackageVersion);
-
- string installerDirectory = Path.Combine(
- this.PackagesPath,
- "GitForWindows.GVFS.Installer." + this.GitPackageVersion,
- "tools");
-
- if (!Directory.Exists(installerDirectory))
- {
- this.Log.LogError("Git package not found. Re-run your build to allow the package to be downloaded by Visual Studio.");
- return false;
- }
-
- this.LatestInstaller = Path.GetFullPath(Directory.EnumerateFiles(installerDirectory).Single());
- this.LatestInstallerFilename = Path.GetFileName(this.LatestInstaller);
- GitVersion version;
- if (!GitVersion.TryParseInstallerName(this.LatestInstallerFilename, out version))
- {
- this.Log.LogError("Unable to parse git version: " + this.LatestInstallerFilename);
- return false;
- }
-
- this.Log.LogMessage(MessageImportance.High, "Found Git version " + version.ToString());
-
- string projectOutputPath = Path.GetDirectoryName(this.OutputFile);
- if (!Directory.Exists(projectOutputPath))
- {
- Directory.CreateDirectory(projectOutputPath);
- }
-
- File.WriteAllText(
- this.OutputFile,
- string.Format(
-@"// This file is auto-generated by GVFS.PreBuild.GenerateGitVersionConstants. Any changes made directly in this file will be lost.
-using GVFS.Common.Git;
-
-namespace GVFS.Common
-{{
- public static partial class GVFSConstants
- {{
- public static readonly GitVersion SupportedGitVersion = new GitVersion({0}, {1}, {2}, ""{3}"", {4}, {5});
- }}
-}}",
- version.Major,
- version.Minor,
- version.Build,
- version.Platform,
- version.Revision,
- version.MinorRevision));
-
- return true;
- }
-
- // This class was partially copied from GVFS.Common.Git.GitVersion for the parsing
- private class GitVersion
- {
- private GitVersion(int major, int minor, int build, string platform, int revision, int minorRevision)
- {
- this.Major = major;
- this.Minor = minor;
- this.Build = build;
- this.Platform = platform;
- this.Revision = revision;
- this.MinorRevision = minorRevision;
- }
-
- public int Major { get; private set; }
- public int Minor { get; private set; }
- public string Platform { get; private set; }
- public int Build { get; private set; }
- public int Revision { get; private set; }
- public int MinorRevision { get; private set; }
-
- public static bool TryParseInstallerName(string input, out GitVersion version)
- {
- // Installer name is of the form
- // Git-2.14.1.gvfs.1.1.gb16030b-64-bit.exe
-
- version = null;
-
- if (!input.StartsWith("Git-", StringComparison.InvariantCultureIgnoreCase))
- {
- return false;
- }
-
- if (!input.EndsWith("-64-bit.exe", StringComparison.InvariantCultureIgnoreCase))
- {
- return false;
- }
-
- return TryParseVersion(input.Substring(4, input.Length - 15), out version);
- }
-
- private static bool TryParseVersion(string input, out GitVersion version)
- {
- version = null;
- int major, minor, build, revision, minorRevision;
-
- if (string.IsNullOrWhiteSpace(input))
- {
- return false;
- }
-
- string[] parsedComponents = input.Split(new char[] { '.' });
- int parsedComponentsLength = parsedComponents.Length;
- if (parsedComponentsLength < 5)
- {
- return false;
- }
-
- if (!TryParseComponent(parsedComponents[0], out major))
- {
- return false;
- }
-
- if (!TryParseComponent(parsedComponents[1], out minor))
- {
- return false;
- }
-
- if (!TryParseComponent(parsedComponents[2], out build))
- {
- return false;
- }
-
- if (!TryParseComponent(parsedComponents[4], out revision))
- {
- return false;
- }
-
- if (parsedComponentsLength < 6 || !TryParseComponent(parsedComponents[5], out minorRevision))
- {
- minorRevision = 0;
- }
-
- string platform = parsedComponents[3];
-
- version = new GitVersion(major, minor, build, platform, revision, minorRevision);
- return true;
- }
-
- public override string ToString()
- {
- return string.Format("{0}.{1}.{2}.{3}.{4}.{5}", this.Major, this.Minor, this.Build, this.Platform, this.Revision, this.MinorRevision);
- }
-
- private static bool TryParseComponent(string component, out int parsedComponent)
- {
- if (!int.TryParse(component, out parsedComponent))
- {
- return false;
- }
-
- if (parsedComponent < 0)
- {
- return false;
- }
-
- return true;
- }
- }
- }
-}
diff --git a/GVFS/GVFS.Build/GenerateInstallScripts.cs b/GVFS/GVFS.Build/GenerateInstallScripts.cs
deleted file mode 100644
index 6ba1129b03..0000000000
--- a/GVFS/GVFS.Build/GenerateInstallScripts.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using System.IO;
-using System.Text;
-
-namespace GVFS.PreBuild
-{
- public class GenerateInstallScripts : Task
- {
- [Required]
- public string GitInstallerFilename { get; set; }
-
- [Required]
- public string VFSForGitSetupFilename { get; set; }
-
- [Required]
- public string GitInstallBatPath { get; set; }
-
- [Required]
- public string VFSForGitInstallBatPath { get; set; }
-
- [Required]
- public string UnifiedInstallBatPath { get; set; }
-
- public override bool Execute()
- {
- this.Log.LogMessage(MessageImportance.High, "Creating install scripts for " + this.GitInstallerFilename);
-
- File.WriteAllText(
- this.GitInstallBatPath,
- this.GetGitInstallCommand());
-
- File.WriteAllText(
- this.VFSForGitInstallBatPath,
- this.GetVFSForGitInstallCommand());
-
- StringBuilder sb = new StringBuilder();
- sb.AppendLine("REM AUTOGENERATED DO NOT EDIT");
- sb.AppendLine();
- sb.AppendLine(this.GetGitInstallCommand());
- sb.AppendLine();
- sb.AppendLine(this.GetVFSForGitInstallCommand());
-
- File.WriteAllText(
- this.UnifiedInstallBatPath,
- sb.ToString());
-
- return true;
- }
-
- public string GetGitInstallCommand()
- {
- return "%~dp0\\" + this.GitInstallerFilename + @" /DIR=""C:\Program Files\Git"" /NOICONS /COMPONENTS=""ext,ext\shellhere,ext\guihere,assoc,assoc_sh"" /GROUP=""Git"" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLOWDOWNGRADE=1";
- }
-
- public string GetVFSForGitInstallCommand()
- {
- return "%~dp0\\" + this.VFSForGitSetupFilename + " /VERYSILENT /SUPPRESSMSGBOXES /NORESTART";
- }
- }
-}
diff --git a/GVFS/GVFS.Build/GenerateVersionInfo.cs b/GVFS/GVFS.Build/GenerateVersionInfo.cs
deleted file mode 100644
index ba69848012..0000000000
--- a/GVFS/GVFS.Build/GenerateVersionInfo.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using System.IO;
-
-namespace GVFS.PreBuild
-{
- public class GenerateVersionInfo : Task
- {
- [Required]
- public string Version { get; set; }
-
- [Required]
- public string BuildOutputPath { get; set; }
-
- [Required]
- public string AssemblyVersion { get; set; }
-
- [Required]
- public string VersionHeader { get; set; }
-
- public override bool Execute()
- {
- this.Log.LogMessage(MessageImportance.High, "Creating version files");
-
- EnsureParentDirectoryExistsFor(this.AssemblyVersion);
- File.WriteAllText(
- this.AssemblyVersion,
- string.Format(
-@"using System.Reflection;
-
-[assembly: AssemblyVersion(""{0}"")]
-[assembly: AssemblyFileVersion(""{0}"")]
-",
- this.Version));
-
- string commaDelimetedVersion = this.Version.Replace('.', ',');
- EnsureParentDirectoryExistsFor(this.VersionHeader);
- File.WriteAllText(
- this.VersionHeader,
- string.Format(
-@"
-#define GVFS_FILE_VERSION {0}
-#define GVFS_FILE_VERSION_STRING ""{1}""
-#define GVFS_PRODUCT_VERSION {0}
-#define GVFS_PRODUCT_VERSION_STRING ""{1}""
-",
- commaDelimetedVersion,
- this.Version));
-
- return true;
- }
-
- private void EnsureParentDirectoryExistsFor(string filename)
- {
- string directory = Path.GetDirectoryName(filename);
- if (!Directory.Exists(directory))
- {
- Directory.CreateDirectory(directory);
- }
-
- }
- }
-}
diff --git a/GVFS/GVFS.Build/ProjFS.props b/GVFS/GVFS.Build/ProjFS.props
deleted file mode 100644
index 0870080599..0000000000
--- a/GVFS/GVFS.Build/ProjFS.props
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- GVFS.ProjFS.2019.411.1
- Microsoft.Windows.ProjFS.1.1.19156.1
-
-
diff --git a/GVFS/GVFS.Common/GVFS.Common.csproj b/GVFS/GVFS.Common/GVFS.Common.csproj
index 8934376fd6..9cc9a5cb8c 100644
--- a/GVFS/GVFS.Common/GVFS.Common.csproj
+++ b/GVFS/GVFS.Common/GVFS.Common.csproj
@@ -1,38 +1,32 @@
-
-
-
-
+
- netcoreapp2.1;netstandard2.0
- x64
+ net461
true
- true
-
-
- $(GVFSVersion)
-
-
- $(GVFSVersion)
-
-
-
-
-
-
- all
-
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GVFS/GVFS.Common/GVFSPlatform.cs b/GVFS/GVFS.Common/GVFSPlatform.cs
index 0e834aaebf..7c252d4934 100644
--- a/GVFS/GVFS.Common/GVFSPlatform.cs
+++ b/GVFS/GVFS.Common/GVFSPlatform.cs
@@ -78,28 +78,8 @@ public static void Register(GVFSPlatform platform)
public abstract bool IsElevated();
public abstract string GetCurrentUser();
public abstract string GetUserIdFromLoginSessionId(int sessionId, ITracer tracer);
-
- ///
- /// Get the directory for upgrades that is permissioned to
- /// require elevated privileges to modify. This can be used for
- /// data that we don't want normal user accounts to modify.
- ///
- public abstract string GetUpgradeProtectedDataDirectory();
-
- ///
- /// Directory that upgrader log directory should be placed
- /// in. There can be multiple log directories, so this is the
- /// containing directory to place them in.
- ///
- public abstract string GetUpgradeLogDirectoryParentDirectory();
public abstract string GetSystemInstallerLogPath();
- ///
- /// Directory that contains the file indicating that a new
- /// version is available.
- ///
- public abstract string GetUpgradeHighestAvailableVersionDirectory();
-
public abstract void ConfigureVisualStudio(string gitBinPath, ITracer tracer);
public abstract bool TryCopyPanicLogs(string copyToDir, out string error);
@@ -125,10 +105,6 @@ public abstract FileBasedLock CreateFileBasedLock(
ITracer tracer,
string lockPath);
- public abstract ProductUpgraderPlatformStrategy CreateProductUpgraderPlatformInteractions(
- PhysicalFileSystem fileSystem,
- ITracer tracer);
-
public bool TryGetNormalizedPathRoot(string path, out string pathRoot, out string errorMessage)
{
pathRoot = null;
@@ -229,11 +205,6 @@ public string MountExecutableName
{
get { return "GVFS.Mount" + this.ExecutableExtension; }
}
-
- public string GVFSUpgraderExecutableName
- {
- get { return "GVFS.Upgrader" + this.ExecutableExtension; }
- }
}
public class UnderConstructionFlags
diff --git a/GVFS/GVFS.Common/Git/LibGit2Repo.cs b/GVFS/GVFS.Common/Git/LibGit2Repo.cs
index 8ea258a9c4..c1056def32 100644
--- a/GVFS/GVFS.Common/Git/LibGit2Repo.cs
+++ b/GVFS/GVFS.Common/Git/LibGit2Repo.cs
@@ -174,7 +174,7 @@ public static class Native
{
public const uint SuccessCode = 0;
- public const string Git2NativeLibName = "git2";
+ public const string Git2NativeLibName = GVFSConstants.LibGit2LibraryName;
public enum ObjectTypes
{
diff --git a/GVFS/GVFS.Common/GitHubUpgrader.cs b/GVFS/GVFS.Common/GitHubUpgrader.cs
deleted file mode 100644
index b2543db256..0000000000
--- a/GVFS/GVFS.Common/GitHubUpgrader.cs
+++ /dev/null
@@ -1,687 +0,0 @@
-using GVFS.Common.FileSystem;
-using GVFS.Common.Git;
-using GVFS.Common.Tracing;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Net;
-using System.Net.Http;
-using System.Net.Http.Headers;
-using System.Runtime.Serialization;
-using System.Runtime.Serialization.Json;
-using System.Threading.Tasks;
-
-namespace GVFS.Common
-{
- public class GitHubUpgrader : ProductUpgrader
- {
- private const string GitHubReleaseURL = @"https://api.github.com/repos/microsoft/vfsforgit/releases";
- private const string JSONMediaType = @"application/vnd.github.v3+json";
- private const string UserAgent = @"GVFS_Auto_Upgrader";
- private const string CommonInstallerArgs = "/VERYSILENT /CLOSEAPPLICATIONS /SUPPRESSMSGBOXES /NORESTART";
- private const string GVFSInstallerArgs = CommonInstallerArgs + " /REMOUNTREPOS=false";
- private const string GitInstallerArgs = CommonInstallerArgs + " /ALLOWDOWNGRADE=1";
- private const string GitAssetId = "Git";
- private const string GVFSAssetId = "GVFS";
- private const string GitInstallerFileNamePrefix = "Git-";
- private const string GVFSSigner = "Microsoft Corporation";
- private const string GVFSCertIssuer = "Microsoft Code Signing PCA";
- private const string GitSigner = "Johannes Schindelin";
- private const string GitCertIssuer = "COMODO RSA Code Signing CA";
-
- private static readonly HashSet GVFSInstallerFileNamePrefixCandidates = new HashSet(GVFSPlatform.Instance.Constants.PathComparer)
- {
- "SetupGVFS",
- "VFSForGit"
- };
-
- private Version newestVersion;
- private Release newestRelease;
-
- public GitHubUpgrader(
- string currentVersion,
- ITracer tracer,
- PhysicalFileSystem fileSystem,
- GitHubUpgraderConfig upgraderConfig,
- bool dryRun = false,
- bool noVerify = false)
- : base(currentVersion, tracer, dryRun, noVerify, fileSystem)
- {
- this.Config = upgraderConfig;
- }
-
- public GitHubUpgraderConfig Config { get; private set; }
-
- public override bool SupportsAnonymousVersionQuery { get => true; }
-
- public static GitHubUpgrader Create(
- ITracer tracer,
- PhysicalFileSystem fileSystem,
- LocalGVFSConfig gvfsConfig,
- bool dryRun,
- bool noVerify,
- out string error)
- {
- return Create(tracer, fileSystem, dryRun, noVerify, gvfsConfig, out error);
- }
-
- public static GitHubUpgrader Create(
- ITracer tracer,
- PhysicalFileSystem fileSystem,
- bool dryRun,
- bool noVerify,
- LocalGVFSConfig localConfig,
- out string error)
- {
- GitHubUpgrader upgrader = null;
- GitHubUpgraderConfig gitHubUpgraderConfig = new GitHubUpgraderConfig(tracer, localConfig);
-
- if (!gitHubUpgraderConfig.TryLoad(out error))
- {
- return null;
- }
-
- if (gitHubUpgraderConfig.ConfigError())
- {
- gitHubUpgraderConfig.ConfigAlertMessage(out error);
- return null;
- }
-
- upgrader = new GitHubUpgrader(
- ProcessHelper.GetCurrentProcessVersion(),
- tracer,
- fileSystem,
- gitHubUpgraderConfig,
- dryRun,
- noVerify);
-
- return upgrader;
- }
-
- public override bool UpgradeAllowed(out string message)
- {
- return this.Config.UpgradeAllowed(out message);
- }
-
- public override bool TryQueryNewestVersion(
- out Version newVersion,
- out string message)
- {
- List releases;
-
- newVersion = null;
- if (this.TryFetchReleases(out releases, out message))
- {
- foreach (Release nextRelease in releases)
- {
- Version releaseVersion = null;
-
- if (nextRelease.Ring <= this.Config.UpgradeRing &&
- nextRelease.TryParseVersion(out releaseVersion) &&
- releaseVersion > this.installedVersion)
- {
- newVersion = releaseVersion;
- this.newestVersion = releaseVersion;
- this.newestRelease = nextRelease;
- message = $"New GVFS version {newVersion.ToString()} available in ring {this.Config.UpgradeRing}.";
- break;
- }
- }
-
- if (newVersion == null)
- {
- message = $"Great news, you're all caught up on upgrades in the {this.Config.UpgradeRing} ring!";
- }
-
- return true;
- }
-
- return false;
- }
-
- public override bool TryDownloadNewestVersion(out string errorMessage)
- {
- if (!this.TryCreateAndConfigureDownloadDirectory(this.tracer, out errorMessage))
- {
- this.tracer.RelatedError($"{nameof(GitHubUpgrader)}.{nameof(this.TryCreateAndConfigureDownloadDirectory)} failed. {errorMessage}");
- return false;
- }
-
- bool downloadedGit = false;
- bool downloadedGVFS = false;
-
- foreach (Asset asset in this.newestRelease.Assets)
- {
- bool targetOSMatch = string.Equals(Path.GetExtension(asset.Name), GVFSPlatform.Instance.Constants.InstallerExtension, GVFSPlatform.Instance.Constants.PathComparison);
- bool isGitAsset = this.IsGitAsset(asset);
- bool isGVFSAsset = isGitAsset ? false : this.IsGVFSAsset(asset);
- if (!targetOSMatch || (!isGVFSAsset && !isGitAsset))
- {
- continue;
- }
-
- if (!this.TryDownloadAsset(asset, out errorMessage))
- {
- errorMessage = $"Could not download {(isGVFSAsset ? GVFSAssetId : GitAssetId)} installer. {errorMessage}";
- return false;
- }
- else
- {
- downloadedGit = isGitAsset ? true : downloadedGit;
- downloadedGVFS = isGVFSAsset ? true : downloadedGVFS;
- }
- }
-
- if (!downloadedGit || !downloadedGVFS)
- {
- errorMessage = $"Could not find {(!downloadedGit ? GitAssetId : GVFSAssetId)} installer in the latest release.";
- return false;
- }
-
- errorMessage = null;
- return true;
- }
-
- public override bool TryRunInstaller(InstallActionWrapper installActionWrapper, out string error)
- {
- string localError;
-
- this.TryGetGitVersion(out GitVersion newGitVersion, out localError);
-
- if (!installActionWrapper(
- () =>
- {
- if (!this.TryInstallUpgrade(GitAssetId, newGitVersion.ToString(), out localError))
- {
- return false;
- }
-
- return true;
- },
- $"Installing Git version: {newGitVersion}"))
- {
- error = localError;
- return false;
- }
-
- if (!installActionWrapper(
- () =>
- {
- if (!this.TryInstallUpgrade(GVFSAssetId, this.newestVersion.ToString(), out localError))
- {
- return false;
- }
-
- return true;
- },
- $"Installing GVFS version: {this.newestVersion}"))
- {
- error = localError;
- return false;
- }
-
- this.LogVersionInfo(this.newestVersion, newGitVersion, "Newly Installed Version");
-
- error = null;
- return true;
- }
-
- public override bool TryCleanup(out string error)
- {
- error = string.Empty;
- if (this.newestRelease == null)
- {
- return true;
- }
-
- foreach (Asset asset in this.newestRelease.Assets)
- {
- Exception exception;
- if (!this.TryDeleteDownloadedAsset(asset, out exception))
- {
- error += $"Could not delete {asset.LocalPath}. {exception.ToString()}." + Environment.NewLine;
- }
- }
-
- if (!string.IsNullOrEmpty(error))
- {
- error.TrimEnd(Environment.NewLine.ToCharArray());
- return false;
- }
-
- error = null;
- return true;
- }
-
- protected virtual bool TryDeleteDownloadedAsset(Asset asset, out Exception exception)
- {
- return this.fileSystem.TryDeleteFile(asset.LocalPath, out exception);
- }
-
- protected virtual bool TryDownloadAsset(Asset asset, out string errorMessage)
- {
- errorMessage = null;
-
- string downloadPath = ProductUpgraderInfo.GetAssetDownloadsPath();
- string localPath = Path.Combine(downloadPath, asset.Name);
- WebClient webClient = new WebClient();
-
- try
- {
- webClient.DownloadFile(asset.DownloadURL, localPath);
- asset.LocalPath = localPath;
- }
- catch (WebException webException)
- {
- errorMessage = "Download error: " + webException.Message;
- this.TraceException(webException, nameof(this.TryDownloadAsset), $"Error downloading asset {asset.Name}.");
- return false;
- }
-
- return true;
- }
-
- protected virtual bool TryFetchReleases(out List releases, out string errorMessage)
- {
- HttpClient client = new HttpClient();
-
- client.DefaultRequestHeaders.Accept.Clear();
- client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(JSONMediaType));
- client.DefaultRequestHeaders.Add("User-Agent", UserAgent);
-
- releases = null;
- errorMessage = null;
-
- try
- {
- Stream result = client.GetStreamAsync(GitHubReleaseURL).GetAwaiter().GetResult();
-
- DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(List));
- releases = serializer.ReadObject(result) as List;
- return true;
- }
- catch (HttpRequestException exception)
- {
- errorMessage = string.Format("Network error: could not connect to GitHub({0}). {1}", GitHubReleaseURL, exception.Message);
- this.TraceException(exception, nameof(this.TryFetchReleases), $"Error fetching release info.");
- }
- catch (TaskCanceledException exception)
- {
- // GetStreamAsync can also throw a TaskCanceledException to indicate a timeout
- // https://github.com/dotnet/corefx/issues/20296
- errorMessage = string.Format("Network error: could not connect to GitHub({0}). {1}", GitHubReleaseURL, exception.Message);
- this.TraceException(exception, nameof(this.TryFetchReleases), $"Error fetching release info.");
- }
- catch (SerializationException exception)
- {
- errorMessage = string.Format("Parse error: could not parse releases info from GitHub({0}). {1}", GitHubReleaseURL, exception.Message);
- this.TraceException(exception, nameof(this.TryFetchReleases), $"Error parsing release info.");
- }
-
- return false;
- }
-
- protected virtual void RunInstaller(string path, string args, string certCN, string issuerCN, out int exitCode, out string error)
- {
- using (Stream stream = this.fileSystem.OpenFileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, false))
- {
- string expectedCNPrefix = $"CN={certCN}, ";
- string expectecIssuerCNPrefix = $"CN={issuerCN}";
- string subject;
- string issuer;
- if (!GVFSPlatform.Instance.TryVerifyAuthenticodeSignature(path, out subject, out issuer, out error))
- {
- exitCode = -1;
- return;
- }
-
- if (!subject.StartsWith(expectedCNPrefix) || !issuer.StartsWith(expectecIssuerCNPrefix))
- {
- exitCode = -1;
- error = $"Installer {path} is signed by unknown signer.";
- this.tracer.RelatedError($"Installer {path} is signed by unknown signer. Signed by {subject}, issued by {issuer} expected signer is {certCN}, issuer {issuerCN}.");
- return;
- }
-
- this.RunInstaller(path, args, out exitCode, out error);
- }
- }
-
- private bool TryGetGitVersion(out GitVersion gitVersion, out string error)
- {
- error = null;
-
- foreach (Asset asset in this.newestRelease.Assets)
- {
- if (asset.Name.StartsWith(GitInstallerFileNamePrefix) &&
- GitVersion.TryParseInstallerName(asset.Name, GVFSPlatform.Instance.Constants.InstallerExtension, out gitVersion))
- {
- return true;
- }
- }
-
- error = "Could not find Git version info in newest release";
- gitVersion = null;
-
- return false;
- }
-
- private bool TryInstallUpgrade(string assetId, string version, out string consoleError)
- {
- bool installSuccess = false;
- EventMetadata metadata = new EventMetadata();
- metadata.Add("Upgrade Step", nameof(this.TryInstallUpgrade));
- metadata.Add("AssetId", assetId);
- metadata.Add("Version", version);
-
- using (ITracer activity = this.tracer.StartActivity($"{nameof(this.TryInstallUpgrade)}", EventLevel.Informational, metadata))
- {
- if (!this.TryRunInstaller(assetId, out installSuccess, out consoleError) ||
- !installSuccess)
- {
- this.tracer.RelatedError(metadata, $"{nameof(this.TryInstallUpgrade)} failed. {consoleError}");
- return false;
- }
-
- activity.RelatedInfo("Successfully installed GVFS version: " + version);
- }
-
- return installSuccess;
- }
-
- private bool TryRunInstaller(string assetId, out bool installationSucceeded, out string error)
- {
- error = null;
- installationSucceeded = false;
-
- int exitCode = 0;
- bool launched = this.TryRunInstallerForAsset(assetId, out exitCode, out error);
- installationSucceeded = exitCode == 0;
-
- return launched;
- }
-
- private bool TryRunInstallerForAsset(string assetId, out int installerExitCode, out string error)
- {
- error = null;
- installerExitCode = 0;
-
- bool installerIsRun = false;
- string path;
- string installerArgs;
- if (this.TryGetLocalInstallerPath(assetId, out path, out installerArgs))
- {
- if (!this.dryRun)
- {
- string logFilePath = GVFSEnlistment.GetNewLogFileName(
- ProductUpgraderInfo.GetLogDirectoryPath(),
- Path.GetFileNameWithoutExtension(path),
- this.UpgradeInstanceId,
- this.fileSystem);
-
- string args = installerArgs + " /Log=" + logFilePath;
- string certCN = null;
- string issuerCN = null;
- switch (assetId)
- {
- case GVFSAssetId:
- {
- certCN = GVFSSigner;
- issuerCN = GVFSCertIssuer;
- break;
- }
-
- case GitAssetId:
- {
- certCN = GitSigner;
- issuerCN = GitCertIssuer;
- break;
- }
- }
-
- this.RunInstaller(path, args, certCN, issuerCN, out installerExitCode, out error);
-
- if (installerExitCode != 0 && string.IsNullOrEmpty(error))
- {
- error = assetId + " installer failed. Error log: " + logFilePath;
- }
- }
-
- installerIsRun = true;
- }
- else
- {
- error = "Could not find downloaded installer for " + assetId;
- }
-
- return installerIsRun;
- }
-
- private bool TryGetLocalInstallerPath(string assetId, out string path, out string args)
- {
- foreach (Asset asset in this.newestRelease.Assets)
- {
- if (string.Equals(Path.GetExtension(asset.Name), GVFSPlatform.Instance.Constants.InstallerExtension, GVFSPlatform.Instance.Constants.PathComparison))
- {
- path = asset.LocalPath;
- if (assetId == GitAssetId && this.IsGitAsset(asset))
- {
- args = GitInstallerArgs;
- return true;
- }
-
- if (assetId == GVFSAssetId && this.IsGVFSAsset(asset))
- {
- args = GVFSInstallerArgs;
- return true;
- }
- }
- }
-
- path = null;
- args = null;
- return false;
- }
-
- private bool IsGVFSAsset(Asset asset)
- {
- return this.AssetInstallerNameCompare(asset, GVFSInstallerFileNamePrefixCandidates);
- }
-
- private bool IsGitAsset(Asset asset)
- {
- return this.AssetInstallerNameCompare(asset, new string[] { GitInstallerFileNamePrefix });
- }
-
- private bool AssetInstallerNameCompare(Asset asset, IEnumerable expectedFileNamePrefixes)
- {
- foreach (string fileNamePrefix in expectedFileNamePrefixes)
- {
- if (asset.Name.StartsWith(fileNamePrefix, GVFSPlatform.Instance.Constants.PathComparison))
- {
- return true;
- }
- }
-
- return false;
- }
-
- private void LogVersionInfo(
- Version gvfsVersion,
- GitVersion gitVersion,
- string message)
- {
- EventMetadata metadata = new EventMetadata();
- metadata.Add(nameof(gvfsVersion), gvfsVersion.ToString());
- metadata.Add(nameof(gitVersion), gitVersion.ToString());
-
- this.tracer.RelatedEvent(EventLevel.Informational, message, metadata);
- }
-
- public class GitHubUpgraderConfig
- {
- public GitHubUpgraderConfig(ITracer tracer, LocalGVFSConfig localGVFSConfig)
- {
- this.Tracer = tracer;
- this.LocalConfig = localGVFSConfig;
- }
-
- public enum RingType
- {
- // The values here should be ascending.
- // Invalid - User has set an incorrect ring
- // NoConfig - User has Not set any ring yet
- // None - User has set a valid "None" ring
- // (Fast should be greater than Slow,
- // Slow should be greater than None, None greater than Invalid.)
- // This is required for the correct implementation of Ring based
- // upgrade logic.
- Invalid = 0,
- NoConfig = None - 1,
- None = 10,
- Slow = None + 1,
- Fast = Slow + 1,
- }
-
- public RingType UpgradeRing { get; private set; }
- public LocalGVFSConfig LocalConfig { get; private set; }
- private ITracer Tracer { get; set; }
-
- public bool TryLoad(out string error)
- {
- this.UpgradeRing = RingType.NoConfig;
-
- string ringConfig = null;
- string loadError = "Could not read GVFS Config." + Environment.NewLine + GVFSConstants.UpgradeVerbMessages.SetUpgradeRingCommand;
-
- if (!this.LocalConfig.TryGetConfig(GVFSConstants.LocalGVFSConfig.UpgradeRing, out ringConfig, out error))
- {
- error = loadError;
- return false;
- }
-
- this.ParseUpgradeRing(ringConfig);
- return true;
- }
-
- public void ParseUpgradeRing(string ringConfig)
- {
- if (string.IsNullOrEmpty(ringConfig))
- {
- this.UpgradeRing = RingType.None;
- return;
- }
-
- RingType ringType;
- if (Enum.TryParse(ringConfig, ignoreCase: true, result: out ringType) &&
- Enum.IsDefined(typeof(RingType), ringType) &&
- ringType != RingType.Invalid)
- {
- this.UpgradeRing = ringType;
- }
- else
- {
- this.UpgradeRing = RingType.Invalid;
- }
- }
-
- public bool ConfigError()
- {
- return this.UpgradeRing == RingType.Invalid;
- }
-
- public bool UpgradeAllowed(out string message)
- {
- if (this.UpgradeRing == RingType.Slow || this.UpgradeRing == RingType.Fast)
- {
- message = null;
- return true;
- }
-
- this.ConfigAlertMessage(out message);
- return false;
- }
-
- public void ConfigAlertMessage(out string message)
- {
- message = null;
-
- if (this.UpgradeRing == GitHubUpgraderConfig.RingType.None)
- {
- message = GVFSConstants.UpgradeVerbMessages.NoneRingConsoleAlert + Environment.NewLine + GVFSConstants.UpgradeVerbMessages.SetUpgradeRingCommand;
- }
-
- if (this.UpgradeRing == GitHubUpgraderConfig.RingType.NoConfig)
- {
- message = GVFSConstants.UpgradeVerbMessages.NoRingConfigConsoleAlert + Environment.NewLine + GVFSConstants.UpgradeVerbMessages.SetUpgradeRingCommand;
- }
-
- if (this.UpgradeRing == GitHubUpgraderConfig.RingType.Invalid)
- {
- string ring;
- string error;
- string prefix = string.Empty;
- if (this.LocalConfig.TryGetConfig(GVFSConstants.LocalGVFSConfig.UpgradeRing, out ring, out error))
- {
- prefix = $"Invalid upgrade ring `{ring}` specified in gvfs config. ";
- }
-
- message = prefix + Environment.NewLine + GVFSConstants.UpgradeVerbMessages.SetUpgradeRingCommand;
- }
- }
- }
-
- [DataContract(Name = "asset")]
- protected class Asset
- {
- [DataMember(Name = "name")]
- public string Name { get; set; }
-
- [DataMember(Name = "size")]
- public long Size { get; set; }
-
- [DataMember(Name = "browser_download_url")]
- public Uri DownloadURL { get; set; }
-
- [IgnoreDataMember]
- public string LocalPath { get; set; }
- }
-
- [DataContract(Name = "release")]
- protected class Release
- {
- [DataMember(Name = "name")]
- public string Name { get; set; }
-
- [DataMember(Name = "tag_name")]
- public string Tag { get; set; }
-
- [DataMember(Name = "prerelease")]
- public bool PreRelease { get; set; }
-
- [DataMember(Name = "assets")]
- public List Assets { get; set; }
-
- [IgnoreDataMember]
- public GitHubUpgraderConfig.RingType Ring
- {
- get
- {
- return this.PreRelease == true ? GitHubUpgraderConfig.RingType.Fast : GitHubUpgraderConfig.RingType.Slow;
- }
- }
-
- public bool TryParseVersion(out Version version)
- {
- version = null;
-
- if (this.Tag.StartsWith("v", StringComparison.CurrentCultureIgnoreCase))
- {
- return Version.TryParse(this.Tag.Substring(1), out version);
- }
-
- return false;
- }
- }
- }
-}
diff --git a/GVFS/GVFS.Common/InstallerPreRunChecker.cs b/GVFS/GVFS.Common/InstallerPreRunChecker.cs
deleted file mode 100644
index 021f48f06e..0000000000
--- a/GVFS/GVFS.Common/InstallerPreRunChecker.cs
+++ /dev/null
@@ -1,218 +0,0 @@
-using GVFS.Common;
-using GVFS.Common.Git;
-using GVFS.Common.Tracing;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Threading;
-
-namespace GVFS.Upgrader
-{
- public class InstallerPreRunChecker
- {
- private ITracer tracer;
-
- public InstallerPreRunChecker(ITracer tracer, string commandToRerun)
- {
- this.tracer = tracer;
- this.CommandToRerun = commandToRerun;
- }
-
- protected string CommandToRerun { private get; set; }
-
- public virtual bool TryRunPreUpgradeChecks(out string consoleError)
- {
- using (ITracer activity = this.tracer.StartActivity(nameof(this.TryRunPreUpgradeChecks), EventLevel.Informational))
- {
- if (this.IsUnattended())
- {
- consoleError = $"{GVFSConstants.UpgradeVerbMessages.GVFSUpgrade} is not supported in unattended mode";
- this.tracer.RelatedWarning($"{nameof(this.TryRunPreUpgradeChecks)}: {consoleError}");
- return false;
- }
-
- if (!this.IsGVFSUpgradeAllowed(out consoleError))
- {
- return false;
- }
-
- activity.RelatedInfo($"Successfully finished pre upgrade checks. Okay to run {GVFSConstants.UpgradeVerbMessages.GVFSUpgrade}.");
- }
-
- consoleError = null;
- return true;
- }
-
- // TODO: Move repo mount calls to GVFS.Upgrader project.
- // https://github.com/Microsoft/VFSForGit/issues/293
- public virtual bool TryMountAllGVFSRepos(out string consoleError)
- {
- return this.TryRunGVFSWithArgs("service --mount-all", out consoleError);
- }
-
- public virtual bool TryUnmountAllGVFSRepos(out string consoleError)
- {
- consoleError = null;
- this.tracer.RelatedInfo("Unmounting any mounted GVFS repositories.");
-
- using (ITracer activity = this.tracer.StartActivity(nameof(this.TryUnmountAllGVFSRepos), EventLevel.Informational))
- {
- if (!this.TryRunGVFSWithArgs("service --unmount-all", out consoleError))
- {
- this.tracer.RelatedError($"{nameof(this.TryUnmountAllGVFSRepos)}: {consoleError}");
- return false;
- }
-
- activity.RelatedInfo("Successfully unmounted repositories.");
- }
-
- return true;
- }
-
- public virtual bool IsInstallationBlockedByRunningProcess(out string consoleError)
- {
- consoleError = null;
-
- // While checking for blocking processes like GVFS.Mount immediately after un-mounting,
- // then sometimes GVFS.Mount shows up as running. But if the check is done after waiting
- // for some time, then eventually GVFS.Mount goes away. The retry loop below is to help
- // account for this delay between the time un-mount call returns and when GVFS.Mount
- // actually quits.
- this.tracer.RelatedInfo("Checking if GVFS or dependent processes are running.");
- int retryCount = 10;
- HashSet processList = null;
- while (retryCount > 0)
- {
- if (!this.IsBlockingProcessRunning(out processList))
- {
- break;
- }
-
- Thread.Sleep(TimeSpan.FromMilliseconds(250));
- retryCount--;
- }
-
- if (processList.Count > 0)
- {
- consoleError = string.Join(
- Environment.NewLine,
- "Blocking processes are running.",
- $"Run {this.CommandToRerun} again after quitting these processes - " + string.Join(", ", processList.ToArray()));
- this.tracer.RelatedWarning($"{nameof(this.IsInstallationBlockedByRunningProcess)}: {consoleError}");
- return false;
- }
-
- return true;
- }
-
- protected virtual bool IsElevated()
- {
- return GVFSPlatform.Instance.IsElevated();
- }
-
- protected virtual bool IsGVFSUpgradeSupported()
- {
- return GVFSPlatform.Instance.KernelDriver.IsGVFSUpgradeSupported();
- }
-
- protected virtual bool IsServiceInstalledAndNotRunning()
- {
- GVFSPlatform.Instance.IsServiceInstalledAndRunning(GVFSConstants.Service.ServiceName, out bool isInstalled, out bool isRunning);
-
- return isInstalled && !isRunning;
- }
-
- protected virtual bool IsUnattended()
- {
- return GVFSEnlistment.IsUnattended(this.tracer);
- }
-
- protected virtual bool IsBlockingProcessRunning(out HashSet processes)
- {
- int currentProcessId = Process.GetCurrentProcess().Id;
- Process[] allProcesses = Process.GetProcesses();
- HashSet matchingNames = new HashSet();
-
- foreach (Process process in allProcesses)
- {
- if (process.Id == currentProcessId || !GVFSPlatform.Instance.Constants.UpgradeBlockingProcesses.Contains(process.ProcessName))
- {
- continue;
- }
-
- matchingNames.Add(process.ProcessName + " pid:" + process.Id);
- }
-
- processes = matchingNames;
- return processes.Count > 0;
- }
-
- protected virtual bool TryRunGVFSWithArgs(string args, out string consoleError)
- {
- string gvfsDirectory = ProcessHelper.GetProgramLocation(GVFSPlatform.Instance.Constants.ProgramLocaterCommand, GVFSPlatform.Instance.Constants.GVFSExecutableName);
- if (!string.IsNullOrEmpty(gvfsDirectory))
- {
- string gvfsPath = Path.Combine(gvfsDirectory, GVFSPlatform.Instance.Constants.GVFSExecutableName);
-
- ProcessResult processResult = ProcessHelper.Run(gvfsPath, args);
- if (processResult.ExitCode == 0)
- {
- consoleError = null;
- return true;
- }
- else
- {
- consoleError = string.IsNullOrEmpty(processResult.Errors) ? $"`gvfs {args}` failed." : processResult.Errors;
- return false;
- }
- }
- else
- {
- consoleError = $"Could not locate {GVFSPlatform.Instance.Constants.GVFSExecutableName}";
- return false;
- }
- }
-
- private bool IsGVFSUpgradeAllowed(out string consoleError)
- {
- bool isConfirmed = string.Equals(this.CommandToRerun, GVFSPlatform.Instance.Constants.UpgradeConfirmCommandMessage, StringComparison.OrdinalIgnoreCase);
- string adviceText = null;
- if (!this.IsElevated())
- {
- adviceText = GVFSPlatform.Instance.Constants.RunUpdateMessage;
- consoleError = string.Join(
- Environment.NewLine,
- "The installer needs to be run with elevated permissions.",
- adviceText);
- this.tracer.RelatedWarning($"{nameof(this.IsGVFSUpgradeAllowed)}: Upgrade is not installable. {consoleError}");
- return false;
- }
-
- if (!this.IsGVFSUpgradeSupported())
- {
- consoleError = string.Join(
- Environment.NewLine,
- $"{GVFSConstants.UpgradeVerbMessages.GVFSUpgrade} is only supported after the \"Windows Projected File System\" optional feature has been enabled by a manual installation of VFS for Git, and only on versions of Windows that support this feature.",
- "Check your team's documentation for how to upgrade.");
- this.tracer.RelatedWarning(metadata: null, message:$"{nameof(this.IsGVFSUpgradeAllowed)}: Upgrade is not installable. {consoleError}", keywords: Keywords.Telemetry);
- return false;
- }
-
- if (this.IsServiceInstalledAndNotRunning())
- {
- adviceText = $"To install, run {GVFSPlatform.Instance.Constants.StartServiceCommandMessage} and run {GVFSPlatform.Instance.Constants.UpgradeConfirmCommandMessage}.";
- consoleError = string.Join(
- Environment.NewLine,
- "GVFS Service is not running.",
- adviceText);
- this.tracer.RelatedWarning($"{nameof(this.IsGVFSUpgradeAllowed)}: Upgrade is not installable. {consoleError}");
- return false;
- }
-
- consoleError = null;
- return true;
- }
- }
-}
diff --git a/GVFS/GVFS.Common/AssemblyInfo.cs b/GVFS/GVFS.Common/InternalsVisibleTo.cs
similarity index 60%
rename from GVFS/GVFS.Common/AssemblyInfo.cs
rename to GVFS/GVFS.Common/InternalsVisibleTo.cs
index a19d69f781..0ba48d81be 100644
--- a/GVFS/GVFS.Common/AssemblyInfo.cs
+++ b/GVFS/GVFS.Common/InternalsVisibleTo.cs
@@ -1,4 +1,3 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("GVFS.UnitTests")]
-[assembly: InternalsVisibleTo("GVFS.UnitTests.Windows")]
diff --git a/GVFS/GVFS.Common/NuGetUpgrade/InstallActionInfo.cs b/GVFS/GVFS.Common/NuGetUpgrade/InstallActionInfo.cs
deleted file mode 100644
index 10a247b124..0000000000
--- a/GVFS/GVFS.Common/NuGetUpgrade/InstallActionInfo.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-namespace GVFS.Common.NuGetUpgrade
-{
- public class InstallActionInfo
- {
- ///
- /// Well known tokens that will be replaced when encountered in an Arguments field.
- ///
- public const string ManifestEntryInstallationIdToken = "installation_id";
- public const string ManifestEntryLogDirectoryToken = "log_directory";
- public const string ManifestEntryInstallerBaseDirectoryToken = "installer_base_path";
-
- public InstallActionInfo(string name, string version, string args, string installerRelativePath, string command)
- {
- this.Name = name;
- this.Version = version;
- this.Args = args;
- this.InstallerRelativePath = installerRelativePath;
- this.Command = command;
- }
-
- ///
- /// The arguments that should be passed to the install command
- ///
- public string Args { get; }
-
- ///
- /// User friendly name for the install action
- ///
- public string Name { get; }
-
- ///
- /// The path to the application or document to start. The path
- /// is relative to the content directory of the NuGet package.
- ///
- public string InstallerRelativePath { get; }
-
- ///
- /// The version of the component that this entry installs
- ///
- public string Version { get; }
-
- ///
- /// The command to run. If this is present, the command is run
- /// directly (with the processed args), and the
- /// InstallerRelativePath property is ignored.
- ///
- public string Command { get; }
- }
-}
diff --git a/GVFS/GVFS.Common/NuGetUpgrade/InstallManifest.cs b/GVFS/GVFS.Common/NuGetUpgrade/InstallManifest.cs
deleted file mode 100644
index 4592a07469..0000000000
--- a/GVFS/GVFS.Common/NuGetUpgrade/InstallManifest.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using Newtonsoft.Json;
-using System.Collections.Generic;
-using System.IO;
-
-namespace GVFS.Common.NuGetUpgrade
-{
- ///
- /// Details on the upgrade included in this package, including information
- /// on what packages are included and how to install them.
- ///
- public class InstallManifest
- {
- public const string WindowsPlatformKey = "Windows";
-
- public InstallManifest()
- {
- this.PlatformInstallManifests = new Dictionary();
- }
-
- ///
- /// Install manifests for different platforms.
- ///
- public Dictionary PlatformInstallManifests { get; private set; }
-
- public static InstallManifest FromJsonFile(string path)
- {
- using (StreamReader streamReader = File.OpenText(path))
- {
- return InstallManifest.FromJson(streamReader);
- }
- }
-
- public static InstallManifest FromJsonString(string json)
- {
- return JsonConvert.DeserializeObject(json);
- }
-
- public static InstallManifest FromJson(StreamReader stream)
- {
- JsonSerializer serializer = new JsonSerializer();
- return (InstallManifest)serializer.Deserialize(stream, typeof(InstallManifest));
- }
-
- public void AddPlatformInstallManifest(string platform, IEnumerable entries)
- {
- InstallManifestPlatform platformManifest = new InstallManifestPlatform(entries);
- this.PlatformInstallManifests.Add(platform, platformManifest);
- }
- }
-}
diff --git a/GVFS/GVFS.Common/NuGetUpgrade/InstallManifestPlatform.cs b/GVFS/GVFS.Common/NuGetUpgrade/InstallManifestPlatform.cs
deleted file mode 100644
index a5ebfaf3f5..0000000000
--- a/GVFS/GVFS.Common/NuGetUpgrade/InstallManifestPlatform.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-
-namespace GVFS.Common.NuGetUpgrade
-{
- public class InstallManifestPlatform
- {
- public InstallManifestPlatform()
- {
- this.InstallActions = new List();
- }
-
- public InstallManifestPlatform(IEnumerable entries)
- {
- this.InstallActions = entries?.ToList() ?? new List();
- }
-
- public List InstallActions { get; }
- }
-}
diff --git a/GVFS/GVFS.Common/NuGetUpgrade/NuGetFeed.cs b/GVFS/GVFS.Common/NuGetUpgrade/NuGetFeed.cs
deleted file mode 100644
index ccfffa6542..0000000000
--- a/GVFS/GVFS.Common/NuGetUpgrade/NuGetFeed.cs
+++ /dev/null
@@ -1,278 +0,0 @@
-using GVFS.Common.Tracing;
-using NuGet.Commands;
-using NuGet.Common;
-using NuGet.Configuration;
-using NuGet.Packaging.Core;
-using NuGet.Protocol;
-using NuGet.Protocol.Core.Types;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace GVFS.Common.NuGetUpgrade
-{
- ///
- /// Handles interactions with a NuGet Feed.
- ///
- public class NuGetFeed : IDisposable
- {
- // This is the SHA256 Certificate Thumbrint we expect packages from Microsoft to be signed with
- private const string TrustedMicrosoftCertFingerprintOld = "3F9001EA83C560D712C24CF213C3D312CB3BFF51EE89435D3430BD06B5D0EECE";
- private const string TrustedMicrosoftCertFingerprintNew = "AA12DA22A49BCE7D5C1AE64CC1F3D892F150DA76140F210ABD2CBFFCA2C18A27";
-
- private readonly ITracer tracer;
- private readonly string feedUrl;
- private readonly string feedName;
- private readonly string downloadFolder;
- private readonly bool platformSupportsEncryption;
-
- private SourceRepository sourceRepository;
- private string personalAccessToken;
- private SourceCacheContext sourceCacheContext;
- private ILogger nuGetLogger;
-
- public NuGetFeed(
- string feedUrl,
- string feedName,
- string downloadFolder,
- string personalAccessToken,
- bool platformSupportsEncryption,
- ITracer tracer)
- {
- this.feedUrl = feedUrl;
- this.feedName = feedName;
- this.downloadFolder = downloadFolder;
- this.personalAccessToken = personalAccessToken;
- this.tracer = tracer;
-
- // Configure the NuGet SourceCacheContext -
- // - Direct download packages - do not download to global
- // NuGet cache. This is set in NullSourceCacheContext.Instance
- // - NoCache - Do not cache package version lists
- this.sourceCacheContext = NullSourceCacheContext.Instance.Clone();
- this.sourceCacheContext.NoCache = true;
- this.platformSupportsEncryption = platformSupportsEncryption;
-
- this.nuGetLogger = new Logger(this.tracer);
- this.SetSourceRepository();
- }
-
- public void Dispose()
- {
- this.sourceRepository = null;
- this.sourceCacheContext?.Dispose();
- this.sourceCacheContext = null;
- }
-
- public virtual void SetCredentials(string credential)
- {
- this.personalAccessToken = credential;
-
- this.SetSourceRepository();
- }
-
- ///
- /// Query a NuGet feed for list of packages that match the packageId.
- ///
- ///
- /// List of packages that match query parameters
- public virtual async Task> QueryFeedAsync(string packageId)
- {
- PackageMetadataResource packageMetadataResource = await this.sourceRepository.GetResourceAsync();
- IEnumerable queryResults = await packageMetadataResource.GetMetadataAsync(
- packageId,
- includePrerelease: false,
- includeUnlisted: false,
- sourceCacheContext: this.sourceCacheContext,
- log: this.nuGetLogger,
- token: CancellationToken.None);
-
- return queryResults.ToList();
- }
-
- ///
- /// Download the specified packageId from the NuGet feed.
- ///
- /// PackageIdentity to download.
- /// Path to the downloaded package.
- public virtual async Task DownloadPackageAsync(PackageIdentity packageId)
- {
- string downloadPath = Path.Combine(this.downloadFolder, $"{this.feedName}.zip");
- PackageDownloadContext packageDownloadContext = new PackageDownloadContext(
- this.sourceCacheContext,
- this.downloadFolder,
- true);
-
- DownloadResource downloadResource = await this.sourceRepository.GetResourceAsync();
-
- using (DownloadResourceResult downloadResourceResult = await downloadResource.GetDownloadResourceResultAsync(
- packageId,
- packageDownloadContext,
- globalPackagesFolder: string.Empty,
- logger : this.nuGetLogger,
- token: CancellationToken.None))
- {
- if (downloadResourceResult.Status != DownloadResourceResultStatus.Available)
- {
- throw new Exception($"Download of NuGet package failed. DownloadResult Status: {downloadResourceResult.Status}");
- }
-
- using (FileStream fileStream = File.Create(downloadPath))
- {
- downloadResourceResult.PackageStream.CopyTo(fileStream);
- }
- }
-
- return downloadPath;
- }
-
- public virtual bool VerifyPackage(string packagePath)
- {
- VerifyArgs verifyArgs = new VerifyArgs()
- {
- Verifications = new VerifyArgs.Verification[] { VerifyArgs.Verification.All },
- PackagePath = packagePath,
- CertificateFingerprint = new List
- {
- TrustedMicrosoftCertFingerprintOld,
- TrustedMicrosoftCertFingerprintNew,
- },
- Logger = this.nuGetLogger
- };
-
- VerifyCommandRunner verifyCommandRunner = new VerifyCommandRunner();
- int result = verifyCommandRunner.ExecuteCommandAsync(verifyArgs).Result;
- return result == 0;
- }
-
- protected static EventMetadata CreateEventMetadata(Exception e = null)
- {
- EventMetadata metadata = new EventMetadata();
- metadata.Add("Area", nameof(NuGetFeed));
- if (e != null)
- {
- metadata.Add("Exception", e.ToString());
- }
-
- return metadata;
- }
-
- private static PackageSourceCredential BuildCredentialsFromPAT(string personalAccessToken, bool storePasswordInClearText)
- {
- // The storePasswordInClearText property is used to control whether the password
- // is written to NuGet config files in clear text or not. It also controls whether the
- // password is stored encrypted in memory or not. The ability to encrypt / decrypt the password
- // is not supported in non-windows platforms at this point.
- // We do not actually write out config files or store the password (except in memory). As in our
- // usage of NuGet functionality we do not write out config files, it is OK to not set this property
- // (with the tradeoff being the password is not encrypted in memory, and we need to make sure that new code
- // does not start to write out config files).
- return PackageSourceCredential.FromUserInput(
- "VfsForGitNugetUpgrader",
- "PersonalAccessToken",
- personalAccessToken,
- storePasswordInClearText: storePasswordInClearText);
- }
-
- private void SetSourceRepository()
- {
- this.sourceRepository = Repository.Factory.GetCoreV3(this.feedUrl);
- if (!string.IsNullOrEmpty(this.personalAccessToken))
- {
- this.sourceRepository.PackageSource.Credentials = BuildCredentialsFromPAT(this.personalAccessToken, !this.platformSupportsEncryption);
- }
- }
-
- ///
- /// Implementation of logger used by NuGet library. It takes all output
- /// and redirects it to the GVFS logger.
- ///
- private class Logger : ILogger
- {
- private ITracer tracer;
-
- public Logger(ITracer tracer)
- {
- this.tracer = tracer;
- }
-
- public void Log(LogLevel level, string data)
- {
- string message = $"NuGet Logger: ({level}): {data}";
- switch (level)
- {
- case LogLevel.Debug:
- case LogLevel.Verbose:
- case LogLevel.Minimal:
- case LogLevel.Information:
- this.tracer.RelatedInfo(message);
- break;
- case LogLevel.Warning:
- this.tracer.RelatedWarning(message);
- break;
- case LogLevel.Error:
- this.tracer.RelatedWarning(message);
- break;
- default:
- this.tracer.RelatedWarning(message);
- break;
- }
- }
-
- public void Log(ILogMessage message)
- {
- this.Log(message.Level, message.Message);
- }
-
- public Task LogAsync(LogLevel level, string data)
- {
- this.Log(level, data);
- return Task.CompletedTask;
- }
-
- public Task LogAsync(ILogMessage message)
- {
- this.Log(message);
- return Task.CompletedTask;
- }
-
- public void LogDebug(string data)
- {
- this.Log(LogLevel.Debug, data);
- }
-
- public void LogError(string data)
- {
- this.Log(LogLevel.Error, data);
- }
-
- public void LogInformation(string data)
- {
- this.Log(LogLevel.Information, data);
- }
-
- public void LogInformationSummary(string data)
- {
- this.Log(LogLevel.Information, data);
- }
-
- public void LogMinimal(string data)
- {
- this.Log(LogLevel.Minimal, data);
- }
-
- public void LogVerbose(string data)
- {
- this.Log(LogLevel.Verbose, data);
- }
-
- public void LogWarning(string data)
- {
- this.Log(LogLevel.Warning, data);
- }
- }
- }
-}
diff --git a/GVFS/GVFS.Common/NuGetUpgrade/NuGetUpgrader.cs b/GVFS/GVFS.Common/NuGetUpgrade/NuGetUpgrader.cs
deleted file mode 100644
index ff724ec6aa..0000000000
--- a/GVFS/GVFS.Common/NuGetUpgrade/NuGetUpgrader.cs
+++ /dev/null
@@ -1,799 +0,0 @@
-using GVFS.Common;
-using GVFS.Common.FileSystem;
-using GVFS.Common.Git;
-using GVFS.Common.Tracing;
-using NuGet.Packaging.Core;
-using NuGet.Protocol.Core.Types;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.IO.Compression;
-using System.Threading;
-
-namespace GVFS.Common.NuGetUpgrade
-{
- public class NuGetUpgrader : ProductUpgrader
- {
- protected readonly NuGetUpgraderConfig nuGetUpgraderConfig;
- protected Version highestVersionAvailable;
-
- private const string ContentDirectoryName = "content";
- private const string InstallManifestFileName = "install-manifest.json";
- private const string ExtractedInstallerDirectoryName = "InstallerTemp";
-
- private InstallManifest installManifest;
- private NuGetFeed nuGetFeed;
- private ICredentialStore credentialStore;
- private bool isNuGetFeedInitialized;
-
- public NuGetUpgrader(
- string currentVersion,
- ITracer tracer,
- PhysicalFileSystem fileSystem,
- bool dryRun,
- bool noVerify,
- NuGetUpgraderConfig config,
- string downloadFolder,
- ICredentialStore credentialStore)
- : this(
- currentVersion,
- tracer,
- dryRun,
- noVerify,
- fileSystem,
- config,
- new NuGetFeed(
- config.FeedUrl,
- config.PackageFeedName,
- downloadFolder,
- null,
- GVFSPlatform.Instance.UnderConstruction.SupportsNuGetEncryption,
- tracer),
- credentialStore,
- GVFSPlatform.Instance.CreateProductUpgraderPlatformInteractions(fileSystem, tracer))
- {
- }
-
- internal NuGetUpgrader(
- string currentVersion,
- ITracer tracer,
- bool dryRun,
- bool noVerify,
- PhysicalFileSystem fileSystem,
- NuGetUpgraderConfig config,
- NuGetFeed nuGetFeed,
- ICredentialStore credentialStore,
- ProductUpgraderPlatformStrategy productUpgraderPlatformStrategy)
- : base(
- currentVersion,
- tracer,
- dryRun,
- noVerify,
- fileSystem,
- productUpgraderPlatformStrategy)
- {
- this.nuGetUpgraderConfig = config;
-
- this.nuGetFeed = nuGetFeed;
- this.credentialStore = credentialStore;
-
- // Extract the folder inside ProductUpgraderInfo.GetAssetDownloadsPath to ensure the
- // correct ACLs are in place
- this.ExtractedInstallerPath = Path.Combine(
- ProductUpgraderInfo.GetAssetDownloadsPath(),
- ExtractedInstallerDirectoryName);
- }
-
- public string DownloadedPackagePath { get; private set; }
-
- public override bool SupportsAnonymousVersionQuery { get => false; }
-
- ///
- /// Path to unzip the downloaded upgrade package
- ///
- private string ExtractedInstallerPath { get; }
-
- ///
- /// Try to load a NuGetUpgrader from config settings.
- /// Flag to indicate whether the system is configured to use a NuGetUpgrader.
- /// A NuGetUpgrader can be set as the Upgrader to use, but it might not be properly configured.
- ///
- /// True if able to load a properly configured NuGetUpgrader
- ///
- public static bool TryCreate(
- ITracer tracer,
- PhysicalFileSystem fileSystem,
- LocalGVFSConfig gvfsConfig,
- ICredentialStore credentialStore,
- bool dryRun,
- bool noVerify,
- out NuGetUpgrader nuGetUpgrader,
- out bool isConfigured,
- out string error)
- {
- NuGetUpgraderConfig upgraderConfig = new NuGetUpgraderConfig(tracer, gvfsConfig);
- nuGetUpgrader = null;
- isConfigured = false;
-
- if (!upgraderConfig.TryLoad(out error))
- {
- nuGetUpgrader = null;
- return false;
- }
-
- if (!(isConfigured = upgraderConfig.IsConfigured(out error)))
- {
- return false;
- }
-
- // At this point, we have determined that the system is set up to use
- // the NuGetUpgrader
-
- if (!upgraderConfig.IsReady(out error))
- {
- return false;
- }
-
- nuGetUpgrader = new NuGetUpgrader(
- ProcessHelper.GetCurrentProcessVersion(),
- tracer,
- fileSystem,
- dryRun,
- noVerify,
- upgraderConfig,
- ProductUpgraderInfo.GetAssetDownloadsPath(),
- credentialStore);
-
- return true;
- }
-
- ///
- /// Performs a replacement on well known strings in the arguments field of a manifest entry.
- ///
- /// The unprocessed string to use as arguments to an install command
- /// A unique installer ID to replace the installer_id token with.
- /// The argument string with tokens replaced.
- public static string ReplaceArgTokens(string src, string installationId, string logsDirectory, string installerBaseDirectory)
- {
- string dst = src
- .Replace(NuGetUpgrader.ReplacementToken(InstallActionInfo.ManifestEntryLogDirectoryToken), logsDirectory)
- .Replace(NuGetUpgrader.ReplacementToken(InstallActionInfo.ManifestEntryInstallationIdToken), installationId)
- .Replace(NuGetUpgrader.ReplacementToken(InstallActionInfo.ManifestEntryInstallerBaseDirectoryToken), installerBaseDirectory);
- return dst;
- }
-
- public override void Dispose()
- {
- this.nuGetFeed?.Dispose();
- this.nuGetFeed = null;
- base.Dispose();
- }
-
- public override bool UpgradeAllowed(out string message)
- {
- if (string.IsNullOrEmpty(this.nuGetUpgraderConfig.FeedUrl))
- {
- message = "Nuget Feed URL has not been configured";
- return false;
- }
- else if (string.IsNullOrEmpty(this.nuGetUpgraderConfig.PackageFeedName))
- {
- message = "NuGet package feed has not been configured";
- return false;
- }
-
- message = null;
- return true;
- }
-
- public override bool TryQueryNewestVersion(out Version newVersion, out string message)
- {
- try
- {
- if (!this.EnsureNuGetFeedInitialized(out message))
- {
- newVersion = null;
- return false;
- }
-
- IList queryResults = this.QueryFeed(firstAttempt: true);
-
- // Find the package with the highest version
- IPackageSearchMetadata newestPackage = null;
- foreach (IPackageSearchMetadata result in queryResults)
- {
- if (newestPackage == null || result.Identity.Version > newestPackage.Identity.Version)
- {
- newestPackage = result;
- }
- }
-
- if (newestPackage != null &&
- newestPackage.Identity.Version.Version > this.installedVersion)
- {
- this.highestVersionAvailable = newestPackage.Identity.Version.Version;
- }
-
- newVersion = this.highestVersionAvailable;
-
- if (newVersion != null)
- {
- this.tracer.RelatedInfo($"{nameof(this.TryQueryNewestVersion)} - new version available: installedVersion: {this.installedVersion}, highestVersionAvailable: {newVersion}");
- message = $"New version {newestPackage.Identity.Version} is available.";
- return true;
- }
- else if (newestPackage != null)
- {
- this.tracer.RelatedInfo($"{nameof(this.TryQueryNewestVersion)} - up-to-date");
- message = $"highest version available is {newestPackage.Identity.Version}, you are up-to-date";
- return true;
- }
- else
- {
- this.tracer.RelatedInfo($"{nameof(this.TryQueryNewestVersion)} - no versions available from feed.");
- message = $"No versions available via feed.";
- }
- }
- catch (Exception ex)
- {
- this.TraceException(
- ex,
- nameof(this.TryQueryNewestVersion),
- "Exception encountered querying for newest version of upgrade package.");
- message = ex.Message;
- newVersion = null;
- }
-
- return false;
- }
-
- public override bool TryDownloadNewestVersion(out string errorMessage)
- {
- if (this.highestVersionAvailable == null)
- {
- // If we hit this code path, it indicates there was a
- // programmer error. The expectation is that this
- // method will only be called after
- // TryQueryNewestVersion has been called, and
- // indicates that a newer version is available.
- errorMessage = "No new version to download. Query for newest version to ensure a new version is available before downloading.";
- return false;
- }
-
- if (!this.EnsureNuGetFeedInitialized(out errorMessage))
- {
- return false;
- }
-
- if (!this.TryCreateAndConfigureDownloadDirectory(this.tracer, out errorMessage))
- {
- this.tracer.RelatedError($"{nameof(NuGetUpgrader)}.{nameof(this.TryCreateAndConfigureDownloadDirectory)} failed. {errorMessage}");
- return false;
- }
-
- using (ITracer activity = this.tracer.StartActivity(nameof(this.TryDownloadNewestVersion), EventLevel.Informational))
- {
- try
- {
- PackageIdentity packageId = this.GetPackageForVersion(this.highestVersionAvailable);
-
- if (packageId == null)
- {
- errorMessage = $"The specified version {this.highestVersionAvailable} was not found in the NuGet feed. Please check with your administrator to make sure the feed is set up correctly.";
- return false;
- }
-
- this.DownloadedPackagePath = this.nuGetFeed.DownloadPackageAsync(packageId).GetAwaiter().GetResult();
- }
- catch (Exception ex)
- {
- this.TraceException(
- activity,
- ex,
- nameof(this.TryDownloadNewestVersion),
- "Exception encountered downloading newest version of upgrade package.");
- errorMessage = ex.Message;
- return false;
- }
- }
-
- if (!this.noVerify)
- {
- if (!this.nuGetFeed.VerifyPackage(this.DownloadedPackagePath))
- {
- errorMessage = "Package signature validation failed. Check the upgrade logs for more details.";
- this.tracer.RelatedError(errorMessage);
- this.fileSystem.DeleteFile(this.DownloadedPackagePath);
- return false;
- }
- }
-
- errorMessage = null;
- return true;
- }
-
- public override bool TryCleanup(out string error)
- {
- return this.TryRecursivelyDeleteInstallerDirectory(out error);
- }
-
- public override bool TryRunInstaller(InstallActionWrapper installActionWrapper, out string error)
- {
- string localError = null;
- int installerExitCode;
- bool installSuccessful = true;
- using (ITracer activity = this.tracer.StartActivity(nameof(this.TryRunInstaller), EventLevel.Informational))
- {
- InstallActionInfo currentInstallAction = null;
- try
- {
- string platformKey = GVFSPlatform.Instance.Name;
-
- if (!this.TryRecursivelyDeleteInstallerDirectory(out error))
- {
- return false;
- }
-
- if (!this.noVerify)
- {
- if (!this.nuGetFeed.VerifyPackage(this.DownloadedPackagePath))
- {
- error = "Package signature validation failed. Check the upgrade logs for more details.";
- activity.RelatedError(error);
- this.fileSystem.DeleteFile(this.DownloadedPackagePath);
- return false;
- }
- }
-
- this.UnzipPackage();
- this.installManifest = InstallManifest.FromJsonFile(Path.Combine(this.ExtractedInstallerPath, ContentDirectoryName, InstallManifestFileName));
- if (!this.installManifest.PlatformInstallManifests.TryGetValue(platformKey, out InstallManifestPlatform platformInstallManifest) ||
- platformInstallManifest == null)
- {
- activity.RelatedError($"Extracted InstallManifest from JSON, but there was no entry for {platformKey}.");
- error = $"No entry in the manifest for the current platform ({platformKey}). Please verify the upgrade package.";
- return false;
- }
-
- activity.RelatedInfo($"Extracted InstallManifest from JSON. InstallActions: {platformInstallManifest.InstallActions.Count}");
-
- foreach (InstallActionInfo entry in platformInstallManifest.InstallActions)
- {
- currentInstallAction = entry;
- string installerBasePath = Path.Combine(this.ExtractedInstallerPath, ContentDirectoryName);
-
- string args = entry.Args ?? string.Empty;
-
- // Replace tokens on args
- string processedArgs = NuGetUpgrader.ReplaceArgTokens(args, this.UpgradeInstanceId, ProductUpgraderInfo.GetLogDirectoryPath(), $"\"{installerBasePath}\"");
-
- activity.RelatedInfo(
- "Running install action: Name: {0}, Version: {1}, InstallerPath: {2}, Command: {3}, RawArgs: {4}, ProcessedArgs: {5}",
- entry.Name,
- entry.Version,
- entry.InstallerRelativePath ?? string.Empty,
- entry.Command ?? string.Empty,
- args,
- processedArgs);
-
- string progressMessage = string.IsNullOrWhiteSpace(entry.Version) ?
- $"Running {entry.Name}" :
- $"Running {entry.Name} (version {entry.Version})";
-
- installActionWrapper(
- () =>
- {
- if (!this.dryRun)
- {
- if (!string.IsNullOrEmpty(entry.Command))
- {
- this.RunInstaller(entry.Command, processedArgs, out installerExitCode, out localError);
- }
- else
- {
- string installerPath = Path.Combine(installerBasePath, entry.InstallerRelativePath);
- this.RunInstaller(installerPath, processedArgs, out installerExitCode, out localError);
- }
- }
- else
- {
- // We add a sleep here to ensure
- // the message for this install
- // action is written to the
- // console. Even though the
- // message is written with a delay
- // of 0, the messages are not
- // always written out. If / when
- // we can ensure that the message
- // is written out to console, then
- // we can remove this sleep.
- Thread.Sleep(1500);
- installerExitCode = 0;
- }
-
- installSuccessful = installerExitCode == 0;
-
- return installSuccessful;
- },
- progressMessage);
-
- if (!installSuccessful)
- {
- break;
- }
- }
- }
- catch (Exception ex)
- {
- localError = ex.Message;
- installSuccessful = false;
- }
-
- if (!installSuccessful)
- {
- this.SaveSystemInstallerLogs();
-
- string installActionName = string.IsNullOrEmpty(currentInstallAction?.Name) ?
- "installer" :
- currentInstallAction.Name;
-
- error = string.IsNullOrEmpty(localError) ?
- $"The {installActionName} failed, but no error message was provided by the failing command." :
- $"The {installActionName} failed with the following error: {localError}";
-
- activity.RelatedError($"Could not complete all install actions. The following error was encountered: {error}");
- return false;
- }
- else
- {
- activity.RelatedInfo($"Install actions completed successfully.");
- error = null;
- return true;
- }
- }
- }
-
- protected static EventMetadata CreateEventMetadata(Exception e = null)
- {
- EventMetadata metadata = new EventMetadata();
- metadata.Add("Area", nameof(NuGetFeed));
- if (e != null)
- {
- metadata.Add("Exception", e.ToString());
- }
-
- return metadata;
- }
-
- private static string ReplacementToken(string tokenString)
- {
- return "{" + tokenString + "}";
- }
-
- private PackageIdentity GetPackageForVersion(Version version)
- {
- IList queryResults = this.QueryFeed(firstAttempt: true);
-
- IPackageSearchMetadata packageForVersion = null;
- foreach (IPackageSearchMetadata result in queryResults)
- {
- if (result.Identity.Version.Version == version)
- {
- packageForVersion = result;
- break;
- }
- }
-
- return packageForVersion?.Identity;
- }
-
- private bool TryGetPersonalAccessToken(string credentialUrl, ITracer tracer, out string token, out string error)
- {
- return this.credentialStore.TryGetCredential(this.tracer, credentialUrl, out string username, out token, out error);
- }
-
- private bool TryReacquirePersonalAccessToken(string credentialUrl, ITracer tracer, out string token, out string error)
- {
- if (!this.credentialStore.TryDeleteCredential(this.tracer, credentialUrl, username: null, password: null, error: out error))
- {
- token = null;
- return false;
- }
-
- return this.TryGetPersonalAccessToken(credentialUrl, tracer, out token, out error);
- }
-
- private void UnzipPackage()
- {
- ZipFile.ExtractToDirectory(this.DownloadedPackagePath, this.ExtractedInstallerPath);
- }
-
- private bool TryRecursivelyDeleteInstallerDirectory(out string error)
- {
- error = null;
- Exception e;
- if (!this.fileSystem.TryDeleteDirectory(this.ExtractedInstallerPath, out e))
- {
- if (e != null)
- {
- this.TraceException(
- e,
- nameof(this.TryRecursivelyDeleteInstallerDirectory),
- $"Exception encountered while deleting {this.ExtractedInstallerPath}.");
- }
-
- error = e?.Message ?? "Failed to delete directory, but no error was specified.";
- return false;
- }
-
- return true;
- }
-
- private IList QueryFeed(bool firstAttempt)
- {
- try
- {
- return this.nuGetFeed.QueryFeedAsync(this.nuGetUpgraderConfig.PackageFeedName).GetAwaiter().GetResult();
- }
- catch (Exception ex) when (firstAttempt &&
- this.IsAuthRelatedException(ex))
- {
- // If we fail to query the feed due to an authorization error, then it is possible we have stale
- // credentials, or credentials without the correct scope. Re-aquire fresh credentials and try again.
- EventMetadata data = CreateEventMetadata(ex);
- this.tracer.RelatedWarning(data, "Failed to query feed due to unauthorized error. Re-acquiring new credentials and trying again.");
-
- if (!this.TryRefreshCredentials(out string error))
- {
- // If we were unable to re-acquire credentials, throw a new exception indicating that we tried to handle this, but were unable to.
- throw new Exception($"Failed to query the feed for upgrade packages due to: {ex.Message}, and was not able to re-acquire new credentials due to: {error}", ex);
- }
-
- // Now that we have re-acquired credentials, try again - but with the retry flag set to false.
- return this.QueryFeed(firstAttempt: false);
- }
- catch (Exception ex)
- {
- EventMetadata data = CreateEventMetadata(ex);
- string message = $"Error encountered when querying NuGet feed. Is first attempt: {firstAttempt}.";
- this.tracer.RelatedWarning(data, message);
- throw new Exception($"Failed to query the NuGet package feed due to error: {ex.Message}", ex);
- }
- }
-
- private bool IsAuthRelatedException(Exception ex)
- {
- // In observation, we have seen either an HttpRequestException directly, or
- // a FatalProtocolException wrapping an HttpRequestException when we are not able
- // to auth against the NuGet feed.
- System.Net.Http.HttpRequestException httpRequestException = null;
- if (ex is System.Net.Http.HttpRequestException)
- {
- httpRequestException = ex as System.Net.Http.HttpRequestException;
- }
- else if (ex is FatalProtocolException &&
- ex.InnerException is System.Net.Http.HttpRequestException)
- {
- httpRequestException = ex.InnerException as System.Net.Http.HttpRequestException;
- }
-
- if (httpRequestException != null &&
- (httpRequestException.Message.Contains("401") || httpRequestException.Message.Contains("403")))
- {
- return true;
- }
-
- return false;
- }
-
- private bool TryRefreshCredentials(out string error)
- {
- try
- {
- string authUrl;
- if (!AzDevOpsOrgFromNuGetFeed.TryCreateCredentialQueryUrl(this.nuGetUpgraderConfig.FeedUrl, out authUrl, out error))
- {
- return false;
- }
-
- if (!this.TryReacquirePersonalAccessToken(authUrl, this.tracer, out string token, out error))
- {
- return false;
- }
-
- this.nuGetFeed.SetCredentials(token);
- return true;
- }
- catch (Exception ex)
- {
- error = ex.Message;
- this.TraceException(ex, nameof(this.TryRefreshCredentials), "Failed to refresh credentials.");
- return false;
- }
- }
-
- private bool EnsureNuGetFeedInitialized(out string error)
- {
- if (!this.isNuGetFeedInitialized)
- {
- if (this.credentialStore == null)
- {
- throw new InvalidOperationException("Attempted to call method that requires authentication but no CredentialStore is configured.");
- }
-
- string authUrl;
- if (!AzDevOpsOrgFromNuGetFeed.TryCreateCredentialQueryUrl(this.nuGetUpgraderConfig.FeedUrl, out authUrl, out error))
- {
- return false;
- }
-
- if (!this.TryGetPersonalAccessToken(authUrl, this.tracer, out string token, out error))
- {
- return false;
- }
-
- this.nuGetFeed.SetCredentials(token);
- this.isNuGetFeedInitialized = true;
- }
-
- error = null;
- return true;
- }
-
- ///
- /// Saves a copy of installer log from platform native installer in the
- /// upgrader diagnose logs directory. On the Mac, it is not possible to
- /// specify custom log file path as command line arg to the installer.
- ///
- private void SaveSystemInstallerLogs()
- {
- if (GVFSPlatform.Instance.SupportsSystemInstallLog)
- {
- string systemInstallerLog = GVFSPlatform.Instance.GetSystemInstallerLogPath();
- if (!string.IsNullOrEmpty(systemInstallerLog))
- {
- string destinationPath = GVFSEnlistment.GetNewGVFSLogFileName(
- ProductUpgraderInfo.GetLogDirectoryPath(),
- GVFSConstants.LogFileTypes.UpgradeSystemInstaller,
- this.UpgradeInstanceId);
-
- try
- {
- using (Stream sourceStream = this.fileSystem.OpenFileStream(
- systemInstallerLog,
- FileMode.Open,
- FileAccess.Read,
- FileShare.ReadWrite,
- callFlushFileBuffers: false))
- using (Stream destStream = this.fileSystem.OpenFileStream(
- destinationPath,
- FileMode.Create,
- FileAccess.Write,
- FileShare.None,
- callFlushFileBuffers: false))
- {
- // Copy the last 100K from the system wide installer log.
- // System wide installer log (/var/log/install.log) holds
- // all messages from installd, including the ones that
- // it generated while installing VFSForGit. We don't
- // need to capture the whole file, which can be lengthy.
- // From my testing, the last 100K captured immediately
- // after upgrade, is found to be lengthy enough to
- // contain all of Git + GCM + Service + VFSForGit
- // installer log messages.
- long hundredKB = 100 * 1024;
- long copyFromOffset = sourceStream.Length > hundredKB ? sourceStream.Length - hundredKB : 0;
-
- sourceStream.Seek(copyFromOffset, SeekOrigin.Begin);
- sourceStream.CopyTo(destStream);
- }
- }
- catch (Exception ex)
- {
- EventMetadata metadata = new EventMetadata();
- metadata.Add("Exception", ex.ToString());
- this.tracer.RelatedError(
- metadata,
- $"{nameof(this.SaveSystemInstallerLogs)} - Error saving native installer log file.");
- }
- }
- else
- {
- this.tracer.RelatedError($"{nameof(this.SaveSystemInstallerLogs)} - Error getting native installer log file path.");
- }
- }
- }
-
- public class NuGetUpgraderConfig
- {
- protected readonly ITracer tracer;
- protected readonly LocalGVFSConfig localConfig;
-
- public NuGetUpgraderConfig(ITracer tracer, LocalGVFSConfig localGVFSConfig)
- {
- this.tracer = tracer;
- this.localConfig = localGVFSConfig;
- }
-
- public NuGetUpgraderConfig(
- ITracer tracer,
- LocalGVFSConfig localGVFSConfig,
- string feedUrl,
- string packageFeedName)
- : this(tracer, localGVFSConfig)
- {
- this.FeedUrl = feedUrl;
- this.PackageFeedName = packageFeedName;
- }
-
- public string FeedUrl { get; private set; }
- public string PackageFeedName { get; private set; }
- public string CertificateFingerprint { get; private set; }
-
- ///
- /// Check if the NuGetUpgrader is ready for use. A
- /// NuGetUpgrader is considered ready if all required
- /// config settings are present.
- ///
- public virtual bool IsReady(out string error)
- {
- if (string.IsNullOrEmpty(this.FeedUrl) ||
- string.IsNullOrEmpty(this.PackageFeedName))
- {
- error = string.Join(
- Environment.NewLine,
- "One or more required settings for NuGetUpgrader are missing.",
- $"Use `gvfs config [{GVFSConstants.LocalGVFSConfig.UpgradeFeedUrl} | {GVFSConstants.LocalGVFSConfig.UpgradeFeedPackageName}] ` to set the config.");
- return false;
- }
-
- error = null;
- return true;
- }
-
- ///
- /// Check if the NuGetUpgrader is configured.
- ///
- public virtual bool IsConfigured(out string error)
- {
- if (string.IsNullOrEmpty(this.FeedUrl) &&
- string.IsNullOrEmpty(this.PackageFeedName))
- {
- error = string.Join(
- Environment.NewLine,
- "NuGet upgrade server is not configured.",
- $"Use `gvfs config [ {GVFSConstants.LocalGVFSConfig.UpgradeFeedUrl} | {GVFSConstants.LocalGVFSConfig.UpgradeFeedPackageName}] ` to set the config.");
- return false;
- }
-
- error = null;
- return true;
- }
-
- ///
- /// Try to load the config for a NuGet upgrader. Returns false if there was an error reading the config.
- ///
- public virtual bool TryLoad(out string error)
- {
- string configValue;
- if (!this.localConfig.TryGetConfig(GVFSConstants.LocalGVFSConfig.UpgradeFeedUrl, out configValue, out error))
- {
- this.tracer.RelatedError(error);
- return false;
- }
-
- this.FeedUrl = configValue;
-
- if (!this.localConfig.TryGetConfig(GVFSConstants.LocalGVFSConfig.UpgradeFeedPackageName, out configValue, out error))
- {
- this.tracer.RelatedError(error);
- return false;
- }
-
- this.PackageFeedName = configValue;
- return true;
- }
- }
- }
-}
diff --git a/GVFS/GVFS.Common/NuGetUpgrade/OrgNuGetUpgrader.cs b/GVFS/GVFS.Common/NuGetUpgrade/OrgNuGetUpgrader.cs
deleted file mode 100644
index dd7f4852b8..0000000000
--- a/GVFS/GVFS.Common/NuGetUpgrade/OrgNuGetUpgrader.cs
+++ /dev/null
@@ -1,244 +0,0 @@
-using GVFS.Common;
-using GVFS.Common.FileSystem;
-using GVFS.Common.Git;
-using GVFS.Common.Tracing;
-using System;
-using System.Net.Http;
-using System.Runtime.Serialization;
-using System.Threading.Tasks;
-
-namespace GVFS.Common.NuGetUpgrade
-{
- public class OrgNuGetUpgrader : NuGetUpgrader
- {
- private HttpClient httpClient;
- private string platform;
-
- public OrgNuGetUpgrader(
- string currentVersion,
- ITracer tracer,
- PhysicalFileSystem fileSystem,
- HttpClient httpClient,
- bool dryRun,
- bool noVerify,
- OrgNuGetUpgraderConfig config,
- string downloadFolder,
- string platform,
- ICredentialStore credentialStore)
- : base(
- currentVersion,
- tracer,
- fileSystem,
- dryRun,
- noVerify,
- config,
- downloadFolder,
- credentialStore)
- {
- this.httpClient = httpClient;
- this.platform = platform;
- }
-
- public OrgNuGetUpgrader(
- string currentVersion,
- ITracer tracer,
- PhysicalFileSystem fileSystem,
- HttpClient httpClient,
- bool dryRun,
- bool noVerify,
- OrgNuGetUpgraderConfig config,
- string platform,
- NuGetFeed nuGetFeed,
- ICredentialStore credentialStore)
- : base(
- currentVersion,
- tracer,
- dryRun,
- noVerify,
- fileSystem,
- config,
- nuGetFeed,
- credentialStore,
- GVFSPlatform.Instance.CreateProductUpgraderPlatformInteractions(fileSystem, tracer))
- {
- this.httpClient = httpClient;
- this.platform = platform;
- }
-
- public override bool SupportsAnonymousVersionQuery { get => true; }
-
- private OrgNuGetUpgraderConfig Config { get => this.nuGetUpgraderConfig as OrgNuGetUpgraderConfig; }
- private string OrgInfoServerUrl { get => this.Config.OrgInfoServer; }
- private string Ring { get => this.Config.UpgradeRing; }
-
- public static bool TryCreate(
- ITracer tracer,
- PhysicalFileSystem fileSystem,
- LocalGVFSConfig gvfsConfig,
- HttpClient httpClient,
- ICredentialStore credentialStore,
- bool dryRun,
- bool noVerify,
- out OrgNuGetUpgrader upgrader,
- out string error)
- {
- OrgNuGetUpgraderConfig upgraderConfig = new OrgNuGetUpgraderConfig(tracer, gvfsConfig);
- upgrader = null;
-
- if (!upgraderConfig.TryLoad(out error))
- {
- upgrader = null;
- return false;
- }
-
- if (!upgraderConfig.IsConfigured(out error))
- {
- return false;
- }
-
- if (!upgraderConfig.IsReady(out error))
- {
- return false;
- }
-
- string platform = GVFSPlatform.Instance.Name;
-
- upgrader = new OrgNuGetUpgrader(
- ProcessHelper.GetCurrentProcessVersion(),
- tracer,
- fileSystem,
- httpClient,
- dryRun,
- noVerify,
- upgraderConfig,
- ProductUpgraderInfo.GetAssetDownloadsPath(),
- platform,
- credentialStore);
-
- return true;
- }
-
- public override bool TryQueryNewestVersion(out Version newVersion, out string message)
- {
- newVersion = null;
-
- if (!AzDevOpsOrgFromNuGetFeed.TryParseOrg(this.Config.FeedUrl, out string orgName))
- {
- message = "OrgNuGetUpgrader is not able to parse org name from NuGet Package Feed URL";
- return false;
- }
-
- OrgInfoApiClient infoServer = new OrgInfoApiClient(this.httpClient, this.OrgInfoServerUrl);
-
- try
- {
- this.highestVersionAvailable = infoServer.QueryNewestVersion(orgName, this.platform, this.Ring);
- }
- catch (Exception exception) when (exception is HttpRequestException ||
- exception is TaskCanceledException)
- {
- // GetStringAsync can also throw a TaskCanceledException to indicate a timeout
- // https://github.com/dotnet/corefx/issues/20296
- message = string.Format("Network error: could not connect to server ({0}). {1}", this.OrgInfoServerUrl, exception.Message);
- this.TraceException(exception, nameof(this.TryQueryNewestVersion), "Error connecting to server.");
-
- return false;
- }
- catch (SerializationException exception)
- {
- message = string.Format("Parse error: could not parse response from server({0}). {1}", this.OrgInfoServerUrl, exception.Message);
- this.TraceException(exception, nameof(this.TryQueryNewestVersion), "Error parsing response from server.");
-
- return false;
- }
- catch (Exception exception) when (exception is ArgumentException ||
- exception is FormatException ||
- exception is OverflowException)
- {
- message = string.Format("Unexpected response from server: could nor parse version({0}). {1}", this.OrgInfoServerUrl, exception.Message);
- this.TraceException(exception, nameof(this.TryQueryNewestVersion), "Error parsing response from server.");
-
- return false;
- }
-
- if (this.highestVersionAvailable != null &&
- this.highestVersionAvailable > this.installedVersion)
- {
- newVersion = this.highestVersionAvailable;
- }
-
- if (newVersion != null)
- {
- this.tracer.RelatedInfo($"{nameof(this.TryQueryNewestVersion)} - new version available: installedVersion: {this.installedVersion}, highestVersionAvailable: {newVersion}");
- message = $"New version {newVersion} is available.";
- return true;
- }
- else if (this.highestVersionAvailable != null)
- {
- this.tracer.RelatedInfo($"{nameof(this.TryQueryNewestVersion)} - up-to-date");
- message = $"Highest version available is {this.highestVersionAvailable}, you are up-to-date";
- return true;
- }
- else
- {
- this.tracer.RelatedInfo($"{nameof(this.TryQueryNewestVersion)} - no versions available from feed.");
- message = "No versions available via endpoint.";
- return true;
- }
- }
-
- public class OrgNuGetUpgraderConfig : NuGetUpgraderConfig
- {
- public OrgNuGetUpgraderConfig(ITracer tracer, LocalGVFSConfig localGVFSConfig)
- : base(tracer, localGVFSConfig)
- {
- }
-
- public string OrgInfoServer { get; set; }
-
- public string UpgradeRing { get; set; }
-
- public override bool TryLoad(out string error)
- {
- if (!base.TryLoad(out error))
- {
- return false;
- }
-
- if (!this.localConfig.TryGetConfig(GVFSConstants.LocalGVFSConfig.OrgInfoServerUrl, out string orgInfoServerUrl, out error))
- {
- this.tracer.RelatedError(error);
- return false;
- }
-
- this.OrgInfoServer = orgInfoServerUrl;
-
- if (!this.localConfig.TryGetConfig(GVFSConstants.LocalGVFSConfig.UpgradeRing, out string upgradeRing, out error))
- {
- this.tracer.RelatedError(error);
- return false;
- }
-
- this.UpgradeRing = upgradeRing;
-
- return true;
- }
-
- public override bool IsReady(out string error)
- {
- if (!base.IsReady(out error) ||
- string.IsNullOrEmpty(this.UpgradeRing) ||
- string.IsNullOrEmpty(this.OrgInfoServer))
- {
- error = string.Join(
- Environment.NewLine,
- "One or more required settings for OrgNuGetUpgrader are missing.",
- "Use `gvfs config [{GVFSConstants.LocalGVFSConfig.UpgradeFeedUrl} | {GVFSConstants.LocalGVFSConfig.UpgradeFeedPackageName} | {GVFSConstants.LocalGVFSConfig.UpgradeRing} | {GVFSConstants.LocalGVFSConfig.OrgInfoServerUrl}] ` to set the config.");
- return false;
- }
-
- return true;
- }
- }
- }
-}
diff --git a/GVFS/GVFS.Common/Prefetch/Git/DiffHelper.cs b/GVFS/GVFS.Common/Prefetch/Git/DiffHelper.cs
index 963efe9227..f55d47d5f6 100644
--- a/GVFS/GVFS.Common/Prefetch/Git/DiffHelper.cs
+++ b/GVFS/GVFS.Common/Prefetch/Git/DiffHelper.cs
@@ -166,37 +166,45 @@ public void ParseDiffFile(string filename)
private void FlushStagedQueues()
{
- List deletedPaths = new List();
- foreach (DiffTreeResult result in this.stagedDirectoryOperations)
+ using (ITracer activity = this.tracer.StartActivity("FlushStagedQueues", EventLevel.Informational))
{
- // Don't enqueue deletes that will be handled by recursively deleting their parent.
- // Git traverses diffs in pre-order, so we are guaranteed to ignore child deletes here.
- if (result.Operation == DiffTreeResult.Operations.Delete)
+ HashSet deletedDirectories =
+ new HashSet(
+ this.stagedDirectoryOperations
+ .Where(d => d.Operation == DiffTreeResult.Operations.Delete)
+ .Select(d => d.TargetPath.TrimEnd(Path.DirectorySeparatorChar)),
+ GVFSPlatform.Instance.Constants.PathComparer);
+
+ foreach (DiffTreeResult result in this.stagedDirectoryOperations)
{
- if (deletedPaths.Any(path => result.TargetPath.StartsWith(path, GVFSPlatform.Instance.Constants.PathComparison)))
+ string parentPath = Path.GetDirectoryName(result.TargetPath.TrimEnd(Path.DirectorySeparatorChar));
+ if (deletedDirectories.Contains(parentPath))
{
- continue;
+ if (result.Operation != DiffTreeResult.Operations.Delete)
+ {
+ EventMetadata metadata = new EventMetadata();
+ metadata.Add(nameof(result.TargetPath), result.TargetPath);
+ metadata.Add(TracingConstants.MessageKey.WarningMessage, "An operation is intended to go inside of a deleted folder");
+ activity.RelatedError("InvalidOperation", metadata);
+ }
+ }
+ else
+ {
+ this.DirectoryOperations.Enqueue(result);
}
-
- deletedPaths.Add(result.TargetPath);
}
- this.DirectoryOperations.Enqueue(result);
- }
-
- foreach (string filePath in this.stagedFileDeletes)
- {
- if (deletedPaths.Any(path => filePath.StartsWith(path, GVFSPlatform.Instance.Constants.PathComparison)))
+ foreach (string filePath in this.stagedFileDeletes)
{
- continue;
+ string parentPath = Path.GetDirectoryName(filePath);
+ if (!deletedDirectories.Contains(parentPath))
+ {
+ this.FileDeleteOperations.Enqueue(filePath);
+ }
}
- deletedPaths.Add(filePath);
-
- this.FileDeleteOperations.Enqueue(filePath);
+ this.RequiredBlobs.CompleteAdding();
}
-
- this.RequiredBlobs.CompleteAdding();
}
private void EnqueueOperationsFromLsTreeLine(ITracer activity, string line)
diff --git a/GVFS/GVFS.Common/Prefetch/Pipeline/BatchObjectDownloadStage.cs b/GVFS/GVFS.Common/Prefetch/Pipeline/BatchObjectDownloadStage.cs
index d9080f1467..81fcee6cef 100644
--- a/GVFS/GVFS.Common/Prefetch/Pipeline/BatchObjectDownloadStage.cs
+++ b/GVFS/GVFS.Common/Prefetch/Pipeline/BatchObjectDownloadStage.cs
@@ -213,7 +213,7 @@ public bool TryTake(out BlobDownloadRequest request)
{
List blobsInChunk = new List();
- for (int i = 0; i < this.chunkSize; ++i)
+ for (int i = 0; i < this.chunkSize;)
{
// Only wait a short while for new work to show up, otherwise go ahead and download what we have accumulated so far
const int TimeoutMs = 100;
@@ -222,6 +222,10 @@ public bool TryTake(out BlobDownloadRequest request)
if (this.missingBlobs.TryTake(out blobId, TimeoutMs))
{
blobsInChunk.Add(blobId);
+
+ // Only increment if a blob was added. Otherwise, if no blobs are added during TimeoutMs * chunkSize,
+ // this will exit early and blobs added later will not be downloaded.
+ ++i;
}
else if (blobsInChunk.Count > 0 ||
this.missingBlobs.IsAddingCompleted)
diff --git a/GVFS/GVFS.Common/ProductUpgrader.cs b/GVFS/GVFS.Common/ProductUpgrader.cs
deleted file mode 100644
index b28330cc25..0000000000
--- a/GVFS/GVFS.Common/ProductUpgrader.cs
+++ /dev/null
@@ -1,258 +0,0 @@
-using GVFS.Common.FileSystem;
-using GVFS.Common.Git;
-using GVFS.Common.NuGetUpgrade;
-using GVFS.Common.Tracing;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Net.Http;
-
-namespace GVFS.Common
-{
- ///
- /// Delegate to wrap install action steps in.
- /// This can be used to report the beginning / end of each install step.
- ///
- /// The method to run inside wrapper
- /// The message to display
- /// success or failure return from the method run.
- public delegate bool InstallActionWrapper(Func method, string message);
-
- public abstract class ProductUpgrader : IDisposable
- {
- protected readonly Version installedVersion;
- protected readonly ITracer tracer;
- protected readonly PhysicalFileSystem fileSystem;
-
- protected bool noVerify;
- protected bool dryRun;
- protected ProductUpgraderPlatformStrategy productUpgraderPlatformStrategy;
-
- protected ProductUpgrader(
- string currentVersion,
- ITracer tracer,
- bool dryRun,
- bool noVerify,
- PhysicalFileSystem fileSystem)
- : this(
- currentVersion,
- tracer,
- dryRun,
- noVerify,
- fileSystem,
- GVFSPlatform.Instance.CreateProductUpgraderPlatformInteractions(fileSystem, tracer))
- {
- }
-
- protected ProductUpgrader(
- string currentVersion,
- ITracer tracer,
- bool dryRun,
- bool noVerify,
- PhysicalFileSystem fileSystem,
- ProductUpgraderPlatformStrategy productUpgraderPlatformStrategy)
- {
- this.installedVersion = new Version(currentVersion);
- this.dryRun = dryRun;
- this.noVerify = noVerify;
- this.tracer = tracer;
- this.fileSystem = fileSystem;
- this.productUpgraderPlatformStrategy = productUpgraderPlatformStrategy;
- }
-
- ///
- /// For mocking purposes only
- ///
- protected ProductUpgrader()
- {
- }
-
- public abstract bool SupportsAnonymousVersionQuery { get; }
-
- public string UpgradeInstanceId { get; set; } = DateTime.Now.ToString("yyyyMMdd_HHmmss");
-
- public static bool TryCreateUpgrader(
- ITracer tracer,
- PhysicalFileSystem fileSystem,
- LocalGVFSConfig gvfsConfig,
- ICredentialStore credentialStore,
- bool dryRun,
- bool noVerify,
- out ProductUpgrader newUpgrader,
- out string error)
- {
- Dictionary entries;
- if (!gvfsConfig.TryGetAllConfig(out entries, out error))
- {
- newUpgrader = null;
- return false;
- }
-
- bool containsUpgradeFeedUrl = entries.ContainsKey(GVFSConstants.LocalGVFSConfig.UpgradeFeedUrl);
- bool containsUpgradePackageName = entries.ContainsKey(GVFSConstants.LocalGVFSConfig.UpgradeFeedPackageName);
- bool containsOrgInfoServerUrl = entries.ContainsKey(GVFSConstants.LocalGVFSConfig.OrgInfoServerUrl);
-
- if (containsUpgradeFeedUrl || containsUpgradePackageName)
- {
- // We are configured for NuGet - determine if we are using OrgNuGetUpgrader or not
- if (containsOrgInfoServerUrl)
- {
- if (OrgNuGetUpgrader.TryCreate(
- tracer,
- fileSystem,
- gvfsConfig,
- new HttpClient(),
- credentialStore,
- dryRun,
- noVerify,
- out OrgNuGetUpgrader orgNuGetUpgrader,
- out error))
- {
- // We were successfully able to load a NuGetUpgrader - use that.
- newUpgrader = orgNuGetUpgrader;
- return true;
- }
- else
- {
- tracer.RelatedError($"{nameof(TryCreateUpgrader)}: Could not create organization based upgrader. {error}");
- newUpgrader = null;
- return false;
- }
- }
- else
- {
- if (NuGetUpgrader.TryCreate(
- tracer,
- fileSystem,
- gvfsConfig,
- credentialStore,
- dryRun,
- noVerify,
- out NuGetUpgrader nuGetUpgrader,
- out bool isConfigured,
- out error))
- {
- // We were successfully able to load a NuGetUpgrader - use that.
- newUpgrader = nuGetUpgrader;
- return true;
- }
- else
- {
- tracer.RelatedError($"{nameof(TryCreateUpgrader)}: Could not create NuGet based upgrader. {error}");
- newUpgrader = null;
- return false;
- }
- }
- }
- else
- {
- newUpgrader = GitHubUpgrader.Create(tracer, fileSystem, gvfsConfig, dryRun, noVerify, out error);
- if (newUpgrader == null)
- {
- tracer.RelatedError($"{nameof(TryCreateUpgrader)}: Could not create GitHub based upgrader. {error}");
- return false;
- }
-
- return true;
- }
- }
-
- public abstract bool UpgradeAllowed(out string message);
-
- public abstract bool TryQueryNewestVersion(out Version newVersion, out string message);
-
- public abstract bool TryDownloadNewestVersion(out string errorMessage);
-
- public abstract bool TryRunInstaller(InstallActionWrapper installActionWrapper, out string error);
-
- public virtual bool TrySetupUpgradeApplicationDirectory(out string upgradeApplicationPath, out string error)
- {
- string upgradeApplicationDirectory = ProductUpgraderInfo.GetUpgradeApplicationDirectory();
-
- if (!this.productUpgraderPlatformStrategy.TryPrepareApplicationDirectory(out error))
- {
- upgradeApplicationPath = null;
- return false;
- }
-
- string currentPath = ProcessHelper.GetCurrentProcessLocation();
- error = null;
- try
- {
- // Copying C:\Program Files\GVFS to inside of C:\Program Files\GVFS\ProgramData\GVFS.Upgrade\Tools
- // directory causes a cycle(at some point we start copying C:\Program Files\GVFS\ProgramData\GVFS.Upgrade
- // and its contents into C:\Program Files\GVFS\ProgramData\GVFS.Upgrade\Tools). The exclusion below is
- // added to avoid this loop.
- HashSet directoriesToExclude = new HashSet(GVFSPlatform.Instance.Constants.PathComparer);
-
- string secureDataRoot = GVFSPlatform.Instance.GetSecureDataRootForGVFS();
- directoriesToExclude.Add(secureDataRoot);
- directoriesToExclude.Add(upgradeApplicationDirectory);
-
- this.tracer.RelatedInfo($"Copying contents of '{currentPath}' to '{upgradeApplicationDirectory}',"
- + $"excluding '{upgradeApplicationDirectory}' and '{secureDataRoot}'");
-
- this.fileSystem.CopyDirectoryRecursive(currentPath, upgradeApplicationDirectory, directoriesToExclude);
- }
- catch (UnauthorizedAccessException e)
- {
- error = string.Join(
- Environment.NewLine,
- "File copy error - " + e.Message,
- $"Make sure you have write permissions to directory {upgradeApplicationDirectory} and run {GVFSPlatform.Instance.Constants.UpgradeConfirmCommandMessage} again.");
- }
- catch (IOException e)
- {
- error = "File copy error - " + e.Message;
- this.TraceException(e, nameof(this.TrySetupUpgradeApplicationDirectory), $"Error copying {currentPath} to {upgradeApplicationDirectory}.");
- }
-
- if (string.IsNullOrEmpty(error))
- {
- // There was no error - set upgradeToolPath and return success.
- upgradeApplicationPath = Path.Combine(
- upgradeApplicationDirectory,
- GVFSPlatform.Instance.Constants.GVFSUpgraderExecutableName);
- return true;
- }
- else
- {
- // Encountered error - do not set upgrade tool path and return failure.
- upgradeApplicationPath = null;
- return false;
- }
- }
-
- public abstract bool TryCleanup(out string error);
-
- public void TraceException(Exception exception, string method, string message)
- {
- this.TraceException(this.tracer, exception, method, message);
- }
-
- public void TraceException(ITracer tracer, Exception exception, string method, string message)
- {
- EventMetadata metadata = new EventMetadata();
- metadata.Add("Method", method);
- metadata.Add("Exception", exception.ToString());
- tracer.RelatedError(metadata, message);
- }
-
- public virtual void Dispose()
- {
- }
-
- protected virtual bool TryCreateAndConfigureDownloadDirectory(ITracer tracer, out string error)
- {
- return this.productUpgraderPlatformStrategy.TryPrepareDownloadDirectory(out error);
- }
-
- protected virtual void RunInstaller(string path, string args, out int exitCode, out string error)
- {
- ProcessResult processResult = ProcessHelper.Run(path, args);
-
- exitCode = processResult.ExitCode;
- error = processResult.Errors;
- }
- }
-}
diff --git a/GVFS/GVFS.Common/ProductUpgraderInfo.Shared.cs b/GVFS/GVFS.Common/ProductUpgraderInfo.Shared.cs
deleted file mode 100644
index 9a8fd367e4..0000000000
--- a/GVFS/GVFS.Common/ProductUpgraderInfo.Shared.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using GVFS.Common.Tracing;
-using System;
-using System.IO;
-
-namespace GVFS.Common
-{
- public partial class ProductUpgraderInfo
- {
- public const string UpgradeDirectoryName = "GVFS.Upgrade";
- public const string LogDirectory = "UpgraderLogs";
- public const string DownloadDirectory = "Downloads";
-
- ///
- /// This is the name of the directory that the Upgrader Application is copied to
- /// when running upgrade. It is called "Tools", as this is what the directory was
- /// originally named, but has since been renamed in code to be more descriptive.
- ///
- public const string ApplicationDirectory = "Tools";
- public const string HighestAvailableVersionFileName = "HighestAvailableVersion";
-
- public static bool IsLocalUpgradeAvailable(ITracer tracer, string highestAvailableVersionDirectory)
- {
- try
- {
- return File.Exists(GetHighestAvailableVersionFilePath(highestAvailableVersionDirectory));
- }
- catch (Exception ex) when (
- ex is IOException ||
- ex is UnauthorizedAccessException ||
- ex is NotSupportedException)
- {
- if (tracer != null)
- {
- tracer.RelatedError(
- CreateEventMetadata(ex),
- "Exception encountered when determining if an upgrade is available.");
- }
- }
-
- return false;
- }
-
- private static string GetHighestAvailableVersionFilePath(string highestAvailableVersionDirectory)
- {
- return Path.Combine(highestAvailableVersionDirectory, HighestAvailableVersionFileName);
- }
-
- private static EventMetadata CreateEventMetadata(Exception e)
- {
- EventMetadata metadata = new EventMetadata();
- if (e != null)
- {
- metadata.Add("Exception", e.ToString());
- }
-
- return metadata;
- }
- }
-}
diff --git a/GVFS/GVFS.Common/ProductUpgraderInfo.cs b/GVFS/GVFS.Common/ProductUpgraderInfo.cs
deleted file mode 100644
index ed097c733a..0000000000
--- a/GVFS/GVFS.Common/ProductUpgraderInfo.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-using GVFS.Common.FileSystem;
-using GVFS.Common.Tracing;
-using System;
-using System.IO;
-
-namespace GVFS.Common
-{
- public partial class ProductUpgraderInfo
- {
- private ITracer tracer;
- private PhysicalFileSystem fileSystem;
-
- public ProductUpgraderInfo(ITracer tracer, PhysicalFileSystem fileSystem)
- {
- this.tracer = tracer;
- this.fileSystem = fileSystem;
- }
-
- public static string CurrentGVFSVersion()
- {
- return ProcessHelper.GetCurrentProcessVersion();
- }
-
- public static string GetUpgradeProtectedDataDirectory()
- {
- return GVFSPlatform.Instance.GetUpgradeProtectedDataDirectory();
- }
-
- public static string GetUpgradeApplicationDirectory()
- {
- return Path.Combine(
- GetUpgradeProtectedDataDirectory(),
- ProductUpgraderInfo.ApplicationDirectory);
- }
-
- public static string GetParentLogDirectoryPath()
- {
- return GVFSPlatform.Instance.GetUpgradeLogDirectoryParentDirectory();
- }
-
- public static string GetLogDirectoryPath()
- {
- return Path.Combine(
- GVFSPlatform.Instance.GetUpgradeLogDirectoryParentDirectory(),
- ProductUpgraderInfo.LogDirectory);
- }
-
- public static string GetAssetDownloadsPath()
- {
- return Path.Combine(
- GVFSPlatform.Instance.GetUpgradeProtectedDataDirectory(),
- ProductUpgraderInfo.DownloadDirectory);
- }
-
- public static string GetHighestAvailableVersionDirectory()
- {
- return GVFSPlatform.Instance.GetUpgradeHighestAvailableVersionDirectory();
- }
-
- public void DeleteAllInstallerDownloads()
- {
- try
- {
- this.fileSystem.DeleteDirectory(GetAssetDownloadsPath());
- }
- catch (Exception ex)
- {
- if (this.tracer != null)
- {
- this.tracer.RelatedError($"{nameof(this.DeleteAllInstallerDownloads)}: Could not remove directory: {ProductUpgraderInfo.GetAssetDownloadsPath()}.{ex.ToString()}");
- }
- }
- }
-
- public void RecordHighestAvailableVersion(Version highestAvailableVersion)
- {
- string highestAvailableVersionFile = GetHighestAvailableVersionFilePath(GetHighestAvailableVersionDirectory());
-
- if (highestAvailableVersion == null)
- {
- if (this.fileSystem.FileExists(highestAvailableVersionFile))
- {
- this.fileSystem.DeleteFile(highestAvailableVersionFile);
-
- if (this.tracer != null)
- {
- this.tracer.RelatedInfo($"{nameof(this.RecordHighestAvailableVersion)}: Deleted upgrade reminder marker file");
- }
- }
- }
- else
- {
- this.fileSystem.WriteAllText(highestAvailableVersionFile, highestAvailableVersion.ToString());
-
- if (this.tracer != null)
- {
- this.tracer.RelatedInfo($"{nameof(this.RecordHighestAvailableVersion)}: Created upgrade reminder marker file");
- }
- }
- }
- }
-}
diff --git a/GVFS/GVFS.Common/ProductUpgraderPlatformStrategy.cs b/GVFS/GVFS.Common/ProductUpgraderPlatformStrategy.cs
deleted file mode 100644
index 776adeaa84..0000000000
--- a/GVFS/GVFS.Common/ProductUpgraderPlatformStrategy.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using GVFS.Common.FileSystem;
-using GVFS.Common.Tracing;
-using System;
-using System.IO;
-
-namespace GVFS.Common
-{
- public abstract class ProductUpgraderPlatformStrategy
- {
- public ProductUpgraderPlatformStrategy(PhysicalFileSystem fileSystem, ITracer tracer)
- {
- this.FileSystem = fileSystem;
- this.Tracer = tracer;
- }
-
- protected PhysicalFileSystem FileSystem { get; }
- protected ITracer Tracer { get; }
-
- public abstract bool TryPrepareLogDirectory(out string error);
-
- public abstract bool TryPrepareApplicationDirectory(out string error);
-
- public abstract bool TryPrepareDownloadDirectory(out string error);
-
- protected void TraceException(Exception exception, string method, string message)
- {
- this.TraceException(this.Tracer, exception, method, message);
- }
-
- protected void TraceException(ITracer tracer, Exception exception, string method, string message)
- {
- EventMetadata metadata = new EventMetadata();
- metadata.Add("Method", method);
- metadata.Add("Exception", exception.ToString());
- tracer.RelatedError(metadata, message);
- }
- }
-}
diff --git a/GVFS/GVFS.Common/Properties/AssemblyInfo.cs b/GVFS/GVFS.Common/Properties/AssemblyInfo.cs
deleted file mode 100644
index 6acb6e0e51..0000000000
--- a/GVFS/GVFS.Common/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("GVFS.Common")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("GVFS.Common")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("9ea6ff63-6bb0-4440-9bfb-0ae79a8f9ba9")]
diff --git a/GVFS/GVFS.FunctionalTests.LockHolder/App.config b/GVFS/GVFS.FunctionalTests.LockHolder/App.config
deleted file mode 100644
index 00bfd114af..0000000000
--- a/GVFS/GVFS.FunctionalTests.LockHolder/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.FunctionalTests.LockHolder/GVFS.FunctionalTests.LockHolder.csproj b/GVFS/GVFS.FunctionalTests.LockHolder/GVFS.FunctionalTests.LockHolder.csproj
index 837fd98698..9a1615fbf3 100644
--- a/GVFS/GVFS.FunctionalTests.LockHolder/GVFS.FunctionalTests.LockHolder.csproj
+++ b/GVFS/GVFS.FunctionalTests.LockHolder/GVFS.FunctionalTests.LockHolder.csproj
@@ -1,42 +1,18 @@
-
+
+ net461
Exe
- netcoreapp2.1
- x64
-
- true
- true
- win-x64;osx-x64
-
-
-
- GVFS.FunctionalTests.LockHolder
- GVFS.FunctionalTests.LockHolder
-
- $(GVFSVersion)
-
-
- $(GVFSVersion)
-
-
-
-
-
+
-
+
-
-
-
-
-
-
- all
-
+
+
+
diff --git a/GVFS/GVFS.FunctionalTests.LockHolder/Properties/AssemblyInfo.cs b/GVFS/GVFS.FunctionalTests.LockHolder/Properties/AssemblyInfo.cs
deleted file mode 100644
index 80fc7a26a1..0000000000
--- a/GVFS/GVFS.FunctionalTests.LockHolder/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("GVFS.FunctionalTests.LockHolder")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("GVFS.FunctionalTests.LockHolder")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("fa273f69-5762-43d8-aea1-b4f08090d624")]
diff --git a/GVFS/GVFS.FunctionalTests.LockHolder/packages.config b/GVFS/GVFS.FunctionalTests.LockHolder/packages.config
deleted file mode 100644
index 4dfb30949a..0000000000
--- a/GVFS/GVFS.FunctionalTests.LockHolder/packages.config
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.FunctionalTests.Windows/GVFS.FunctionalTests.Windows.csproj b/GVFS/GVFS.FunctionalTests.Windows/GVFS.FunctionalTests.Windows.csproj
deleted file mode 100644
index 3f69c0d626..0000000000
--- a/GVFS/GVFS.FunctionalTests.Windows/GVFS.FunctionalTests.Windows.csproj
+++ /dev/null
@@ -1,214 +0,0 @@
-
-
-
-
-
- {0F0A008E-AB12-40EC-A671-37A541B08C7F}
- Exe
- Properties
- GVFS.FunctionalTests.Windows
- GVFS.FunctionalTests.Windows
- v4.6.1
- 512
- 10.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
- False
- UnitTest
- true
-
-
-
-
- true
- DEBUG;TRACE
- full
- x64
- prompt
-
-
- TRACE
- true
- pdbonly
- x64
- prompt
-
-
- GVFS.FunctionalTests.Program
-
-
- Always
-
-
-
- False
- ..\..\..\packages\Microsoft.Database.Collections.Generic.1.9.4\lib\net40\Esent.Collections.dll
- True
-
-
- False
- ..\..\..\packages\ManagedEsent.1.9.4\lib\net40\Esent.Interop.dll
- True
-
-
- False
- ..\..\..\packages\Microsoft.Database.Isam.1.9.4\lib\net40\Esent.Isam.dll
- True
-
-
- ..\..\..\packages\Microsoft.Data.Sqlite.Core.2.2.4\lib\netstandard2.0\Microsoft.Data.Sqlite.dll
-
-
- False
- ..\..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
- True
-
-
- False
- ..\..\..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll
- True
-
-
- ..\..\..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll
-
-
- ..\..\..\packages\NUnitLite.3.12.0\lib\net45\nunitlite.dll
-
-
- ..\..\..\packages\SQLitePCLRaw.bundle_green.1.1.12\lib\net45\SQLitePCLRaw.batteries_green.dll
-
-
- ..\..\..\packages\SQLitePCLRaw.bundle_green.1.1.12\lib\net45\SQLitePCLRaw.batteries_v2.dll
-
-
- ..\..\..\packages\SQLitePCLRaw.core.1.1.12\lib\net45\SQLitePCLRaw.core.dll
-
-
- ..\..\..\packages\SQLitePCLRaw.provider.e_sqlite3.net45.1.1.12\lib\net45\SQLitePCLRaw.provider.e_sqlite3.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
-
-
- NetCore\%(RecursiveDir)\%(Filename)%(Extension)
-
-
-
-
-
-
-
- {72701BC3-5DA9-4C7A-BF10-9E98C9FC8EAC}
- GVFS.Tests
-
-
-
-
-
-
-
-
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
-
-
- xcopy /Y $(BuildOutputDir)\GVFS.Windows\bin\$(Platform)\$(Configuration)\* $(TargetDir)
- xcopy /Y $(BuildOutputDir)\GVFS.Windows\bin\$(Platform)\$(Configuration)\$(Platform)\* $(TargetDir)
- xcopy /Y $(BuildOutputDir)\GVFS.Service.Windows\bin\$(Platform)\$(Configuration)\* $(TargetDir)
- xcopy /Y $(BuildOutputDir)\GVFS.Mount.Windows\bin\$(Platform)\$(Configuration)\* $(TargetDir)
- xcopy /Y $(BuildOutputDir)\GVFS.NativeTests\bin\$(Platform)\$(Configuration)\* $(TargetDir)
- xcopy /Y $(BuildOutputDir)\GVFS.Hooks.Windows\bin\$(Platform)\$(Configuration)\* $(TargetDir)
- mkdir $(TargetDir)\netcoreapp2.1
- xcopy /Y $(BuildOutputDir)\FastFetch\bin\$(Platform)\$(Configuration)\netcoreapp2.1\* $(TargetDir)\netcoreapp2.1
- xcopy /Y $(BuildOutputDir)\GVFS.FunctionalTests.LockHolder\bin\$(Platform)\$(Configuration)\netcoreapp2.1\* $(TargetDir)\netcoreapp2.1
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Properties/AssemblyInfo.cs b/GVFS/GVFS.FunctionalTests.Windows/Properties/AssemblyInfo.cs
deleted file mode 100644
index 313350adff..0000000000
--- a/GVFS/GVFS.FunctionalTests.Windows/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using NUnit.Framework;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("GVFS.FunctionalTests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("GVFS.FunctionalTests")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("0f0a008e-ab12-40ec-a671-37a541b08c7f")]
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epc.log b/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epc.log
deleted file mode 100644
index 0b2ef2f5a3..0000000000
Binary files a/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epc.log and /dev/null differ
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epctmp.log b/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epctmp.log
deleted file mode 100644
index 9e0f96a2a2..0000000000
Binary files a/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epctmp.log and /dev/null differ
diff --git a/GVFS/GVFS.FunctionalTests.Windows/packages.config b/GVFS/GVFS.FunctionalTests.Windows/packages.config
deleted file mode 100644
index 066c75f4e0..0000000000
--- a/GVFS/GVFS.FunctionalTests.Windows/packages.config
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.FunctionalTests/Categories.cs b/GVFS/GVFS.FunctionalTests/Categories.cs
index 613938c57c..7a55e9b687 100644
--- a/GVFS/GVFS.FunctionalTests/Categories.cs
+++ b/GVFS/GVFS.FunctionalTests/Categories.cs
@@ -5,30 +5,6 @@ public static class Categories
public const string ExtraCoverage = "ExtraCoverage";
public const string FastFetch = "FastFetch";
public const string GitCommands = "GitCommands";
-
- // Linux uses a separate device mount for its repository, and so is unable to rename(2) inodes
- // in or out of the repository filesystem; attempts to do so fail with errno set to EXDEV.
- // Therefore, tests which move files or directories across the repository boundary should
- // be flagged with this category so they will be excluded on Linux.
- public const string RepositoryMountsSameFileSystem = "RepositoryMountsSameFileSystem";
-
- public const string WindowsOnly = "WindowsOnly";
- public const string MacOnly = "MacOnly";
- public const string POSIXOnly = "POSIXOnly";
-
- public static class MacTODO
- {
- // Tests that require #360 (detecting/handling new empty folders)
- public const string NeedsNewFolderCreateNotification = "NeedsNewFolderCreateNotification";
-
- // Tests that require the Status Cache to be built
- public const string NeedsStatusCache = "NeedsStatusCache";
-
- // Tests that require Config to be built
- public const string NeedsGVFSConfig = "NeedsConfig";
-
- // Tests requires code updates so that we lock the file instead of looking for a .lock file
- public const string TestNeedsToLockFile = "TestNeedsToLockFile";
- }
+ public const string NeedsReactionInCI = "NeedsReactionInCI";
}
}
diff --git a/GVFS/GVFS.FunctionalTests/FileSystemRunners/BashRunner.cs b/GVFS/GVFS.FunctionalTests/FileSystemRunners/BashRunner.cs
index d3456d0da7..e0d75f013f 100644
--- a/GVFS/GVFS.FunctionalTests/FileSystemRunners/BashRunner.cs
+++ b/GVFS/GVFS.FunctionalTests/FileSystemRunners/BashRunner.cs
@@ -299,15 +299,7 @@ public override long FileSize(string path)
{
string bashPath = this.ConvertWinPathToBashPath(path);
- string statCommand = null;
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- statCommand = string.Format("-c \"stat -f \"%z\" '{0}'\"", bashPath);
- }
- else
- {
- statCommand = string.Format("-c \"stat --format \"%s\" '{0}'\"", bashPath);
- }
+ string statCommand = string.Format("-c \"stat --format \"%s\" '{0}'\"", bashPath);
return long.Parse(this.RunProcess(statCommand));
}
diff --git a/GVFS/GVFS.FunctionalTests/GVFS.FunctionalTests.csproj b/GVFS/GVFS.FunctionalTests/GVFS.FunctionalTests.csproj
index 06ee65c93c..eb0a937ccb 100644
--- a/GVFS/GVFS.FunctionalTests/GVFS.FunctionalTests.csproj
+++ b/GVFS/GVFS.FunctionalTests/GVFS.FunctionalTests.csproj
@@ -1,54 +1,37 @@
-
-
-
- Exe
- netcoreapp2.1
- x64
-
- true
- true
- win-x64;osx-x64
-
+
- GVFS.FunctionalTests
- GVFS.FunctionalTests
-
-
- $(GVFSVersion)
-
-
- $(GVFSVersion)
+ net461
+ Exe
+
+
+
-
-
- all
-
+
+
+ false
+ Content
+ PreserveNewest
+
+
+ false
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GVFS/GVFS.FunctionalTests/GVFSTestConfig.cs b/GVFS/GVFS.FunctionalTests/GVFSTestConfig.cs
index 52c8ffb7f0..aee3f2df82 100644
--- a/GVFS/GVFS.FunctionalTests/GVFSTestConfig.cs
+++ b/GVFS/GVFS.FunctionalTests/GVFSTestConfig.cs
@@ -14,18 +14,13 @@ public static class GVFSTestConfig
public static object[] GitRepoTestsValidateWorkTree { get; set; }
- public static bool TestGVFSOnPath { get; set; }
-
public static bool ReplaceInboxProjFS { get; set; }
public static string PathToGVFS
{
get
{
- return
- TestGVFSOnPath ?
- Properties.Settings.Default.PathToGVFS :
- Path.Combine(Properties.Settings.Default.CurrentDirectory, Properties.Settings.Default.PathToGVFS);
+ return Properties.Settings.Default.PathToGVFS;
}
}
diff --git a/GVFS/GVFS.FunctionalTests/Program.cs b/GVFS/GVFS.FunctionalTests/Program.cs
index 07aa380151..276a7d7011 100644
--- a/GVFS/GVFS.FunctionalTests/Program.cs
+++ b/GVFS/GVFS.FunctionalTests/Program.cs
@@ -5,7 +5,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
-using System.Runtime.InteropServices;
namespace GVFS.FunctionalTests
{
@@ -14,6 +13,11 @@ public class Program
public static void Main(string[] args)
{
Properties.Settings.Default.Initialize();
+ Console.WriteLine("Settings.Default.CurrentDirectory: {0}", Settings.Default.CurrentDirectory);
+ Console.WriteLine("Settings.Default.PathToGit: {0}", Settings.Default.PathToGit);
+ Console.WriteLine("Settings.Default.PathToGVFS: {0}", Settings.Default.PathToGVFS);
+ Console.WriteLine("Settings.Default.PathToGVFSService: {0}", Settings.Default.PathToGVFSService);
+
NUnitRunner runner = new NUnitRunner(args);
runner.AddGlobalSetupIfNeeded("GVFS.FunctionalTests.GlobalSetup");
@@ -23,12 +27,6 @@ public static void Main(string[] args)
GVFSTestConfig.NoSharedCache = true;
}
- if (runner.HasCustomArg("--test-gvfs-on-path"))
- {
- Console.WriteLine("Running tests against GVFS on path");
- GVFSTestConfig.TestGVFSOnPath = true;
- }
-
if (runner.HasCustomArg("--replace-inbox-projfs"))
{
Console.WriteLine("Tests will replace inbox ProjFS");
@@ -51,15 +49,7 @@ public static void Main(string[] args)
}
GVFSTestConfig.GitRepoTestsValidateWorkTree = modes.ToArray();
-
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- GVFSTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.AllWindowsRunners;
- }
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- GVFSTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.AllMacRunners;
- }
+ GVFSTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.AllWindowsRunners;
}
else
{
@@ -89,34 +79,17 @@ public static void Main(string[] args)
excludeCategories.Add(Categories.ExtraCoverage);
}
- GVFSTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.DefaultRunners;
- }
-
- if (runner.HasCustomArg("--windows-only"))
- {
- includeCategories.Add(Categories.WindowsOnly);
-
- // RunTests unions all includeCategories. Remove ExtraCoverage to
- // ensure that we only run tests flagged as WindowsOnly
- includeCategories.Remove(Categories.ExtraCoverage);
- }
+ // If we're running in CI exclude tests that are currently
+ // flakey or broken when run in a CI environment.
+ if (runner.HasCustomArg("--ci"))
+ {
+ excludeCategories.Add(Categories.NeedsReactionInCI);
+ }
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- excludeCategories.Add(Categories.MacTODO.NeedsNewFolderCreateNotification);
- excludeCategories.Add(Categories.MacTODO.NeedsGVFSConfig);
- excludeCategories.Add(Categories.MacTODO.NeedsStatusCache);
- excludeCategories.Add(Categories.MacTODO.TestNeedsToLockFile);
- excludeCategories.Add(Categories.WindowsOnly);
- }
- else
- {
- // Windows excludes.
- excludeCategories.Add(Categories.MacOnly);
- excludeCategories.Add(Categories.POSIXOnly);
+ GVFSTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.DefaultRunners;
}
- GVFSTestConfig.DotGVFSRoot = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? ".vfsforgit" : ".gvfs";
+ GVFSTestConfig.DotGVFSRoot = ".gvfs";
GVFSTestConfig.RepoToClone =
runner.GetCustomArgWithParam("--repo-to-clone")
@@ -134,26 +107,26 @@ public static void Main(string[] args)
private static void RunBeforeAnyTests()
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ if (GVFSTestConfig.ReplaceInboxProjFS)
{
- if (GVFSTestConfig.ReplaceInboxProjFS)
- {
- ProjFSFilterInstaller.ReplaceInboxProjFS();
- }
+ ProjFSFilterInstaller.ReplaceInboxProjFS();
+ }
- GVFSServiceProcess.InstallService();
+ GVFSServiceProcess.InstallService();
- string statusCacheVersionTokenPath = Path.Combine(
- Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles, Environment.SpecialFolderOption.Create),
- "GVFS",
- "ProgramData",
- "GVFS.Service",
- "EnableGitStatusCacheToken.dat");
+ string serviceProgramDataDir = Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles, Environment.SpecialFolderOption.Create),
+ "GVFS",
+ "ProgramData",
+ "GVFS.Service");
- if (!File.Exists(statusCacheVersionTokenPath))
- {
- File.WriteAllText(statusCacheVersionTokenPath, string.Empty);
- }
+ string statusCacheVersionTokenPath = Path.Combine(
+ serviceProgramDataDir, "EnableGitStatusCacheToken.dat");
+
+ if (!File.Exists(statusCacheVersionTokenPath))
+ {
+ Directory.CreateDirectory(serviceProgramDataDir);
+ File.WriteAllText(statusCacheVersionTokenPath, string.Empty);
}
}
}
diff --git a/GVFS/GVFS.FunctionalTests/Settings.cs b/GVFS/GVFS.FunctionalTests/Settings.cs
index 953d09f765..a2b2871632 100644
--- a/GVFS/GVFS.FunctionalTests/Settings.cs
+++ b/GVFS/GVFS.FunctionalTests/Settings.cs
@@ -32,7 +32,8 @@ public static class Default
public static void Initialize()
{
- CurrentDirectory = Path.GetFullPath(Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]));
+ string testExec = System.Reflection.Assembly.GetEntryAssembly().Location;
+ CurrentDirectory = Path.GetFullPath(Path.GetDirectoryName(testExec));
RepoToClone = @"https://gvfs.visualstudio.com/ci/_git/ForTests";
@@ -43,35 +44,17 @@ public static void Initialize()
// ProjFS is fixed and deployed to our build machines.
Commitish = @"FunctionalTests/20201014";
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- EnlistmentRoot = @"C:\Repos\GVFSFunctionalTests\enlistment";
- PathToGVFS = @"GVFS.exe";
- PathToGit = @"C:\Program Files\Git\cmd\git.exe";
- PathToBash = @"C:\Program Files\Git\bin\bash.exe";
-
- ControlGitRepoRoot = @"C:\Repos\GVFSFunctionalTests\ControlRepo";
- FastFetchBaseRoot = @"C:\Repos\GVFSFunctionalTests\FastFetch";
- FastFetchRoot = Path.Combine(FastFetchBaseRoot, "test");
- FastFetchControl = Path.Combine(FastFetchBaseRoot, "control");
- PathToGVFSService = @"GVFS.Service.exe";
- BinaryFileNameExtension = ".exe";
- }
- else
- {
- string root = Path.Combine(
- Environment.GetEnvironmentVariable("HOME"),
- "GVFS.FT");
- EnlistmentRoot = Path.Combine(root, "test");
- ControlGitRepoRoot = Path.Combine(root, "control");
- FastFetchBaseRoot = Path.Combine(root, "FastFetch");
- FastFetchRoot = Path.Combine(FastFetchBaseRoot, "test");
- FastFetchControl = Path.Combine(FastFetchBaseRoot, "control");
- PathToGVFS = "gvfs";
- PathToGit = "/usr/local/bin/git";
- PathToBash = "/bin/bash";
- BinaryFileNameExtension = string.Empty;
- }
+ EnlistmentRoot = @"C:\Repos\GVFSFunctionalTests\enlistment";
+ PathToGVFS = @"C:\Program Files\GVFS\GVFS.exe";
+ PathToGit = @"C:\Program Files\Git\cmd\git.exe";
+ PathToBash = @"C:\Program Files\Git\bin\bash.exe";
+
+ ControlGitRepoRoot = @"C:\Repos\GVFSFunctionalTests\ControlRepo";
+ FastFetchBaseRoot = @"C:\Repos\GVFSFunctionalTests\FastFetch";
+ FastFetchRoot = Path.Combine(FastFetchBaseRoot, "test");
+ FastFetchControl = Path.Combine(FastFetchBaseRoot, "control");
+ PathToGVFSService = @"C:\Program Files\GVFS\GVFS.Service.exe";
+ BinaryFileNameExtension = ".exe";
}
}
}
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/BasicFileSystemTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/BasicFileSystemTests.cs
index 57f491c9fc..1a8925ed1b 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/BasicFileSystemTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/BasicFileSystemTests.cs
@@ -81,7 +81,6 @@ public void FilesAreBufferedAndCanBeFlushed(FileSystemRunner fileSystem, string
}
[TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFolders.Folders))]
- [Category(Categories.WindowsOnly)]
public void NewFileAttributesAreUpdated(string parentFolder)
{
string filename = Path.Combine(parentFolder, "FileAttributesAreUpdated");
@@ -109,7 +108,6 @@ public void NewFileAttributesAreUpdated(string parentFolder)
}
[TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFolders.Folders))]
- [Category(Categories.WindowsOnly)]
public void NewFolderAttributesAreUpdated(string parentFolder)
{
string folderName = Path.Combine(parentFolder, "FolderAttributesAreUpdated");
@@ -136,7 +134,6 @@ public void NewFolderAttributesAreUpdated(string parentFolder)
}
[TestCase]
- [Category(Categories.WindowsOnly)]
public void ExpandedFileAttributesAreUpdated()
{
FileSystemRunner fileSystem = FileSystemRunner.DefaultRunner;
@@ -182,7 +179,6 @@ public void ExpandedFileAttributesAreUpdated()
}
[TestCase]
- [Category(Categories.WindowsOnly)]
public void UnhydratedFolderAttributesAreUpdated()
{
FileSystemRunner fileSystem = FileSystemRunner.DefaultRunner;
@@ -509,10 +505,7 @@ public void CanDeleteHydratedFilesWhileTheyAreOpenForWrite()
virtualPath.ShouldNotExistOnDisk(fileSystem);
}
- // WindowsOnly because file timestamps on Mac are set to the time at which
- // placeholders are written
[TestCase]
- [Category(Categories.WindowsOnly)]
public void ProjectedBlobFileTimesMatchHead()
{
// TODO: 467539 - Update all runners to support getting create/modify/access times
@@ -536,7 +529,6 @@ public void ProjectedBlobFileTimesMatchHead()
}
[TestCase]
- [Category(Categories.WindowsOnly)]
public void ProjectedBlobFolderTimesMatchHead()
{
// TODO: 467539 - Update all runners to support getting create/modify/access times
@@ -814,23 +806,6 @@ public void DeleteIndexFileFails(FileSystemRunner fileSystem)
indexFilePath.ShouldBeAFile(fileSystem);
}
- // On some platforms, a pre-rename event may be delivered prior to a
- // file rename rather than a pre-delete event, so we check this
- // separately from the DeleteIndexFileFails() test case
- // This test is failing on Windows because the CmdRunner succeeds in moving the index file
- [TestCaseSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Runners))]
- [Category(Categories.POSIXOnly)]
- public void MoveIndexFileFails(FileSystemRunner fileSystem)
- {
- string indexFilePath = this.Enlistment.GetVirtualPathTo(Path.Combine(".git", "index"));
- string indexTargetFilePath = this.Enlistment.GetVirtualPathTo(Path.Combine(".git", "index_target"));
- indexFilePath.ShouldBeAFile(fileSystem);
- indexTargetFilePath.ShouldNotExistOnDisk(fileSystem);
- fileSystem.ReplaceFile_AccessShouldBeDenied(indexFilePath, indexTargetFilePath);
- indexFilePath.ShouldBeAFile(fileSystem);
- indexTargetFilePath.ShouldNotExistOnDisk(fileSystem);
- }
-
[TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFolders.Runners))]
public void MoveVirtualNTFSFolderIntoInvalidFolder(FileSystemRunner fileSystem, string parentFolder)
{
@@ -880,7 +855,6 @@ public void MoveVirtualNTFSFolderIntoInvalidFolder(FileSystemRunner fileSystem,
}
[TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFolders.Folders))]
- [Category(Categories.WindowsOnly)]
public void CreateFileInheritsParentDirectoryAttributes(string parentFolder)
{
string parentDirectoryPath = this.Enlistment.GetVirtualPathTo(Path.Combine(parentFolder, "CreateFileInheritsParentDirectoryAttributes"));
@@ -897,7 +871,6 @@ public void CreateFileInheritsParentDirectoryAttributes(string parentFolder)
}
[TestCaseSource(typeof(FileRunnersAndFolders), nameof(FileRunnersAndFolders.Folders))]
- [Category(Categories.WindowsOnly)]
public void CreateDirectoryInheritsParentDirectoryAttributes(string parentFolder)
{
string parentDirectoryPath = this.Enlistment.GetVirtualPathTo(Path.Combine(parentFolder, "CreateDirectoryInheritsParentDirectoryAttributes"));
@@ -913,30 +886,6 @@ public void CreateDirectoryInheritsParentDirectoryAttributes(string parentFolder
FileSystemRunner.DefaultRunner.DeleteDirectory(parentDirectoryPath);
}
- [TestCase]
- [Category(Categories.POSIXOnly)]
- public void RunPythonExecutable()
- {
- GitProcess.Invoke(this.Enlistment.RepoRoot, "checkout FunctionalTests/PythonExecutable");
-
- // Found an issue on Mac where running a python executable that is a placeholder, fails
- // The fix was to always hydrate executables (no placeholders for this mode)
- // To repro this issue in the C# framework the python executable must be run via a wrapper
- string pythonDirectory = Path.Combine(this.Enlistment.RepoRoot, "Test_Executable");
- string pythonExecutable = Path.Combine(pythonDirectory, "python_wrapper.sh");
-
- ProcessStartInfo startInfo = new ProcessStartInfo(pythonExecutable);
- startInfo.RedirectStandardOutput = true;
- startInfo.RedirectStandardError = true;
- startInfo.WorkingDirectory = pythonDirectory;
-
- ProcessResult result = ProcessHelper.Run(startInfo);
- result.ExitCode.ShouldEqual(0);
- result.Output.ShouldContain("3.14");
-
- GitProcess.Invoke(this.Enlistment.RepoRoot, "checkout " + this.Enlistment.Commitish);
- }
-
private void VerifyExistenceAfterDeleteWhileOpen(string filePath, FileSystemRunner fileSystem)
{
if (this.SupportsPosixDelete())
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CloneTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CloneTests.cs
index d67ce5d56a..b554cfb591 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CloneTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/CloneTests.cs
@@ -3,7 +3,7 @@
using GVFS.FunctionalTests.Tools;
using GVFS.Tests.Should;
using NUnit.Framework;
-using System;
+using System;
using System.Diagnostics;
using System.IO;
@@ -46,62 +46,30 @@ public void CloneWithLocalCachePathWithinSrc()
result.Output.ShouldContain("'--local-cache-path' cannot be inside the src folder");
}
- [TestCase]
- [Category(Categories.POSIXOnly)]
- public void CloneWithDefaultLocalCacheLocation()
- {
- FileSystemRunner fileSystem = FileSystemRunner.DefaultRunner;
- string homeDirectory = Environment.GetEnvironmentVariable("HOME");
- homeDirectory.ShouldBeADirectory(fileSystem);
-
- string newEnlistmentRoot = GVFSFunctionalTestEnlistment.GetUniqueEnlistmentRoot();
-
- ProcessStartInfo processInfo = new ProcessStartInfo(GVFSTestConfig.PathToGVFS);
- processInfo.Arguments = $"clone {Properties.Settings.Default.RepoToClone} {newEnlistmentRoot} --no-mount --no-prefetch";
- processInfo.WindowStyle = ProcessWindowStyle.Hidden;
- processInfo.CreateNoWindow = true;
- processInfo.UseShellExecute = false;
- processInfo.RedirectStandardOutput = true;
-
- ProcessResult result = ProcessHelper.Run(processInfo);
- result.ExitCode.ShouldEqual(0, result.Errors);
-
- string dotGVFSRoot = Path.Combine(newEnlistmentRoot, GVFSTestConfig.DotGVFSRoot);
- dotGVFSRoot.ShouldBeADirectory(fileSystem);
- string localCacheRoot = GVFSHelpers.GetPersistedLocalCacheRoot(dotGVFSRoot);
- string gitObjectsRoot = GVFSHelpers.GetPersistedGitObjectsRoot(dotGVFSRoot);
-
- string defaultGVFSCacheRoot = Path.Combine(homeDirectory, ".gvfsCache");
- localCacheRoot.StartsWith(defaultGVFSCacheRoot, StringComparison.Ordinal).ShouldBeTrue($"Local cache root did not default to using {homeDirectory}");
- gitObjectsRoot.StartsWith(defaultGVFSCacheRoot, StringComparison.Ordinal).ShouldBeTrue($"Git objects root did not default to using {homeDirectory}");
-
- RepositoryHelpers.DeleteTestDirectory(newEnlistmentRoot);
- }
-
[TestCase]
public void CloneToPathWithSpaces()
{
GVFSFunctionalTestEnlistment enlistment = GVFSFunctionalTestEnlistment.CloneAndMountEnlistmentWithSpacesInPath(GVFSTestConfig.PathToGVFS);
enlistment.UnmountAndDeleteAll();
- }
-
+ }
+
[TestCase]
public void CloneCreatesCorrectFilesInRoot()
{
GVFSFunctionalTestEnlistment enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(GVFSTestConfig.PathToGVFS);
- try
- {
- string[] files = Directory.GetFiles(enlistment.EnlistmentRoot);
- files.Length.ShouldEqual(1);
- files.ShouldContain(x => Path.GetFileName(x).Equals("git.cmd", StringComparison.Ordinal));
- string[] directories = Directory.GetDirectories(enlistment.EnlistmentRoot);
- directories.Length.ShouldEqual(2);
- directories.ShouldContain(x => Path.GetFileName(x).Equals(GVFSTestConfig.DotGVFSRoot, StringComparison.Ordinal));
- directories.ShouldContain(x => Path.GetFileName(x).Equals("src", StringComparison.Ordinal));
+ try
+ {
+ string[] files = Directory.GetFiles(enlistment.EnlistmentRoot);
+ files.Length.ShouldEqual(1);
+ files.ShouldContain(x => Path.GetFileName(x).Equals("git.cmd", StringComparison.Ordinal));
+ string[] directories = Directory.GetDirectories(enlistment.EnlistmentRoot);
+ directories.Length.ShouldEqual(2);
+ directories.ShouldContain(x => Path.GetFileName(x).Equals(GVFSTestConfig.DotGVFSRoot, StringComparison.Ordinal));
+ directories.ShouldContain(x => Path.GetFileName(x).Equals("src", StringComparison.Ordinal));
}
finally
- {
- enlistment.UnmountAndDeleteAll();
+ {
+ enlistment.UnmountAndDeleteAll();
}
}
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DehydrateTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DehydrateTests.cs
index ca9a4fe4d9..f896825fed 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DehydrateTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/DehydrateTests.cs
@@ -36,16 +36,7 @@ public void TearDown()
string backupFolder = Path.Combine(this.Enlistment.EnlistmentRoot, "dehydrate_backup");
if (this.fileSystem.DirectoryExists(backupFolder))
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- // Mac gets permission denied when using the System.IO DeleteDirectory
- BashRunner runner = new BashRunner();
- runner.DeleteDirectory(backupFolder);
- }
- else
- {
- this.fileSystem.DeleteDirectory(backupFolder);
- }
+ this.fileSystem.DeleteDirectory(backupFolder);
}
if (!this.Enlistment.IsMounted())
@@ -271,7 +262,6 @@ public void FolderDehydrateFolderThatWasDeleted()
}
[TestCase]
- [Category(Categories.WindowsOnly)]
public void FolderDehydrateFolderThatIsLocked()
{
const string folderToDehydrate = "GVFS";
@@ -420,7 +410,7 @@ public void FolderDehydrateCannotDehydrateDotGitFolder()
this.DehydrateShouldSucceed(new[] { $"Cannot dehydrate folder '{TestConstants.DotGit.Info.Root}': invalid folder path." }, confirm: true, noStatus: false, foldersToDehydrate: TestConstants.DotGit.Info.Root);
}
- [TestCase]
+ [TestCase]
public void FolderDehydratePreviouslyDeletedFolders()
{
string folderToDehydrate = "TrailingSlashTests";
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSLockTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSLockTests.cs
index af3fe49ec6..7046231e5d 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSLockTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSLockTests.cs
@@ -1,5 +1,5 @@
using GVFS.FunctionalTests.FileSystemRunners;
-using GVFS.FunctionalTests.Properties;
+using GVFS.FunctionalTests.Properties;
using GVFS.FunctionalTests.Tools;
using GVFS.Tests.Should;
using NUnit.Framework;
@@ -64,7 +64,6 @@ public void GitCheckoutFailsOutsideLock()
}
[TestCase]
- [Category(Categories.RepositoryMountsSameFileSystem)]
public void LockPreventsRenameFromOutsideRootOnTopOfIndex()
{
this.OverwritingIndexShouldFail(Path.Combine(this.Enlistment.EnlistmentRoot, "LockPreventsRenameFromOutsideRootOnTopOfIndex.txt"));
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSUpgradeReminderTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSUpgradeReminderTests.cs
index 909c402ac1..1801571128 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSUpgradeReminderTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GVFSUpgradeReminderTests.cs
@@ -13,7 +13,6 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
[TestFixture]
[NonParallelizable]
[Category(Categories.ExtraCoverage)]
- [Category(Categories.WindowsOnly)]
public class UpgradeReminderTests : TestsWithEnlistmentPerFixture
{
private const string HighestAvailableVersionFileName = "HighestAvailableVersion";
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitFilesTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitFilesTests.cs
index 634e8e380b..50fc1e1ecc 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitFilesTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitFilesTests.cs
@@ -332,9 +332,7 @@ public void OverwrittenFileAddedToModifiedPathsAndSkipWorktreeBitCleared()
this.VerifyWorktreeBit(fileToOverwriteEntry, LsFilesStatus.Cached);
}
- // WindowsOnly because Mac does not support SupersedeFile
[TestCase, Order(15)]
- [Category(Categories.WindowsOnly)]
public void SupersededFileAddedToModifiedPathsAndSkipWorktreeBitCleared()
{
string fileToSupersedeEntry = "GVFlt_FileOperationTest/WriteAndVerify.txt";
@@ -396,7 +394,6 @@ public void FileMovedFromInsideRepoToOutside()
}
[TestCase, Order(18)]
- [Category(Categories.RepositoryMountsSameFileSystem)]
public void HardlinkFromOutsideRepoToInside()
{
string fileName = "OutsideRepoToInside_FileForHardlink.txt";
@@ -416,7 +413,6 @@ public void HardlinkFromOutsideRepoToInside()
}
[TestCase, Order(19)]
- [Category(Categories.RepositoryMountsSameFileSystem)]
public void HardlinkFromInsideRepoToOutside()
{
string fileName = "Readme.md";
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitMoveRenameTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitMoveRenameTests.cs
index 6e2a21fb9d..b106876ec0 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitMoveRenameTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/GitMoveRenameTests.cs
@@ -221,7 +221,6 @@ public void GitStatusAfterRenameFileOutOfRepo()
}
[TestCase, Order(11)]
- [Category(Categories.RepositoryMountsSameFileSystem)]
public void GitStatusAfterRenameFolderIntoRepo()
{
string folderName = "GitStatusAfterRenameFolderIntoRepo";
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/HealthTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/HealthTests.cs
index 605e2dcb17..d16cda74cc 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/HealthTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/HealthTests.cs
@@ -11,7 +11,7 @@
namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
{
- [TestFixture, Category(Categories.WindowsOnly)]
+ [TestFixture]
public class HealthTests : TestsWithEnlistmentPerFixture
{
[TestCase, Order(0)]
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs
index 72271b0b2f..40e9016ce4 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MountTests.cs
@@ -30,16 +30,8 @@ public MountTests()
{
this.fileSystem = new SystemIORunner();
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- this.fileDeletedBackgroundOperationCode = 16;
- this.directoryDeletedBackgroundOperationCode = 17;
- }
- else
- {
- this.fileDeletedBackgroundOperationCode = 3;
- this.directoryDeletedBackgroundOperationCode = 11;
- }
+ this.fileDeletedBackgroundOperationCode = 3;
+ this.directoryDeletedBackgroundOperationCode = 11;
}
[TestCaseSource(typeof(MountSubfolders), MountSubfolders.MountFolders)]
@@ -97,7 +89,6 @@ public void MountSetsCoreHooksPath()
}
[TestCase]
- [Category(Categories.WindowsOnly)] // Only Windows uses GitHooksLoader.exe and merges hooks
public void MountMergesLocalPrePostHooksConfig()
{
// Create some dummy pre/post command hooks
@@ -379,7 +370,6 @@ public void MountFailsUpgradingFromInvalidUpgradePath(string mountSubfolder)
// Ported from ProjFS's BugRegressionTest
[TestCase]
- [Category(Categories.WindowsOnly)]
public void ProjFS_CMDHangNoneActiveInstance()
{
this.Enlistment.UnmountGVFS();
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MoveRenameFolderTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MoveRenameFolderTests.cs
index 78316ef815..48656333cb 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MoveRenameFolderTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MoveRenameFolderTests.cs
@@ -40,9 +40,7 @@ public MoveRenameFolderTests(FileSystemRunner fileSystem)
this.fileSystem = fileSystem;
}
- // WindowsOnly because renames of partial folders are blocked only on Windows
[TestCase]
- [Category(Categories.WindowsOnly)]
public void RenameFolderShouldFail()
{
string testFileName = "RenameFolderShouldFail.cpp";
@@ -59,70 +57,6 @@ public void RenameFolderShouldFail()
this.Enlistment.GetVirtualPathTo(Path.Combine(oldFolderName, testFileName)).ShouldBeAFile(this.fileSystem).WithContents(TestFileContents);
}
- // MacOnly because renames of partial folders are blocked on Windows
- [TestCase]
- [Category(Categories.MacOnly)]
- public void ChangeUnhydratedFolderName()
- {
- string testFileName = "ChangeUnhydratedFolderName.cpp";
- string oldFolderName = Path.Combine("Test_EPF_MoveRenameFolderTests", "ChangeUnhydratedFolderName", "source");
- string newFolderName = Path.Combine("Test_EPF_MoveRenameFolderTests", "ChangeUnhydratedFolderName", "source_renamed");
- this.Enlistment.GetVirtualPathTo(newFolderName).ShouldNotExistOnDisk(this.fileSystem);
-
- this.fileSystem.MoveDirectory(this.Enlistment.GetVirtualPathTo(oldFolderName), this.Enlistment.GetVirtualPathTo(newFolderName));
-
- this.Enlistment.GetVirtualPathTo(newFolderName).ShouldBeADirectory(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(oldFolderName).ShouldNotExistOnDisk(this.fileSystem);
-
- this.Enlistment.GetVirtualPathTo(Path.Combine(oldFolderName, testFileName)).ShouldNotExistOnDisk(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(Path.Combine(newFolderName, testFileName)).ShouldBeAFile(this.fileSystem).WithContents(TestFileContents);
- }
-
- // MacOnly because renames of partial folders are blocked on Windows
- [TestCase]
- [Category(Categories.MacOnly)]
- public void MoveUnhydratedFolderToNewFolder()
- {
- string testFileName = "MoveUnhydratedFolderToVirtualNTFSFolder.cpp";
- string oldFolderName = Path.Combine("Test_EPF_MoveRenameFolderTests", "MoveUnhydratedFolderToVirtualNTFSFolder");
-
- string newFolderName = "NewPerFixtureParent";
- this.Enlistment.GetVirtualPathTo(newFolderName).ShouldNotExistOnDisk(this.fileSystem);
- this.fileSystem.CreateDirectory(this.Enlistment.GetVirtualPathTo(newFolderName));
- this.Enlistment.GetVirtualPathTo(newFolderName).ShouldBeADirectory(this.fileSystem);
-
- string movedFolderPath = Path.Combine(newFolderName, "EnlistmentPerFixture");
- this.fileSystem.MoveDirectory(this.Enlistment.GetVirtualPathTo(oldFolderName), this.Enlistment.GetVirtualPathTo(movedFolderPath));
-
- this.Enlistment.GetVirtualPathTo(movedFolderPath).ShouldBeADirectory(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(oldFolderName).ShouldNotExistOnDisk(this.fileSystem);
-
- this.Enlistment.GetVirtualPathTo(Path.Combine(oldFolderName, testFileName)).ShouldNotExistOnDisk(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(Path.Combine(movedFolderPath, testFileName)).ShouldBeAFile(this.fileSystem).WithContents(TestFileContents);
- }
-
- // MacOnly because renames of partial folders are blocked on Windows
- [TestCase]
- [Category(Categories.MacOnly)]
- public void MoveUnhydratedFolderToFullFolderInDotGitFolder()
- {
- string testFileName = "MoveUnhydratedFolderToFullFolderInDotGitFolder.cpp";
- string oldFolderName = Path.Combine("Test_EPF_MoveRenameFolderTests", "MoveUnhydratedFolderToFullFolderInDotGitFolder");
-
- string newFolderName = Path.Combine(".git", "NewPerFixtureParent");
- this.Enlistment.GetVirtualPathTo(newFolderName).ShouldNotExistOnDisk(this.fileSystem);
- this.fileSystem.CreateDirectory(this.Enlistment.GetVirtualPathTo(newFolderName));
- this.Enlistment.GetVirtualPathTo(newFolderName).ShouldBeADirectory(this.fileSystem);
-
- string movedFolderPath = Path.Combine(newFolderName, "Should");
- this.fileSystem.MoveDirectory(this.Enlistment.GetVirtualPathTo(oldFolderName), this.Enlistment.GetVirtualPathTo(movedFolderPath));
-
- this.Enlistment.GetVirtualPathTo(movedFolderPath).ShouldBeADirectory(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(oldFolderName).ShouldNotExistOnDisk(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(Path.Combine(oldFolderName, testFileName)).ShouldNotExistOnDisk(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(Path.Combine(movedFolderPath, testFileName)).ShouldBeAFile(this.fileSystem).WithContents(TestFileContents);
- }
-
[TestCase]
public void MoveFullFolderToFullFolderInDotGitFolder()
{
@@ -150,99 +84,5 @@ public void MoveFullFolderToFullFolderInDotGitFolder()
oldFolderPath.ShouldNotExistOnDisk(this.fileSystem);
Path.Combine(movedFolderPath, testFileName).ShouldBeAFile(this.fileSystem).WithContents(fileContents);
}
-
- // MacOnly because renames of partial folders are blocked on Windows
- [TestCase]
- [Category(Categories.MacOnly)]
- public void MoveAndRenameUnhydratedFolderToNewFolder()
- {
- string testFileName = "MoveAndRenameUnhydratedFolderToNewFolder.cpp";
- string oldFolderName = Path.Combine("Test_EPF_MoveRenameFolderTests", "MoveAndRenameUnhydratedFolderToNewFolder");
-
- string newFolderName = "NewPerTestCaseParent";
- this.Enlistment.GetVirtualPathTo(newFolderName).ShouldNotExistOnDisk(this.fileSystem);
- this.fileSystem.CreateDirectory(this.Enlistment.GetVirtualPathTo(newFolderName));
- this.Enlistment.GetVirtualPathTo(newFolderName).ShouldBeADirectory(this.fileSystem);
-
- string movedFolderPath = Path.Combine(newFolderName, "MoveAndRenameUnhydratedFolderToNewFolder_renamed");
- this.fileSystem.MoveDirectory(this.Enlistment.GetVirtualPathTo(oldFolderName), this.Enlistment.GetVirtualPathTo(movedFolderPath));
-
- this.Enlistment.GetVirtualPathTo(movedFolderPath).ShouldBeADirectory(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(oldFolderName).ShouldNotExistOnDisk(this.fileSystem);
-
- this.Enlistment.GetVirtualPathTo(Path.Combine(oldFolderName, testFileName)).ShouldNotExistOnDisk(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(Path.Combine(movedFolderPath, testFileName)).ShouldBeAFile(this.fileSystem).WithContents(TestFileContents);
- }
-
- // MacOnly because renames of partial folders are blocked on Windows
- [TestCase]
- [Category(Categories.MacOnly)]
- public void MoveFolderWithUnhydratedAndFullContents()
- {
- string testFileName = "MoveFolderWithUnhydratedAndFullContents.cpp";
- string oldFolderName = Path.Combine("Test_EPF_MoveRenameFolderTests", "MoveFolderWithUnhydratedAndFullContents");
-
- string newFile = "TestFile.txt";
- string newFileContents = "Contents of TestFile.txt";
- this.fileSystem.WriteAllText(this.Enlistment.GetVirtualPathTo(Path.Combine(oldFolderName, newFile)), newFileContents);
-
- string newFolderName = "New_MoveFolderWithUnhydratedAndFullContents";
- this.Enlistment.GetVirtualPathTo(newFolderName).ShouldNotExistOnDisk(this.fileSystem);
- this.fileSystem.CreateDirectory(this.Enlistment.GetVirtualPathTo(newFolderName));
- this.Enlistment.GetVirtualPathTo(newFolderName).ShouldBeADirectory(this.fileSystem);
-
- string movedFolderPath = Path.Combine(newFolderName, "MoveFolderWithUnhydratedAndFullContents_renamed");
- this.fileSystem.MoveDirectory(this.Enlistment.GetVirtualPathTo(oldFolderName), this.Enlistment.GetVirtualPathTo(movedFolderPath));
-
- this.Enlistment.GetVirtualPathTo(movedFolderPath).ShouldBeADirectory(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(oldFolderName).ShouldNotExistOnDisk(this.fileSystem);
-
- // Test file should have been moved
- this.Enlistment.GetVirtualPathTo(Path.Combine(oldFolderName, testFileName)).ShouldNotExistOnDisk(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(Path.Combine(movedFolderPath, testFileName)).ShouldBeAFile(this.fileSystem).WithContents(TestFileContents);
-
- // New file should have been moved
- this.Enlistment.GetVirtualPathTo(Path.Combine(oldFolderName, newFile)).ShouldNotExistOnDisk(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(Path.Combine(movedFolderPath, newFile)).ShouldBeAFile(this.fileSystem).WithContents(newFileContents);
- }
-
- // MacOnly because renames of partial folders are blocked on Windows
- [TestCase]
- [Category(Categories.MacOnly)]
- public void MoveFolderWithUnexpandedChildFolders()
- {
- string oldFolderPath = this.Enlistment.GetVirtualPathTo("Test_EPF_MoveRenameFileTests");
- string newFolderName = "Test_EPF_MoveRenameFileTests_Renamed";
- string newFolderPath = this.Enlistment.GetVirtualPathTo(newFolderName);
- this.fileSystem.MoveDirectory(oldFolderPath, newFolderPath);
- oldFolderPath.ShouldNotExistOnDisk(this.fileSystem);
-
- newFolderPath.ShouldBeADirectory(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(newFolderName, "ChangeNestedUnhydratedFileNameCase", "Program.cs")
- .ShouldBeAFile(this.fileSystem)
- .WithContents(MoveRenameFileTests.TestFileContents);
-
- this.Enlistment.GetVirtualPathTo(newFolderName, "ChangeUnhydratedFileName", "Program.cs")
- .ShouldBeAFile(this.fileSystem)
- .WithContents(MoveRenameFileTests.TestFileContents);
-
- this.Enlistment.GetVirtualPathTo(newFolderName, "MoveUnhydratedFileToDotGitFolder", "Program.cs")
- .ShouldBeAFile(this.fileSystem)
- .WithContents(MoveRenameFileTests.TestFileContents);
-
- // Test moving a folder with a very deep unhydrated child tree
- oldFolderPath = this.Enlistment.GetVirtualPathTo("Test_EPF_WorkingDirectoryTests");
-
- // But expand the folder we will be renaming (so that only the children have not been expanded)
- oldFolderPath.ShouldBeADirectory(this.fileSystem).WithDirectories().ShouldContain(dir => dir.Name.Equals("1"));
-
- newFolderName = "Test_EPF_WorkingDirectoryTests_Renamed";
- newFolderPath = this.Enlistment.GetVirtualPathTo(newFolderName);
- this.fileSystem.MoveDirectory(oldFolderPath, newFolderPath);
- oldFolderPath.ShouldNotExistOnDisk(this.fileSystem);
- this.Enlistment.GetVirtualPathTo(newFolderName, "1", "2", "3", "4", "ReadDeepProjectedFile.cpp")
- .ShouldBeAFile(this.fileSystem)
- .WithContents(WorkingDirectoryTests.TestFileContents);
- }
}
}
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs
index 1f85474bd2..a56cab3388 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs
@@ -115,9 +115,7 @@ public void NoopPrefetch()
this.Enlistment.Prefetch("--files *").ShouldContain("Nothing new to prefetch.");
}
- // TODO(#1219): Handle that lock files are not deleted on Mac, they are simply unlocked
[TestCase, Order(11)]
- [Category(Categories.MacTODO.TestNeedsToLockFile)]
public void PrefetchCleansUpStalePrefetchLock()
{
this.Enlistment.Prefetch("--commits");
@@ -162,6 +160,7 @@ public void PrefetchFilesFromFileListFile()
}
[TestCase, Order(13)]
+ [Category(Categories.NeedsReactionInCI)]
public void PrefetchFilesFromFileListStdIn()
{
// on case-insensitive filesystems, test case-blind matching
@@ -178,6 +177,7 @@ public void PrefetchFilesFromFileListStdIn()
}
[TestCase, Order(14)]
+ [Category(Categories.NeedsReactionInCI)]
public void PrefetchFolderListFromStdin()
{
string input = string.Join(Environment.NewLine, PrefetchFolderList);
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbWithoutSharedCacheTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbWithoutSharedCacheTests.cs
index d94fe70376..68dbb3dd65 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbWithoutSharedCacheTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbWithoutSharedCacheTests.cs
@@ -9,11 +9,8 @@
namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
{
- // TODO(#1219): Before these tests can be enabled PostFetchJobShouldComplete needs
- // to work on Mac (where post-fetch.lock is not removed from disk)
[TestFixture]
[Category(Categories.ExtraCoverage)]
- [Category(Categories.MacTODO.TestNeedsToLockFile)]
public class PrefetchVerbWithoutSharedCacheTests : TestsWithEnlistmentPerFixture
{
private const string PrefetchPackPrefix = "prefetch";
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SparseTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SparseTests.cs
index 84c5de3b70..30a8056bd8 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SparseTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SparseTests.cs
@@ -143,7 +143,6 @@ public void AddingSubfolderShouldKeepParentRecursive()
}
[TestCase, Order(6)]
- [Category(Categories.WindowsOnly)]
public void CreatingFolderShouldAddToSparseListAndStartProjecting()
{
this.gvfsProcess.AddSparseFolders(this.mainSparseFolder);
@@ -166,33 +165,6 @@ public void CreatingFolderShouldAddToSparseListAndStartProjecting()
projectedFile.ShouldBeAFile(this.fileSystem);
}
- [TestCase, Order(7)]
- [Category(Categories.MacOnly)]
- public void CreateFolderThenFileShouldAddToSparseListAndStartProjecting()
- {
- this.gvfsProcess.AddSparseFolders(this.mainSparseFolder);
- this.ValidateFoldersInSparseList(this.mainSparseFolder);
-
- string newFolderPath = Path.Combine(this.Enlistment.RepoRoot, "GVFS", "GVFS.Common");
- newFolderPath.ShouldNotExistOnDisk(this.fileSystem);
- Directory.CreateDirectory(newFolderPath);
- string newFilePath = Path.Combine(newFolderPath, "test.txt");
- File.WriteAllText(newFilePath, "New file content");
- newFolderPath.ShouldBeADirectory(this.fileSystem);
- newFilePath.ShouldBeAFile(this.fileSystem);
- string[] fileSystemEntries = Directory.GetFileSystemEntries(newFolderPath);
- fileSystemEntries.Length.ShouldEqual(33);
- this.ValidateFoldersInSparseList(this.mainSparseFolder, Path.Combine("GVFS", "GVFS.Common"));
-
- string projectedFolder = Path.Combine(newFolderPath, "Git");
- projectedFolder.ShouldBeADirectory(this.fileSystem);
- fileSystemEntries = Directory.GetFileSystemEntries(projectedFolder);
- fileSystemEntries.Length.ShouldEqual(13);
-
- string projectedFile = Path.Combine(newFolderPath, "ReturnCode.cs");
- projectedFile.ShouldBeAFile(this.fileSystem);
- }
-
[TestCase, Order(7)]
public void ReadFileThenChangingSparseFoldersShouldRemoveFileAndFolder()
{
@@ -300,33 +272,6 @@ public void CreateNewFileAndCommitThenRemoveSparseFolderShouldKeepFileAndFolder(
fileToCreate.ShouldBeAFile(this.fileSystem);
}
- [TestCase, Order(13)]
- [Category(Categories.MacOnly)]
- public void CreateFolderAndFileThatAreExcluded()
- {
- this.gvfsProcess.AddSparseFolders(this.mainSparseFolder);
- this.ValidateFoldersInSparseList(this.mainSparseFolder);
-
- // Create a file that should already be in the projection but excluded
- string newFolderPath = Path.Combine(this.Enlistment.RepoRoot, "GVFS", "GVFS.Mount");
- newFolderPath.ShouldNotExistOnDisk(this.fileSystem);
- Directory.CreateDirectory(newFolderPath);
- string newFilePath = Path.Combine(newFolderPath, "Program.cs");
- File.WriteAllText(newFilePath, "New file content");
- newFolderPath.ShouldBeADirectory(this.fileSystem);
- newFilePath.ShouldBeAFile(this.fileSystem);
- string[] fileSystemEntries = Directory.GetFileSystemEntries(newFolderPath);
- fileSystemEntries.Length.ShouldEqual(7);
-
- string projectedFolder = Path.Combine(newFolderPath, "Properties");
- projectedFolder.ShouldBeADirectory(this.fileSystem);
- fileSystemEntries = Directory.GetFileSystemEntries(projectedFolder);
- fileSystemEntries.Length.ShouldEqual(1);
-
- string projectedFile = Path.Combine(newFolderPath, "MountVerb.cs");
- projectedFile.ShouldBeAFile(this.fileSystem);
- }
-
[TestCase, Order(14)]
public void ModifiedFileAndCommitThenChangingSparseFoldersWithPrune()
{
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SymbolicLinkTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SymbolicLinkTests.cs
index 5f7a83e04b..9e6140e21e 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SymbolicLinkTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/SymbolicLinkTests.cs
@@ -1,14 +1,14 @@
using System.IO;
using GVFS.FunctionalTests.FileSystemRunners;
-using GVFS.FunctionalTests.Should;
+using GVFS.FunctionalTests.Should;
using GVFS.FunctionalTests.Tools;
-using GVFS.Tests.Should;
+using GVFS.Tests.Should;
using NUnit.Framework;
namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
{
- // POSIXOnly until issue #297 (add SymLink support for Windows) is complete
- [Category(Categories.POSIXOnly)]
+ // Ignored until issue #297 (add SymLink support for Windows) is complete
+ [Ignore("Symbolic link support not yet implemented (see issue #297)")]
[TestFixture]
public class SymbolicLinkTests : TestsWithEnlistmentPerFixture
{
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/WorkingDirectoryTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/WorkingDirectoryTests.cs
index f08e13ab48..683b02a2c4 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/WorkingDirectoryTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/WorkingDirectoryTests.cs
@@ -398,7 +398,6 @@ public void FolderPlaceHolderHasVersionInfo()
[TestCase, Order(13)]
[Category(Categories.GitCommands)]
- [Category(Categories.MacTODO.NeedsNewFolderCreateNotification)]
public void FolderContentsProjectedAfterFolderCreateAndCheckout()
{
string folderName = "GVFlt_MultiThreadTest";
@@ -548,29 +547,15 @@ public void TruncatedObjectRedownloaded()
objectPath.ShouldBeAFile(this.fileSystem);
new FileInfo(objectPath).Length.ShouldEqual(objectLength - 16);
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- // Mac can't correct corrupt objects, but it should detect them and add to ModifiedPaths.dat
- this.Enlistment.GetVirtualPathTo("Test_EPF_WorkingDirectoryTests", "TruncatedObjectRedownloaded.txt").ShouldBeAFile(this.fileSystem);
-
- GVFSHelpers.ModifiedPathsShouldContain(this.Enlistment, this.fileSystem, modifedFile);
- GitHelpers.CheckGitCommandAgainstGVFSRepo(
- this.Enlistment.RepoRoot,
- "status",
- $"modified: {modifedFile}");
- }
- else
- {
- // Windows should correct a corrupt obect
- // Read the original path and verify its contents are correct
- this.Enlistment.GetVirtualPathTo("Test_EPF_WorkingDirectoryTests", "TruncatedObjectRedownloaded.txt").ShouldBeAFile(this.fileSystem).WithContents(testFileContents);
+ // Windows should correct a corrupt obect
+ // Read the original path and verify its contents are correct
+ this.Enlistment.GetVirtualPathTo("Test_EPF_WorkingDirectoryTests", "TruncatedObjectRedownloaded.txt").ShouldBeAFile(this.fileSystem).WithContents(testFileContents);
- // Confirm there's a new item in the corrupt objects folder
- corruptObjectFolderPath.ShouldBeADirectory(this.fileSystem).WithItems().Count().ShouldEqual(initialCorruptObjectCount + 1);
+ // Confirm there's a new item in the corrupt objects folder
+ corruptObjectFolderPath.ShouldBeADirectory(this.fileSystem).WithItems().Count().ShouldEqual(initialCorruptObjectCount + 1);
- // File should not be in ModifiedPaths.dat
- GVFSHelpers.ModifiedPathsShouldNotContain(this.Enlistment, this.fileSystem, "Test_EPF_WorkingDirectoryTests/TruncatedObjectRedownloaded.txt");
- }
+ // File should not be in ModifiedPaths.dat
+ GVFSHelpers.ModifiedPathsShouldNotContain(this.Enlistment, this.fileSystem, "Test_EPF_WorkingDirectoryTests/TruncatedObjectRedownloaded.txt");
}
[TestCase, Order(18)]
@@ -625,44 +610,12 @@ private void FolderEnumerationShouldHaveSingleEntry(string folderVirtualPath, st
private void EnumerateAndReadShouldNotChangeEnumerationOrder(string folderRelativePath)
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- NativeTests.EnumerateAndReadDoesNotChangeEnumerationOrder(folderRelativePath).ShouldEqual(true);
- }
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- string[] entries = Directory.GetFileSystemEntries(folderRelativePath);
- foreach (string entry in entries)
- {
- File.ReadAllText(entry);
- }
-
- string[] postReadEntries = Directory.GetFileSystemEntries(folderRelativePath);
- Enumerable.SequenceEqual(entries, postReadEntries)
- .ShouldBeTrue($"Entries are not the same after reading. Orignial list:\n{string.Join(",", entries)}\n\nAfter read:\n{string.Join(",", postReadEntries)}");
- }
- else
- {
- Assert.Fail("Unsupported platform");
- }
+ NativeTests.EnumerateAndReadDoesNotChangeEnumerationOrder(folderRelativePath).ShouldEqual(true);
}
private bool PlaceholderHasVersionInfo(string relativePath, int version, string sha)
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- return NativeTests.PlaceHolderHasVersionInfo(relativePath, version, sha);
- }
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- // TODO(#1360): Add a version of PlaceHolderHasVersionInfo that works on Mac
- return true;
- }
- else
- {
- Assert.Fail("Unsupported platform");
- return false;
- }
+ return NativeTests.PlaceHolderHasVersionInfo(relativePath, version, sha);
}
private class NativeTests
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/CaseOnlyFolderRenameTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/CaseOnlyFolderRenameTests.cs
deleted file mode 100644
index 3c4a9fc0c5..0000000000
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/CaseOnlyFolderRenameTests.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-using GVFS.FunctionalTests.FileSystemRunners;
-using GVFS.FunctionalTests.Should;
-using GVFS.FunctionalTests.Tools;
-using GVFS.Tests.Should;
-using NUnit.Framework;
-using System.IO;
-
-namespace GVFS.FunctionalTests.Tests.EnlistmentPerTestCase
-{
- [TestFixture]
- public class CaseOnlyFolderRenameTests : TestsWithEnlistmentPerTestCase
- {
- private FileSystemRunner fileSystem;
-
- public CaseOnlyFolderRenameTests()
- {
- this.fileSystem = new BashRunner();
- }
-
- // MacOnly because renames of partial folders are blocked on Windows
- [TestCase]
- [Category(Categories.MacOnly)]
- public void CaseRenameFoldersAndRemountAndRenameAgain()
- {
- // Projected folder without a physical folder
- string parentFolderName = "GVFS";
- string oldGVFSSubFolderName = "GVFS";
- string oldGVFSSubFolderPath = Path.Combine(parentFolderName, oldGVFSSubFolderName);
- string newGVFSSubFolderName = "gvfs";
- string newGVFSSubFolderPath = Path.Combine(parentFolderName, newGVFSSubFolderName);
-
- this.Enlistment.GetVirtualPathTo(oldGVFSSubFolderPath).ShouldBeADirectory(this.fileSystem).WithCaseMatchingName(oldGVFSSubFolderName);
-
- this.fileSystem.MoveFile(this.Enlistment.GetVirtualPathTo(oldGVFSSubFolderPath), this.Enlistment.GetVirtualPathTo(newGVFSSubFolderPath));
-
- this.Enlistment.GetVirtualPathTo(newGVFSSubFolderPath).ShouldBeADirectory(this.fileSystem).WithCaseMatchingName(newGVFSSubFolderName);
-
- // Projected folder with a physical folder
- string oldTestsSubFolderName = "GVFS.FunctionalTests";
- string oldTestsSubFolderPath = Path.Combine(parentFolderName, oldTestsSubFolderName);
- string newTestsSubFolderName = "gvfs.functionaltests";
- string newTestsSubFolderPath = Path.Combine(parentFolderName, newTestsSubFolderName);
-
- string fileToAdd = "NewFile.txt";
- string fileToAddContent = "This is new file text.";
- string fileToAddPath = this.Enlistment.GetVirtualPathTo(Path.Combine(oldTestsSubFolderPath, fileToAdd));
- this.fileSystem.WriteAllText(fileToAddPath, fileToAddContent);
-
- this.Enlistment.GetVirtualPathTo(oldTestsSubFolderPath).ShouldBeADirectory(this.fileSystem).WithCaseMatchingName(oldTestsSubFolderName);
-
- this.fileSystem.MoveFile(this.Enlistment.GetVirtualPathTo(oldTestsSubFolderPath), this.Enlistment.GetVirtualPathTo(newTestsSubFolderPath));
-
- this.Enlistment.GetVirtualPathTo(newTestsSubFolderPath).ShouldBeADirectory(this.fileSystem).WithCaseMatchingName(newTestsSubFolderName);
-
- // Remount
- this.Enlistment.UnmountGVFS();
- this.Enlistment.MountGVFS();
-
- this.Enlistment.GetVirtualPathTo(newGVFSSubFolderPath).ShouldBeADirectory(this.fileSystem).WithCaseMatchingName(newGVFSSubFolderName);
- this.Enlistment.GetVirtualPathTo(newTestsSubFolderPath).ShouldBeADirectory(this.fileSystem).WithCaseMatchingName(newTestsSubFolderName);
- this.Enlistment.GetVirtualPathTo(Path.Combine(newTestsSubFolderPath, fileToAdd)).ShouldBeAFile(this.fileSystem).WithContents().ShouldEqual(fileToAddContent);
-
- // Rename each folder again
- string finalGVFSSubFolderName = "gvFS";
- string finalGVFSSubFolderPath = Path.Combine(parentFolderName, finalGVFSSubFolderName);
- this.fileSystem.MoveFile(this.Enlistment.GetVirtualPathTo(newGVFSSubFolderPath), this.Enlistment.GetVirtualPathTo(finalGVFSSubFolderPath));
- this.Enlistment.GetVirtualPathTo(finalGVFSSubFolderPath).ShouldBeADirectory(this.fileSystem).WithCaseMatchingName(finalGVFSSubFolderName);
-
- string finalTestsSubFolderName = "gvfs.FunctionalTESTS";
- string finalTestsSubFolderPath = Path.Combine(parentFolderName, finalTestsSubFolderName);
- this.fileSystem.MoveFile(this.Enlistment.GetVirtualPathTo(newTestsSubFolderPath), this.Enlistment.GetVirtualPathTo(finalTestsSubFolderPath));
- this.Enlistment.GetVirtualPathTo(finalTestsSubFolderPath).ShouldBeADirectory(this.fileSystem).WithCaseMatchingName(finalTestsSubFolderName);
- this.Enlistment.GetVirtualPathTo(Path.Combine(finalTestsSubFolderPath, fileToAdd)).ShouldBeAFile(this.fileSystem).WithContents().ShouldEqual(fileToAddContent);
- }
- }
-}
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/LooseObjectStepTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/LooseObjectStepTests.cs
index 69254634f1..aa29b8de93 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/LooseObjectStepTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/LooseObjectStepTests.cs
@@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
+using System;
namespace GVFS.FunctionalTests.Tests.EnlistmentPerTestCase
{
@@ -28,6 +29,7 @@ public LooseObjectStepTests()
private string TempPackRoot => Path.Combine(this.PackRoot, TempPackFolder);
[TestCase]
+ [Category(Categories.NeedsReactionInCI)]
public void RemoveLooseObjectsInPackFiles()
{
this.ClearAllObjects();
@@ -47,6 +49,7 @@ public void RemoveLooseObjectsInPackFiles()
}
[TestCase]
+ [Category(Categories.NeedsReactionInCI)]
public void PutLooseObjectsInPackFiles()
{
this.ClearAllObjects();
@@ -83,6 +86,7 @@ public void NoLooseObjectsDoesNothing()
}
[TestCase]
+ [Category(Categories.NeedsReactionInCI)]
public void CorruptLooseObjectIsDeleted()
{
this.ClearAllObjects();
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/MacDiskLayoutUpgradeTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/MacDiskLayoutUpgradeTests.cs
deleted file mode 100644
index b8face6690..0000000000
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/MacDiskLayoutUpgradeTests.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using GVFS.FunctionalTests.Should;
-using GVFS.FunctionalTests.Tools;
-using GVFS.Tests.Should;
-using NUnit.Framework;
-using System;
-using System.IO;
-
-namespace GVFS.FunctionalTests.Tests.EnlistmentPerTestCase
-{
- [TestFixture]
- [Category(Categories.ExtraCoverage)]
- [Category(Categories.MacOnly)]
- public class MacDiskLayoutUpgradeTests : DiskLayoutUpgradeTests
- {
- public const int CurrentDiskLayoutMajorVersion = 19;
- public const int CurrentDiskLayoutMinorVersion = 0;
-
- public override int GetCurrentDiskLayoutMajorVersion() => CurrentDiskLayoutMajorVersion;
- public override int GetCurrentDiskLayoutMinorVersion() => CurrentDiskLayoutMinorVersion;
-
- [TestCase]
- public void MountUpgradesPlaceholderListDatabaseToSQLite()
- {
- this.Enlistment.UnmountGVFS();
-
- this.fileSystem.DeleteFile(Path.Combine(this.Enlistment.DotGVFSRoot, TestConstants.Databases.VFSForGit));
- this.WriteOldPlaceholderListDatabase();
-
- GVFSHelpers.SaveDiskLayoutVersion(this.Enlistment.DotGVFSRoot, "18", "0");
-
- this.Enlistment.MountGVFS();
- this.Enlistment.UnmountGVFS();
-
- // Validate the placeholders are in the SQLite placeholder database now
- string placeholderDatabasePath = Path.Combine(this.Enlistment.DotGVFSRoot, TestConstants.Databases.VFSForGit);
- placeholderDatabasePath.ShouldBeAFile(this.fileSystem);
- string[] lines = GVFSHelpers.GetAllSQLitePlaceholdersAsString(placeholderDatabasePath).Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
- lines.Length.ShouldEqual(10);
- this.PlaceholderDatabaseShouldIncludeCommonLines(lines);
- lines.ShouldContain(x => x == this.PartialFolderPlaceholderString("GVFS", "GVFS.Tests", "Properties"));
-
- this.ValidatePersistedVersionMatchesCurrentVersion();
- }
- }
-}
diff --git a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/ModifiedPathsTests.cs b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/ModifiedPathsTests.cs
index c07e601060..3754cfaaab 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/ModifiedPathsTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/ModifiedPathsTests.cs
@@ -61,7 +61,6 @@ public void DeletedTempFolderDeletesFilesFromModifiedFiles(FileSystemRunner file
}
[TestCaseSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Runners))]
- [Category(Categories.MacTODO.NeedsNewFolderCreateNotification)]
public void ModifiedPathsFromChangesInsideRepoSavedAfterRemount(FileSystemRunner fileSystem)
{
string[] expectedModifiedFilesContentsAfterRemount =
@@ -134,8 +133,6 @@ public void ModifiedPathsFromChangesInsideRepoSavedAfterRemount(FileSystemRunner
}
[TestCaseSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Runners))]
- [Category(Categories.RepositoryMountsSameFileSystem)]
- [Category(Categories.MacTODO.NeedsNewFolderCreateNotification)]
public void ModifiedPathsFromRenamingOutsideRepoSavedAfterRemount(FileSystemRunner fileSystem)
{
string[] expectedModifiedFilesContentsAfterRemount =
@@ -221,7 +218,6 @@ public void ModifiedPathsCorrectAfterHardLinkingInsideRepo(FileSystemRunner file
}
[TestCaseSource(typeof(FileSystemRunner), nameof(FileSystemRunner.Runners))]
- [Category(Categories.RepositoryMountsSameFileSystem)]
public void ModifiedPathsCorrectAfterHardLinkingOutsideRepo(FileSystemRunner fileSystem)
{
string[] expectedModifiedFilesContentsAfterHardlinks =
diff --git a/GVFS/GVFS.FunctionalTests/Tests/FastFetchTests.cs b/GVFS/GVFS.FunctionalTests/Tests/FastFetchTests.cs
index faaa7edb38..2a09893276 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/FastFetchTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/FastFetchTests.cs
@@ -9,7 +9,6 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
-using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
namespace GVFS.FunctionalTests.Tests
@@ -492,21 +491,13 @@ private ProcessResult RunFastFetch(string args)
{
args = args + " --verbose";
- string fastfetch;
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- fastfetch = Path.Combine(Settings.Default.CurrentDirectory, "netcoreapp2.1", "FastFetch.dll");
- }
- else
- {
- fastfetch = Path.Combine(Settings.Default.CurrentDirectory, "FastFetch.dll");
- }
+ string fastfetch = Path.Combine(Settings.Default.CurrentDirectory, "FastFetch.exe");
File.Exists(fastfetch).ShouldBeTrue($"{fastfetch} did not exist.");
Console.WriteLine($"Using {fastfetch}");
- ProcessStartInfo processInfo = new ProcessStartInfo("dotnet");
- processInfo.Arguments = $"{fastfetch} {args}";
+ ProcessStartInfo processInfo = new ProcessStartInfo(fastfetch);
+ processInfo.Arguments = args;
processInfo.WorkingDirectory = this.fastFetchRepoRoot;
processInfo.UseShellExecute = false;
processInfo.RedirectStandardOutput = true;
diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CheckoutTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CheckoutTests.cs
index f7862cf42b..e6de487b72 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CheckoutTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CheckoutTests.cs
@@ -644,9 +644,7 @@ public void CheckoutBranchWhileOutsideToolDoesNotAllowDeleteOfOpenRepoMetadata()
}
}
- // WindowsOnly because the test depends on Windows specific file sharing behavior
[TestCase]
- [Category(Categories.WindowsOnly)]
public void CheckoutBranchWhileOutsideToolHasExclusiveReadHandleOnDatabasesFolder()
{
this.ControlGitRepo.Fetch(GitRepoTests.ConflictSourceBranch);
@@ -871,7 +869,6 @@ public void CheckoutEditCheckoutWithoutFolderThenCheckoutWithMultipleFiles()
}
[TestCase]
- [Category(Categories.MacTODO.NeedsNewFolderCreateNotification)]
public void CreateAFolderThenCheckoutBranchWithFolder()
{
this.ControlGitRepo.Fetch("FunctionalTests/20201014_Checkout8");
@@ -1004,6 +1001,6 @@ private static extern SafeFileHandle CreateFile(
[In] IntPtr securityAttributes,
[MarshalAs(UnmanagedType.U4)] FileMode creationDisposition,
[MarshalAs(UnmanagedType.U4)] NativeFileAttributes flagsAndAttributes,
- [In] IntPtr templateFile);
+ [In] IntPtr templateFile);
}
}
diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CreatePlaceholderTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CreatePlaceholderTests.cs
index 8116824efe..ccf231e246 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CreatePlaceholderTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/CreatePlaceholderTests.cs
@@ -39,7 +39,6 @@ public void AllowsPlaceholderCreationWhileGitCommandIsRunning(string commandToRu
[TestCase("reset --stdin")]
[TestCase("send-pack --stdin URL")]
[TestCase("update-index --stdin")]
- [Category(Categories.WindowsOnly)] // Mac never blocks placeholder creation
public void BlocksPlaceholderCreationWhileGitCommandIsRunning(string commandToRun)
{
this.CheckPlaceholderCreation(commandToRun, shouldAllow: false);
diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs
index e952373ee3..28f7523534 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitCommandsTests.cs
@@ -416,7 +416,6 @@ public void CaseOnlyRenameFileAndChangeBranches()
}
[TestCase]
- [Category(Categories.RepositoryMountsSameFileSystem)]
public void MoveFileFromOutsideRepoToInsideRepoAndAdd()
{
string testFileContents = "0123456789";
@@ -450,7 +449,6 @@ public void MoveFileFromOutsideRepoToInsideRepoAndAdd()
}
[TestCase]
- [Category(Categories.RepositoryMountsSameFileSystem)]
public void MoveFolderFromOutsideRepoToInsideRepoAndAdd()
{
string testFileContents = "0123456789";
@@ -488,7 +486,6 @@ public void MoveFolderFromOutsideRepoToInsideRepoAndAdd()
}
[TestCase]
- [Category(Categories.RepositoryMountsSameFileSystem)]
public void MoveFileFromInsideRepoToOutsideRepoAndCommit()
{
string newBranchName = "tests/functional/MoveFileFromInsideRepoToOutsideRepoAndCommit";
@@ -554,26 +551,6 @@ public void RenameFileCommitChangesSwitchBranchSwitchBackTest()
this.CommitChangesSwitchBranchSwitchBack(fileSystemAction: this.RenameFile);
}
- // MacOnly because renames of partial folders are blocked on Windows
- [TestCase]
- [Category(Categories.MacOnly)]
- public void MoveFolderCommitChangesSwitchBranchSwitchBackTest()
- {
- this.CommitChangesSwitchBranchSwitchBack(fileSystemAction: this.MoveFolder);
- }
-
- // Mac and Linux only because Windows does not support file mode
- [TestCase]
- [Category(Categories.POSIXOnly)]
- public void UpdateFileModeOnly()
- {
- const string TestFileName = "test-file-mode";
- this.CreateFile("#!/bin/bash\n", TestFileName);
- this.ChangeMode(TestFileName, Convert.ToUInt16("755", 8));
- this.ValidateGitCommand($"add {TestFileName}");
- this.ValidateGitCommand($"ls-files --stage {TestFileName}");
- }
-
[TestCase]
public void AddFileCommitThenDeleteAndCommit()
{
diff --git a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/StatusTests.cs b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/StatusTests.cs
index bc5c776c25..65edacc6df 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/GitCommands/StatusTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/GitCommands/StatusTests.cs
@@ -1,6 +1,6 @@
using GVFS.FunctionalTests.FileSystemRunners;
using GVFS.FunctionalTests.Properties;
-using GVFS.FunctionalTests.Should;
+using GVFS.FunctionalTests.Should;
using GVFS.FunctionalTests.Tools;
using GVFS.Tests.Should;
using NUnit.Framework;
@@ -75,12 +75,11 @@ public void AppendFileUsingBash()
// We check the contents after status, to ensure this check didn't cause the hydration
string appendedContent = string.Concat("Commit2LockToPreventUpdate \r\n", content);
- virtualFile.ShouldBeAFile(this.FileSystem).WithContents(appendedContent);
- controlFile.ShouldBeAFile(this.FileSystem).WithContents(appendedContent);
+ virtualFile.ShouldBeAFile(this.FileSystem).WithContents(appendedContent);
+ controlFile.ShouldBeAFile(this.FileSystem).WithContents(appendedContent);
}
[TestCase]
- [Category(Categories.MacTODO.NeedsStatusCache)]
public void ModifyingAndDeletingRepositoryExcludeFileInvalidatesCache()
{
string repositoryExcludeFile = Path.Combine(".git", "info", "exclude");
@@ -106,7 +105,6 @@ public void ModifyingAndDeletingRepositoryExcludeFileInvalidatesCache()
}
[TestCase]
- [Category(Categories.MacTODO.NeedsStatusCache)]
public void NewRepositoryExcludeFileInvalidatesCache()
{
string repositoryExcludeFileRelativePath = Path.Combine(".git", "info", "exclude");
@@ -127,7 +125,6 @@ public void NewRepositoryExcludeFileInvalidatesCache()
}
[TestCase]
- [Category(Categories.MacTODO.NeedsStatusCache)]
public void ModifyingHeadSymbolicRefInvalidatesCache()
{
this.ValidateGitCommand("status");
@@ -143,7 +140,6 @@ public void ModifyingHeadSymbolicRefInvalidatesCache()
}
[TestCase]
- [Category(Categories.MacTODO.NeedsStatusCache)]
public void ModifyingHeadRefInvalidatesCache()
{
this.ValidateGitCommand("status");
diff --git a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ConfigVerbTests.cs b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ConfigVerbTests.cs
index 9881020af8..b7c09600f0 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ConfigVerbTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/ConfigVerbTests.cs
@@ -3,14 +3,11 @@
using NUnit.Framework;
using System;
using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
namespace GVFS.FunctionalTests.Tests.MultiEnlistmentTests
{
[TestFixture]
[Category(Categories.ExtraCoverage)]
- [Category(Categories.MacTODO.NeedsGVFSConfig)]
public class ConfigVerbTests : TestsWithMultiEnlistment
{
private const string IntegerSettingKey = "functionalTest_Integer";
diff --git a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs
index 5111b415e7..7d343d8b24 100644
--- a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs
@@ -80,7 +80,6 @@ public void RepairFixesCorruptBlobSizesDatabase()
}
[TestCase]
- [Category(Categories.MacTODO.TestNeedsToLockFile)]
public void CloneCleansUpStaleMetadataLock()
{
GVFSFunctionalTestEnlistment enlistment1 = this.CloneAndMountEnlistment();
diff --git a/GVFS/GVFS.FunctionalTests/Tools/ControlGitRepo.cs b/GVFS/GVFS.FunctionalTests/Tools/ControlGitRepo.cs
index a4352252cd..d2f792cea2 100644
--- a/GVFS/GVFS.FunctionalTests/Tools/ControlGitRepo.cs
+++ b/GVFS/GVFS.FunctionalTests/Tools/ControlGitRepo.cs
@@ -55,6 +55,7 @@ public void Initialize()
GitProcess.Invoke(this.RootPath, "config merge.renames false");
GitProcess.Invoke(this.RootPath, "config advice.statusUoption false");
GitProcess.Invoke(this.RootPath, "config core.abbrev 40");
+ GitProcess.Invoke(this.RootPath, "config core.useBuiltinFSMonitor false");
GitProcess.Invoke(this.RootPath, "config pack.useSparse true");
GitProcess.Invoke(this.RootPath, "config reset.quiet true");
GitProcess.Invoke(this.RootPath, "config status.aheadbehind false");
diff --git a/GVFS/GVFS.FunctionalTests/Tools/GVFSHelpers.cs b/GVFS/GVFS.FunctionalTests/Tools/GVFSHelpers.cs
index 391579a9a4..d079e36684 100644
--- a/GVFS/GVFS.FunctionalTests/Tools/GVFSHelpers.cs
+++ b/GVFS/GVFS.FunctionalTests/Tools/GVFSHelpers.cs
@@ -206,44 +206,20 @@ public static string GetInternalParameter(string maintenanceJob = "null", string
public static void RegisterForOfflineIO()
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- uint result = PrjFSRegisterForOfflineIO();
- result.ShouldEqual(PrjFSResultSuccess, $"{nameof(RegisterForOfflineIO)} failed (result = {result})");
- }
}
public static void UnregisterForOfflineIO()
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- uint result = PrjFSUnregisterForOfflineIO();
- result.ShouldEqual(PrjFSResultSuccess, $"{nameof(RegisterForOfflineIO)} failed (result = {result})");
- }
}
public static int GetCurrentDiskLayoutMajorVersion()
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- return MacCurrentDiskLayoutMajorVersion;
- }
- else
- {
- return WindowsCurrentDiskLayoutMajorVersion;
- }
+ return WindowsCurrentDiskLayoutMajorVersion;
}
public static int GetCurrentDiskLayoutMinimumMajorVersion()
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- return MacCurrentDiskLayoutMinimumMajorVersion;
- }
- else
- {
- return WindowsCurrentDiskLayoutMinimumMajorVersion;
- }
+ return WindowsCurrentDiskLayoutMinimumMajorVersion;
}
private static string GetModifiedPathsContents(GVFSFunctionalTestEnlistment enlistment, FileSystemRunner fileSystem)
diff --git a/GVFS/GVFS.FunctionalTests/Tools/GVFSServiceProcess.cs b/GVFS/GVFS.FunctionalTests/Tools/GVFSServiceProcess.cs
index 5417a9337f..d27925e864 100644
--- a/GVFS/GVFS.FunctionalTests/Tools/GVFSServiceProcess.cs
+++ b/GVFS/GVFS.FunctionalTests/Tools/GVFSServiceProcess.cs
@@ -3,7 +3,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
-using System.Runtime.InteropServices;
+using System.Runtime.InteropServices;
using System.ServiceProcess;
using System.Threading;
@@ -17,20 +17,6 @@ public static string TestServiceName
{
get
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- // Service name is used in the lookup of GVFS.Service communication pipes
- // by clients for IPC. Custom pipe names can be specified as command line
- // args to the Service during its startup. On the Mac, GVFS.Service started
- // for testing is the same instance as the one that is installed by the
- // Mac installer. Also it is not as easy as in Windows to pass command line
- // args (that are specific to testing) to GVFS.Service (Service on Mac is a
- // Launch agent and needs its args to be specified in its launchd.plist
- // file). So on Mac - during tests GVFS.Service is started without any
- // customized pipe name for testing.
- return "GVFS.Service";
- }
-
return "Test.GVFS.Service";
}
}
@@ -127,25 +113,8 @@ private static ProcessResult RunScCommand(string command, string parameters)
private static string GetPathToService()
{
- if (GVFSTestConfig.TestGVFSOnPath)
- {
- ProcessResult result = ProcessHelper.Run("where", Properties.Settings.Default.PathToGVFSService);
- result.ExitCode.ShouldEqual(0, $"{nameof(GetPathToService)}: where returned {result.ExitCode} when looking for {Properties.Settings.Default.PathToGVFSService}");
-
- string firstPath =
- string.IsNullOrWhiteSpace(result.Output)
- ? null
- : result.Output.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault();
-
- firstPath.ShouldNotBeNull($"{nameof(GetPathToService)}: Failed to find {Properties.Settings.Default.PathToGVFSService}");
- return firstPath;
- }
- else
- {
- return Path.Combine(
- Properties.Settings.Default.CurrentDirectory,
- Properties.Settings.Default.PathToGVFSService);
- }
+ File.Exists(Properties.Settings.Default.PathToGVFSService).ShouldBeTrue("Failed to locate GVFS.Service.exe");
+ return Properties.Settings.Default.PathToGVFSService;
}
}
}
diff --git a/GVFS/GVFS.FunctionalTests/Tools/GitHelpers.cs b/GVFS/GVFS.FunctionalTests/Tools/GitHelpers.cs
index 092d0011ae..8aacac84a7 100644
--- a/GVFS/GVFS.FunctionalTests/Tools/GitHelpers.cs
+++ b/GVFS/GVFS.FunctionalTests/Tools/GitHelpers.cs
@@ -6,7 +6,6 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
-using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
@@ -19,7 +18,7 @@ public static class GitHelpers
/// GVFS.FunctionalTests.LockHolder program.
///
private const string LockHolderCommandName = @"GVFS.FunctionalTests.LockHolder";
- private const string LockHolderCommand = @"GVFS.FunctionalTests.LockHolder.dll";
+ private const string LockHolderCommand = @"GVFS.FunctionalTests.LockHolder.exe";
private const string WindowsPathSeparator = "\\";
private const string GitPathSeparator = "/";
@@ -28,25 +27,9 @@ private static string LockHolderCommandPath
{
get
{
- // On OSX functional tests are run from inside Publish directory. Dependent
- // assemblies including LockHolder test are available at the same level in
- // the same directory.
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- return Path.Combine(
- Settings.Default.CurrentDirectory,
- LockHolderCommand);
- }
- else
- {
- // On Windows, FT is run from the Output directory of GVFS.FunctionalTest project.
- // LockHolder is a .netcore assembly and can be found inside netcoreapp2.1
- // subdirectory of GVFS.FunctionalTest Output directory.
- return Path.Combine(
- Settings.Default.CurrentDirectory,
- "netcoreapp2.1",
- LockHolderCommand);
- }
+ // LockHolder is a .NET Framework application and can be found inside
+ // GVFS.FunctionalTest Output directory.
+ return Path.Combine(Settings.Default.CurrentDirectory, LockHolderCommand);
}
}
@@ -149,16 +132,16 @@ public static ManualResetEventSlim AcquireGVFSLock(
int resetTimeout = Timeout.Infinite,
bool skipReleaseLock = false)
{
- string args = LockHolderCommandPath;
+ string args = null;
if (skipReleaseLock)
{
- args += " --skip-release-lock";
+ args = "--skip-release-lock";
}
return RunCommandWithWaitAndStdIn(
enlistment,
resetTimeout,
- "dotnet",
+ LockHolderCommandPath,
args,
GitHelpers.LockHolderCommandName,
"done",
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/PersistentDictionary.edb b/GVFS/GVFS.FunctionalTests/Windows/TestData/BackgroundGitUpdates/PersistentDictionary.edb
similarity index 100%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/PersistentDictionary.edb
rename to GVFS/GVFS.FunctionalTests/Windows/TestData/BackgroundGitUpdates/PersistentDictionary.edb
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/PersistentDictionary.jfm b/GVFS/GVFS.FunctionalTests/Windows/TestData/BackgroundGitUpdates/PersistentDictionary.jfm
similarity index 100%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/PersistentDictionary.jfm
rename to GVFS/GVFS.FunctionalTests/Windows/TestData/BackgroundGitUpdates/PersistentDictionary.jfm
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epc.chk b/GVFS/GVFS.FunctionalTests/Windows/TestData/BackgroundGitUpdates/epc.chk
similarity index 100%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epc.chk
rename to GVFS/GVFS.FunctionalTests/Windows/TestData/BackgroundGitUpdates/epc.chk
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epcres00001.jrs b/GVFS/GVFS.FunctionalTests/Windows/TestData/BackgroundGitUpdates/epcres00001.jrs
similarity index 100%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epcres00001.jrs
rename to GVFS/GVFS.FunctionalTests/Windows/TestData/BackgroundGitUpdates/epcres00001.jrs
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epcres00002.jrs b/GVFS/GVFS.FunctionalTests/Windows/TestData/BackgroundGitUpdates/epcres00002.jrs
similarity index 100%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/TestData/BackgroundGitUpdates/epcres00002.jrs
rename to GVFS/GVFS.FunctionalTests/Windows/TestData/BackgroundGitUpdates/epcres00002.jrs
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/JunctionAndSubstTests.cs b/GVFS/GVFS.FunctionalTests/Windows/Tests/JunctionAndSubstTests.cs
similarity index 97%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/JunctionAndSubstTests.cs
rename to GVFS/GVFS.FunctionalTests/Windows/Tests/JunctionAndSubstTests.cs
index be3f05e201..617691a005 100644
--- a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/JunctionAndSubstTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Windows/Tests/JunctionAndSubstTests.cs
@@ -13,7 +13,6 @@ namespace GVFS.FunctionalTests.Windows.Tests
{
[TestFixture]
[Category(Categories.ExtraCoverage)]
- [Category(Categories.WindowsOnly)]
public class JunctionAndSubstTests : TestsWithEnlistmentPerFixture
{
private const string SubstDrive = "Q:";
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/ServiceTests.cs b/GVFS/GVFS.FunctionalTests/Windows/Tests/ServiceTests.cs
similarity index 87%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/ServiceTests.cs
rename to GVFS/GVFS.FunctionalTests/Windows/Tests/ServiceTests.cs
index c1353a571a..ddbca48c19 100644
--- a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/ServiceTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Windows/Tests/ServiceTests.cs
@@ -14,7 +14,6 @@ namespace GVFS.FunctionalTests.Windows.Tests
[TestFixture]
[NonParallelizable]
[Category(Categories.ExtraCoverage)]
- [Category(Categories.WindowsOnly)]
public class ServiceTests : TestsWithEnlistmentPerFixture
{
private const string NativeLibPath = @"C:\Program Files\GVFS\ProjectedFSLib.dll";
@@ -31,11 +30,6 @@ public ServiceTests()
[TestCase]
public void MountAsksServiceToEnsurePrjFltServiceIsHealthy()
{
- if (!GVFSTestConfig.TestGVFSOnPath)
- {
- Assert.Ignore("Skipping test, test only enabled when --test-gvfs-on-path is set");
- }
-
this.Enlistment.UnmountGVFS();
StopPrjFlt();
@@ -53,11 +47,6 @@ public void MountAsksServiceToEnsurePrjFltServiceIsHealthy()
[TestCase]
public void ServiceStartsPrjFltService()
{
- if (!GVFSTestConfig.TestGVFSOnPath)
- {
- Assert.Ignore("Skipping test, test only enabled when --test-gvfs-on-path is set");
- }
-
this.Enlistment.UnmountGVFS();
StopPrjFlt();
GVFSServiceProcess.StopService();
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/SharedCacheUpgradeTests.cs b/GVFS/GVFS.FunctionalTests/Windows/Tests/SharedCacheUpgradeTests.cs
similarity index 97%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/SharedCacheUpgradeTests.cs
rename to GVFS/GVFS.FunctionalTests/Windows/Tests/SharedCacheUpgradeTests.cs
index 3be0cb77fe..3025b443e3 100644
--- a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/SharedCacheUpgradeTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Windows/Tests/SharedCacheUpgradeTests.cs
@@ -14,7 +14,6 @@ namespace GVFS.FunctionalTests.Windows.Windows.Tests
{
[TestFixture]
[Category(Categories.ExtraCoverage)]
- [Category(Categories.WindowsOnly)]
public class SharedCacheUpgradeTests : TestsWithMultiEnlistment
{
private string localCachePath;
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsDiskLayoutUpgradeTests.cs b/GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsDiskLayoutUpgradeTests.cs
similarity index 97%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsDiskLayoutUpgradeTests.cs
rename to GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsDiskLayoutUpgradeTests.cs
index ff355734b4..328652458d 100644
--- a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsDiskLayoutUpgradeTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsDiskLayoutUpgradeTests.cs
@@ -13,7 +13,6 @@ namespace GVFS.FunctionalTests.Windows.Tests
{
[TestFixture]
[Category(Categories.ExtraCoverage)]
- [Category(Categories.WindowsOnly)]
public class WindowsDiskLayoutUpgradeTests : DiskLayoutUpgradeTests
{
public const int CurrentDiskLayoutMajorVersion = 19;
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsFileSystemTests.cs b/GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsFileSystemTests.cs
similarity index 97%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsFileSystemTests.cs
rename to GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsFileSystemTests.cs
index 74d49a3c69..f6537afaa9 100644
--- a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsFileSystemTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsFileSystemTests.cs
@@ -16,7 +16,6 @@
namespace GVFS.FunctionalTests.Windows.Windows.Tests
{
[TestFixture]
- [Category(Categories.WindowsOnly)]
public class WindowsFileSystemTests : TestsWithEnlistmentPerFixture
{
private enum CreationDisposition
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsFolderUsnUpdate.cs b/GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsFolderUsnUpdate.cs
similarity index 96%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsFolderUsnUpdate.cs
rename to GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsFolderUsnUpdate.cs
index 79f3d62b76..7ddb30aefb 100644
--- a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsFolderUsnUpdate.cs
+++ b/GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsFolderUsnUpdate.cs
@@ -10,7 +10,6 @@
namespace GVFS.FunctionalTests.Windows.Windows.Tests
{
[TestFixture]
- [Category(Categories.WindowsOnly)]
[Category(Categories.GitCommands)]
[Ignore("fsutil requires WSL be enabled. Need to find a way to enable for builds or a different way to get the USN for the folder.")]
public class WindowsFolderUsnUpdate : TestsWithEnlistmentPerFixture
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsTombstoneTests.cs b/GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsTombstoneTests.cs
similarity index 96%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsTombstoneTests.cs
rename to GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsTombstoneTests.cs
index a9c1f06360..f2c1b2d47d 100644
--- a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsTombstoneTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsTombstoneTests.cs
@@ -10,7 +10,6 @@
namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
{
[TestFixture]
- [Category(Categories.WindowsOnly)]
[Category(Categories.GitCommands)]
public class WindowsTombstoneTests : TestsWithEnlistmentPerFixture
{
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsUpdatePlaceholderTests.cs b/GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsUpdatePlaceholderTests.cs
similarity index 98%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsUpdatePlaceholderTests.cs
rename to GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsUpdatePlaceholderTests.cs
index a9e2f4cf86..acd88a8844 100644
--- a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tests/WindowsUpdatePlaceholderTests.cs
+++ b/GVFS/GVFS.FunctionalTests/Windows/Tests/WindowsUpdatePlaceholderTests.cs
@@ -13,7 +13,6 @@ namespace GVFS.FunctionalTests.Tests.EnlistmentPerFixture
{
// WindowsOnly because tests in this class depend on Windows specific file sharing behavior
[TestFixture]
- [Category(Categories.WindowsOnly)]
[Category(Categories.GitCommands)]
public class WindowsUpdatePlaceholderTests : TestsWithEnlistmentPerFixture
{
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tools/ESENTDatabase.cs b/GVFS/GVFS.FunctionalTests/Windows/Tools/ESENTDatabase.cs
similarity index 100%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/Tools/ESENTDatabase.cs
rename to GVFS/GVFS.FunctionalTests/Windows/Tools/ESENTDatabase.cs
diff --git a/GVFS/GVFS.FunctionalTests.Windows/Windows/Tools/RegistryHelper.cs b/GVFS/GVFS.FunctionalTests/Windows/Tools/RegistryHelper.cs
similarity index 100%
rename from GVFS/GVFS.FunctionalTests.Windows/Windows/Tools/RegistryHelper.cs
rename to GVFS/GVFS.FunctionalTests/Windows/Tools/RegistryHelper.cs
diff --git a/GVFS/GVFS.GVFlt/GVFS.GVFlt.csproj b/GVFS/GVFS.GVFlt/GVFS.GVFlt.csproj
index 094009ca9c..16074079a8 100644
--- a/GVFS/GVFS.GVFlt/GVFS.GVFlt.csproj
+++ b/GVFS/GVFS.GVFlt/GVFS.GVFlt.csproj
@@ -1,66 +1,11 @@
-
-
-
-
+
+
- {1118B427-7063-422F-83B9-5023C8EC5A7A}
- Library
- Properties
- GVFS.GVFlt
- GVFS.GVFlt
- v4.6.1
- 512
-
-
+ net461
-
- true
- DEBUG;TRACE
- full
- x64
- prompt
-
-
- TRACE
- true
- pdbonly
- x64
- prompt
-
-
-
- False
- ..\..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
- True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
+
-
-
+
-
-
+
diff --git a/GVFS/GVFS.GVFlt/Properties/AssemblyInfo.cs b/GVFS/GVFS.GVFlt/Properties/AssemblyInfo.cs
deleted file mode 100644
index ab6e7354cb..0000000000
--- a/GVFS/GVFS.GVFlt/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("GVFS.GVFlt")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("GVFS.GVFlt")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("1118b427-7063-422f-83b9-5023c8ec5a7a")]
diff --git a/GVFS/GVFS.GVFlt/packages.config b/GVFS/GVFS.GVFlt/packages.config
deleted file mode 100644
index c7d616a3fa..0000000000
--- a/GVFS/GVFS.GVFlt/packages.config
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.Hooks/App.config b/GVFS/GVFS.Hooks/App.config
deleted file mode 100644
index 6d44256319..0000000000
--- a/GVFS/GVFS.Hooks/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/GVFS/GVFS.Hooks/GVFS.Hooks.Windows.csproj b/GVFS/GVFS.Hooks/GVFS.Hooks.csproj
similarity index 51%
rename from GVFS/GVFS.Hooks/GVFS.Hooks.Windows.csproj
rename to GVFS/GVFS.Hooks/GVFS.Hooks.csproj
index f8252b2563..efe7842a7d 100644
--- a/GVFS/GVFS.Hooks/GVFS.Hooks.Windows.csproj
+++ b/GVFS/GVFS.Hooks/GVFS.Hooks.csproj
@@ -1,45 +1,10 @@
-
-
-
-
+
+
- {BDA91EE5-C684-4FC5-A90A-B7D677421917}
Exe
- Properties
- GVFS.Hooks
- GVFS.Hooks
- v4.6.1
- 512
- true
-
-
-
-
- true
- DEBUG;TRACE
- full
- x64
- prompt
- true
-
-
- TRACE
- true
- pdbonly
- x64
- prompt
- true
+ net461
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.Mac.cs b/GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.Mac.cs
deleted file mode 100644
index 589ae46983..0000000000
--- a/GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.Mac.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using GVFS.Platform.Mac;
-
-namespace GVFS.Hooks.HooksPlatform
-{
- public static partial class GVFSHooksPlatform
- {
- public static string GetUpgradeHighestAvailableVersionDirectory()
- {
- return MacPlatform.GetUpgradeHighestAvailableVersionDirectoryImplementation();
- }
-
- public static bool TryGetGVFSEnlistmentRoot(string directory, out string enlistmentRoot, out string errorMessage)
- {
- return MacPlatform.TryGetGVFSEnlistmentRootImplementation(directory, out enlistmentRoot, out errorMessage);
- }
-
- public static string GetNamedPipeName(string enlistmentRoot)
- {
- return MacPlatform.GetNamedPipeNameImplementation(enlistmentRoot);
- }
-
- public static string GetGitGuiBlockedMessage()
- {
- return "git gui is not supported in VFS for Git repos on Mac";
- }
-
- public static string GetUpgradeReminderNotification()
- {
- return MacPlatform.GetUpgradeReminderNotificationImplementation();
- }
- }
-}
diff --git a/GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.POSIX.cs b/GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.POSIX.cs
deleted file mode 100644
index 99f7eedcc5..0000000000
--- a/GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.POSIX.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using GVFS.Platform.POSIX;
-
-namespace GVFS.Hooks.HooksPlatform
-{
- public static partial class GVFSHooksPlatform
- {
- public static bool IsElevated()
- {
- return POSIXPlatform.IsElevatedImplementation();
- }
-
- public static bool IsProcessActive(int processId)
- {
- return POSIXPlatform.IsProcessActiveImplementation(processId);
- }
-
- public static bool IsConsoleOutputRedirectedToFile()
- {
- return POSIXPlatform.IsConsoleOutputRedirectedToFileImplementation();
- }
-
- public static bool TryGetNormalizedPath(string path, out string normalizedPath, out string errorMessage)
- {
- return POSIXFileSystem.TryGetNormalizedPathImplementation(path, out normalizedPath, out errorMessage);
- }
- }
-}
diff --git a/GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.Windows.cs b/GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.cs
similarity index 79%
rename from GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.Windows.cs
rename to GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.cs
index f3bd65a012..0c7cf7239f 100644
--- a/GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.Windows.cs
+++ b/GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.cs
@@ -1,4 +1,4 @@
-using GVFS.Platform.Windows;
+using GVFS.Platform.Windows;
namespace GVFS.Hooks.HooksPlatform
{
@@ -37,19 +37,9 @@ public static bool TryGetNormalizedPath(string path, out string normalizedPath,
return WindowsFileSystem.TryGetNormalizedPathImplementation(path, out normalizedPath, out errorMessage);
}
- public static string GetUpgradeHighestAvailableVersionDirectory()
- {
- return WindowsPlatform.GetUpgradeHighestAvailableVersionDirectoryImplementation();
- }
-
public static string GetGitGuiBlockedMessage()
{
return "To access the 'git gui' in a GVFS repo, please invoke 'git-gui.exe' instead.";
}
-
- public static string GetUpgradeReminderNotification()
- {
- return WindowsPlatform.GetUpgradeReminderNotificationImplementation();
- }
}
}
diff --git a/GVFS/GVFS.Hooks/Program.cs b/GVFS/GVFS.Hooks/Program.cs
index af84760803..4dc9aeb99e 100644
--- a/GVFS/GVFS.Hooks/Program.cs
+++ b/GVFS/GVFS.Hooks/Program.cs
@@ -1,4 +1,4 @@
-using GVFS.Common;
+using GVFS.Common;
using GVFS.Common.NamedPipes;
using GVFS.Hooks.HooksPlatform;
using System;
@@ -65,8 +65,6 @@ public static void Main(string[] args)
{
RunLockRequest(args, unattended, ReleaseGVFSLock);
}
-
- RunPostCommands(args, unattended);
break;
default:
@@ -92,30 +90,6 @@ private static void RunPreCommands(string[] args)
}
}
- private static void RunPostCommands(string[] args, bool unattended)
- {
- if (!unattended)
- {
- RemindUpgradeAvailable();
- }
- }
-
- private static void RemindUpgradeAvailable()
- {
- // The idea is to generate a random number between 0 and 100. To make
- // sure that the reminder is displayed only 10% of the times a git
- // command is run, check that the random number is between 0 and 10,
- // which will have a probability of 10/100 == 10%.
- int reminderFrequency = 10;
- int randomValue = random.Next(0, 100);
-
- if ((IsUpgradeMessageDeterministic() || randomValue <= reminderFrequency) &&
- ProductUpgraderInfo.IsLocalUpgradeAvailable(tracer: null, highestAvailableVersionDirectory: GVFSHooksPlatform.GetUpgradeHighestAvailableVersionDirectory()))
- {
- Console.WriteLine(Environment.NewLine + GVFSHooksPlatform.GetUpgradeReminderNotification());
- }
- }
-
private static void ExitWithError(params string[] messages)
{
foreach (string message in messages)
diff --git a/GVFS/GVFS.Hooks/Properties/AssemblyInfo.cs b/GVFS/GVFS.Hooks/Properties/AssemblyInfo.cs
deleted file mode 100644
index 21669de01f..0000000000
--- a/GVFS/GVFS.Hooks/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("GVFS.Hooks")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("GVFS.Hooks")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("bda91ee5-c684-4fc5-a90a-b7d677421917")]
diff --git a/GVFS/GVFS.Hooks/packages.config b/GVFS/GVFS.Hooks/packages.config
deleted file mode 100644
index 119108d189..0000000000
--- a/GVFS/GVFS.Hooks/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.Installer.Windows/GVFS.Installer.Windows.csproj b/GVFS/GVFS.Installer.Windows/GVFS.Installer.Windows.csproj
deleted file mode 100644
index 0159c407e7..0000000000
--- a/GVFS/GVFS.Installer.Windows/GVFS.Installer.Windows.csproj
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
- {3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}
- Library
- Properties
- GVFS.Installer.Windows
- GVFS.Installer.Windows
- v4.6.1
- 512
-
-
-
-
- true
- DEBUG;TRACE
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
- TRACE
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
-
- Microsoft400
- false
-
-
-
-
-
-
-
- Designer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.Installer.Windows/packages.config b/GVFS/GVFS.Installer.Windows/packages.config
deleted file mode 100644
index 7635037a7b..0000000000
--- a/GVFS/GVFS.Installer.Windows/packages.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.Installers/GVFS.Installers.csproj b/GVFS/GVFS.Installers/GVFS.Installers.csproj
new file mode 100644
index 0000000000..da65ffbe46
--- /dev/null
+++ b/GVFS/GVFS.Installers/GVFS.Installers.csproj
@@ -0,0 +1,58 @@
+
+
+
+ net461
+ false
+ $(RepoOutPath)GVFS.Payload\bin\$(Configuration)\win-x64\
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft400
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GVFS/GVFS.Installers/GVFS.Installers.template.nuspec b/GVFS/GVFS.Installers/GVFS.Installers.template.nuspec
new file mode 100644
index 0000000000..8991bd81e0
--- /dev/null
+++ b/GVFS/GVFS.Installers/GVFS.Installers.template.nuspec
@@ -0,0 +1,15 @@
+
+
+
+ GVFS.Installers
+ $version$
+ Microsoft
+ false
+ GVFS and G4W installers
+
+
+
+
+
+
+
diff --git a/GVFS/GVFS.Installer.Windows/Setup.iss b/GVFS/GVFS.Installers/Setup.iss
similarity index 70%
rename from GVFS/GVFS.Installer.Windows/Setup.iss
rename to GVFS/GVFS.Installers/Setup.iss
index 2b6525c3d2..f12f289fc8 100644
--- a/GVFS/GVFS.Installer.Windows/Setup.iss
+++ b/GVFS/GVFS.Installers/Setup.iss
@@ -3,23 +3,8 @@
; General documentation on how to use InnoSetup scripts: http://www.jrsoftware.org/ishelp/index.php
-#define PrjFltDir PackagesDir + "\" + ProjFSNativePackage + "\filter"
-#define ProjFSNativeLibDir PackagesDir + "\" + ProjFSNativePackage + "\lib"
-#define VCRuntimeDir PackagesDir + "\GVFS.VCRuntime.0.2.0-build\lib\x64"
-#define GVFSDir BuildOutputDir + "\GVFS.Windows\bin\" + PlatformAndConfiguration
-#define GVFSCommonDir BuildOutputDir + "\GVFS.Common\bin\" + PlatformAndConfiguration + "\netstandard2.0"
-#define HooksDir BuildOutputDir + "\GVFS.Hooks.Windows\bin\" + PlatformAndConfiguration
-#define HooksLoaderDir BuildOutputDir + "\GitHooksLoader\bin\" + PlatformAndConfiguration
-#define ServiceDir BuildOutputDir + "\GVFS.Service.Windows\bin\" + PlatformAndConfiguration
-#define ServiceUIDir BuildOutputDir + "\GVFS.Service.UI\bin\" + PlatformAndConfiguration
-#define GVFSMountDir BuildOutputDir + "\GVFS.Mount.Windows\bin\" + PlatformAndConfiguration
-#define ReadObjectDir BuildOutputDir + "\GVFS.ReadObjectHook.Windows\bin\" + PlatformAndConfiguration
-#define VirtualFileSystemDir BuildOutputDir + "\GVFS.VirtualFileSystemHook.Windows\bin\" + PlatformAndConfiguration
-#define PostIndexChangedDir BuildOutputDir + "\GVFS.PostIndexChangedHook.Windows\bin\" + PlatformAndConfiguration
-#define GVFSUpgraderDir BuildOutputDir + "\GVFS.Upgrader\bin\" + PlatformAndConfiguration + "\net461"
-
#define MyAppName "GVFS"
-#define MyAppInstallerVersion GetFileVersion(GVFSDir + "\GVFS.exe")
+#define MyAppInstallerVersion GetFileVersion(LayoutDir + "\GVFS.exe")
#define MyAppPublisher "Microsoft Corporation"
#define MyAppPublisherURL "http://www.microsoft.com"
#define MyAppURL "https://github.com/microsoft/VFSForGit"
@@ -41,7 +26,7 @@ AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppPublisherURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
-AppCopyright=Copyright � Microsoft 2019
+AppCopyright=Copyright (c) Microsoft 2021
BackColor=clWhite
BackSolid=yes
DefaultDirName={pf}\{#MyAppName}
@@ -53,14 +38,14 @@ SolidCompression=yes
MinVersion=10.0.14374
DisableDirPage=yes
DisableReadyPage=yes
-SetupIconFile="{#GVFSDir}\GitVirtualFileSystem.ico"
+SetupIconFile="{#LayoutDir}\GitVirtualFileSystem.ico"
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
WizardImageStretch=no
WindowResizable=no
CloseApplications=yes
ChangesEnvironment=yes
-RestartIfNeededByRun=yes
+RestartIfNeededByRun=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl";
@@ -75,113 +60,8 @@ Name: "full"; Description: "Full installation"; Flags: iscustom;
Type: files; Name: "{app}\ucrtbase.dll"
[Files]
-; PrjFlt Filter Files
-DestDir: "{app}\Filter"; Flags: ignoreversion; Source:"{#PrjFltDir}\PrjFlt.sys"
-DestDir : "{app}\Filter"; Flags: ignoreversion; Source: "{#PrjFltDir}\prjflt.inf"
-
-; PrjFlt Native Library Files, the GVFS.Service will copy these files into the {app} directory if needed
-DestDir: "{app}\ProjFS"; Flags: ignoreversion; Source:"{#ProjFSNativeLibDir}\ProjectedFSLib.dll"
-
-; PrjFlt Managed Assembly Files
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\ProjectedFSLib.Managed.dll"
-
-; GitHooks Files
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#HooksDir}\GVFS.Hooks.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#HooksDir}\GVFS.Hooks.exe"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#HooksDir}\GVFS.Hooks.exe.config"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#HooksLoaderDir}\GitHooksLoader.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#HooksLoaderDir}\GitHooksLoader.exe"
-
-; GVFS.Common Files
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSCommonDir}\git2.dll"
-
-; GVFS.Mount Files
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSMountDir}\GVFS.Mount.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSMountDir}\GVFS.Mount.exe"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSMountDir}\GVFS.Mount.exe.config"
-
-; GVFS.Upgrader Files
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSUpgraderDir}\GVFS.Upgrader.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSUpgraderDir}\GVFS.Upgrader.exe"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSUpgraderDir}\GVFS.Upgrader.exe.config"
-
-; GVFS.ReadObjectHook files
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#ReadObjectDir}\GVFS.ReadObjectHook.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#ReadObjectDir}\GVFS.ReadObjectHook.exe"
-
-; GVFS.VirtualFileSystemHook files
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#VirtualFileSystemDir}\GVFS.VirtualFileSystemHook.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#VirtualFileSystemDir}\GVFS.VirtualFileSystemHook.exe"
-
-; GVFS.PostIndexChangedHook files
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#PostIndexChangedDir}\GVFS.PostIndexChangedHook.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#PostIndexChangedDir}\GVFS.PostIndexChangedHook.exe"
-
-; Cpp Dependencies
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#VCRuntimeDir}\msvcp140.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#VCRuntimeDir}\msvcp140_1.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#VCRuntimeDir}\msvcp140_2.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#VCRuntimeDir}\vcruntime140.dll"
-
-; GVFS PDB's
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\Esent.Collections.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\Esent.Interop.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\Esent.Isam.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.Common.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.GVFlt.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.Virtualization.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.Platform.Windows.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.pdb"
-
-; GVFS.Service.UI Files
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#ServiceUIDir}\GVFS.Service.UI.exe"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#ServiceUIDir}\GVFS.Service.UI.exe.config"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#ServiceUIDir}\GVFS.Service.UI.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#ServiceUIDir}\GitVirtualFileSystem.ico"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#ServiceUIDir}\System.Runtime.dll"
-
-; GVFS Files
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\CommandLine.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\Esent.Collections.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\Esent.Interop.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\Esent.Isam.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\Microsoft.Data.Sqlite.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\SQLitePCLRaw.batteries_green.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\SQLitePCLRaw.batteries_v2.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\SQLitePCLRaw.core.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\SQLitePCLRaw.provider.e_sqlite3.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\x64\e_sqlite3.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.Common.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.GVFlt.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.Virtualization.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.Platform.Windows.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\Newtonsoft.Json.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\ICSharpCode.SharpZipLib.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.exe.config"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GitVirtualFileSystem.ico"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\GVFS.exe"
-
-; NuGet support DLLs
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\NuGet.Commands.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\NuGet.Common.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\NuGet.Configuration.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\NuGet.Frameworks.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\NuGet.Packaging.Core.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\NuGet.Packaging.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\NuGet.Protocol.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\NuGet.Versioning.dll"
-
-; .NET Standard Files
-; See https://github.com/dotnet/standard/issues/415 for a discussion on why this are copied
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\netstandard.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\System.Net.Http.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\System.ValueTuple.dll"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#GVFSDir}\System.IO.Compression.dll"
-
-; GVFS.Service Files and PDB's
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#ServiceDir}\GVFS.Service.pdb"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#ServiceDir}\GVFS.Service.exe.config"
-DestDir: "{app}"; Flags: ignoreversion; Source:"{#ServiceDir}\GVFS.Service.exe"; AfterInstall: InstallGVFSService
+DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Source:"{#LayoutDir}\*"
+DestDir: "{app}"; Flags: ignoreversion; Source:"{#LayoutDir}\GVFS.Service.exe"; AfterInstall: InstallGVFSService
[Dirs]
Name: "{app}\ProgramData\{#ServiceName}"; Permissions: users-readexec
@@ -221,7 +101,7 @@ begin
exit;
end;
// look for the path with leading and trailing semicolon
- // Pos() returns 0 if not found
+ // Pos() returns 0 if not found
Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
end;
@@ -336,11 +216,11 @@ var
InstallSuccessful: Boolean;
begin
InstallSuccessful := False;
-
+
StatusText := WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption := 'Installing GVFS.Service.';
WizardForm.ProgressGauge.Style := npbstMarquee;
-
+
try
if Exec(ExpandConstant('{sys}\SC.EXE'), ExpandConstant('create GVFS.Service binPath="{app}\GVFS.Service.exe" start=auto'), '', SW_HIDE, ewWaitUntilTerminated, ResultCode) and (ResultCode = 0) then
begin
@@ -369,7 +249,11 @@ procedure StartGVFSServiceUI();
var
ResultCode: integer;
begin
- if ExecAsOriginalUser(ExpandConstant('{app}\GVFS.Service.UI.exe'), '', '', SW_HIDE, ewNoWait, ResultCode) then
+ if GetEnv('GVFS_UNATTENDED') = '1' then
+ begin
+ Log('StartGVFSServiceUI: Skipping launching GVFS.Service.UI');
+ end
+ else if ExecAsOriginalUser(ExpandConstant('{app}\GVFS.Service.UI.exe'), '', '', SW_HIDE, ewNoWait, ResultCode) then
begin
Log('StartGVFSServiceUI: Successfully launched GVFS.Service.UI');
end
@@ -468,7 +352,7 @@ begin
StatusText := WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption := 'Uninstalling PrjFlt Driver.';
WizardForm.ProgressGauge.Style := npbstMarquee;
-
+
Log('UninstallNonInboxProjFS: Uninstalling ProjFS');
try
UninstallService('prjflt', False);
@@ -477,7 +361,7 @@ begin
if DeleteFileIfItExists(ExpandConstant('{sys}\drivers\prjflt.sys')) then
begin
Result := True;
- end;
+ end;
end;
finally
WizardForm.StatusLabel.Caption := StatusText;
@@ -493,7 +377,7 @@ begin
if FileExists(ExpandConstant('{app}\Filter\PrjFlt.inf')) and FileExists(ExpandConstant('{sys}\drivers\prjflt.sys')) then
begin
UninstallSuccessful := False;
-
+
if Exec('powershell.exe', '-NoProfile "$var=(Get-WindowsOptionalFeature -Online -FeatureName Client-ProjFS); if($var -eq $null){exit 2}else{if($var.State -eq ''Enabled''){exit 3}else{exit 4}}"', '', SW_HIDE, ewWaitUntilTerminated, ProjFSFeatureEnabledResultCode) then
begin
if ProjFSFeatureEnabledResultCode = 2 then
@@ -525,7 +409,7 @@ begin
end;
end;
end;
-
+
if UninstallSuccessful = False then
begin
RaiseException('Fatal: An error occured while uninstalling ProjFS.');
@@ -588,7 +472,7 @@ begin
ExecWithResult(ExpandConstant('{app}') + '\gvfs.exe', 'service --mount-all', '', SW_HIDE, ewWaitUntilTerminated, ResultCode, MountOutput);
WizardForm.StatusLabel.Caption := StatusText;
WizardForm.ProgressGauge.Style := npbstNormal;
-
+
// 4 = ReturnCode.FilterError
if (ResultCode = 4) then
begin
@@ -770,7 +654,7 @@ begin
SetIfNotConfigured('upgrade.feedpackagename', FeedPackageName);
end;
-// Below are EVENT FUNCTIONS -> The main entry points of InnoSetup into the code region
+// Below are EVENT FUNCTIONS -> The main entry points of InnoSetup into the code region
// Documentation : http://www.jrsoftware.org/ishelp/index.php?topic=scriptevents
function InitializeUninstall(): Boolean;
diff --git a/GVFS/GVFS.Installers/info.bat b/GVFS/GVFS.Installers/info.bat
new file mode 100644
index 0000000000..335fc269e7
--- /dev/null
+++ b/GVFS/GVFS.Installers/info.bat
@@ -0,0 +1,68 @@
+@ECHO OFF
+SETLOCAL
+
+SET SYS_PRJFLT=C:\Windows\System32\drivers\prjflt.sys
+SET SYS_PROJFSLIB=C:\Windows\System32\ProjectedFSLib.dll
+SET VFS_PROJFSLIB=C:\Program Files\GVFS\ProjectedFSLib.dll
+SET VFS_BUND_PRJFLT=C:\Program Files\GVFS\Filter\PrjFlt.sys
+SET VFS_BUND_PROJFSLIB=C:\Program Files\GVFS\ProjFS\ProjectedFSLib.dll
+SET VFS_EXEC=C:\Program Files\GVFS\GVFS.exe
+SET GIT_EXEC=C:\Program Files\Git\cmd\git.exe
+
+ECHO Checking ProjFS Windows feature...
+powershell -Command "Get-WindowsOptionalFeature -Online -FeatureName Client-ProjFS"
+
+ECHO Checking ProjFS and GVFS services...
+ECHO GVFS.Service:
+sc query GVFS.Service
+
+ECHO Test.GVFS.Service:
+sc query Test.GVFS.Service
+
+ECHO prjflt:
+sc query prjflt
+
+ECHO Checking ProjFS files...
+IF EXIST "%SYS_PRJFLT%" (
+ ECHO [ FOUND ] %SYS_PRJFLT%
+) ELSE (
+ ECHO [MISSING] %SYS_PRJFLT%
+)
+
+IF EXIST "%SYS_PROJFSLIB%" (
+ ECHO [ FOUND ] %SYS_PROJFSLIB%
+) ELSE (
+ ECHO [MISSING] %SYS_PROJFSLIB%
+)
+
+IF EXIST "%VFS_PROJFSLIB%" (
+ ECHO [ FOUND ] %VFS_PROJFSLIB%
+) ELSE (
+ ECHO [MISSING] %VFS_PROJFSLIB%
+)
+
+IF EXIST "%VFS_BUND_PRJFLT%" (
+ ECHO [ FOUND ] %VFS_BUND_PRJFLT%
+) ELSE (
+ ECHO [MISSING] %VFS_BUND_PRJFLT%
+)
+
+IF EXIST "%VFS_BUND_PROJFSLIB%" (
+ ECHO [ FOUND ] %VFS_BUND_PROJFSLIB%
+) ELSE (
+ ECHO [MISSING] %VFS_BUND_PROJFSLIB%
+)
+
+ECHO.
+ECHO Print product versions...
+IF EXIST "%VFS_EXEC%" (
+ "%VFS_EXEC%" version
+) ELSE (
+ ECHO GVFS not installed at %VFS_EXEC%
+)
+
+IF EXIST "%GIT_EXEC%" (
+ "%GIT_EXEC%" version
+) ELSE (
+ ECHO Git not installed at %GIT_EXEC%
+)
diff --git a/GVFS/GVFS.Installers/install.bat b/GVFS/GVFS.Installers/install.bat
new file mode 100644
index 0000000000..fb92991537
--- /dev/null
+++ b/GVFS/GVFS.Installers/install.bat
@@ -0,0 +1,19 @@
+@ECHO OFF
+SETLOCAL
+
+REM Lookup full paths to Git and VFS for Git installers
+FOR /F "tokens=* USEBACKQ" %%F IN ( `where /R %~dp0 Git*.exe` ) DO SET GIT_INSTALLER=%%F
+FOR /F "tokens=* USEBACKQ" %%F IN ( `where /R %~dp0 SetupGVFS*.exe` ) DO SET GVFS_INSTALLER=%%F
+
+REM Create new empty directory for logs
+SET LOGDIR=%~dp0\logs
+IF EXIST %LOGDIR% (
+ rmdir /S /Q %LOGDIR%
+)
+mkdir %LOGDIR%
+
+ECHO Installing Git for Windows...
+%GIT_INSTALLER% /LOG="%LOGDIR%\git.log" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLOWDOWNGRADE=1
+
+ECHO Installing VFS for Git...
+%GVFS_INSTALLER% /LOG="%LOGDIR%\gvfs.log" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
diff --git a/GVFS/GVFS.MSBuild/CompileTemplatedFile.cs b/GVFS/GVFS.MSBuild/CompileTemplatedFile.cs
new file mode 100644
index 0000000000..a9c3df72cb
--- /dev/null
+++ b/GVFS/GVFS.MSBuild/CompileTemplatedFile.cs
@@ -0,0 +1,88 @@
+using System;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace GVFS.MSBuild
+{
+ public class CompileTemplatedFile : Task
+ {
+ [Required]
+ public ITaskItem Template { get; set; }
+
+ [Required]
+ public string OutputFile { get; set; }
+
+ [Output]
+ public ITaskItem CompiledTemplate { get; set; }
+
+ public override bool Execute()
+ {
+ string templateFilePath = this.Template.ItemSpec;
+ IDictionary properties = ParseProperties(this.Template.GetMetadata("Properties"));
+
+ string outputFileDirectory = Path.GetDirectoryName(this.OutputFile);
+
+ if (!File.Exists(templateFilePath))
+ {
+ this.Log.LogError("Failed to find template file '{0}'.", templateFilePath);
+ return false;
+ }
+
+ // Copy the template to the destination to keep the same file mode bits/ACLs as the template
+ File.Copy(templateFilePath, this.OutputFile, true);
+
+ this.Log.LogMessage(MessageImportance.Low, "Reading template contents");
+ string template = File.ReadAllText(this.OutputFile);
+
+ this.Log.LogMessage(MessageImportance.Normal, "Compiling template '{0}'", templateFilePath);
+ string compiled = Compile(template, properties);
+
+ if (!Directory.Exists(outputFileDirectory))
+ {
+ this.Log.LogMessage(MessageImportance.Low, "Creating output directory '{0}'", outputFileDirectory);
+ Directory.CreateDirectory(outputFileDirectory);
+ }
+
+ this.Log.LogMessage(MessageImportance.Normal, "Writing compiled template to '{0}'", this.OutputFile);
+ File.WriteAllText(this.OutputFile, compiled);
+
+ this.CompiledTemplate = new TaskItem(this.OutputFile, this.Template.CloneCustomMetadata());
+
+ return true;
+ }
+
+ private IDictionary ParseProperties(string propertiesStr)
+ {
+ string[] properties = propertiesStr?.Split(';') ?? new string[0];
+ var dict = new Dictionary();
+
+ foreach (string propertyStr in properties)
+ {
+ string[] kvp = propertyStr.Split(new[] {'='}, count: 2);
+ if (kvp.Length > 1)
+ {
+ string key = kvp[0].Trim();
+ dict[key] = kvp[1].Trim();
+ }
+ }
+
+ return dict;
+ }
+
+ private string Compile(string template, IDictionary properties)
+ {
+ var sb = new StringBuilder(template);
+
+ foreach (var kvp in properties)
+ {
+ this.Log.LogMessage(MessageImportance.Low, "Replacing \"{0}\" -> \"{1}\"", kvp.Key, kvp.Value);
+ sb.Replace(kvp.Key, kvp.Value);
+ }
+
+ return sb.ToString();
+ }
+ }
+}
diff --git a/GVFS/GVFS.MSBuild/GVFS.MSBuild.csproj b/GVFS/GVFS.MSBuild/GVFS.MSBuild.csproj
new file mode 100644
index 0000000000..1505e24e07
--- /dev/null
+++ b/GVFS/GVFS.MSBuild/GVFS.MSBuild.csproj
@@ -0,0 +1,13 @@
+
+
+
+ netstandard2.0
+ false
+
+
+
+
+
+
+
+
diff --git a/GVFS/GVFS.MSBuild/GVFS.targets b/GVFS/GVFS.MSBuild/GVFS.targets
new file mode 100644
index 0000000000..53859d6e62
--- /dev/null
+++ b/GVFS/GVFS.MSBuild/GVFS.targets
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ $(IntermediateOutputPath)app.manifest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GVFS/GVFS.MSBuild/GVFS.tasks b/GVFS/GVFS.MSBuild/GVFS.tasks
new file mode 100644
index 0000000000..b9e9b35aed
--- /dev/null
+++ b/GVFS/GVFS.MSBuild/GVFS.tasks
@@ -0,0 +1,31 @@
+
+
+ <_TaskAssembly>$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll
+ <_TaskFactory>CodeTaskFactory
+
+
+ <_TaskAssembly>$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll
+ <_TaskFactory>RoslynCodeTaskFactory
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GVFS/GVFS.MSBuild/GenerateGVFSConstants.cs b/GVFS/GVFS.MSBuild/GenerateGVFSConstants.cs
new file mode 100644
index 0000000000..bb831584d7
--- /dev/null
+++ b/GVFS/GVFS.MSBuild/GenerateGVFSConstants.cs
@@ -0,0 +1,102 @@
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+using System.IO;
+using System.Text.RegularExpressions;
+
+namespace GVFS.MSBuild
+{
+ public class GenerateGVFSConstants : Task
+ {
+ [Required]
+ public string MinimumGitVersion { get; set; }
+
+ [Required]
+ public string LibGit2FileName { get; set; }
+
+ [Required]
+ public string OutputFile { get; set; }
+
+ public override bool Execute()
+ {
+ this.Log.LogMessage(MessageImportance.Normal,
+ "Creating GVFS constants file with minimum Git version '{0}' at '{1}'...",
+ this.MinimumGitVersion, this.OutputFile);
+
+ if (!TryParseVersion(this.MinimumGitVersion, out var version))
+ {
+ this.Log.LogError("Failed to parse Git version '{0}'.", this.MinimumGitVersion);
+ return false;
+ }
+
+ string outputDirectory = Path.GetDirectoryName(this.OutputFile);
+ if (!Directory.Exists(outputDirectory))
+ {
+ Directory.CreateDirectory(outputDirectory);
+ }
+
+ string template =
+@"//
+// This file is auto-generated by Scalar.Build.GenerateScalarConstants.
+// Any changes made directly in this file will be lost.
+//
+using GVFS.Common.Git;
+
+namespace GVFS.Common
+{{
+ public static partial class GVFSConstants
+ {{
+ public static readonly GitVersion SupportedGitVersion = new GitVersion({0}, {1}, {2}, ""{3}"", {4}, {5});
+ public const string LibGit2LibraryName = ""{6}"";
+ }}
+}}";
+
+ File.WriteAllText(
+ this.OutputFile,
+ string.Format(
+ template,
+ version.Major,
+ version.Minor,
+ version.Build,
+ version.Platform,
+ version.Revision,
+ version.MinorRevision,
+ this.LibGit2FileName));
+
+ return true;
+ }
+
+ private static bool TryParseVersion(string versionString, out GitVersion version)
+ {
+ const string pattern = @"(\d+)\.(\d+)\.(\d+)\.([A-Z]+)\.(\d+)\.(\d+)";
+
+ Match match = Regex.Match(versionString, pattern, RegexOptions.IgnoreCase);
+ if (match.Success)
+ {
+ version = new GitVersion
+ {
+ Major = int.Parse(match.Groups[1].Value),
+ Minor = int.Parse(match.Groups[2].Value),
+ Build = int.Parse(match.Groups[3].Value),
+ Platform = match.Groups[4].Value,
+ Revision = int.Parse(match.Groups[5].Value),
+ MinorRevision = int.Parse(match.Groups[6].Value)
+ };
+
+ return true;
+ }
+
+ version = default(GitVersion);
+ return false;
+ }
+
+ private struct GitVersion
+ {
+ public int Major { get; set; }
+ public int Minor { get; set; }
+ public int Build { get; set; }
+ public string Platform { get; set; }
+ public int Revision { get; set; }
+ public int MinorRevision { get; set; }
+ }
+ }
+}
\ No newline at end of file
diff --git a/GVFS/GVFS.MSBuild/GenerateGVFSVersionHeader.cs b/GVFS/GVFS.MSBuild/GenerateGVFSVersionHeader.cs
new file mode 100644
index 0000000000..a6dcec9367
--- /dev/null
+++ b/GVFS/GVFS.MSBuild/GenerateGVFSVersionHeader.cs
@@ -0,0 +1,48 @@
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+using System.IO;
+
+namespace GVFS.MSBuild
+{
+ public class GenerateGVFSVersionHeader : Task
+ {
+ [Required]
+ public string Version { get; set; }
+
+ [Required]
+ public string OutputFile { get; set; }
+
+ public override bool Execute()
+ {
+ this.Log.LogMessage(MessageImportance.Normal,
+ "Creating GVFS version header file with version '{0}' at '{1}'...",
+ this.Version, this.OutputFile);
+
+ string outputDirectory = Path.GetDirectoryName(this.OutputFile);
+ if (!Directory.Exists(outputDirectory))
+ {
+ Directory.CreateDirectory(outputDirectory);
+ }
+
+ string template =
+@"/*
+ * This file is auto-generated by GVFS.MSBuild.GenerateGVFSVersionHeader.
+ * Any changes made directly in this file will be lost.
+ */
+#define GVFS_FILE_VERSION {1}
+#define GVFS_FILE_VERSION_STRING ""{0}""
+#define GVFS_PRODUCT_VERSION {1}
+#define GVFS_PRODUCT_VERSION_STRING ""{0}""
+";
+
+ File.WriteAllText(
+ this.OutputFile,
+ string.Format(
+ template,
+ this.Version,
+ this.Version?.Replace('.',',')));
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/GVFS/GVFS.Build/GenerateApplicationManifests.cs b/GVFS/GVFS.MSBuild/GenerateWindowsAppManifest.cs
similarity index 75%
rename from GVFS/GVFS.Build/GenerateApplicationManifests.cs
rename to GVFS/GVFS.MSBuild/GenerateWindowsAppManifest.cs
index 296dd39833..fc16070024 100644
--- a/GVFS/GVFS.Build/GenerateApplicationManifests.cs
+++ b/GVFS/GVFS.MSBuild/GenerateWindowsAppManifest.cs
@@ -2,9 +2,9 @@
using Microsoft.Build.Utilities;
using System.IO;
-namespace GVFS.PreBuild
+namespace GVFS.MSBuild
{
- public class GenerateApplicationManifests : Task
+ public class GenerateWindowsAppManifest : Task
{
[Required]
public string Version { get; set; }
@@ -13,13 +13,13 @@ public class GenerateApplicationManifests : Task
public string ApplicationName { get; set; }
[Required]
- public string ManifestPath { get; set; }
+ public string OutputFile { get; set; }
public override bool Execute()
{
- this.Log.LogMessage(MessageImportance.High, "Creating application manifest file for {0}", ApplicationName);
+ this.Log.LogMessage(MessageImportance.Normal, "Creating application manifest file for '{0}'...", this.ApplicationName);
- string manifestDirectory = Path.GetDirectoryName(this.ManifestPath);
+ string manifestDirectory = Path.GetDirectoryName(this.OutputFile);
if (!Directory.Exists(manifestDirectory))
{
Directory.CreateDirectory(manifestDirectory);
@@ -28,9 +28,9 @@ public override bool Execute()
// Any application that calls GetVersionEx must have an application manifest in order to get an accurate response.
// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx for details
File.WriteAllText(
- this.ManifestPath,
+ this.OutputFile,
string.Format(
-@"
+ @"
@@ -47,5 +47,4 @@ public override bool Execute()
return true;
}
}
-}
-
+}
\ No newline at end of file
diff --git a/GVFS/GVFS.Mount/GVFS.Mount.Windows.csproj b/GVFS/GVFS.Mount/GVFS.Mount.Windows.csproj
deleted file mode 100644
index 677a482acf..0000000000
--- a/GVFS/GVFS.Mount/GVFS.Mount.Windows.csproj
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
- {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}
- Exe
- Properties
- GVFS.Mount
- GVFS.Mount
- v4.6.1
- 512
- true
-
-
-
-
- x64
- true
- full
- false
- DEBUG;TRACE
- prompt
- 4
- false
-
-
- x64
- pdbonly
- TRACE
- true
- prompt
- 4
-
-
-
- False
- ..\..\..\packages\CommandLineParser.2.1.1-beta\lib\net45\CommandLine.dll
- True
-
-
- ..\..\..\packages\Microsoft.Data.Sqlite.Core.2.2.4\lib\netstandard2.0\Microsoft.Data.Sqlite.dll
-
-
- False
- ..\..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
- True
-
-
- False
- ..\..\..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll
- True
-
-
- ..\..\..\packages\SQLitePCLRaw.bundle_green.1.1.12\lib\net45\SQLitePCLRaw.batteries_green.dll
-
-
- ..\..\..\packages\SQLitePCLRaw.bundle_green.1.1.12\lib\net45\SQLitePCLRaw.batteries_v2.dll
-
-
- ..\..\..\packages\SQLitePCLRaw.core.1.1.12\lib\net45\SQLitePCLRaw.core.dll
-
-
- ..\..\..\packages\SQLitePCLRaw.provider.e_sqlite3.net45.1.1.12\lib\net45\SQLitePCLRaw.provider.e_sqlite3.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
- PlatformLoader.Windows.cs
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
-
-
- {374bf1e5-0b2d-4d4a-bd5e-4212299def09}
- GVFS.Common
-
-
- {4ce404e7-d3fc-471c-993c-64615861ea63}
- GVFS.Platform.Windows
-
-
- {f468b05a-95e5-46bc-8c67-b80a78527b7d}
- GVFS.Virtualization
-
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
- xcopy /Y $(BuildOutputDir)\GVFS.ReadObjectHook.Windows\bin\$(Platform)\$(Configuration)\GVFS.ReadObjectHook.* $(TargetDir)
-xcopy /Y $(BuildOutputDir)\GVFS.VirtualFileSystemHook.Windows\bin\$(Platform)\$(Configuration)\GVFS.VirtualFileSystemHook.* $(TargetDir)
-xcopy /Y $(BuildOutputDir)\GVFS.PostIndexChangedHook.Windows\bin\$(Platform)\$(Configuration)\GVFS.PostIndexChangedHook.* $(TargetDir)
-xcopy /Y $(BuildOutputDir)\GVFS.Hooks.Windows\bin\$(Platform)\$(Configuration)\GVFS.Hooks.* $(TargetDir)
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.Mount/GVFS.Mount.csproj b/GVFS/GVFS.Mount/GVFS.Mount.csproj
new file mode 100644
index 0000000000..b770e6f99c
--- /dev/null
+++ b/GVFS/GVFS.Mount/GVFS.Mount.csproj
@@ -0,0 +1,22 @@
+
+
+
+ Exe
+ net461
+
+
+
+
+ false
+ Content
+ PreserveNewest
+ Build;DebugSymbolsProjectOutputGroup
+
+
+
+
+
+
+
+
+
diff --git a/GVFS/GVFS.Mount/Properties/AssemblyInfo.cs b/GVFS/GVFS.Mount/Properties/AssemblyInfo.cs
deleted file mode 100644
index cd83cf8c2b..0000000000
--- a/GVFS/GVFS.Mount/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("GVFS.Mount")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("GVFS.Mount")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("b8c1dfbd-cafd-4f7e-a1a3-e11907b5467b")]
diff --git a/GVFS/GVFS.Mount/app.config b/GVFS/GVFS.Mount/app.config
deleted file mode 100644
index 1da8c9b53a..0000000000
--- a/GVFS/GVFS.Mount/app.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/GVFS/GVFS.Mount/packages.config b/GVFS/GVFS.Mount/packages.config
deleted file mode 100644
index 7b9c65be5c..0000000000
--- a/GVFS/GVFS.Mount/packages.config
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GVFS/GVFS.NativeHooks.Common/common.posix.cpp b/GVFS/GVFS.NativeHooks.Common/common.posix.cpp
deleted file mode 100644
index 7e982aadd2..0000000000
--- a/GVFS/GVFS.NativeHooks.Common/common.posix.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-#include "stdafx.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "common.h"
-
-#define MAX_PATH 260
-
-PATH_STRING GetFinalPathName(const PATH_STRING& path)
-{
- // TODO(#1358): Implement
- return path;
-}
-
-PATH_STRING GetGVFSPipeName(const char *appName)
-{
- // The pipe name is built using the path of the GVFS enlistment root.
- // Start in the current directory and walk up the directory tree
- // until we find a folder that contains the ".gvfs" folder
-
- // TODO 640838: Support paths longer than MAX_PATH
- char enlistmentRoot[MAX_PATH];
- if (getcwd(enlistmentRoot, MAX_PATH) == nullptr)
- {
- die(ReturnCode::GetCurrentDirectoryFailure, "getcwd failed (%d)\n", errno);
- }
-
- PATH_STRING finalRootPath(GetFinalPathName(enlistmentRoot));
- size_t enlistmentRootLength = finalRootPath.length();
- // allow an extra byte in case we need to add a trailing slash
- if (enlistmentRootLength + 2 > sizeof(enlistmentRoot))
- {
- die(ReturnCode::PipeConnectError,
- "Could not copy finalRootPath: %s, insufficient buffer. enlistmentRootLength: %zu, sizeof(enlistmentRoot): %zu\n",
- finalRootPath.c_str(),
- enlistmentRootLength,
- sizeof(enlistmentRoot));
- }
-
- memcpy(enlistmentRoot, finalRootPath.c_str(), enlistmentRootLength);
- if (enlistmentRootLength == 0 || enlistmentRoot[enlistmentRootLength - 1] != '/')
- {
- enlistmentRoot[enlistmentRootLength++] = '/';
- }
- enlistmentRoot[enlistmentRootLength] = '\0';
-
- // Walk up enlistmentRoot looking for a folder named .gvfs
- char* lastslash = enlistmentRoot + enlistmentRootLength - 1;
- bool gvfsFound = false;
- while (1)
- {
- *lastslash = '\0';
- DIR* directory = opendir(enlistmentRoot);
- if (directory == nullptr)
- {
- die(ReturnCode::NotInGVFSEnlistment, "Failed to open directory: %s, error: %d\n", enlistmentRoot, errno);
- }
-
- dirent* dirEntry = readdir(directory);
- while (!gvfsFound && dirEntry != nullptr)
- {
- if (dirEntry->d_type == DT_DIR && strcmp(dirEntry->d_name, ".gvfs") == 0)
- {
- gvfsFound = true;
- }
- else
- {
- dirEntry = readdir(directory);
- }
- }
-
- closedir(directory);
-
- if (gvfsFound)
- {
- break;
- }
-
- if (errno != 0)
- {
- die(ReturnCode::NotInGVFSEnlistment, "readdir failed in directory: %s, error: %i\n", enlistmentRoot, errno);
- }
-
- lastslash--;
- while ((enlistmentRoot != lastslash) && (*lastslash != '/'))
- {
- lastslash--;
- }
-
- if (enlistmentRoot == lastslash)
- {
- die(ReturnCode::NotInGVFSEnlistment, "%s must be run from inside a GVFS enlistment\n", appName);
- }
-
- *(lastslash + 1) = 0;
- };
-
- *(lastslash) = 0;
-
- return PATH_STRING(enlistmentRoot) + "/.gvfs/GVFS_NetCorePipe";
-}
-
-PIPE_HANDLE CreatePipeToGVFS(const PATH_STRING& pipeName)
-{
- PIPE_HANDLE socket_fd = socket(PF_UNIX, SOCK_STREAM, 0);
- if (socket_fd < 0)
- {
- die(ReturnCode::PipeConnectError, "Failed to create a new socket, pipeName: %s, error: %d\n", pipeName.c_str(), errno);
- }
-
- struct sockaddr_un socket_address;
- memset(&socket_address, 0, sizeof(struct sockaddr_un));
-
- socket_address.sun_family = AF_UNIX;
- size_t pathLength = pipeName.length();
- if (pathLength + 1 > sizeof(socket_address.sun_path))
- {
- die(ReturnCode::PipeConnectError,
- "Could not copy pipeName: %s, insufficient buffer. pathLength: %zu, sizeof(socket_address.sun_path): %zu\n",
- pipeName.c_str(),
- pathLength,
- sizeof(socket_address.sun_path));
- }
-
- memcpy(socket_address.sun_path, pipeName.c_str(), pathLength);
- socket_address.sun_path[pathLength] = '\0';
-
- if(connect(socket_fd, (struct sockaddr *) &socket_address, sizeof(struct sockaddr_un)) != 0)
- {
- die(ReturnCode::PipeConnectError, "Failed to connect socket, pipeName: %s, error: %d\n", pipeName.c_str(), errno);
- }
-
- return socket_fd;
-}
-
-void DisableCRLFTranslationOnStdPipes()
-{
- // not required on Mac
-}
-
-bool WriteToPipe(PIPE_HANDLE pipe, const char* message, size_t messageLength, /* out */ size_t* bytesWritten, /* out */ int* error)
-{
-
- size_t bytesRemaining = messageLength;
- while (bytesRemaining > 0)
- {
- size_t offset = messageLength - bytesRemaining;
- ssize_t bytesSent = write(pipe, message + offset, bytesRemaining);
-
- if (-1 == bytesSent)
- {
- if (EINTR != errno)
- {
- break;
- }
- }
- else
- {
- bytesRemaining -= bytesSent;
- }
- }
-
- *bytesWritten = messageLength - bytesRemaining;
-
- bool success = *bytesWritten == messageLength;
- *error = success ? 0 : errno;
- return success;
-}
-
-bool ReadFromPipe(PIPE_HANDLE pipe, char* buffer, size_t bufferLength, /* out */ size_t* bytesRead, /* out */ int* error)
-{
- *error = 0;
- *bytesRead = 0;
- ssize_t readByteCount;
-
- do
- {
- readByteCount = recv(pipe, buffer, bufferLength, 0);
- } while (readByteCount == -1 && errno == EINTR);
-
- if (readByteCount < 0)
- {
- *error = errno;
- return false;
- }
-
- *bytesRead = readByteCount;
- return true;
-}
diff --git a/GVFS/GVFS.NativeTests/GVFS.NativeTests.vcxproj b/GVFS/GVFS.NativeTests/GVFS.NativeTests.vcxproj
index f08d118aaf..87352d6112 100644
--- a/GVFS/GVFS.NativeTests/GVFS.NativeTests.vcxproj
+++ b/GVFS/GVFS.NativeTests/GVFS.NativeTests.vcxproj
@@ -1,5 +1,8 @@
+
+ GVFS.ProjFS.2019.411.1
+
Debug
@@ -14,21 +17,19 @@
{3771C555-B5C1-45E2-B8B7-2CEF1619CDC5}
Win32Proj
GVFSNativeTests
- 10.0.10240.0
+ 10.0.16299.0
-
-
DynamicLibrary
true
- v141
+ v142
NotSet
DynamicLibrary
false
- v141
+ v142
true
NotSet
@@ -58,13 +59,13 @@
_DEBUG;_WINDOWS;_USRDLL;GVFSNATIVETESTS_EXPORTS;%(PreprocessorDefinitions)
true
true
- C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt;$(SolutionDir)\GVFS\$(Projectname)\include;$(SolutionDir)\GVFS\$(Projectname)\interface;%(AdditionalIncludeDirectories)
+ C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;$(MSBuildProjectDirectory)\include;$(MSBuildProjectDirectory)\interface;%(AdditionalIncludeDirectories)
Windows
true
ProjectedFSLib.lib;fltlib.lib;Shlwapi.lib;%(AdditionalDependencies)
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;$(PackagesDir)\$(ProjFSNativePackage)\lib
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64;$(BuildPackagesPath)$(ProjFSNativePackage)\lib
@@ -77,7 +78,7 @@
NDEBUG;_WINDOWS;_USRDLL;GVFSNATIVETESTS_EXPORTS;%(PreprocessorDefinitions)
true
true
- C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt;$(SolutionDir)\GVFS\$(Projectname)\include;$(SolutionDir)\GVFS\$(Projectname)\interface;%(AdditionalIncludeDirectories)
+ C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;$(MSBuildProjectDirectory)\include;$(MSBuildProjectDirectory)\interface;%(AdditionalIncludeDirectories)
Windows
@@ -85,7 +86,7 @@
true
true
ProjectedFSLib.lib;fltlib.lib;Shlwapi.lib;%(AdditionalDependencies)
- C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;$(PackagesDir)\$(ProjFSNativePackage)\lib
+ C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64;$(BuildPackagesPath)$(ProjFSNativePackage)\lib
@@ -151,7 +152,8 @@
Create
+
+
+
-
-
-
+
\ No newline at end of file
diff --git a/GVFS/GVFS.NativeTests/GVFS.NativeTests.vcxproj.filters b/GVFS/GVFS.NativeTests/GVFS.NativeTests.vcxproj.filters
index 78765fc3c5..4dfa38544d 100644
--- a/GVFS/GVFS.NativeTests/GVFS.NativeTests.vcxproj.filters
+++ b/GVFS/GVFS.NativeTests/GVFS.NativeTests.vcxproj.filters
@@ -160,4 +160,7 @@
source
+
+
+
\ No newline at end of file
diff --git a/GVFS/GVFS.NativeTests/packages.config b/GVFS/GVFS.NativeTests/packages.config
new file mode 100644
index 0000000000..0dac1a4251
--- /dev/null
+++ b/GVFS/GVFS.NativeTests/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSForGitNotification.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSForGitNotification.h
deleted file mode 100644
index f1978445f6..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSForGitNotification.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#import
-
-NS_ASSUME_NONNULL_BEGIN
-
-extern NSString * const KnownMessagePrefix;
-
-typedef NS_ENUM(NSInteger, Identifier)
-{
- AutomountStart,
- MountSuccess,
- MountFailure,
- UpgradeAvailable,
- UnknownMessage
-};
-
-@interface VFSForGitNotification : NSObject
-
-@property (assign, readonly) Identifier identifier;
-@property (copy, readonly) NSString *title;
-@property (copy, readonly) NSString *actionTitle;
-@property (copy, readonly) NSString *message;
-@property (copy, readonly) NSString *gvfsCommand;
-@property (assign, readonly) BOOL actionable;
-
-+ (BOOL)tryValidateMessage:(NSDictionary *)jsonMessage
- buildNotification:(VFSForGitNotification *_Nullable *_Nonnull)notification
- error:(NSError *__autoreleasing *)error;
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSForGitNotification.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSForGitNotification.m
deleted file mode 100644
index bff539dda6..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSForGitNotification.m
+++ /dev/null
@@ -1,280 +0,0 @@
-#import "VFSForGitNotification.h"
-#import "VFSNotificationErrors.h"
-
-NSString * const IdentifierKey = @"Id";
-NSString * const EnlistmentKey = @"Enlistment";
-NSString * const EnlistmentCountKey = @"EnlistmentCount";
-NSString * const NewUpgradeVersionKey = @"NewVersion";
-NSString * const TitleKey = @"Title";
-NSString * const ActionTitleKey = @"ActionTitle";
-NSString * const IsActionableKey = @"IsActionable";
-NSString * const MessageKey = @"Message";
-NSString * const GVFSCommandKey = @"GVFSCommand";
-
-NSString * const AutomountTitle = @"GVFS AutoMount";
-NSString * const MountGVFSCommandFormat = @"gvfs mount %@";
-NSString * const MountActionTitle = @"Retry";
-NSString * const AutomountStartMessageFormat = @"Attempting to mount %lu GVFS repos(s)";
-NSString * const AutomountSuccessMessageFormat = @"The following GVFS repo is now mounted: \n%@";
-NSString * const AutomountFailureMessageFormat = @"The following GVFS repo failed to mount: \n%@";
-
-NSString * const UpgradeAvailableTitleFormat = @"New version %@ is available";
-NSString * const UpgradeAvailableMessage = @"Upgrade will unmount and remount gvfs repos, ensure you are at a stopping point.\nWhen ready, click Upgrade button to run upgrade.";
-NSString * const UpgradeActionTitle = @"Upgrade";
-NSString * const UpgradeGVFSCommandFormat = @"sudo gvfs upgrade --confirm";
-
-@interface VFSForGitNotification()
-
-@property (readwrite) Identifier identifier;
-@property (readwrite) NSString *title;
-@property (readwrite) NSString *message;
-@property (readwrite) NSString *actionTitle;
-@property (readwrite) NSString *gvfsCommand;
-@property (readwrite) BOOL actionable;
-
-NS_ASSUME_NONNULL_BEGIN
-
-- (instancetype _Nullable)initAsMountSuccessWithMessage:(NSDictionary *)messageDict
- error:(NSError *__autoreleasing *)error;
-
-- (instancetype _Nullable)initAsMountFailureWithMessage:(NSDictionary *)messageDict
- error:(NSError *__autoreleasing *)error;
-
-- (instancetype _Nullable)initAsMountWithMessage:(NSDictionary *)messageDict
- title:(NSString *)title
- messageFormat:(NSString *)messageFormat
- actionFormat:(NSString * _Nullable)commandFormat
- error:(NSError *__autoreleasing *)error;
-
-- (instancetype)initAsUpgradeAvailableWithMessage:(NSDictionary *)messageDict
- error:(NSError *__autoreleasing *)error;
-NS_ASSUME_NONNULL_END
-
-@end
-
-@implementation VFSForGitNotification
-
-+ (BOOL)tryValidateMessage:(NSDictionary *)jsonMessage
- buildNotification:(VFSForGitNotification **)notification
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(notification);
- NSParameterAssert(jsonMessage);
-
- id identifier = jsonMessage[IdentifierKey];
- if (![identifier isKindOfClass:[NSNumber class]])
- {
- if (error != nil)
- {
- *error = [NSError errorWithDomain:VFSForGitNotificationErrorDomain
- code:VFSForGitInvalidMessageIdFormatError
- userInfo:@{ NSLocalizedDescriptionKey : @"Unexpected message id/format)" }];
- }
-
- return NO;
- }
-
- Identifier idValue = [identifier integerValue];
- NSError *initError = nil;
- switch (idValue)
- {
- case AutomountStart:
- {
- *notification = [[VFSForGitNotification alloc]
- initAsAutomountStartWithMessage:jsonMessage
- error:&initError];
- break;
- }
-
- case MountSuccess:
- {
- *notification = [[VFSForGitNotification alloc]
- initAsMountSuccessWithMessage:jsonMessage
- error:&initError];
- break;
- }
-
- case MountFailure:
- {
- *notification = [[VFSForGitNotification alloc]
- initAsMountFailureWithMessage:jsonMessage
- error:&initError];
- break;
- }
-
- case UpgradeAvailable:
- {
- *notification = [[VFSForGitNotification alloc]
- initAsUpgradeAvailableWithMessage:jsonMessage
- error:&initError];
- break;
- }
-
- default:
- {
- *notification = nil;
- initError = [NSError errorWithDomain:VFSForGitNotificationErrorDomain
- code:VFSForGitUnsupportedMessageError
- userInfo:@{ NSLocalizedDescriptionKey : @"Unrecognised message id" }];
- break;
- }
- }
-
- if (error != nil)
- {
- *error = initError;
- }
-
- return *notification != nil;
-}
-
-#pragma mark Private initializers
-
-- (instancetype)initAsAutomountStartWithMessage:(NSDictionary *)messageDict
- error:(NSError *__autoreleasing *)error
-{
- if (self = [super init])
- {
- id repoCount = messageDict[EnlistmentCountKey];
- if ((repoCount != nil) && [repoCount isKindOfClass:[NSNumber class]])
- {
- _title = [AutomountTitle copy];
- _message = [[NSString stringWithFormat:AutomountStartMessageFormat, [repoCount unsignedIntegerValue]] copy];
- }
- else
- {
- if (error != nil)
- {
- *error = [NSError errorWithDomain:VFSForGitNotificationErrorDomain
- code:VFSForGitMissingRepoCountError
- userInfo:@{ NSLocalizedDescriptionKey : @"Missing repos count in AutomountStart message" }];
- }
-
- self = nil;
- }
- }
-
- return self;
-}
-
-- (instancetype)initAsMountSuccessWithMessage:(NSDictionary *)messageDict
- error:(NSError *__autoreleasing *)error
-{
- return self = [self initAsMountWithMessage:messageDict
- title:(NSString *)AutomountTitle
- messageFormat:(NSString *)AutomountSuccessMessageFormat
- actionFormat:nil
- error:error];
-}
-
-- (instancetype)initAsMountFailureWithMessage:(NSDictionary *)messageDict
- error:(NSError *__autoreleasing *)error
-{
- return self = [self initAsMountWithMessage:messageDict
- title:(NSString *)AutomountTitle
- messageFormat:(NSString *)AutomountFailureMessageFormat
- actionFormat:MountGVFSCommandFormat
- error:error];
-}
-
-- (instancetype)initAsMountWithMessage:(NSDictionary *)messageDict
- title:(NSString *)title
- messageFormat:(NSString *)messageFormat
- actionFormat:(NSString *)commandFormat
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(title);
- NSParameterAssert(messageFormat);
-
- if (self = [super init])
- {
- id enlistment = messageDict[EnlistmentKey];
- if ((enlistment != nil) && [enlistment isKindOfClass:[NSString class]])
- {
- _title = [title copy];
- _message = [[NSString stringWithFormat:
- (NSString *)messageFormat,
- enlistment] copy];
- if (commandFormat != nil)
- {
- _gvfsCommand = [[NSString stringWithFormat:commandFormat, enlistment] copy];
- _actionable = YES;
- _actionTitle = MountActionTitle;
- }
-
- return self;
- }
- else
- {
- if (error != nil)
- {
- *error = [NSError errorWithDomain:VFSForGitNotificationErrorDomain
- code:VFSForGitMissingEntitlementInfoError
- userInfo:@{ NSLocalizedDescriptionKey : @"ERROR: missing enlistment info." }];
- }
-
- self = nil;
- }
- }
-
- return self;
-}
-
-- (instancetype)initAsUpgradeAvailableWithMessage:(NSDictionary *)messageDict
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(messageDict);
-
- if (self = [super init])
- {
- id newVersion = messageDict[NewUpgradeVersionKey];
- if ((newVersion != nil) && [newVersion isKindOfClass:[NSString class]])
- {
- _title = [[NSString stringWithFormat:UpgradeAvailableTitleFormat, newVersion] copy];
- _message = [UpgradeAvailableMessage copy];
- _actionTitle = [UpgradeActionTitle copy];
- _actionable = YES;
- _gvfsCommand = [UpgradeGVFSCommandFormat copy];
- }
- else
- {
- if (error != nil)
- {
- *error = [NSError errorWithDomain:VFSForGitNotificationErrorDomain
- code:VFSForGitMissingEntitlementInfoError
- userInfo:@{ NSLocalizedDescriptionKey : @"ERROR: missing new upgrade version info." }];
- }
-
- self = nil;
- }
- }
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)aCoder
-{
- [aCoder encodeObject:[NSNumber numberWithInt:[self identifier]] forKey:IdentifierKey];
- [aCoder encodeObject:[self title] forKey:TitleKey];
- [aCoder encodeObject:[self message] forKey:MessageKey];
- [aCoder encodeObject:[self actionTitle] forKey:ActionTitleKey];
- [aCoder encodeObject:[self gvfsCommand] forKey:GVFSCommandKey];
- [aCoder encodeObject:[NSNumber numberWithBool:[self actionable]] forKey:IsActionableKey];
-}
-
-- (instancetype)initWithCoder:(NSCoder *)aDecoder
-{
- if (self = [super init])
- {
- _identifier = [[aDecoder decodeObjectForKey:IdentifierKey] integerValue];
- _title = [[aDecoder decodeObjectForKey:TitleKey] copy];
- _message = [[aDecoder decodeObjectForKey:MessageKey] copy];
- _actionTitle = [[aDecoder decodeObjectForKey:ActionTitleKey] copy];
- _gvfsCommand = [[aDecoder decodeObjectForKey:GVFSCommandKey] copy];
- _actionable = [[aDecoder decodeObjectForKey:IsActionableKey] boolValue];
- }
-
- return self;
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageListener.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageListener.h
deleted file mode 100644
index 4f161a1317..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageListener.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#import
-
-typedef void (^NewMessageCallback) (NSDictionary *_Nonnull messageInfo);
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface VFSMessageListener : NSObject
-
-@property (copy) NSString *socketPath;
-@property (copy) NewMessageCallback messageCallback;
-
-- (instancetype _Nullable)initWithSocket:(NSString *)socketPath
- callback:(NewMessageCallback)callback;
-- (BOOL)startListening;
-- (void)stopListening;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageListener.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageListener.m
deleted file mode 100644
index a4dce2259d..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageListener.m
+++ /dev/null
@@ -1,163 +0,0 @@
-#import
-#import
-#import
-#import "VFSMessageListener.h"
-#import "VFSMessageParser.h"
-
-NSString * const NotificationServerPipeName = @"vfsforgit.notification";
-
-@interface VFSMessageListener ()
-
-@property (strong) NSFileHandle *connectionHandle;
-@property CFSocketRef socketRef;
-
-@end
-
-@implementation VFSMessageListener
-
-- (instancetype)initWithSocket:(NSString *)socketPath
- callback:(nonnull NewMessageCallback)callback
-{
- if (self = [super init])
- {
- _socketPath =
- [[socketPath stringByAppendingPathComponent:NotificationServerPipeName]
- copy];
- _messageCallback = [callback copy];
- }
-
- return self;
-}
-
-- (void) dealloc
-{
- if (_socketRef != NULL)
- {
- CFSocketInvalidate(_socketRef);
- CFRelease(_socketRef);
- }
-}
-
-- (BOOL)startListening
-{
- CFSocketRef cfSocket;
- if ((cfSocket = CFSocketCreate(kCFAllocatorDefault,
- PF_LOCAL,
- SOCK_STREAM,
- 0,
- kCFSocketNoCallBack,
- NULL,
- NULL)) == NULL)
- {
- return NO;
- }
-
- CFAutorelease(cfSocket);
-
- int reuse = TRUE;
- int socketDescriptor = CFSocketGetNative(cfSocket);
- if (setsockopt(socketDescriptor,
- SOL_SOCKET,
- SO_REUSEADDR,
- (void *) &reuse,
- sizeof(reuse)))
- {
- return NO;
- }
-
- if ([[NSFileManager defaultManager] fileExistsAtPath:self.socketPath] &&
- ![[NSFileManager defaultManager] removeItemAtPath:self.socketPath error:nil])
- {
- return NO;
- }
-
- struct sockaddr_un sockAddress = {};
- memset(&sockAddress, 0, sizeof(sockAddress));
- sockAddress.sun_family = AF_UNIX;
- sockAddress.sun_len = sizeof(sockAddress);
- [self.socketPath getCString:sockAddress.sun_path
- maxLength:sizeof(sockAddress.sun_path)
- encoding:NSUTF8StringEncoding];
-
- CFDataRef addressData = CFDataCreate(kCFAllocatorDefault,
- (const UInt8 *) &sockAddress,
- sizeof(sockAddress));
- CFAutorelease(addressData);
- if (CFSocketSetAddress(cfSocket, addressData) != kCFSocketSuccess)
- {
- return NO;
- }
-
- self.socketRef = (CFSocketRef) CFRetain(cfSocket);
-
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(messageReadCompleteCallback:)
- name:NSFileHandleReadToEndOfFileCompletionNotification
- object:nil];
-
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(newConnectionCallback:)
- name:NSFileHandleConnectionAcceptedNotification
- object:nil];
-
- self.connectionHandle = [[NSFileHandle alloc] initWithFileDescriptor:socketDescriptor
- closeOnDealloc:YES];
- [self.connectionHandle acceptConnectionInBackgroundAndNotify];
-
- return YES;
-}
-
-- (void)stopListening
-{
- [[NSNotificationCenter defaultCenter] removeObserver:self];
-
- CFSocketInvalidate(self.socketRef);
- CFRelease(self.socketRef);
-
- self.socketRef = NULL;
- self.connectionHandle = nil;
-}
-
-- (void)newConnectionCallback:(NSNotification *)notification
-{
- @autoreleasepool
- {
- NSFileHandle *readHandle = [[notification userInfo]
- objectForKey:NSFileHandleNotificationFileHandleItem];
- if (readHandle != nil)
- {
- [readHandle readToEndOfFileInBackgroundAndNotify];
- }
-
- [self.connectionHandle acceptConnectionInBackgroundAndNotify];
- }
-}
-
-- (void)messageReadCompleteCallback:(NSNotification *)notification
-{
- @autoreleasepool
- {
- NSData *data = [[notification userInfo] objectForKey:NSFileHandleNotificationDataItem];
- if ((data != nil) && ([data length] > 0))
- {
- NSError *error;
- NSDictionary *message;
- if([VFSMessageParser tryParseData:data message:&message error:&error])
- {
- self.messageCallback(message);
- }
- else
- {
- NSLog(@"ERROR: Could not parse notification payload: %@.", [error description]);
- }
- }
- else
- {
- NSNumber *unixError = [[notification userInfo] objectForKey:@"NSFileHandleError"];
- NSLog(@"ERROR: Could not read data from socket %s.",
- unixError != nil ? strerror([unixError intValue]) : "");
- }
- }
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageParser.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageParser.h
deleted file mode 100644
index 7860d9ccc0..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageParser.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#import
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface VFSMessageParser : NSObject
-
-+ (BOOL)tryParseData:(NSData *)data
- message:(NSDictionary *_Nullable __autoreleasing *_Nonnull)parsedMessage
- error:(NSError *__autoreleasing *)error;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageParser.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageParser.m
deleted file mode 100644
index f557085142..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/IPC/VFSMessageParser.m
+++ /dev/null
@@ -1,63 +0,0 @@
-#import "VFSMessageParser.h"
-#import "VFSNotificationErrors.h"
-
-NSString * const NotificationPrefix = @"Notification|";
-
-@implementation VFSMessageParser
-
-+ (BOOL)tryParseData:(NSData *)data
- message:(NSDictionary *__autoreleasing *)parsedMessage
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(parsedMessage);
-
- NSString *messageStr;
- if (!(messageStr = [[NSString alloc] initWithData:data
- encoding:NSUTF8StringEncoding]))
- {
- if (error != nil)
- {
- NSString *info = [NSString stringWithFormat:@"%@: ERROR: error reading data.",
- NSStringFromSelector(_cmd)];
- *error = [NSError errorWithDomain:VFSForGitNotificationErrorDomain
- code:VFSForGitMessageReadError
- userInfo:@{ NSLocalizedDescriptionKey : info }];
- }
- *parsedMessage = nil;
- return NO;
- }
-
- if ([messageStr hasPrefix:NotificationPrefix])
- {
- messageStr = [messageStr substringFromIndex:[NotificationPrefix length]];
- }
-
- messageStr = [messageStr stringByTrimmingCharactersInSet:[NSCharacterSet controlCharacterSet]];
-
- NSError *parseError;
- if (!(*parsedMessage = [NSJSONSerialization
- JSONObjectWithData:[messageStr dataUsingEncoding:NSUTF8StringEncoding]
- options:NSJSONReadingAllowFragments
- error:&parseError]))
- {
- if (error != nil)
- {
- if (parseError == nil)
- {
- NSString *info = [NSString stringWithFormat:@"%@: ERROR: Unknown parse error.",
- NSStringFromSelector(_cmd)];
- *error = [NSError errorWithDomain:VFSForGitNotificationErrorDomain
- code:VFSForGitMessageParseError
- userInfo:@{ NSLocalizedDescriptionKey : info }];
- }
- else
- {
- *error = parseError;
- }
- }
- }
-
- return *parsedMessage != nil;
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Info.plist b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Info.plist
deleted file mode 100644
index fef4889365..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Info.plist
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
- LSApplicationCategoryType
-
- NSAppleEventsUsageDescription
- `$(PRODUCT_NAME)` uses `Terminal` app to run `gvfs` commands.
- LSUIElement
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIconFile
-
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
- LSMinimumSystemVersion
- $(MACOSX_DEPLOYMENT_TARGET)
- NSHumanReadableCopyright
- Copyright © 2019 Microsoft. All rights reserved.
- NSMainNibFile
- MainMenu
- NSPrincipalClass
- NSApplication
-
-
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/Contents.json b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/Contents.json
deleted file mode 100644
index da4a164c91..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/Contents.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/Contents.json b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/Contents.json
deleted file mode 100644
index 3830a74e1b..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/Contents.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "VFSForGit_16.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "VFSForGit_32.png",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "filename" : "VFSForGit_64.png",
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/VFSForGit_16.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/VFSForGit_16.png
deleted file mode 100644
index 77915f68a8..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/VFSForGit_16.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/VFSForGit_32.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/VFSForGit_32.png
deleted file mode 100644
index b0bc232fe7..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/VFSForGit_32.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/VFSForGit_64.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/VFSForGit_64.png
deleted file mode 100644
index 72a22b25b4..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/StatusItem.imageset/VFSForGit_64.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/Contents.json b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/Contents.json
deleted file mode 100644
index c15d868722..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/Contents.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "images" : [
- {
- "size" : "16x16",
- "idiom" : "mac",
- "filename" : "VFSForGit_16.png",
- "scale" : "1x"
- },
- {
- "size" : "16x16",
- "idiom" : "mac",
- "filename" : "VFSForGit_32-1.png",
- "scale" : "2x"
- },
- {
- "size" : "32x32",
- "idiom" : "mac",
- "filename" : "VFSForGit_32.png",
- "scale" : "1x"
- },
- {
- "size" : "32x32",
- "idiom" : "mac",
- "filename" : "VFSForGit_64.png",
- "scale" : "2x"
- },
- {
- "size" : "128x128",
- "idiom" : "mac",
- "filename" : "VFSForGit_128.png",
- "scale" : "1x"
- },
- {
- "size" : "128x128",
- "idiom" : "mac",
- "filename" : "VFSForGit_256-1.png",
- "scale" : "2x"
- },
- {
- "size" : "256x256",
- "idiom" : "mac",
- "filename" : "VFSForGit_256.png",
- "scale" : "1x"
- },
- {
- "size" : "256x256",
- "idiom" : "mac",
- "filename" : "VFSForGit_512-1.png",
- "scale" : "2x"
- },
- {
- "size" : "512x512",
- "idiom" : "mac",
- "filename" : "VFSForGit_512.png",
- "scale" : "1x"
- },
- {
- "size" : "512x512",
- "idiom" : "mac",
- "filename" : "VFSForGit_1024.png",
- "scale" : "2x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_1024.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_1024.png
deleted file mode 100644
index 9a08221228..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_1024.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_128.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_128.png
deleted file mode 100644
index d953ad9ae3..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_128.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_16.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_16.png
deleted file mode 100644
index 77915f68a8..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_16.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_256-1.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_256-1.png
deleted file mode 100644
index c57e4e533e..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_256-1.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_256.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_256.png
deleted file mode 100644
index c57e4e533e..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_256.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_32-1.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_32-1.png
deleted file mode 100644
index b0bc232fe7..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_32-1.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_32.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_32.png
deleted file mode 100644
index b0bc232fe7..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_32.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_512-1.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_512-1.png
deleted file mode 100644
index c42a319ef3..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_512-1.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_512.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_512.png
deleted file mode 100644
index c42a319ef3..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_512.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_64.png b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_64.png
deleted file mode 100644
index 72a22b25b4..0000000000
Binary files a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Assets.xcassets/VFS For Git.appiconset/VFSForGit_64.png and /dev/null differ
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Base.lproj/MainMenu.xib b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Base.lproj/MainMenu.xib
deleted file mode 100644
index 91dae4551f..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/Base.lproj/MainMenu.xib
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAboutWindowController.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAboutWindowController.h
deleted file mode 100644
index 54470a1ed3..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAboutWindowController.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#import
-#import "VFSProductInfoFetcher.h"
-
-@interface VFSAboutWindowController : NSWindowController
-
-@property (readonly, nullable) NSString *vfsforgitVersion;
-@property (readonly, nullable) NSString *gitVersion;
-
-- (instancetype _Nullable)initWithProductInfoFetcher:(VFSProductInfoFetcher *_Nonnull)productInfoFetcher;
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAboutWindowController.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAboutWindowController.m
deleted file mode 100644
index bd93a6b8ac..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAboutWindowController.m
+++ /dev/null
@@ -1,55 +0,0 @@
-#import "VFSAboutWindowController.h"
-
-@interface VFSAboutWindowController ()
-
-@property (strong) VFSProductInfoFetcher *productInfoFetcher;
-
-@end
-
-@implementation VFSAboutWindowController
-
-- (instancetype)initWithProductInfoFetcher:(VFSProductInfoFetcher *)productInfoFetcher
-{
- if (productInfoFetcher == nil)
- {
- self = nil;
- }
- else if (self = [super initWithWindowNibName:@"VFSAboutWindowController"])
- {
- _productInfoFetcher = productInfoFetcher;
- }
-
- return self;
-}
-
-- (NSString *)vfsforgitVersion
-{
- NSString *version;
- NSError *error;
- if ([self.productInfoFetcher tryGetVFSForGitVersion:&version error:&error])
- {
- return version;
- }
- else
- {
- NSLog(@"Error getting VFS For Git version: %@", [error description]);
- return @"Not available";
- }
-}
-
-- (NSString *)gitVersion
-{
- NSString *version;
- NSError *error;
- if ([self.productInfoFetcher tryGetGitVersion:&version error:&error])
- {
- return version;
- }
- else
- {
- NSLog(@"Error getting Git version: %@", [error description]);
- return @"Not available";
- }
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAboutWindowController.xib b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAboutWindowController.xib
deleted file mode 100644
index b03070d52c..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAboutWindowController.xib
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAppDelegate.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAppDelegate.h
deleted file mode 100644
index 0033a9e983..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAppDelegate.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#import
-
-@interface VFSAppDelegate : NSObject
-
-@end
-
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAppDelegate.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAppDelegate.m
deleted file mode 100644
index 7b1fe0077d..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSAppDelegate.m
+++ /dev/null
@@ -1,73 +0,0 @@
-#import "VFSAboutWindowController.h"
-#import "VFSAppDelegate.h"
-#import "VFSCommandRunner.h"
-#import "VFSMessageListener.h"
-#import "VFSNotificationDisplay.h"
-#import "VFSForGitNotification.h"
-#import "VFSProductInfoFetcher.h"
-#import "VFSStatusBarItem.h"
-#import "VFSNotificationDisplay.h"
-
-@interface VFSAppDelegate ()
-
-@property (weak) IBOutlet NSWindow *Window;
-@property (strong) VFSStatusBarItem *StatusDisplay;
-@property (strong) VFSMessageListener *messageListener;
-@property (strong) VFSNotificationDisplay *notificationDisplay;
-
-- (void)displayNotification:(NSDictionary *_Nonnull)messageInfo;
-
-@end
-
-@implementation VFSAppDelegate
-
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
-{
- self.messageListener = [[VFSMessageListener alloc]
- initWithSocket:NSTemporaryDirectory()
- callback:^(NSDictionary *messageInfo)
- {
- [self displayNotification:messageInfo];
- }];
-
- [self.messageListener startListening];
-
- VFSProductInfoFetcher *productInfoFetcher =
- [[VFSProductInfoFetcher alloc]
- initWithProcessRunner:[[VFSProcessRunner alloc] initWithProcessFactory:^NSTask *
- {
- return [[NSTask alloc] init];
- }]];
-
- self.StatusDisplay = [[VFSStatusBarItem alloc] initWithAboutWindowController:
- [[VFSAboutWindowController alloc]
- initWithProductInfoFetcher:productInfoFetcher]];
-
- [self.StatusDisplay load];
-
- self.notificationDisplay = [[VFSNotificationDisplay alloc]
- initWithCommandRunner:[[VFSCommandRunner alloc] init]];
-}
-
-- (void)applicationWillTerminate:(NSNotification *)aNotification
-{
- [self.messageListener stopListening];
-}
-
-- (void)displayNotification:(NSDictionary *_Nonnull)messageInfo
-{
- NSParameterAssert(messageInfo);
-
- VFSForGitNotification *notification;
- NSError *error;
- if (![VFSForGitNotification tryValidateMessage:messageInfo
- buildNotification:¬ification
- error:&error])
- {
- NSLog(@"ERROR: Could not display notification. %@", [error description]);
- return;
- }
-
- [self.notificationDisplay display:notification];
-}
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSNotificationDisplay.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSNotificationDisplay.h
deleted file mode 100644
index 8c3979cee8..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSNotificationDisplay.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#import
-#import "VFSForGitNotification.h"
-
-@interface VFSNotificationDisplay : NSObject
-
-- (instancetype)initWithCommandRunner:(VFSCommandRunner *)commandRunner;
-- (void)display:(VFSForGitNotification *) notification;
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSNotificationDisplay.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSNotificationDisplay.m
deleted file mode 100644
index d157508cd2..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSNotificationDisplay.m
+++ /dev/null
@@ -1,70 +0,0 @@
-#import
-#import "VFSCommandRunner.h"
-#import "VFSNotificationDisplay.h"
-
-@interface VFSNotificationDisplay ()
-
-@property (strong, nonnull) VFSCommandRunner *commandRunner;
-
-@end
-
-@implementation VFSNotificationDisplay
-
-- (instancetype)initWithCommandRunner:(VFSCommandRunner *)commandRunner
-{
- if (self = [super init])
- {
- _commandRunner = commandRunner;
- [[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:self];
- }
-
- return self;
-}
-
-- (void)display:(VFSForGitNotification *) notification
-{
- NSUserNotification *userNotification = [[NSUserNotification alloc] init];
- userNotification.title = notification.title;
- userNotification.informativeText = notification.message;
- userNotification.userInfo = [NSDictionary dictionaryWithObject:[NSKeyedArchiver archivedDataWithRootObject:notification]
- forKey:@"VFSForGitNotification"];
- if (notification.actionable == YES)
- {
- userNotification.hasActionButton = notification.actionable;
- userNotification.actionButtonTitle = notification.actionTitle;
- }
-
- [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:userNotification];
-}
-
-- (void)userNotificationCenter:(NSUserNotificationCenter *)center
- didActivateNotification:(NSUserNotification *)notification
-{
- [[NSUserNotificationCenter defaultUserNotificationCenter] removeDeliveredNotification:notification];
-
- VFSForGitNotification *vfsNotification = [NSKeyedUnarchiver
- unarchiveObjectWithData:[[notification userInfo]
- objectForKey:@"VFSForGitNotification"]];
- if (vfsNotification != nil)
- {
- switch (notification.activationType)
- {
- case NSUserNotificationActivationTypeActionButtonClicked:
- {
- if (vfsNotification.gvfsCommand)
- {
- [self.commandRunner runCommand:vfsNotification.gvfsCommand];
- }
-
- break;
- }
-
- default:
- {
- break;
- }
- }
- }
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSStatusBarItem.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSStatusBarItem.h
deleted file mode 100644
index 86160ed123..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSStatusBarItem.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#import
-
-@interface VFSStatusBarItem : NSObject
-
-- (instancetype _Nullable)initWithAboutWindowController:(VFSAboutWindowController *_Nonnull)aboutWindowController;
-- (void)load;
-- (NSMenu *_Nullable)getStatusMenu;
-- (IBAction)handleMenuClick:(id)sender;
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSStatusBarItem.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSStatusBarItem.m
deleted file mode 100644
index 5b3f281e62..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/UI/VFSStatusBarItem.m
+++ /dev/null
@@ -1,97 +0,0 @@
-#import "VFSAboutWindowController.h"
-#import "VFSStatusBarItem.h"
-#import "VFSProductInfoFetcher.h"
-
-@interface VFSStatusBarItem ()
-
-@property (strong, nonnull) NSStatusItem *statusItem;
-@property (strong, nonnull) VFSAboutWindowController *aboutWindowController;
-
-@end
-
-@implementation VFSStatusBarItem
-
-- (instancetype)initWithAboutWindowController:(VFSAboutWindowController *)aboutWindowController
-{
- if (aboutWindowController == nil)
- {
- self = nil;
- }
- else if (self = [super init])
- {
- _aboutWindowController = aboutWindowController;
- }
-
- return self;
-}
-
-- (void)load
-{
- self.statusItem = [[NSStatusBar systemStatusBar]
- statusItemWithLength:NSVariableStatusItemLength];
-
- [self.statusItem setHighlightMode:YES];
-
- [self addStatusButton];
- [self addMenuItems];
-}
-
-- (IBAction)handleMenuClick:(id)sender
-{
- switch (((NSButton *) sender).tag)
- {
- case 0:
- {
- [self displayAboutBox];
- break;
- }
-
- default:
- {
- break;
- }
- }
-}
-
-- (IBAction)displayAboutBox
-{
- [[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
- [self.aboutWindowController showWindow:self];
- [self.aboutWindowController.window makeKeyAndOrderFront:self];
-}
-
-- (NSMenu *)getStatusMenu
-{
- return self.statusItem.menu;
-}
-
-- (void)addStatusButton
-{
- NSImage *image = [NSImage imageNamed:@"StatusItem"];
-
- [image setTemplate:YES];
-
- [self.statusItem.button setImage:image];
- [self.statusItem.button setTarget:nil];
- [self.statusItem.button setAction:nil];
-}
-
-- (void)addMenuItems
-{
- NSUInteger index = 0;
- NSMenu *menu = [[NSMenu alloc] init];
- NSMenuItem *aboutItem = [[NSMenuItem alloc]
- initWithTitle:@"About VFS For Git"
- action:@selector(handleMenuClick:)
- keyEquivalent:@""];
-
- [aboutItem setTag:0];
- [aboutItem setTarget:self];
- [menu insertItem:[NSMenuItem separatorItem] atIndex:index++];
- [menu insertItem:aboutItem atIndex:index++];
- [menu setAutoenablesItems:NO];
-
- [self.statusItem setMenu:menu];
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSCommandRunner.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSCommandRunner.h
deleted file mode 100644
index db7797276c..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSCommandRunner.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#import
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface VFSCommandRunner : NSObject
-
-- (void) runCommand:(NSString *) command;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSCommandRunner.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSCommandRunner.m
deleted file mode 100644
index e44bf3e10b..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSCommandRunner.m
+++ /dev/null
@@ -1,25 +0,0 @@
-#import "VFSCommandRunner.h"
-
-NSString * const LaunchTerminalScriptFormat = @"\
-tell application \"Terminal\" \n\
-activate \n\
-do script (\"echo;echo Running gvfs command: %@;echo You might need to type Admin password;%@ \") \n\
-end tell";
-
-@implementation VFSCommandRunner
-
-- (void) runCommand:(NSString *) command
-{
- NSString *scriptSource = [NSString stringWithFormat:LaunchTerminalScriptFormat, command, command];
- NSAppleScript *scriptObject = [[NSAppleScript alloc] initWithSource:scriptSource];
- NSDictionary *errorDict;
- NSAppleEventDescriptor *returnDescriptor = NULL;
-
- returnDescriptor = [scriptObject executeAndReturnError: &errorDict];
- if (returnDescriptor == nil)
- {
- NSLog(@"Error running %@. %@", command, [errorDict description]);
- }
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSNotificationErrors.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSNotificationErrors.h
deleted file mode 100644
index f9b10c96a3..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSNotificationErrors.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#import
-
-NS_ASSUME_NONNULL_BEGIN
-
-extern NSErrorDomain const VFSForGitNotificationErrorDomain;
-typedef NS_ERROR_ENUM(VFSForGitNotificationErrorDomain, VFSForGitNotificationErrorCode)
-{
- VFSForGitInitError = 200,
- VFSForGitAllocError,
- VFSForGitInvalidMessageIdFormatError,
- VFSForGitUnsupportedMessageError,
- VFSForGitMissingEntitlementInfoError,
- VFSForGitMissingRepoCountError,
- VFSForGitMessageParseError,
- VFSForGitMessageReadError,
-};
-
-NS_ASSUME_NONNULL_END
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSNotificationErrors.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSNotificationErrors.m
deleted file mode 100644
index 2f21d3c6e4..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSNotificationErrors.m
+++ /dev/null
@@ -1,3 +0,0 @@
-#import "VFSNotificationErrors.h"
-
-NSErrorDomain const VFSForGitNotificationErrorDomain = @"VFSForGitNotificationErrorDomain";
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProcessRunner.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProcessRunner.h
deleted file mode 100644
index be03a9be13..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProcessRunner.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#import
-
-NS_ASSUME_NONNULL_BEGIN
-
-typedef NSTask *_Nonnull (^ProcessFactory)(void);
-
-@interface VFSProcessRunner : NSObject
-
-- (instancetype _Nullable)initWithProcessFactory:(ProcessFactory)processFactory;
-- (BOOL)tryRunExecutable:(NSURL *)path
- args:(NSArray *_Nullable)args
- output:(NSString *_Nullable __autoreleasing *_Nonnull)output
- error:(NSError * __autoreleasing *)error;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProcessRunner.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProcessRunner.m
deleted file mode 100644
index 6c017ddeb9..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProcessRunner.m
+++ /dev/null
@@ -1,82 +0,0 @@
-#import "VFSProcessRunner.h"
-#import "VFSNotificationErrors.h"
-
-@interface VFSProcessRunner()
-
-@property (strong) ProcessFactory processFactory;
-
-@end
-
-@implementation VFSProcessRunner
-
-- (instancetype)initWithProcessFactory:(ProcessFactory)processFactory
-{
- if (processFactory == nil)
- {
- self = nil;
- }
- else if (self = [super init])
- {
- _processFactory = processFactory;
- }
-
- return self;
-}
-
-/**
- Runs an executable specified by path and args. If the executable could be run
- successfully - output will contain the executable's combined stderr/stdout
- output and the method returns YES. In case of failure, it returns NO and error
- will hold the executable's combined stderr/stdout output.
-
- @param path - specify full path to the executable.
- @param args - specify any command line args to pass to the executable.
- @param output - contains executable's output, if it was successfully run.
- @param error - contains executable's output, if it exited with an error.
- @return YES if the executable was successfully run, NO otherwise.
- */
-- (BOOL)tryRunExecutable:(NSURL *)path
- args:(NSArray *)args
- output:(NSString *__autoreleasing *)output
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(path);
- NSParameterAssert(output);
-
- NSTask *task = self.processFactory();
- NSPipe *taskOut = [NSPipe pipe];
-
- task.executableURL = path;
- task.arguments = args;
- task.standardOutput = taskOut;
- task.standardError = taskOut;
-
- int exitCode = -1;
-
- if ([task launchAndReturnError:error])
- {
- [task waitUntilExit];
-
- exitCode = [task terminationStatus];
-
- *output = [[NSString alloc] initWithData:[taskOut.fileHandleForReading availableData]
- encoding:NSUTF8StringEncoding];
-
- if (0 != exitCode)
- {
- if (error != nil)
- {
- NSDictionary *userInfo = @{ NSLocalizedDescriptionKey : *output };
- *error = [NSError errorWithDomain:VFSForGitNotificationErrorDomain
- code:exitCode
- userInfo:userInfo];
- }
-
- *output = nil;
- }
- }
-
- return 0 == exitCode;
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProductInfoFetcher.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProductInfoFetcher.h
deleted file mode 100644
index 32a3a53e93..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProductInfoFetcher.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#import
-#import "VFSProcessRunner.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface VFSProductInfoFetcher : NSObject
-
-- (instancetype _Nullable)initWithProcessRunner:(VFSProcessRunner *)processRunner;
-- (BOOL)tryGetGitVersion:(NSString *_Nullable __autoreleasing *_Nonnull)version
- error:(NSError **)error;
-- (BOOL)tryGetVFSForGitVersion:(NSString *_Nullable __autoreleasing *_Nonnull)version
- error:(NSError **)error;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProductInfoFetcher.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProductInfoFetcher.m
deleted file mode 100644
index 8b9014830a..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/Utilities/VFSProductInfoFetcher.m
+++ /dev/null
@@ -1,61 +0,0 @@
-#import
-#import "VFSProductInfoFetcher.h"
-
-NSString * const VFSForGitPath = @"/usr/local/bin/gvfs";
-NSString * const GitPath = @"/usr/local/bin/git";
-
-@interface VFSProductInfoFetcher()
-
-@property (strong, nonnull) VFSProcessRunner *processRunner;
-
-@end
-
-@implementation VFSProductInfoFetcher
-
-- (instancetype)initWithProcessRunner:(VFSProcessRunner *)processRunner
-{
- if (processRunner == nil)
- {
- self = nil;
- }
- else if (self = [super init])
- {
- _processRunner = processRunner;
- }
-
- return self;
-}
-
-- (BOOL)tryGetVFSForGitVersion:(NSString *__autoreleasing *)version
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(version);
-
- if (![self.processRunner tryRunExecutable:[NSURL fileURLWithPath:VFSForGitPath]
- args:@[ @"version" ]
- output:version
- error:error])
- {
- return NO;
- }
-
- return YES;
-}
-
-- (BOOL)tryGetGitVersion:(NSString *__autoreleasing *)version
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(version);
-
- if (![self.processRunner tryRunExecutable:[NSURL fileURLWithPath:GitPath]
- args:@[ @"version" ]
- output:version
- error:error])
- {
- return NO;
- }
-
- return YES;
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/VFSForGit.entitlements b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/VFSForGit.entitlements
deleted file mode 100644
index f2ef3ae026..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/VFSForGit.entitlements
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- com.apple.security.app-sandbox
-
- com.apple.security.files.user-selected.read-only
-
-
-
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/main.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/main.m
deleted file mode 100644
index 3eb7a378e1..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/StatusMenuItem/main.m
+++ /dev/null
@@ -1,6 +0,0 @@
-#import
-
-int main(int argc, const char * argv[])
-{
- return NSApplicationMain(argc, argv);
-}
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Info.plist b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Info.plist
deleted file mode 100644
index 6c40a6cd0c..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- BNDL
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
-
-
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockAboutWindowController.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockAboutWindowController.h
deleted file mode 100644
index b70ef79b33..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockAboutWindowController.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#import
-#import "VFSAboutWindowController.h"
-
-@interface VFSMockAboutWindowController : VFSAboutWindowController
-
-@property (readonly) BOOL aboutBoxDisplayed;
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockAboutWindowController.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockAboutWindowController.m
deleted file mode 100644
index fd9ff69924..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockAboutWindowController.m
+++ /dev/null
@@ -1,23 +0,0 @@
-#import
-#import "VFSMockAboutWindowController.h"
-
-@interface VFSMockAboutWindowController()
-
-@property (readwrite) BOOL aboutBoxDisplayed;
-
-@end
-
-@implementation VFSMockAboutWindowController
-
-- (instancetype) initWithProductInfo:(VFSProductInfoFetcher *) productInfo
-{
- self = [super initWithProductInfoFetcher:productInfo];
- return self;
-}
-
-- (IBAction)showWindow:(nullable id)sender
-{
- self.aboutBoxDisplayed = YES;
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockNotificationCenter.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockNotificationCenter.h
deleted file mode 100644
index 357ffab45c..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockNotificationCenter.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#import
-
-@interface VFSMockNotificationCenter : NSUserNotificationCenter
-
-@property (assign) BOOL notificationDelivered;
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockNotificationCenter.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockNotificationCenter.m
deleted file mode 100644
index 6d9a2dd01a..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockNotificationCenter.m
+++ /dev/null
@@ -1,31 +0,0 @@
-#import
-#import "VFSMockNotificationCenter.h"
-
-@interface VFSMockNotificationCenter ()
-
-@property (strong) NSUserNotification *expectedNotification;
-
-@end
-
-@implementation VFSMockNotificationCenter
-
-- (instancetype) initWithExpectedNotification:(NSUserNotification *) notification
-{
- if (self = [super init])
- {
- _expectedNotification = notification;
- }
-
- return self;
-}
-
-- (void)deliverNotification:(NSUserNotification *) notification
-{
- if ([notification.title isEqualToString:self.expectedNotification.title] &&
- [notification.informativeText isEqualToString:self.expectedNotification.informativeText])
- {
- self.notificationDelivered = YES;
- }
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockProductInfoFetcher.h b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockProductInfoFetcher.h
deleted file mode 100644
index 32c7654c79..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockProductInfoFetcher.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#import
-#import "VFSProductInfoFetcher.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface VFSMockProductInfoFetcher : VFSProductInfoFetcher
-
-- (instancetype _Nullable) initWithGitVersion:(NSString *) gitVersion
- vfsforgitVersion:(NSString *) vfsforgitVersion;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockProductInfoFetcher.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockProductInfoFetcher.m
deleted file mode 100644
index 500d95f68e..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/Mocks/VFSMockProductInfoFetcher.m
+++ /dev/null
@@ -1,39 +0,0 @@
-#import
-#import "VFSMockProductInfoFetcher.h"
-
-@interface VFSMockProductInfoFetcher()
-
-@property (copy) NSString *gitVersion;
-@property (copy) NSString *vfsforgitVersion;
-
-@end
-
-@implementation VFSMockProductInfoFetcher
-
-- (instancetype) initWithGitVersion:(NSString *) gitVersion
- vfsforgitVersion:(NSString *) vfsforgitVersion
-{
- if (self = [super init])
- {
- _gitVersion = [gitVersion copy];
- _vfsforgitVersion = [vfsforgitVersion copy];
- }
-
- return self;
-}
-
-- (BOOL) tryGetVFSForGitVersion:(NSString *__autoreleasing *) version
- error:(NSError *__autoreleasing *) error
-{
- *version = self.vfsforgitVersion;
- return YES;
-}
-
-- (BOOL) tryGetGitVersion:(NSString *__autoreleasing *) version
- error:(NSError *__autoreleasing *) error
-{
- *version = self.gitVersion;
- return YES;
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSAboutWindowControllerTests.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSAboutWindowControllerTests.m
deleted file mode 100644
index 96fcdb41f2..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSAboutWindowControllerTests.m
+++ /dev/null
@@ -1,47 +0,0 @@
-#import
-#import "VFSMockAboutWindowController.h"
-#import "VFSMockProductInfoFetcher.h"
-
-NSString * const ExpectedGitVersionString = @"2.20.1.vfs.1.1.104.g2ab7360";
-NSString * const ExpectedVFSForGitVersionString = @"1.0.19116.1";
-
-@interface VFSAboutWindowControllerTests : XCTestCase
-
-@property (strong) VFSAboutWindowController *windowController;
-
-@end
-
-@implementation VFSAboutWindowControllerTests
-
-- (void)setUp
-{
- [super setUp];
-
- VFSMockProductInfoFetcher *mockProductInfoFetcher =
- [[VFSMockProductInfoFetcher alloc] initWithGitVersion:(NSString *) ExpectedGitVersionString
- vfsforgitVersion:(NSString *) ExpectedVFSForGitVersionString];
-
- self.windowController = [[VFSAboutWindowController alloc]
- initWithProductInfoFetcher:mockProductInfoFetcher];
-}
-
-- (void)tearDown
-{
- [super tearDown];
-}
-
-- (void)testAboutWindowContainsGVFSVersion
-{
- XCTAssertEqual(self.windowController.vfsforgitVersion,
- ExpectedVFSForGitVersionString,
- @"Incorrect VFSForGit version displayed in About box");
-}
-
-- (void)testAboutWindowContainsGitVersion
-{
- XCTAssertEqual(self.windowController.gitVersion,
- ExpectedGitVersionString,
- @"Incorrect Git version displayed in About box");
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSForGitNotificationTests.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSForGitNotificationTests.m
deleted file mode 100644
index 3935e17dd3..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSForGitNotificationTests.m
+++ /dev/null
@@ -1,93 +0,0 @@
-#import
-#import "VFSForGitNotification.h"
-
-@interface VFSForGitNotificationTests : XCTestCase
-@end
-
-@implementation VFSForGitNotificationTests
-
-- (void)testCreateNotificationWithMissingIdFails
-{
- NSDictionary *message = @{
- @"Title" : @"foo",
- @"Message" : @"bar",
- @"Enlistment" : @"/foo/bar",
- @"EnlistmentCount" : [NSNumber numberWithLong:0]
- };
-
- NSError *error;
- VFSForGitNotification *notification;
-
- XCTAssertFalse([VFSForGitNotification tryValidateMessage:message
- buildNotification:¬ification
- error:&error]);
- XCTAssertNotNil(error);
-}
-
-- (void)testCreateNotificationWithInvalidIdFails
-{
- NSDictionary *message = @{
- @"Id" : [NSNumber numberWithLong:32],
- @"Title" : @"foo",
- @"Message" : @"bar",
- @"EnlistmentCount" : [NSNumber numberWithLong:0]
- };
-
- NSError *error;
- VFSForGitNotification *notification;
- XCTAssertFalse([VFSForGitNotification tryValidateMessage:message
- buildNotification:¬ification
- error:&error]);
- XCTAssertNotNil(error);
-}
-
-- (void)testCreateAutomountNotificationWithValidMessageSucceeds
-{
- NSDictionary *message = @{
- @"Id" : [NSNumber numberWithLong:0],
- @"EnlistmentCount" : [NSNumber numberWithLong:5]
- };
-
- NSError *error;
- VFSForGitNotification *notification;
- XCTAssertTrue([VFSForGitNotification tryValidateMessage:message
- buildNotification:¬ification
- error:&error]);
- XCTAssertTrue([notification.title isEqualToString:@"GVFS AutoMount"]);
- XCTAssertTrue([notification.message isEqualToString:@"Attempting to mount 5 GVFS repos(s)"]);
- XCTAssertNil(error);
-}
-
-- (void)testCreateMountNotificationWithValidMessageSucceeds
-{
- NSString *enlistment = @"/Users/foo/bar/foo.bar";
- NSDictionary *message = @{
- @"Id" : [NSNumber numberWithLong:1],
- @"Enlistment" : enlistment
- };
-
- NSError *error;
- VFSForGitNotification *notification;
- XCTAssertTrue([VFSForGitNotification tryValidateMessage:message
- buildNotification:¬ification
- error:&error]);
- XCTAssertTrue([notification.title isEqualToString:@"GVFS AutoMount"]);
- XCTAssertTrue([notification.message containsString:enlistment]);
- XCTAssertNil(error);
-}
-
-- (void)testCreateMountNotificationWithMissingEnlistmentFails
-{
- NSDictionary *message = @{
- @"Id" : [NSNumber numberWithLong:1],
- };
-
- NSError *error;
- VFSForGitNotification *notification;
- XCTAssertFalse([VFSForGitNotification tryValidateMessage:message
- buildNotification:¬ification
- error:&error]);
- XCTAssertNotNil(error);
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSMessageParserTests.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSMessageParserTests.m
deleted file mode 100644
index 3f3b14f977..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSMessageParserTests.m
+++ /dev/null
@@ -1,115 +0,0 @@
-#import
-#import "VFSMessageParser.h"
-
-@interface MessageParserTests : XCTestCase
-@end
-
-@implementation MessageParserTests
-
-- (void)testParsingValidMessageSucceeds
-{
- NSDictionary *expectedDict = [self validMessage];
- NSData *messageData =
- [NSJSONSerialization dataWithJSONObject:expectedDict
- options:NSJSONWritingPrettyPrinted
- error:nil];
-
- NSError *error;
- NSDictionary *parsedMessage;
- XCTAssertTrue([VFSMessageParser tryParseData:messageData
- message:&parsedMessage
- error:&error]);
- XCTAssertNil(error);
-
- [self validateParsedMessage:parsedMessage expectedMessage:expectedDict];
-}
-
-- (void)testParsingMessageWithTrailingCtrlCharsSucceed
-{
- NSDictionary *expectedDict = [self validMessage];
- NSData *messageData =
- [NSJSONSerialization dataWithJSONObject:expectedDict
- options:NSJSONWritingPrettyPrinted
- error:nil];
- NSMutableData *dataWithCtrlChars = [NSMutableData dataWithData:messageData];
- NSString *stringWithCtrlChars = [NSString stringWithFormat:@"%c%c%c%c%c%c%c",
- 0x07,
- 0x08,
- 0x1B,
- 0x0C,
- 0x0A,
- 0x0D,
- 0x09];
- [dataWithCtrlChars appendData:[stringWithCtrlChars
- dataUsingEncoding:NSUTF8StringEncoding]];
-
- NSError *error;
- NSDictionary *parsedMessage;
- XCTAssertTrue([VFSMessageParser tryParseData:dataWithCtrlChars
- message:&parsedMessage
- error:&error]);
- XCTAssertNil(error);
-
- [self validateParsedMessage:parsedMessage expectedMessage:expectedDict];
-}
-
-- (void)testParsingMalformedMessageFails
-{
- NSString *message = @"{ \"Id\", \"Message\", \"Foobar\"}";
- NSError *error;
- NSDictionary *parsedMessage;
- XCTAssertFalse([VFSMessageParser tryParseData:[message dataUsingEncoding:NSUTF8StringEncoding]
- message:&parsedMessage
- error:&error]);
- XCTAssertNil(parsedMessage);
- XCTAssertNotNil(error);
-}
-
-- (void)testParsingEmptyMessageFails
-{
- NSString *message = @"";
- NSError *error;
- NSDictionary *parsedMessage;
-
- XCTAssertFalse([VFSMessageParser tryParseData:[message dataUsingEncoding:NSUTF8StringEncoding]
- message:&parsedMessage
- error:&error]);
- XCTAssertNil(parsedMessage);
- XCTAssertNotNil(error);
-}
-
-#pragma mark Utility Methods
-
-- (NSDictionary *)validMessage
-{
- NSInteger messageId = 1;
- NSString *title = @"GVFS Mount";
- NSString *message = @"Successfully mount repo";
- NSString *enlistment = @"/Users/foo/bar";
- NSInteger enlistmentCount = 0;
- NSDictionary *validDict = @{
- @"Id" : [NSNumber numberWithLong:messageId],
- @"Title" : title,
- @"Message" : message,
- @"Enlistment" : enlistment,
- @"EnlistmentCount" : [NSNumber numberWithLong:enlistmentCount]
- };
- return validDict;
-}
-
-- (BOOL)validateParsedMessage:(NSDictionary *)messageDict
- expectedMessage:(NSDictionary *)expectedDict
-{
- XCTAssertNotNil(messageDict, @"Parse error: failure parsing message");
-
- [messageDict enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key,
- id _Nonnull obj,
- BOOL * _Nonnull stop)
- {
- XCTAssertEqualObjects(obj,
- expectedDict[key],
- @"Parse error: mismatch in values of %@",
- key);
- }];
-}
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSStatusBarItemTests.m b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSStatusBarItemTests.m
deleted file mode 100644
index 302ecd4d33..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.UnitTests/VFSStatusBarItemTests.m
+++ /dev/null
@@ -1,56 +0,0 @@
-#import
-#import "VFSMockAboutWindowController.h"
-#import "VFSMockProductInfoFetcher.h"
-#import "VFSStatusBarItem.h"
-
-NSString * const ExpectedAboutMenuTitle = @"About VFS For Git";
-
-@interface VFSStatusBarItemTests : XCTestCase
-
-@property (strong) VFSStatusBarItem *statusbarItem;
-@property (strong) VFSMockAboutWindowController *aboutWindowController;
-
-@end
-
-@implementation VFSStatusBarItemTests
-
-- (void)setUp
-{
- [super setUp];
-
- VFSMockProductInfoFetcher *mockProductInfoFetcher = [[VFSMockProductInfoFetcher alloc]
- initWithGitVersion:@""
- vfsforgitVersion:@""];
-
- self.aboutWindowController = [[VFSMockAboutWindowController alloc]
- initWithProductInfoFetcher:mockProductInfoFetcher];
- self.statusbarItem = [[VFSStatusBarItem alloc]
- initWithAboutWindowController:self.aboutWindowController];
-
- [self.statusbarItem load];
-}
-
-- (void)tearDown
-{
- [super tearDown];
-}
-
-- (void)testStatusItemContainsAboutMenu
-{
- NSMenu *statusMenu = [self.statusbarItem getStatusMenu];
- XCTAssertNotNil(statusMenu, @"Status bar does not contain VFSForGit menu");
-
- NSMenuItem *menuItem = [statusMenu itemWithTitle:ExpectedAboutMenuTitle];
- XCTAssertNotNil(menuItem, @"Missing \"%@\" item in VFSForGit menu", ExpectedAboutMenuTitle);
-}
-
-- (void)testAboutMenuClickDisplaysAboutBox
-{
- [self.statusbarItem handleMenuClick:nil];
-
- XCTAssertTrue(self.aboutWindowController.aboutBoxDisplayed,
- @"Clicking on \"%@\" menu does not show About box",
- ExpectedAboutMenuTitle);
-}
-
-@end
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.xcodeproj/project.pbxproj b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.xcodeproj/project.pbxproj
deleted file mode 100644
index 2664a692e9..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,595 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 50;
- objects = {
-
-/* Begin PBXBuildFile section */
- 433FE819227B593500488730 /* VFSAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 433FE818227B593500488730 /* VFSAppDelegate.m */; };
- 433FE81B227B594300488730 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 433FE81A227B594300488730 /* Assets.xcassets */; };
- 433FE81E227B594300488730 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 433FE81C227B594300488730 /* MainMenu.xib */; };
- 433FE821227B594300488730 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 433FE820227B594300488730 /* main.m */; };
- 433FE8562280C21000488730 /* VFSStatusBarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 433FE8542280C21000488730 /* VFSStatusBarItem.m */; };
- 433FE85A2280E10F00488730 /* VFSProductInfoFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 433FE8592280E10F00488730 /* VFSProductInfoFetcher.m */; };
- 433FE8632281D06100488730 /* VFSAboutWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 433FE8602281D06000488730 /* VFSAboutWindowController.m */; };
- 433FE8642281D06100488730 /* VFSAboutWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 433FE8612281D06100488730 /* VFSAboutWindowController.xib */; };
- 43583C362289BDAA003357D6 /* VFSStatusBarItemTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 43583C352289BDAA003357D6 /* VFSStatusBarItemTests.m */; };
- 43583C382289BE94003357D6 /* VFSAboutWindowControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 43583C372289BE94003357D6 /* VFSAboutWindowControllerTests.m */; };
- 435B1E0F228CC1E000E853F3 /* VFSProcessRunner.m in Sources */ = {isa = PBXBuildFile; fileRef = 435B1E0E228CC1E000E853F3 /* VFSProcessRunner.m */; };
- 43AF0DF822B01C9800E54D48 /* VFSForGitNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 43AF0DF422B01C9700E54D48 /* VFSForGitNotification.m */; };
- 43AF0DFA22B01C9800E54D48 /* VFSMessageParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 43AF0DF522B01C9700E54D48 /* VFSMessageParser.m */; };
- 43AF0DFC22B01C9800E54D48 /* VFSMessageListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 43AF0DF622B01C9800E54D48 /* VFSMessageListener.m */; };
- 43AF0E0222B01E3200E54D48 /* VFSNotificationDisplay.m in Sources */ = {isa = PBXBuildFile; fileRef = 43AF0E0122B01E3200E54D48 /* VFSNotificationDisplay.m */; };
- 43AF0E0322B023BE00E54D48 /* VFSMockAboutWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 435B1DFA228B4C8400E853F3 /* VFSMockAboutWindowController.m */; };
- 43AF0E0422B023BE00E54D48 /* VFSMockProductInfoFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 435B1DFE228B590100E853F3 /* VFSMockProductInfoFetcher.m */; };
- 43AF0E0522B023BE00E54D48 /* VFSMockNotificationCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 435B1E01228B6C3900E853F3 /* VFSMockNotificationCenter.m */; };
- 43AF0E0822B023F200E54D48 /* VFSMessageParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 43AF0E0622B023F200E54D48 /* VFSMessageParserTests.m */; };
- 43AF0E0922B023F200E54D48 /* VFSForGitNotificationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 43AF0E0722B023F200E54D48 /* VFSForGitNotificationTests.m */; };
- 43C021F022B18BDD00F868F2 /* VFSNotificationErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C021EF22B18BDD00F868F2 /* VFSNotificationErrors.m */; };
- 43C0221A22BBFA7A00F868F2 /* VFSCommandRunner.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C0221822BBFA7A00F868F2 /* VFSCommandRunner.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- 43583C302285E3E1003357D6 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 433FE80C227B593500488730 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 433FE813227B593500488730;
- remoteInfo = VFSForGit;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
- 433FE814227B593500488730 /* VFS For Git.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "VFS For Git.app"; sourceTree = BUILT_PRODUCTS_DIR; };
- 433FE817227B593500488730 /* VFSAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VFSAppDelegate.h; sourceTree = ""; };
- 433FE818227B593500488730 /* VFSAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VFSAppDelegate.m; sourceTree = ""; };
- 433FE81A227B594300488730 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
- 433FE81D227B594300488730 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
- 433FE81F227B594300488730 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 433FE820227B594300488730 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
- 433FE822227B594300488730 /* VFSForGit.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = VFSForGit.entitlements; sourceTree = ""; };
- 433FE8532280C21000488730 /* VFSStatusBarItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VFSStatusBarItem.h; sourceTree = ""; };
- 433FE8542280C21000488730 /* VFSStatusBarItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VFSStatusBarItem.m; sourceTree = ""; };
- 433FE8582280E10F00488730 /* VFSProductInfoFetcher.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VFSProductInfoFetcher.h; sourceTree = ""; };
- 433FE8592280E10F00488730 /* VFSProductInfoFetcher.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VFSProductInfoFetcher.m; sourceTree = ""; };
- 433FE8602281D06000488730 /* VFSAboutWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VFSAboutWindowController.m; sourceTree = ""; };
- 433FE8612281D06100488730 /* VFSAboutWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VFSAboutWindowController.xib; sourceTree = ""; };
- 433FE8622281D06100488730 /* VFSAboutWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VFSAboutWindowController.h; sourceTree = ""; };
- 43583C2B2285E3E1003357D6 /* VFSForGit.UnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VFSForGit.UnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
- 43583C2F2285E3E1003357D6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 43583C352289BDAA003357D6 /* VFSStatusBarItemTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VFSStatusBarItemTests.m; sourceTree = ""; };
- 43583C372289BE94003357D6 /* VFSAboutWindowControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VFSAboutWindowControllerTests.m; sourceTree = ""; };
- 435B1DFA228B4C8400E853F3 /* VFSMockAboutWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VFSMockAboutWindowController.m; sourceTree = ""; };
- 435B1DFC228B4CB500E853F3 /* VFSMockAboutWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VFSMockAboutWindowController.h; sourceTree = ""; };
- 435B1DFD228B590100E853F3 /* VFSMockProductInfoFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VFSMockProductInfoFetcher.h; sourceTree = ""; };
- 435B1DFE228B590100E853F3 /* VFSMockProductInfoFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VFSMockProductInfoFetcher.m; sourceTree = ""; };
- 435B1E00228B6C3900E853F3 /* VFSMockNotificationCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VFSMockNotificationCenter.h; sourceTree = ""; };
- 435B1E01228B6C3900E853F3 /* VFSMockNotificationCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VFSMockNotificationCenter.m; sourceTree = ""; };
- 435B1E0D228CC1E000E853F3 /* VFSProcessRunner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VFSProcessRunner.h; sourceTree = ""; };
- 435B1E0E228CC1E000E853F3 /* VFSProcessRunner.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VFSProcessRunner.m; sourceTree = ""; };
- 43AF0DF222B01C9700E54D48 /* VFSForGitNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VFSForGitNotification.h; sourceTree = ""; };
- 43AF0DF322B01C9700E54D48 /* VFSMessageListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VFSMessageListener.h; sourceTree = ""; };
- 43AF0DF422B01C9700E54D48 /* VFSForGitNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VFSForGitNotification.m; sourceTree = ""; };
- 43AF0DF522B01C9700E54D48 /* VFSMessageParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VFSMessageParser.m; sourceTree = ""; };
- 43AF0DF622B01C9800E54D48 /* VFSMessageListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VFSMessageListener.m; sourceTree = ""; };
- 43AF0DF722B01C9800E54D48 /* VFSMessageParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VFSMessageParser.h; sourceTree = ""; };
- 43AF0E0022B01E3200E54D48 /* VFSNotificationDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VFSNotificationDisplay.h; sourceTree = ""; };
- 43AF0E0122B01E3200E54D48 /* VFSNotificationDisplay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VFSNotificationDisplay.m; sourceTree = ""; };
- 43AF0E0622B023F200E54D48 /* VFSMessageParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VFSMessageParserTests.m; sourceTree = ""; };
- 43AF0E0722B023F200E54D48 /* VFSForGitNotificationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VFSForGitNotificationTests.m; sourceTree = ""; };
- 43C021EE22B18BDD00F868F2 /* VFSNotificationErrors.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VFSNotificationErrors.h; sourceTree = ""; };
- 43C021EF22B18BDD00F868F2 /* VFSNotificationErrors.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VFSNotificationErrors.m; sourceTree = ""; };
- 43C0221822BBFA7A00F868F2 /* VFSCommandRunner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VFSCommandRunner.m; sourceTree = ""; };
- 43C0221922BBFA7A00F868F2 /* VFSCommandRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VFSCommandRunner.h; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 433FE811227B593500488730 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 43583C282285E3E1003357D6 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 430ED36D2281E6B200319408 /* UI */ = {
- isa = PBXGroup;
- children = (
- 43AF0E0022B01E3200E54D48 /* VFSNotificationDisplay.h */,
- 43AF0E0122B01E3200E54D48 /* VFSNotificationDisplay.m */,
- 433FE8532280C21000488730 /* VFSStatusBarItem.h */,
- 433FE8542280C21000488730 /* VFSStatusBarItem.m */,
- 433FE8622281D06100488730 /* VFSAboutWindowController.h */,
- 433FE8602281D06000488730 /* VFSAboutWindowController.m */,
- 433FE8612281D06100488730 /* VFSAboutWindowController.xib */,
- 433FE817227B593500488730 /* VFSAppDelegate.h */,
- 433FE818227B593500488730 /* VFSAppDelegate.m */,
- 433FE81A227B594300488730 /* Assets.xcassets */,
- 433FE81C227B594300488730 /* MainMenu.xib */,
- );
- path = UI;
- sourceTree = "";
- };
- 433FE80B227B593500488730 = {
- isa = PBXGroup;
- children = (
- 433FE816227B593500488730 /* StatusMenuItem */,
- 43583C2C2285E3E1003357D6 /* VFSForGit.UnitTests */,
- 433FE815227B593500488730 /* Products */,
- );
- sourceTree = "";
- };
- 433FE815227B593500488730 /* Products */ = {
- isa = PBXGroup;
- children = (
- 433FE814227B593500488730 /* VFS For Git.app */,
- 43583C2B2285E3E1003357D6 /* VFSForGit.UnitTests.xctest */,
- );
- name = Products;
- sourceTree = "";
- };
- 433FE816227B593500488730 /* StatusMenuItem */ = {
- isa = PBXGroup;
- children = (
- 43AF0DFF22B01CD400E54D48 /* IPC */,
- 435B1E04228C88E300E853F3 /* Utilities */,
- 430ED36D2281E6B200319408 /* UI */,
- 433FE81F227B594300488730 /* Info.plist */,
- 433FE820227B594300488730 /* main.m */,
- 433FE822227B594300488730 /* VFSForGit.entitlements */,
- );
- path = StatusMenuItem;
- sourceTree = "";
- };
- 43583C2C2285E3E1003357D6 /* VFSForGit.UnitTests */ = {
- isa = PBXGroup;
- children = (
- 43583C3B228A17D4003357D6 /* Mocks */,
- 43583C2F2285E3E1003357D6 /* Info.plist */,
- 43583C372289BE94003357D6 /* VFSAboutWindowControllerTests.m */,
- 43AF0E0722B023F200E54D48 /* VFSForGitNotificationTests.m */,
- 43AF0E0622B023F200E54D48 /* VFSMessageParserTests.m */,
- 43583C352289BDAA003357D6 /* VFSStatusBarItemTests.m */,
- );
- path = VFSForGit.UnitTests;
- sourceTree = "";
- };
- 43583C3B228A17D4003357D6 /* Mocks */ = {
- isa = PBXGroup;
- children = (
- 435B1DFC228B4CB500E853F3 /* VFSMockAboutWindowController.h */,
- 435B1DFA228B4C8400E853F3 /* VFSMockAboutWindowController.m */,
- 435B1DFD228B590100E853F3 /* VFSMockProductInfoFetcher.h */,
- 435B1DFE228B590100E853F3 /* VFSMockProductInfoFetcher.m */,
- 435B1E00228B6C3900E853F3 /* VFSMockNotificationCenter.h */,
- 435B1E01228B6C3900E853F3 /* VFSMockNotificationCenter.m */,
- );
- path = Mocks;
- sourceTree = "";
- };
- 435B1E04228C88E300E853F3 /* Utilities */ = {
- isa = PBXGroup;
- children = (
- 43C0221922BBFA7A00F868F2 /* VFSCommandRunner.h */,
- 43C0221822BBFA7A00F868F2 /* VFSCommandRunner.m */,
- 433FE8582280E10F00488730 /* VFSProductInfoFetcher.h */,
- 433FE8592280E10F00488730 /* VFSProductInfoFetcher.m */,
- 435B1E0D228CC1E000E853F3 /* VFSProcessRunner.h */,
- 435B1E0E228CC1E000E853F3 /* VFSProcessRunner.m */,
- 43C021EE22B18BDD00F868F2 /* VFSNotificationErrors.h */,
- 43C021EF22B18BDD00F868F2 /* VFSNotificationErrors.m */,
- );
- path = Utilities;
- sourceTree = "";
- };
- 43AF0DFF22B01CD400E54D48 /* IPC */ = {
- isa = PBXGroup;
- children = (
- 43AF0DF222B01C9700E54D48 /* VFSForGitNotification.h */,
- 43AF0DF422B01C9700E54D48 /* VFSForGitNotification.m */,
- 43AF0DF322B01C9700E54D48 /* VFSMessageListener.h */,
- 43AF0DF622B01C9800E54D48 /* VFSMessageListener.m */,
- 43AF0DF722B01C9800E54D48 /* VFSMessageParser.h */,
- 43AF0DF522B01C9700E54D48 /* VFSMessageParser.m */,
- );
- path = IPC;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 433FE813227B593500488730 /* VFS For Git */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 433FE830227B594300488730 /* Build configuration list for PBXNativeTarget "VFS For Git" */;
- buildPhases = (
- 433FE810227B593500488730 /* Sources */,
- 433FE811227B593500488730 /* Frameworks */,
- 433FE812227B593500488730 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "VFS For Git";
- productName = VFSForGit;
- productReference = 433FE814227B593500488730 /* VFS For Git.app */;
- productType = "com.apple.product-type.application";
- };
- 43583C2A2285E3E1003357D6 /* VFSForGit.UnitTests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 43583C322285E3E1003357D6 /* Build configuration list for PBXNativeTarget "VFSForGit.UnitTests" */;
- buildPhases = (
- 43583C272285E3E1003357D6 /* Sources */,
- 43583C282285E3E1003357D6 /* Frameworks */,
- 43583C292285E3E1003357D6 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- 43583C312285E3E1003357D6 /* PBXTargetDependency */,
- );
- name = VFSForGit.UnitTests;
- productName = VFSForGit.UnitTests;
- productReference = 43583C2B2285E3E1003357D6 /* VFSForGit.UnitTests.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 433FE80C227B593500488730 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0930;
- ORGANIZATIONNAME = Microsoft;
- TargetAttributes = {
- 433FE813227B593500488730 = {
- CreatedOnToolsVersion = 9.3;
- };
- 43583C2A2285E3E1003357D6 = {
- CreatedOnToolsVersion = 9.3;
- TestTargetID = 433FE813227B593500488730;
- };
- };
- };
- buildConfigurationList = 433FE80F227B593500488730 /* Build configuration list for PBXProject "VFSForGit" */;
- compatibilityVersion = "Xcode 9.3";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 433FE80B227B593500488730;
- productRefGroup = 433FE815227B593500488730 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 433FE813227B593500488730 /* VFS For Git */,
- 43583C2A2285E3E1003357D6 /* VFSForGit.UnitTests */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 433FE812227B593500488730 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 433FE8642281D06100488730 /* VFSAboutWindowController.xib in Resources */,
- 433FE81B227B594300488730 /* Assets.xcassets in Resources */,
- 433FE81E227B594300488730 /* MainMenu.xib in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 43583C292285E3E1003357D6 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 433FE810227B593500488730 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 433FE85A2280E10F00488730 /* VFSProductInfoFetcher.m in Sources */,
- 435B1E0F228CC1E000E853F3 /* VFSProcessRunner.m in Sources */,
- 433FE8632281D06100488730 /* VFSAboutWindowController.m in Sources */,
- 43AF0DF822B01C9800E54D48 /* VFSForGitNotification.m in Sources */,
- 433FE821227B594300488730 /* main.m in Sources */,
- 43C0221A22BBFA7A00F868F2 /* VFSCommandRunner.m in Sources */,
- 43C021F022B18BDD00F868F2 /* VFSNotificationErrors.m in Sources */,
- 43AF0DFA22B01C9800E54D48 /* VFSMessageParser.m in Sources */,
- 433FE819227B593500488730 /* VFSAppDelegate.m in Sources */,
- 43AF0E0222B01E3200E54D48 /* VFSNotificationDisplay.m in Sources */,
- 433FE8562280C21000488730 /* VFSStatusBarItem.m in Sources */,
- 43AF0DFC22B01C9800E54D48 /* VFSMessageListener.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 43583C272285E3E1003357D6 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 43AF0E0322B023BE00E54D48 /* VFSMockAboutWindowController.m in Sources */,
- 43AF0E0422B023BE00E54D48 /* VFSMockProductInfoFetcher.m in Sources */,
- 43AF0E0822B023F200E54D48 /* VFSMessageParserTests.m in Sources */,
- 43AF0E0922B023F200E54D48 /* VFSForGitNotificationTests.m in Sources */,
- 43AF0E0522B023BE00E54D48 /* VFSMockNotificationCenter.m in Sources */,
- 43583C362289BDAA003357D6 /* VFSStatusBarItemTests.m in Sources */,
- 43583C382289BE94003357D6 /* VFSAboutWindowControllerTests.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- 43583C312285E3E1003357D6 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 433FE813227B593500488730 /* VFS For Git */;
- targetProxy = 43583C302285E3E1003357D6 /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin PBXVariantGroup section */
- 433FE81C227B594300488730 /* MainMenu.xib */ = {
- isa = PBXVariantGroup;
- children = (
- 433FE81D227B594300488730 /* Base */,
- );
- name = MainMenu.xib;
- sourceTree = "";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 433FE82E227B594300488730 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ASSETCATALOG_COMPILER_APPICON_NAME = VFSForGit;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "Mac Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.13;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- };
- name = Debug;
- };
- 433FE82F227B594300488730 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ASSETCATALOG_COMPILER_APPICON_NAME = VFSForGit;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "Mac Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.13;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
- };
- name = Release;
- };
- 433FE831227B594300488730 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = "VFS For Git";
- CODE_SIGN_ENTITLEMENTS = "";
- CODE_SIGN_IDENTITY = "Mac Developer";
- CODE_SIGN_STYLE = Automatic;
- COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_TEAM = UBF8T346G9;
- INFOPLIST_FILE = StatusMenuItem/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/../Frameworks",
- );
- MACOSX_DEPLOYMENT_TARGET = 10.13;
- PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.VFSForGit;
- PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "";
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Debug;
- };
- 433FE832227B594300488730 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = "VFS For Git";
- CODE_SIGN_ENTITLEMENTS = "";
- CODE_SIGN_IDENTITY = "Mac Developer";
- CODE_SIGN_STYLE = Automatic;
- COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_TEAM = UBF8T346G9;
- ENABLE_TESTABILITY = YES;
- INFOPLIST_FILE = StatusMenuItem/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/../Frameworks",
- );
- MACOSX_DEPLOYMENT_TARGET = 10.13;
- PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.VFSForGit;
- PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "";
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Release;
- };
- 43583C332285E3E1003357D6 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- CODE_SIGN_STYLE = Automatic;
- COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_TEAM = UBF8T346G9;
- HEADER_SEARCH_PATHS = "$(SRCROOT)/VFSForGit.UnitTests/Mocks";
- INFOPLIST_FILE = VFSForGit.UnitTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/../Frameworks",
- "@loader_path/../Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = "com.microsoft.VFSForGit-UnitTests";
- PRODUCT_NAME = "$(TARGET_NAME)";
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VFS For Git.app/Contents/MacOS/VFS For Git";
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Debug;
- };
- 43583C342285E3E1003357D6 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- CODE_SIGN_STYLE = Automatic;
- COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_TEAM = UBF8T346G9;
- HEADER_SEARCH_PATHS = "$(SRCROOT)/VFSForGit.UnitTests/Mocks";
- INFOPLIST_FILE = VFSForGit.UnitTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/../Frameworks",
- "@loader_path/../Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = "com.microsoft.VFSForGit-UnitTests";
- PRODUCT_NAME = "$(TARGET_NAME)";
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VFS For Git.app/Contents/MacOS/VFS For Git";
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 433FE80F227B593500488730 /* Build configuration list for PBXProject "VFSForGit" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 433FE82E227B594300488730 /* Debug */,
- 433FE82F227B594300488730 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 433FE830227B594300488730 /* Build configuration list for PBXNativeTarget "VFS For Git" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 433FE831227B594300488730 /* Debug */,
- 433FE832227B594300488730 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 43583C322285E3E1003357D6 /* Build configuration list for PBXNativeTarget "VFSForGit.UnitTests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 43583C332285E3E1003357D6 /* Debug */,
- 43583C342285E3E1003357D6 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 433FE80C227B593500488730 /* Project object */;
-}
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index a952dc9ef2..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d981003d..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/VFSForGit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/GVFS/GVFS.Notifications/VFSForGit.Mac/org.vfsforgit.usernotification.plist b/GVFS/GVFS.Notifications/VFSForGit.Mac/org.vfsforgit.usernotification.plist
deleted file mode 100644
index ed609ec568..0000000000
--- a/GVFS/GVFS.Notifications/VFSForGit.Mac/org.vfsforgit.usernotification.plist
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
- EnvironmentVariables
-
-
- PATH
- /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
-
- Label
- org.vfsforgit.usernotification
- ProgramArguments
-
- /Library/Application Support/VFS For Git/VFS For Git.app/Contents/MacOS/VFS For Git
-
- WorkingDirectory
- /usr/local/vfsforgit
- ProcessType
- Interactive
- LimitLoadToSessionType
- Aqua
- Disabled
-
- OnDemand
-
- KeepAlive
-
- RunAtLoad
-
-
-
diff --git a/GVFS/GVFS.Payload/GVFS.Payload.csproj b/GVFS/GVFS.Payload/GVFS.Payload.csproj
new file mode 100644
index 0000000000..a976360f65
--- /dev/null
+++ b/GVFS/GVFS.Payload/GVFS.Payload.csproj
@@ -0,0 +1,59 @@
+
+
+
+ net461
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft400
+ false
+
+
+
+
diff --git a/GVFS/GVFS.Payload/layout.bat b/GVFS/GVFS.Payload/layout.bat
new file mode 100644
index 0000000000..85036a5018
--- /dev/null
+++ b/GVFS/GVFS.Payload/layout.bat
@@ -0,0 +1,86 @@
+@ECHO OFF
+SETLOCAL
+
+IF "%~1" == "" (
+ ECHO error: missing configuration
+ ECHO.
+ GOTO USAGE
+)
+
+IF "%~2" == "" (
+ ECHO error: missing version
+ ECHO.
+ GOTO USAGE
+)
+
+IF "%~3" == "" (
+ ECHO error: missing ProjFS path
+ ECHO.
+ GOTO USAGE
+)
+
+IF "%~4" == "" (
+ ECHO error: missing VCRuntime path
+ ECHO.
+ GOTO USAGE
+)
+
+IF "%~5" == "" (
+ ECHO error: missing output path
+ ECHO.
+ GOTO USAGE
+)
+
+SET CONFIGURATION=%1
+SET GVFSVERSION=%2
+SET PROJFS=%3
+SET VCRUNTIME=%4
+SET OUTPUT=%5
+
+SET ROOT=%~dp0..\..
+SET BUILD_OUT=%ROOT%\..\out
+SET MANAGED_OUT_FRAGMENT=bin\%CONFIGURATION%\net461\win-x64
+SET NATIVE_OUT_FRAGMENT=bin\x64\%CONFIGURATION%
+
+ECHO Copying files...
+xcopy /Y %PROJFS%\filter\PrjFlt.sys %OUTPUT%\Filter\
+xcopy /Y %PROJFS%\filter\prjflt.inf %OUTPUT%\Filter\
+xcopy /Y %PROJFS%\lib\ProjectedFSLib.dll %OUTPUT%\ProjFS\
+xcopy /Y %VCRUNTIME%\lib\x64\msvcp140.dll %OUTPUT%
+xcopy /Y %VCRUNTIME%\lib\x64\msvcp140_1.dll %OUTPUT%
+xcopy /Y %VCRUNTIME%\lib\x64\msvcp140_2.dll %OUTPUT%
+xcopy /Y %VCRUNTIME%\lib\x64\vcruntime140.dll %OUTPUT%
+xcopy /Y /S %BUILD_OUT%\GVFS\%MANAGED_OUT_FRAGMENT%\* %OUTPUT%
+xcopy /Y /S %BUILD_OUT%\GVFS.Hooks\%MANAGED_OUT_FRAGMENT%\* %OUTPUT%
+xcopy /Y /S %BUILD_OUT%\GVFS.Mount\%MANAGED_OUT_FRAGMENT%\* %OUTPUT%
+xcopy /Y /S %BUILD_OUT%\GVFS.Service\%MANAGED_OUT_FRAGMENT%\* %OUTPUT%
+xcopy /Y /S %BUILD_OUT%\GVFS.Service.UI\%MANAGED_OUT_FRAGMENT%\* %OUTPUT%
+xcopy /Y /S %BUILD_OUT%\GitHooksLoader\%NATIVE_OUT_FRAGMENT%\* %OUTPUT%
+xcopy /Y /S %BUILD_OUT%\GVFS.PostIndexChangedHook\%NATIVE_OUT_FRAGMENT%\* %OUTPUT%
+xcopy /Y /S %BUILD_OUT%\GVFS.ReadObjectHook\%NATIVE_OUT_FRAGMENT%\* %OUTPUT%
+xcopy /Y /S %BUILD_OUT%\GVFS.VirtualFileSystemHook\%NATIVE_OUT_FRAGMENT%\* %OUTPUT%
+
+ECHO Cleaning up...
+REM Remove unused LibGit2 files
+RMDIR /S /Q %OUTPUT%\lib
+REM Remove files for x86 (not supported)
+RMDIR /S /Q %OUTPUT%\x86
+
+GOTO EOF
+
+:USAGE
+ECHO usage: %~n0%~x0 ^ ^ ^ ^ ^