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/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..3806b86627 100644 --- a/GVFS.sln +++ b/GVFS.sln @@ -1,398 +1,163 @@ + 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 +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.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("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.PerfProfiling", "GVFS\GVFS.PerfProfiling\GVFS.PerfProfiling.csproj", "{26B5D74F-972B-4B54-98C3-15958616E56D}" 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.Platform.Windows", "GVFS\GVFS.Platform.Windows\GVFS.Platform.Windows.csproj", "{41A25DAD-698D-47AB-8BB1-7E622FE6FAAC}" 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("{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.Virtualization", "GVFS\GVFS.Virtualization\GVFS.Virtualization.csproj", "{F468B05A-95E5-46BC-8C67-B80A78527B7D}" +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.Platform.POSIX", "GVFS\GVFS.Platform.POSIX\GVFS.Platform.POSIX.csproj", "{15FAE44C-0D21-4312-9FD3-28F05A5AB7A6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Service", "GVFS\GVFS.Service\GVFS.Service.csproj", "{5E236AF3-31D7-4313-A129-F080FF058283}" 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.UI", "GVFS\GVFS.Service.UI\GVFS.Service.UI.csproj", "{D8FB16E2-EAE0-4E05-A993-940062CD7CA7}" 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.Tests", "GVFS\GVFS.Tests\GVFS.Tests.csproj", "{FE70E0D6-B0A6-421D-AA12-F28F822F09A0}" 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.UnitTests", "GVFS\GVFS.UnitTests\GVFS.UnitTests.csproj", "{1A46C414-7F39-4EF0-B216-A88033D18678}" 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.Upgrader", "GVFS\GVFS.Upgrader\GVFS.Upgrader.csproj", "{F8D96536-0F2C-4B40-8516-D2C0516C66EC}" 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 + {F8D96536-0F2C-4B40-8516-D2C0516C66EC}.Debug|x64.ActiveCfg = Debug|Any CPU + {F8D96536-0F2C-4B40-8516-D2C0516C66EC}.Debug|x64.Build.0 = Debug|Any CPU + {F8D96536-0F2C-4B40-8516-D2C0516C66EC}.Release|x64.ActiveCfg = Release|Any CPU + {F8D96536-0F2C-4B40-8516-D2C0516C66EC}.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 6805724bde..0000000000 --- a/GVFS/GVFS.Build/GVFS.props +++ /dev/null @@ -1,17 +0,0 @@ - - - - - 0.2.173.2 - 2.20210505.2 - - - - 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/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/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/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/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 54% rename from GVFS/GVFS.Hooks/GVFS.Hooks.Windows.csproj rename to GVFS/GVFS.Hooks/GVFS.Hooks.csproj index f8252b2563..10ad576b7a 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 - - + net461 - - true - DEBUG;TRACE - full - x64 - prompt - true - - - TRACE - true - pdbonly - x64 - prompt - true - - - - - - - - - - - + + 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 95% rename from GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.Windows.cs rename to GVFS/GVFS.Hooks/HooksPlatform/GVFSHooksPlatform.cs index f3bd65a012..1fbf2aaf30 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 { diff --git a/GVFS/GVFS.Hooks/Program.cs b/GVFS/GVFS.Hooks/Program.cs index af84760803..eac434c5d5 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; 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 71% rename from GVFS/GVFS.Installer.Windows/Setup.iss rename to GVFS/GVFS.Installers/Setup.iss index 2b6525c3d2..268cbbbc95 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 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..c6f7004c5d --- /dev/null +++ b/GVFS/GVFS.Payload/GVFS.Payload.csproj @@ -0,0 +1,61 @@ + + + + net461 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Microsoft400 + false + + + + diff --git a/GVFS/GVFS.Payload/layout.bat b/GVFS/GVFS.Payload/layout.bat new file mode 100644 index 0000000000..10c7c8878d --- /dev/null +++ b/GVFS/GVFS.Payload/layout.bat @@ -0,0 +1,87 @@ +@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%\GVFS.Upgrader\%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 ^ ^ ^ ^ ^ +ECHO. +ECHO configuration Build configuration (Debug, Release). +ECHO version GVFS version string. +ECHO projfs Path to GVFS.ProjFS NuGet package contents. +ECHO vcruntime Path to GVFS.VCRuntime NuGet package contents. +ECHO output Output directory. +ECHO. +EXIT 1 + +:ERROR +ECHO Failed with error %ERRORLEVEL% +EXIT /B %ERRORLEVEL% + +:EOF diff --git a/GVFS/GVFS.PerfProfiling/App.config b/GVFS/GVFS.PerfProfiling/App.config deleted file mode 100644 index 6d44256319..0000000000 --- a/GVFS/GVFS.PerfProfiling/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/GVFS/GVFS.PerfProfiling/GVFS.PerfProfiling.csproj b/GVFS/GVFS.PerfProfiling/GVFS.PerfProfiling.csproj index fac88be03a..de092f981c 100644 --- a/GVFS/GVFS.PerfProfiling/GVFS.PerfProfiling.csproj +++ b/GVFS/GVFS.PerfProfiling/GVFS.PerfProfiling.csproj @@ -1,105 +1,14 @@ - - - - + + - {C5D3CA26-562F-4CA4-A378-B93E97A730E3} Exe - Properties - GVFS.PerfProfiling - GVFS.PerfProfiling - v4.6.1 - 512 - true - - + net461 - - true - DEBUG;TRACE - full - x64 - prompt - - - TRACE - true - pdbonly - x64 - prompt - - - - ..\..\..\packages\Microsoft.Data.Sqlite.Core.2.2.4\lib\netstandard2.0\Microsoft.Data.Sqlite.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 - - - - - - - - - - - - - - - - PlatformLoader.Windows.cs - - - - - - + - - {374bf1e5-0b2d-4d4a-bd5e-4212299def09} - GVFS.Common - - - {1118b427-7063-422f-83b9-5023c8ec5a7a} - GVFS.GVFlt - - - {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}. - - - - - - - - - \ No newline at end of file + + diff --git a/GVFS/GVFS.PerfProfiling/Properties/AssemblyInfo.cs b/GVFS/GVFS.PerfProfiling/Properties/AssemblyInfo.cs deleted file mode 100644 index 540c65d5d1..0000000000 --- a/GVFS/GVFS.PerfProfiling/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.PerfProfiling")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("GVFS.PerfProfiling")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[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("c5d3ca26-562f-4ca4-a378-b93e97a730e3")] diff --git a/GVFS/GVFS.PerfProfiling/packages.config b/GVFS/GVFS.PerfProfiling/packages.config deleted file mode 100644 index ebcf07f92f..0000000000 --- a/GVFS/GVFS.PerfProfiling/packages.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/GVFS/GVFS.Platform.POSIX/GVFS.Platform.POSIX.csproj b/GVFS/GVFS.Platform.POSIX/GVFS.Platform.POSIX.csproj deleted file mode 100644 index 9c267f5381..0000000000 --- a/GVFS/GVFS.Platform.POSIX/GVFS.Platform.POSIX.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - netcoreapp2.1;netstandard2.0 - x64 - true - true - - - - $(GVFSVersion) - - - $(GVFSVersion) - - - - $(GVFSVersion) - - - - - - - - - - all - - - diff --git a/GVFS/GVFS.Platform.POSIX/POSIXFileSystem.Shared.cs b/GVFS/GVFS.Platform.POSIX/POSIXFileSystem.Shared.cs deleted file mode 100644 index 212eeefeb4..0000000000 --- a/GVFS/GVFS.Platform.POSIX/POSIXFileSystem.Shared.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace GVFS.Platform.POSIX -{ - public partial class POSIXFileSystem - { - public static bool TryGetNormalizedPathImplementation(string path, out string normalizedPath, out string errorMessage) - { - // TODO(#1358): Properly determine normalized paths (e.g. across links) - errorMessage = null; - normalizedPath = path; - return true; - } - } -} diff --git a/GVFS/GVFS.Platform.POSIX/POSIXFileSystem.cs b/GVFS/GVFS.Platform.POSIX/POSIXFileSystem.cs deleted file mode 100644 index c1ff51c2ac..0000000000 --- a/GVFS/GVFS.Platform.POSIX/POSIXFileSystem.cs +++ /dev/null @@ -1,108 +0,0 @@ -using GVFS.Common; -using GVFS.Common.FileSystem; -using GVFS.Common.Tracing; -using System; -using System.IO; -using System.Runtime.InteropServices; - -namespace GVFS.Platform.POSIX -{ - public abstract partial class POSIXFileSystem : IPlatformFileSystem - { - // https://github.com/dotnet/corefx/blob/103639b6ff5aa6ab6097f70732530e411817f09b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.OpenFlags.cs#L12 - [Flags] - public enum OpenFlags - { - // Access modes (mutually exclusive) - O_RDONLY = 0x0000, - O_WRONLY = 0x0001, - O_RDWR = 0x0002, - - // Flags (combinable) - O_CLOEXEC = 0x0010, - O_CREAT = 0x0020, - O_EXCL = 0x0040, - O_TRUNC = 0x0080, - O_SYNC = 0x0100, - } - - public bool SupportsFileMode { get; } = true; - - public void FlushFileBuffers(string path) - { - // TODO(#1057): Use native API to flush file - } - - public void MoveAndOverwriteFile(string sourceFileName, string destinationFilename) - { - if (Rename(sourceFileName, destinationFilename) != 0) - { - NativeMethods.ThrowLastWin32Exception($"Failed to rename {sourceFileName} to {destinationFilename}"); - } - } - - public abstract void ChangeMode(string path, ushort mode); - - public bool TryGetNormalizedPath(string path, out string normalizedPath, out string errorMessage) - { - return POSIXFileSystem.TryGetNormalizedPathImplementation(path, out normalizedPath, out errorMessage); - } - - public void SetDirectoryLastWriteTime(string path, DateTime lastWriteTime, out bool directoryExists) - { - directoryExists = Directory.Exists(path); - if (directoryExists) - { - Directory.SetLastWriteTime(path, lastWriteTime); - } - } - - public abstract bool HydrateFile(string fileName, byte[] buffer); - - public abstract bool IsExecutable(string fileName); - - public abstract bool IsSocket(string fileName); - - public bool TryCreateDirectoryAccessibleByAuthUsers(string directoryPath, out string error, ITracer tracer = null) - { - try - { - Directory.CreateDirectory(directoryPath); - error = null; - return true; - } - catch (Exception e) when (e is IOException || e is UnauthorizedAccessException) - { - if (tracer != null) - { - EventMetadata metadataData = new EventMetadata(); - metadataData.Add("Exception", e.ToString()); - metadataData.Add(nameof(directoryPath), directoryPath); - tracer.RelatedError(metadataData, $"{nameof(this.TryCreateDirectoryAccessibleByAuthUsers)}: Failed to create directory"); - } - - error = e.Message; - return false; - } - } - - public bool TryCreateDirectoryWithAdminAndUserModifyPermissions(string directoryPath, out string error) - { - throw new NotImplementedException(); - } - - public bool TryCreateOrUpdateDirectoryToAdminModifyPermissions(ITracer tracer, string directoryPath, out string error) - { - throw new NotImplementedException(); - } - - public virtual bool IsFileSystemSupported(string path, out string error) - { - error = null; - return true; - } - - [DllImport("libc", EntryPoint = "rename", SetLastError = true)] - private static extern int Rename(string oldPath, string newPath); - } -} diff --git a/GVFS/GVFS.Platform.POSIX/POSIXGitInstallation.cs b/GVFS/GVFS.Platform.POSIX/POSIXGitInstallation.cs deleted file mode 100644 index 5c63532dde..0000000000 --- a/GVFS/GVFS.Platform.POSIX/POSIXGitInstallation.cs +++ /dev/null @@ -1,32 +0,0 @@ -using GVFS.Common; -using GVFS.Common.Git; -using System.IO; - -namespace GVFS.Platform.POSIX -{ - public class POSIXGitInstallation : IGitInstallation - { - private const string GitProcessName = "git"; - - public bool GitExists(string gitBinPath) - { - if (!string.IsNullOrWhiteSpace(gitBinPath)) - { - return File.Exists(gitBinPath); - } - - return this.GetInstalledGitBinPath() != null; - } - - public string GetInstalledGitBinPath() - { - ProcessResult result = ProcessHelper.Run("which", args: "git", redirectOutput: true); - if (result.ExitCode != 0) - { - return null; - } - - return result.Output.Trim(); - } - } -} diff --git a/GVFS/GVFS.Platform.POSIX/POSIXPlatform.Shared.cs b/GVFS/GVFS.Platform.POSIX/POSIXPlatform.Shared.cs deleted file mode 100644 index 0a9d642e7f..0000000000 --- a/GVFS/GVFS.Platform.POSIX/POSIXPlatform.Shared.cs +++ /dev/null @@ -1,66 +0,0 @@ -using GVFS.Common; -using System; -using System.Diagnostics; -using System.IO; -using System.Runtime.InteropServices; - -namespace GVFS.Platform.POSIX -{ - public abstract partial class POSIXPlatform - { - public static bool IsElevatedImplementation() - { - int euid = GetEuid(); - return euid == 0; - } - - public static bool IsProcessActiveImplementation(int processId) - { - try - { - Process process = Process.GetProcessById(processId); - } - catch (ArgumentException) - { - return false; - } - - return true; - } - - public static string GetNamedPipeNameImplementation(string enlistmentRoot, string dotGVFSRoot) - { - // Pipes are stored as files on POSIX, use a rooted pipe name to keep full control of the location of the file - return Path.Combine(enlistmentRoot, dotGVFSRoot, "GVFS_NetCorePipe"); - } - - public static bool IsConsoleOutputRedirectedToFileImplementation() - { - // TODO(#1355): Implement proper check - return false; - } - - public static bool TryGetGVFSEnlistmentRootImplementation(string directory, string dotGVFSRoot, out string enlistmentRoot, out string errorMessage) - { - enlistmentRoot = null; - - string finalDirectory; - if (!POSIXFileSystem.TryGetNormalizedPathImplementation(directory, out finalDirectory, out errorMessage)) - { - return false; - } - - enlistmentRoot = Paths.GetRoot(finalDirectory, dotGVFSRoot); - if (enlistmentRoot == null) - { - errorMessage = $"Failed to find the root directory for {dotGVFSRoot} in {finalDirectory}"; - return false; - } - - return true; - } - - [DllImport("libc", EntryPoint = "geteuid", SetLastError = true)] - private static extern int GetEuid(); - } -} diff --git a/GVFS/GVFS.Platform.POSIX/POSIXPlatform.cs b/GVFS/GVFS.Platform.POSIX/POSIXPlatform.cs deleted file mode 100644 index 19bec8c9af..0000000000 --- a/GVFS/GVFS.Platform.POSIX/POSIXPlatform.cs +++ /dev/null @@ -1,302 +0,0 @@ -using GVFS.Common; -using GVFS.Common.Git; -using GVFS.Common.Tracing; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.IO.Pipes; -using System.Linq; -using System.Runtime.InteropServices; -using System.Security; - -namespace GVFS.Platform.POSIX -{ - public abstract partial class POSIXPlatform : GVFSPlatform - { - private const int StdInFileNo = 0; // STDIN_FILENO -> standard input file descriptor - private const int StdOutFileNo = 1; // STDOUT_FILENO -> standard output file descriptor - private const int StdErrFileNo = 2; // STDERR_FILENO -> standard error file descriptor - - protected POSIXPlatform() : this( - underConstruction: new UnderConstructionFlags( - supportsGVFSUpgrade: false, - supportsGVFSConfig: false, - supportsNuGetEncryption: false, - supportsNuGetVerification: false)) - { - } - - protected POSIXPlatform(UnderConstructionFlags underConstruction) - : base(underConstruction) - { - } - - public override IGitInstallation GitInstallation { get; } = new POSIXGitInstallation(); - - public override void ConfigureVisualStudio(string gitBinPath, ITracer tracer) - { - } - - public override bool TryGetGVFSHooksVersion(out string hooksVersion, out string error) - { - // TODO(#1044): Get the hooks version rather than the GVFS version (and share that code with the Windows platform) - hooksVersion = ProcessHelper.GetCurrentProcessVersion(); - error = null; - return true; - } - - public override bool TryInstallGitCommandHooks(GVFSContext context, string executingDirectory, string hookName, string commandHookPath, out string errorMessage) - { - errorMessage = null; - - string gvfsHooksPath = Path.Combine(executingDirectory, GVFSPlatform.Instance.Constants.GVFSHooksExecutableName); - - File.WriteAllText( - commandHookPath, - $"#!/bin/sh\n{gvfsHooksPath} {hookName} \"$@\""); - GVFSPlatform.Instance.FileSystem.ChangeMode(commandHookPath, Convert.ToUInt16("755", 8)); - - return true; - } - - public override bool TryVerifyAuthenticodeSignature(string path, out string subject, out string issuer, out string error) - { - throw new NotImplementedException(); - } - - public override bool IsProcessActive(int processId) - { - return POSIXPlatform.IsProcessActiveImplementation(processId); - } - - public override void IsServiceInstalledAndRunning(string name, out bool installed, out bool running) - { - throw new NotImplementedException(); - } - - public override void StartBackgroundVFS4GProcess(ITracer tracer, string programName, string[] args) - { - string programArguments = string.Empty; - try - { - programArguments = string.Join(" ", args.Select(arg => arg.Contains(' ') ? "\"" + arg + "\"" : arg)); - ProcessStartInfo processInfo = new ProcessStartInfo(programName, programArguments); - - // Redirecting stdin/out/err ensures that all standard input/output file descriptors are properly closed - // by dup2 before execve is called for the child process - // (see https://github.com/dotnet/corefx/blob/b10e8d67b260e26f2e47750cf96669e6f48e774d/src/Native/Unix/System.Native/pal_process.c#L381) - // - // Testing has shown that without redirecting stdin/err/out code like this: - // - // string result = process.StandardOutput.ReadToEnd(); - // process.WaitForExit(); - // - // That waits on a `gvfs` verb to exit can hang in the WaitForExit() call because the chuild process has inheritied - // standard input/output handle(s), and redirecting those streams before spawing the process appears to be the only - // way to ensure they're properly closed. - // - // Note that this approach requires that the child process know that it needs to redirect its standard input/output to /dev/null and - // so this method can only be used with VFS4G processes that are aware they're being launched in the background - processInfo.RedirectStandardError = true; - processInfo.RedirectStandardInput = true; - processInfo.RedirectStandardOutput = true; - - Process executingProcess = new Process(); - executingProcess.StartInfo = processInfo; - executingProcess.Start(); - } - catch (Exception ex) - { - EventMetadata metadata = new EventMetadata(); - metadata.Add(nameof(programName), programName); - metadata.Add(nameof(programArguments), programArguments); - metadata.Add("Exception", ex.ToString()); - tracer.RelatedError(metadata, "Failed to start background process."); - throw; - } - } - - public override void PrepareProcessToRunInBackground() - { - int devNullIn = Open("/dev/null", (int)POSIXFileSystem.OpenFlags.O_RDONLY); - if (devNullIn == -1) - { - throw new Win32Exception(Marshal.GetLastWin32Error(), "Unable to open /dev/null for reading"); - } - - int devNullOut = Open("/dev/null", (int)POSIXFileSystem.OpenFlags.O_WRONLY); - if (devNullOut == -1) - { - throw new Win32Exception(Marshal.GetLastWin32Error(), "Unable to open /dev/null for writing"); - } - - // Redirect stdout/stdin/stderr to "/dev/null" - if (Dup2(devNullIn, StdInFileNo) == -1 || - Dup2(devNullOut, StdOutFileNo) == -1 || - Dup2(devNullOut, StdErrFileNo) == -1) - { - throw new Win32Exception(Marshal.GetLastWin32Error(), "Error redirecting stdout/stdin/stderr to /dev/null"); - } - - Close(devNullIn); - Close(devNullOut); - - // Become session leader of a new session - if (SetSid() == -1) - { - throw new Win32Exception(Marshal.GetLastWin32Error(), "Failed to become session leader"); - } - } - - public override NamedPipeServerStream CreatePipeByName(string pipeName) - { - NamedPipeServerStream pipe = new NamedPipeServerStream( - pipeName, - PipeDirection.InOut, - NamedPipeServerStream.MaxAllowedServerInstances, - PipeTransmissionMode.Byte, - PipeOptions.WriteThrough | PipeOptions.Asynchronous, - 0, // default inBufferSize - 0); // default outBufferSize) - - return pipe; - } - - public override string GetCurrentUser() - { - return Getuid().ToString(); - } - - public override string GetUserIdFromLoginSessionId(int sessionId, ITracer tracer) - { - // There are no separate User and Session Ids on POSIX platforms. - return sessionId.ToString(); - } - - public override Dictionary GetPhysicalDiskInfo(string path, bool sizeStatsOnly) - { - // TODO(#1356): Collect disk information - Dictionary result = new Dictionary(); - result.Add("GetPhysicalDiskInfo", "Not yet implemented on POSIX"); - return result; - } - - public override string GetGVFSServiceNamedPipeName(string serviceName) - { - // Pipes are stored as files on POSIX, use a rooted pipe name - // in the same location as the service to keep full control of the location of the file - return this.GetSecureDataRootForGVFSComponent(serviceName) + ".pipe"; - } - - public override bool IsConsoleOutputRedirectedToFile() - { - return POSIXPlatform.IsConsoleOutputRedirectedToFileImplementation(); - } - - public override bool IsElevated() - { - return POSIXPlatform.IsElevatedImplementation(); - } - - public override bool TryGetDefaultLocalCacheRoot(string enlistmentRoot, out string localCacheRoot, out string localCacheRootError) - { - string homeDirectory; - - try - { - homeDirectory = Environment.GetEnvironmentVariable("HOME"); - } - catch (SecurityException e) - { - localCacheRoot = null; - localCacheRootError = $"Failed to read $HOME, insufficient permission: {e.Message}"; - return false; - } - - if (string.IsNullOrEmpty(homeDirectory)) - { - localCacheRoot = null; - localCacheRootError = "$HOME empty or not found"; - return false; - } - - try - { - localCacheRoot = Path.Combine(homeDirectory, GVFSConstants.DefaultGVFSCacheFolderName); - localCacheRootError = null; - return true; - } - catch (ArgumentException e) - { - localCacheRoot = null; - localCacheRootError = $"Failed to build local cache path using $HOME('{homeDirectory}'): {e.Message}"; - return false; - } - } - - public override bool IsGitStatusCacheSupported() - { - // Git status cache is only supported on Windows - return false; - } - - public override bool TryKillProcessTree(int processId, out int exitCode, out string error) - { - ProcessResult result = ProcessHelper.Run("pkill", $"-P {processId}"); - error = result.Errors; - exitCode = result.ExitCode; - return result.ExitCode == 0; - } - - public override bool TryCopyPanicLogs(string copyToDir, out string error) - { - error = null; - return true; - } - - [DllImport("libc", EntryPoint = "getuid", SetLastError = true)] - private static extern uint Getuid(); - - [DllImport("libc", EntryPoint = "setsid", SetLastError = true)] - private static extern int SetSid(); - - [DllImport("libc", EntryPoint = "open", SetLastError = true)] - private static extern int Open(string path, int flag); - - [DllImport("libc", EntryPoint = "close", SetLastError = true)] - private static extern int Close(int filedes); - - [DllImport("libc", EntryPoint = "dup2", SetLastError = true)] - private static extern int Dup2(int oldfd, int newfd); - - public abstract class POSIXPlatformConstants : GVFSPlatformConstants - { - public override string ExecutableExtension - { - get { return string.Empty; } - } - - public override string GVFSExecutableName - { - get { return "gvfs"; } - } - - public override string ProgramLocaterCommand - { - get { return "which"; } - } - - public override HashSet UpgradeBlockingProcesses - { - get { return new HashSet(GVFSPlatform.Instance.Constants.PathComparer) { "GVFS.Mount", "git", "wish" }; } - } - - public override bool SupportsUpgradeWhileRunning => true; - - // Documented here (in the addressing section): https://www.unix.com/man-page/linux/7/unix/ - public override int MaxPipePathLength => 108; - } - } -} diff --git a/GVFS/GVFS.Platform.Windows/GVFS.Platform.Windows.csproj b/GVFS/GVFS.Platform.Windows/GVFS.Platform.Windows.csproj index 5373548cce..0528354ffc 100644 --- a/GVFS/GVFS.Platform.Windows/GVFS.Platform.Windows.csproj +++ b/GVFS/GVFS.Platform.Windows/GVFS.Platform.Windows.csproj @@ -1,134 +1,25 @@ - - - - - + + - {4CE404E7-D3FC-471C-993C-64615861EA63} - Library - Properties - GVFS.Platform.Windows - GVFS.Platform.Windows - v4.6.1 - 512 - - + net461 - - true - DEBUG;TRACE - full - x64 - prompt - - - TRACE - true - pdbonly - x64 - prompt - - - - 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.Windows.ProjFS.1.1.19156.1\lib\net461\ProjectedFSLib.Managed.dll - - - - - - ..\..\..\packages\System.Management.Automation.dll.10.0.10586.0\lib\net40\System.Management.Automation.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - + - - Designer - + + + - - {374bf1e5-0b2d-4d4a-bd5e-4212299def09} - GVFS.Common - - - {1118b427-7063-422f-83b9-5023c8ec5a7a} - GVFS.GVFlt - - - {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}. - - - + diff --git a/GVFS/GVFS.PlatformLoader/PlatformLoader.Windows.cs b/GVFS/GVFS.Platform.Windows/PlatformLoader.Windows.cs similarity index 100% rename from GVFS/GVFS.PlatformLoader/PlatformLoader.Windows.cs rename to GVFS/GVFS.Platform.Windows/PlatformLoader.Windows.cs diff --git a/GVFS/GVFS.Platform.Windows/ProjFSFilter.cs b/GVFS/GVFS.Platform.Windows/ProjFSFilter.cs index 452b8687d3..7306eaefdf 100644 --- a/GVFS/GVFS.Platform.Windows/ProjFSFilter.cs +++ b/GVFS/GVFS.Platform.Windows/ProjFSFilter.cs @@ -5,7 +5,7 @@ using Microsoft.Windows.ProjFS; using System; using System.ComponentModel; -using System.Diagnostics; +using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -282,39 +282,39 @@ public static bool IsNativeLibInstalled(ITracer tracer, PhysicalFileSystem fileS return existsInSystem32 || existsInAppDirectory; } - public static bool TryCopyNativeLibIfDriverVersionsMatch(ITracer tracer, PhysicalFileSystem fileSystem, out string copyNativeDllError) - { + public static bool TryCopyNativeLibIfDriverVersionsMatch(ITracer tracer, PhysicalFileSystem fileSystem, out string copyNativeDllError) + { string system32NativeLibraryPath = Path.Combine(Environment.SystemDirectory, ProjFSNativeLibFileName); - if (fileSystem.FileExists(system32NativeLibraryPath)) + if (fileSystem.FileExists(system32NativeLibraryPath)) { copyNativeDllError = $"{ProjFSNativeLibFileName} already exists at {system32NativeLibraryPath}"; - return false; + return false; } string gvfsProcessLocation = ProcessHelper.GetCurrentProcessLocation(); string nonInboxNativeLibInstallPath; string packagedNativeLibPath; GetNativeLibPaths(gvfsProcessLocation, out packagedNativeLibPath, out nonInboxNativeLibInstallPath); - if (fileSystem.FileExists(nonInboxNativeLibInstallPath)) - { + if (fileSystem.FileExists(nonInboxNativeLibInstallPath)) + { copyNativeDllError = $"{ProjFSNativeLibFileName} already exists at {nonInboxNativeLibInstallPath}"; - return false; + return false; } - if (!fileSystem.FileExists(packagedNativeLibPath)) + if (!fileSystem.FileExists(packagedNativeLibPath)) { copyNativeDllError = $"{packagedNativeLibPath} not found, no {ProjFSNativeLibFileName} available to copy"; - return false; + return false; } string packagedPrjfltDriverPath = Path.Combine(gvfsProcessLocation, "Filter", DriverFileName); - if (!fileSystem.FileExists(packagedPrjfltDriverPath)) + if (!fileSystem.FileExists(packagedPrjfltDriverPath)) { copyNativeDllError = $"{packagedPrjfltDriverPath} not found, unable to validate that packaged driver matches installed driver"; - return false; + return false; } - string system32PrjfltDriverPath = Path.Combine(Environment.ExpandEnvironmentVariables(System32DriversRoot), DriverFileName); + string system32PrjfltDriverPath = Path.Combine(Environment.ExpandEnvironmentVariables(System32DriversRoot), DriverFileName); if (!fileSystem.FileExists(system32PrjfltDriverPath)) { copyNativeDllError = $"{system32PrjfltDriverPath} not found, unable to validate that packaged driver matches installed driver"; @@ -323,42 +323,42 @@ public static bool TryCopyNativeLibIfDriverVersionsMatch(ITracer tracer, Physica FileVersionInfo packagedDriverVersion; FileVersionInfo system32DriverVersion; - try - { - packagedDriverVersion = fileSystem.GetVersionInfo(packagedPrjfltDriverPath); - system32DriverVersion = fileSystem.GetVersionInfo(system32PrjfltDriverPath); - if (!fileSystem.FileVersionsMatch(packagedDriverVersion, system32DriverVersion)) + try + { + packagedDriverVersion = fileSystem.GetVersionInfo(packagedPrjfltDriverPath); + system32DriverVersion = fileSystem.GetVersionInfo(system32PrjfltDriverPath); + if (!fileSystem.FileVersionsMatch(packagedDriverVersion, system32DriverVersion)) { copyNativeDllError = $"Packaged sys FileVersion '{packagedDriverVersion.FileVersion}' does not match System32 sys FileVersion '{system32DriverVersion.FileVersion}'"; - return false; + return false; } if (!fileSystem.ProductVersionsMatch(packagedDriverVersion, system32DriverVersion)) { copyNativeDllError = $"Packaged sys ProductVersion '{packagedDriverVersion.ProductVersion}' does not match System32 sys ProductVersion '{system32DriverVersion.ProductVersion}'"; return false; - } - } - catch (FileNotFoundException e) - { - EventMetadata metadata = CreateEventMetadata(e); + } + } + catch (FileNotFoundException e) + { + EventMetadata metadata = CreateEventMetadata(e); tracer.RelatedWarning( metadata, - $"{nameof(TryCopyNativeLibIfDriverVersionsMatch)}: Exception caught while comparing sys versions"); - copyNativeDllError = $"Exception caught while comparing sys versions: {e.Message}"; - return false; - } - - EventMetadata driverVersionMetadata = CreateEventMetadata(); - driverVersionMetadata.Add($"{nameof(packagedDriverVersion)}.FileVersion", packagedDriverVersion.FileVersion.ToString()); + $"{nameof(TryCopyNativeLibIfDriverVersionsMatch)}: Exception caught while comparing sys versions"); + copyNativeDllError = $"Exception caught while comparing sys versions: {e.Message}"; + return false; + } + + EventMetadata driverVersionMetadata = CreateEventMetadata(); + driverVersionMetadata.Add($"{nameof(packagedDriverVersion)}.FileVersion", packagedDriverVersion.FileVersion.ToString()); driverVersionMetadata.Add($"{nameof(system32DriverVersion)}.FileVersion", system32DriverVersion.FileVersion.ToString()); - driverVersionMetadata.Add($"{nameof(packagedDriverVersion)}.ProductVersion", packagedDriverVersion.ProductVersion.ToString()); - driverVersionMetadata.Add($"{nameof(system32DriverVersion)}.ProductVersion", system32DriverVersion.ProductVersion.ToString()); - tracer.RelatedInfo(driverVersionMetadata, $"{nameof(TryCopyNativeLibIfDriverVersionsMatch)}: Copying native library"); - + driverVersionMetadata.Add($"{nameof(packagedDriverVersion)}.ProductVersion", packagedDriverVersion.ProductVersion.ToString()); + driverVersionMetadata.Add($"{nameof(system32DriverVersion)}.ProductVersion", system32DriverVersion.ProductVersion.ToString()); + tracer.RelatedInfo(driverVersionMetadata, $"{nameof(TryCopyNativeLibIfDriverVersionsMatch)}: Copying native library"); + if (!TryCopyNativeLibToNonInboxInstallLocation(tracer, fileSystem, gvfsProcessLocation)) { - copyNativeDllError = "Failed to copy native library"; + copyNativeDllError = "Failed to copy native library"; return false; } diff --git a/GVFS/GVFS.Platform.Windows/Properties/AssemblyInfo.cs b/GVFS/GVFS.Platform.Windows/Properties/AssemblyInfo.cs deleted file mode 100644 index 64dcb8f5f1..0000000000 --- a/GVFS/GVFS.Platform.Windows/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.Platform.Windows")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("GVFS.Platform.Windows")] -[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("4ce404e7-d3fc-471c-993c-64615861ea63")] diff --git a/GVFS/GVFS.Platform.Windows/WindowsFileSystem.cs b/GVFS/GVFS.Platform.Windows/WindowsFileSystem.cs index 9ea87ad963..98990c4f5f 100644 --- a/GVFS/GVFS.Platform.Windows/WindowsFileSystem.cs +++ b/GVFS/GVFS.Platform.Windows/WindowsFileSystem.cs @@ -104,8 +104,8 @@ public void ChangeMode(string path, ushort mode) public bool TryGetNormalizedPath(string path, out string normalizedPath, out string errorMessage) { return WindowsFileSystem.TryGetNormalizedPathImplementation(path, out normalizedPath, out errorMessage); - } - + } + public bool HydrateFile(string fileName, byte[] buffer) { return NativeFileReader.TryReadFirstByteOfFile(fileName, buffer); @@ -275,7 +275,7 @@ public bool IsFileSystemSupported(string path, out string error) private class NativeFileReader { private const uint GenericRead = 0x80000000; - private const uint OpenExisting = 3; + private const uint OpenExisting = 3; public static bool TryReadFirstByteOfFile(string fileName, byte[] buffer) { diff --git a/GVFS/GVFS.Platform.Windows/WindowsPlatform.cs b/GVFS/GVFS.Platform.Windows/WindowsPlatform.cs index b31d3f6fe0..07ee383e9b 100644 --- a/GVFS/GVFS.Platform.Windows/WindowsPlatform.cs +++ b/GVFS/GVFS.Platform.Windows/WindowsPlatform.cs @@ -45,7 +45,7 @@ public override string GVFSConfigPath return Path.Combine(gvfsDirectory, LocalGVFSConfig.FileName); } - } + } /// /// On Windows VFSForGit does not need to use system wide logs to track @@ -162,9 +162,9 @@ public override void StartBackgroundVFS4GProcess(ITracer tracer, string programN } } - public override void PrepareProcessToRunInBackground() - { - // No additional work required + public override void PrepareProcessToRunInBackground() + { + // No additional work required } public override NamedPipeServerStream CreatePipeByName(string pipeName) @@ -333,28 +333,28 @@ public override string GetUserIdFromLoginSessionId(int sessionId, ITracer tracer } } - public override string GetUpgradeLogDirectoryParentDirectory() + public override string GetUpgradeLogDirectoryParentDirectory() { return Path.Combine( this.GetCommonAppDataRootForGVFS(), - ProductUpgraderInfo.UpgradeDirectoryName); - } + ProductUpgraderInfo.UpgradeDirectoryName); + } public override string GetSystemInstallerLogPath() { return null; } - - public override string GetUpgradeHighestAvailableVersionDirectory() - { - return this.GetUpgradeProtectedDataDirectory(); - } - - public override string GetUpgradeProtectedDataDirectory() - { - return GetUpgradeProtectedDataDirectoryImplementation(); - } - + + public override string GetUpgradeHighestAvailableVersionDirectory() + { + return this.GetUpgradeProtectedDataDirectory(); + } + + public override string GetUpgradeProtectedDataDirectory() + { + return GetUpgradeProtectedDataDirectoryImplementation(); + } + public override Dictionary GetPhysicalDiskInfo(string path, bool sizeStatsOnly) => WindowsPhysicalDiskInfo.GetPhysicalDiskInfo(path, sizeStatsOnly); public override bool IsConsoleOutputRedirectedToFile() @@ -374,45 +374,45 @@ public override FileBasedLock CreateFileBasedLock( { return new WindowsFileBasedLock(fileSystem, tracer, lockPath); } - - public override ProductUpgraderPlatformStrategy CreateProductUpgraderPlatformInteractions( - PhysicalFileSystem fileSystem, - ITracer tracer) - { - return new WindowsProductUpgraderPlatformStrategy(fileSystem, tracer); - } + + public override ProductUpgraderPlatformStrategy CreateProductUpgraderPlatformInteractions( + PhysicalFileSystem fileSystem, + ITracer tracer) + { + return new WindowsProductUpgraderPlatformStrategy(fileSystem, tracer); + } public override bool TryGetGVFSEnlistmentRoot(string directory, out string enlistmentRoot, out string errorMessage) { return WindowsPlatform.TryGetGVFSEnlistmentRootImplementation(directory, out enlistmentRoot, out errorMessage); } - public override bool TryGetDefaultLocalCacheRoot(string enlistmentRoot, out string localCacheRoot, out string localCacheRootError) + public override bool TryGetDefaultLocalCacheRoot(string enlistmentRoot, out string localCacheRoot, out string localCacheRootError) { string pathRoot; - try + try { - pathRoot = Path.GetPathRoot(enlistmentRoot); + pathRoot = Path.GetPathRoot(enlistmentRoot); } catch (ArgumentException e) { localCacheRoot = null; localCacheRootError = $"Failed to determine the root of '{enlistmentRoot}'): {e.Message}"; - return false; - } - + return false; + } + if (string.IsNullOrEmpty(pathRoot)) { localCacheRoot = null; localCacheRootError = $"Failed to determine the root of '{enlistmentRoot}', path does not contain root directory information"; return false; - } - + } + try { - localCacheRoot = Path.Combine(pathRoot, GVFSConstants.DefaultGVFSCacheFolderName); - localCacheRootError = null; + localCacheRoot = Path.Combine(pathRoot, GVFSConstants.DefaultGVFSCacheFolderName); + localCacheRootError = null; return true; } catch (ArgumentException e) @@ -420,7 +420,7 @@ public override bool TryGetDefaultLocalCacheRoot(string enlistmentRoot, out stri localCacheRoot = null; localCacheRootError = $"Failed to build local cache path using root directory '{pathRoot}'): {e.Message}"; return false; - } + } } public override bool TryKillProcessTree(int processId, out int exitCode, out string error) @@ -431,7 +431,7 @@ public override bool TryKillProcessTree(int processId, out int exitCode, out str return result.ExitCode == 0; } - public override bool TryCopyPanicLogs(string copyToDir, out string error) + public override bool TryCopyPanicLogs(string copyToDir, out string error) { error = null; return true; @@ -457,12 +457,12 @@ public override string InstallerExtension { get { return ".exe"; } } - - public override bool SupportsUpgradeWhileRunning => false; - - public override string WorkingDirectoryBackingRootPath - { - get { return GVFSConstants.WorkingDirectoryRootName; } + + public override bool SupportsUpgradeWhileRunning => false; + + public override string WorkingDirectoryBackingRootPath + { + get { return GVFSConstants.WorkingDirectoryRootName; } } public override string DotGVFSRoot @@ -478,23 +478,23 @@ public override string GVFSBinDirectoryPath Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), this.GVFSBinDirectoryName); } - } - - public override string GVFSBinDirectoryName - { - get { return "GVFS"; } - } - - public override string GVFSExecutableName - { - get { return "GVFS" + this.ExecutableExtension; } + } + + public override string GVFSBinDirectoryName + { + get { return "GVFS"; } + } + + public override string GVFSExecutableName + { + get { return "GVFS" + this.ExecutableExtension; } } public override string ProgramLocaterCommand { get { return "where"; } - } - + } + public override HashSet UpgradeBlockingProcesses { get { return new HashSet(GVFSPlatform.Instance.Constants.PathComparer) { "GVFS", "GVFS.Mount", "git", "ssh-agent", "wish", "bash" }; } diff --git a/GVFS/GVFS.Platform.Windows/packages.config b/GVFS/GVFS.Platform.Windows/packages.config deleted file mode 100644 index cbf3000052..0000000000 --- a/GVFS/GVFS.Platform.Windows/packages.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/GVFS/GVFS.PlatformLoader/PlatformLoader.Mac.cs b/GVFS/GVFS.PlatformLoader/PlatformLoader.Mac.cs deleted file mode 100644 index fb2a642ec7..0000000000 --- a/GVFS/GVFS.PlatformLoader/PlatformLoader.Mac.cs +++ /dev/null @@ -1,21 +0,0 @@ -using GVFS.Common; -using GVFS.Common.Git; -using GVFS.Platform.Mac; -using GVFS.Virtualization.FileSystem; - -namespace GVFS.PlatformLoader -{ - public static class GVFSPlatformLoader - { - public static FileSystemVirtualizer CreateFileSystemVirtualizer(GVFSContext context, GVFSGitObjects gitObjects) - { - return new MacFileSystemVirtualizer(context, gitObjects); - } - - public static void Initialize() - { - GVFSPlatform.Register(new MacPlatform()); - return; - } - } -} \ No newline at end of file diff --git a/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Mac.xcodeproj/project.pbxproj b/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Mac.xcodeproj/project.pbxproj deleted file mode 100644 index 4a3b3b90aa..0000000000 --- a/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Mac.xcodeproj/project.pbxproj +++ /dev/null @@ -1,280 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 267A836C20EE9F27005E6B60 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267A836B20EE9F27005E6B60 /* main.cpp */; }; - 26E839D920FD4026004E53CE /* common.posix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E839D620FD29D6004E53CE /* common.posix.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 267A836620EE9F27005E6B60 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 267A836820EE9F27005E6B60 /* GVFS.PostIndexChangedHook */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = GVFS.PostIndexChangedHook; sourceTree = BUILT_PRODUCTS_DIR; }; - 267A836B20EE9F27005E6B60 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = SOURCE_ROOT; }; - 2686926B20EFF2610080F95D /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../GVFS.NativeHooks.Common/common.h; sourceTree = SOURCE_ROOT; }; - 26E839D620FD29D6004E53CE /* common.posix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = common.posix.cpp; path = ../GVFS.NativeHooks.Common/common.posix.cpp; sourceTree = SOURCE_ROOT; }; - 26E839DB20FD5918004E53CE /* stdafx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stdafx.h; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 267A836520EE9F27005E6B60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2673FD8620EBD84A00B64B7F = { - isa = PBXGroup; - children = ( - 26E839DB20FD5918004E53CE /* stdafx.h */, - 26E839D620FD29D6004E53CE /* common.posix.cpp */, - 2686926B20EFF2610080F95D /* common.h */, - 267A836B20EE9F27005E6B60 /* main.cpp */, - 267A836920EE9F27005E6B60 /* Products */, - ); - sourceTree = ""; - }; - 267A836920EE9F27005E6B60 /* Products */ = { - isa = PBXGroup; - children = ( - 267A836820EE9F27005E6B60 /* GVFS.PostIndexChangedHook */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 267A836720EE9F27005E6B60 /* GVFS.PostIndexChangedHook */ = { - isa = PBXNativeTarget; - buildConfigurationList = 267A836F20EE9F27005E6B60 /* Build configuration list for PBXNativeTarget "GVFS.PostIndexChangedHook" */; - buildPhases = ( - 267A836420EE9F27005E6B60 /* Sources */, - 267A836520EE9F27005E6B60 /* Frameworks */, - 267A836620EE9F27005E6B60 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = GVFS.PostIndexChangedHook; - productName = GVFS.PostIndexChangedHook; - productReference = 267A836820EE9F27005E6B60 /* GVFS.PostIndexChangedHook */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 2673FD8720EBD84A00B64B7F /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0940; - TargetAttributes = { - 267A836720EE9F27005E6B60 = { - CreatedOnToolsVersion = 9.4.1; - }; - }; - }; - buildConfigurationList = 2673FD8A20EBD84A00B64B7F /* Build configuration list for PBXProject "GVFS.PostIndexChangedHook.Mac" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 2673FD8620EBD84A00B64B7F; - productRefGroup = 267A836920EE9F27005E6B60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 267A836720EE9F27005E6B60 /* GVFS.PostIndexChangedHook */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 267A836420EE9F27005E6B60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 267A836C20EE9F27005E6B60 /* main.cpp in Sources */, - 26E839D920FD4026004E53CE /* common.posix.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 2673FD8B20EBD84A00B64B7F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - 2673FD8C20EBD84A00B64B7F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - 267A836D20EE9F27005E6B60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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"; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = UBF8T346G9; - 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_TREAT_WARNINGS_AS_ERRORS = 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 = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Debug; - }; - 267A836E20EE9F27005E6B60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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"; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = UBF8T346G9; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = 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; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2673FD8A20EBD84A00B64B7F /* Build configuration list for PBXProject "GVFS.PostIndexChangedHook.Mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2673FD8B20EBD84A00B64B7F /* Debug */, - 2673FD8C20EBD84A00B64B7F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 267A836F20EE9F27005E6B60 /* Build configuration list for PBXNativeTarget "GVFS.PostIndexChangedHook" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 267A836D20EE9F27005E6B60 /* Debug */, - 267A836E20EE9F27005E6B60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 2673FD8720EBD84A00B64B7F /* Project object */; -} diff --git a/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 4054d401b8..0000000000 --- a/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Mac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Mac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d..0000000000 --- a/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Mac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Windows.vcxproj b/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.vcxproj similarity index 81% rename from GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Windows.vcxproj rename to GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.vcxproj index 7200135816..0537dfaf1e 100644 --- a/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Windows.vcxproj +++ b/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.vcxproj @@ -14,22 +14,21 @@ {24D161E9-D1F0-4299-BBD3-5D940BEDD535} Win32Proj GVFSPostIndexChangedHook - 10.0.10240.0 - GVFS.PostIndexChangedHook.Windows + 10.0.16299.0 + GVFS.PostIndexChangedHook GVFS.PostIndexChangedHook - Application true - v141 + v142 MultiByte Application false - v141 + v142 true MultiByte @@ -59,22 +58,22 @@ _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true true - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt;$(SolutionDir)\GVFS\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) + C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;..\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) /Zc:__cplusplus MultiThreadedDebug Console true - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;%(AdditionalLibraryDirectories) + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64;%(AdditionalLibraryDirectories) - $(BuildOutputDir)\$(ProjectName)\intermediate\$(Platform)\$(Configuration)\$(MSBuildProjectName).log + $(IntDir)\$(MSBuildProjectName).log - $(BuildOutputDir) + $(GeneratedIncludePath) @@ -87,7 +86,7 @@ NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true true - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt;$(SolutionDir)\GVFS\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) + C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;..\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) /Zc:__cplusplus MultiThreaded @@ -96,15 +95,15 @@ true true true - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;%(AdditionalLibraryDirectories) + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64;%(AdditionalLibraryDirectories) - $(BuildOutputDir)\$(ProjectName)\intermediate\$(Platform)\$(Configuration)\$(MSBuildProjectName).log + $(IntDir)\$(MSBuildProjectName).log - $(BuildOutputDir) + $(GeneratedIncludePath) diff --git a/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Windows.vcxproj.filters b/GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.vcxproj.filters similarity index 100% rename from GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.Windows.vcxproj.filters rename to GVFS/GVFS.PostIndexChangedHook/GVFS.PostIndexChangedHook.vcxproj.filters diff --git a/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Mac.xcodeproj/project.pbxproj b/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Mac.xcodeproj/project.pbxproj deleted file mode 100644 index 5e9c95a823..0000000000 --- a/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Mac.xcodeproj/project.pbxproj +++ /dev/null @@ -1,286 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 2673FD9620EBDAA900B64B7F /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2673FD9520EBDAA900B64B7F /* main.cpp */; }; - 2673FD9C20EBDEA500B64B7F /* packet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2673FD9B20EBDEA500B64B7F /* packet.cpp */; }; - 26E839D820FD387D004E53CE /* common.posix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E839D720FD29EC004E53CE /* common.posix.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 2673FD9020EBDAA900B64B7F /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 2673FD9220EBDAA900B64B7F /* GVFS.ReadObjectHook */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = GVFS.ReadObjectHook; sourceTree = BUILT_PRODUCTS_DIR; }; - 2673FD9520EBDAA900B64B7F /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = SOURCE_ROOT; }; - 2673FD9A20EBDEA500B64B7F /* packet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = packet.h; sourceTree = SOURCE_ROOT; }; - 2673FD9B20EBDEA500B64B7F /* packet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = packet.cpp; sourceTree = SOURCE_ROOT; }; - 2673FD9D20EBDEAA00B64B7F /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../GVFS.NativeHooks.Common/common.h; sourceTree = SOURCE_ROOT; }; - 26E839D720FD29EC004E53CE /* common.posix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = common.posix.cpp; path = ../GVFS.NativeHooks.Common/common.posix.cpp; sourceTree = SOURCE_ROOT; }; - 26E839DA20FD58B8004E53CE /* stdafx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stdafx.h; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 2673FD8F20EBDAA900B64B7F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2673FD7F20EBD81D00B64B7F = { - isa = PBXGroup; - children = ( - 26E839DA20FD58B8004E53CE /* stdafx.h */, - 26E839D720FD29EC004E53CE /* common.posix.cpp */, - 2673FD9D20EBDEAA00B64B7F /* common.h */, - 2673FD9B20EBDEA500B64B7F /* packet.cpp */, - 2673FD9A20EBDEA500B64B7F /* packet.h */, - 2673FD9520EBDAA900B64B7F /* main.cpp */, - 2673FD9320EBDAA900B64B7F /* Products */, - ); - sourceTree = ""; - }; - 2673FD9320EBDAA900B64B7F /* Products */ = { - isa = PBXGroup; - children = ( - 2673FD9220EBDAA900B64B7F /* GVFS.ReadObjectHook */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 2673FD9120EBDAA900B64B7F /* GVFS.ReadObjectHook */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2673FD9720EBDAA900B64B7F /* Build configuration list for PBXNativeTarget "GVFS.ReadObjectHook" */; - buildPhases = ( - 2673FD8E20EBDAA900B64B7F /* Sources */, - 2673FD8F20EBDAA900B64B7F /* Frameworks */, - 2673FD9020EBDAA900B64B7F /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = GVFS.ReadObjectHook; - productName = GVFS.ReadObjectHook; - productReference = 2673FD9220EBDAA900B64B7F /* GVFS.ReadObjectHook */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 2673FD8020EBD81D00B64B7F /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0940; - TargetAttributes = { - 2673FD9120EBDAA900B64B7F = { - CreatedOnToolsVersion = 9.4.1; - }; - }; - }; - buildConfigurationList = 2673FD8320EBD81D00B64B7F /* Build configuration list for PBXProject "GVFS.ReadObjectHook.Mac" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 2673FD7F20EBD81D00B64B7F; - productRefGroup = 2673FD9320EBDAA900B64B7F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 2673FD9120EBDAA900B64B7F /* GVFS.ReadObjectHook */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 2673FD8E20EBDAA900B64B7F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 26E839D820FD387D004E53CE /* common.posix.cpp in Sources */, - 2673FD9620EBDAA900B64B7F /* main.cpp in Sources */, - 2673FD9C20EBDEA500B64B7F /* packet.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 2673FD8420EBD81D00B64B7F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - 2673FD8520EBD81D00B64B7F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - 2673FD9820EBDAA900B64B7F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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"; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = UBF8T346G9; - 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_TREAT_WARNINGS_AS_ERRORS = 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 = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Debug; - }; - 2673FD9920EBDAA900B64B7F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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"; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = UBF8T346G9; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = 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; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2673FD8320EBD81D00B64B7F /* Build configuration list for PBXProject "GVFS.ReadObjectHook.Mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2673FD8420EBD81D00B64B7F /* Debug */, - 2673FD8520EBD81D00B64B7F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2673FD9720EBDAA900B64B7F /* Build configuration list for PBXNativeTarget "GVFS.ReadObjectHook" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2673FD9820EBDAA900B64B7F /* Debug */, - 2673FD9920EBDAA900B64B7F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 2673FD8020EBD81D00B64B7F /* Project object */; -} diff --git a/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index fd68549aed..0000000000 --- a/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Mac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Mac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d..0000000000 --- a/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Mac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Windows.vcxproj b/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.vcxproj similarity index 81% rename from GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Windows.vcxproj rename to GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.vcxproj index 03d2702621..613e9d9a7c 100644 --- a/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Windows.vcxproj +++ b/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.vcxproj @@ -14,22 +14,21 @@ {5A6656D5-81C7-472C-9DC8-32D071CB2258} Win32Proj readobject - 10.0.10240.0 - GVFS.ReadObjectHook.Windows + 10.0.16299.0 + GVFS.ReadObjectHook GVFS.ReadObjectHook - Application true - v141 + v142 MultiByte Application false - v141 + v142 true MultiByte @@ -59,22 +58,22 @@ _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true true - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt;$(SolutionDir)\GVFS\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) + C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;..\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) /Zc:__cplusplus MultiThreadedDebug Console true - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;%(AdditionalLibraryDirectories) + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64;%(AdditionalLibraryDirectories) - $(BuildOutputDir)\$(ProjectName)\intermediate\$(Platform)\$(Configuration)\$(MSBuildProjectName).log + $(IntDir)\$(MSBuildProjectName).log - $(BuildOutputDir) + $(GeneratedIncludePath) @@ -87,7 +86,7 @@ NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true true - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt;$(SolutionDir)\GVFS\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) + C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;..\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) /Zc:__cplusplus MultiThreaded @@ -96,15 +95,15 @@ true true true - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;%(AdditionalLibraryDirectories) + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64;%(AdditionalLibraryDirectories) - $(BuildOutputDir)\$(ProjectName)\intermediate\$(Platform)\$(Configuration)\$(MSBuildProjectName).log + $(IntDir)\$(MSBuildProjectName).log - $(BuildOutputDir) + $(GeneratedIncludePath) diff --git a/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Windows.vcxproj.filters b/GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.vcxproj.filters similarity index 100% rename from GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.Windows.vcxproj.filters rename to GVFS/GVFS.ReadObjectHook/GVFS.ReadObjectHook.vcxproj.filters diff --git a/GVFS/GVFS.Service.UI/GVFS.Service.UI.csproj b/GVFS/GVFS.Service.UI/GVFS.Service.UI.csproj index 0693223d52..90589d9330 100644 --- a/GVFS/GVFS.Service.UI/GVFS.Service.UI.csproj +++ b/GVFS/GVFS.Service.UI/GVFS.Service.UI.csproj @@ -1,94 +1,22 @@ - - - - + + - {93B403FD-DAFB-46C5-9636-B122792A548A} Exe - Properties - GVFS.Service.UI - GVFS.Service.UI - v4.6.1 - 512 - true - - + net461 - - x64 - true - full - false - DEBUG;TRACE - prompt - 4 - false - - - x64 - pdbonly - true - TRACE - prompt - 4 - - - - - - - - - - - - - C:\Program Files (x86)\Windows Kits\10\App Certification Kit\winmds\windows81\Windows.winmd - - + - - PlatformLoader.Windows.cs - - - - - - - - - - - - - + + - - - - - - {374bf1e5-0b2d-4d4a-bd5e-4212299def09} - GVFS.Common - - - {4ce404e7-d3fc-471c-993c-64615861ea63} - GVFS.Platform.Windows - - - {f468b05a-95e5-46bc-8c67-b80a78527b7d} - GVFS.Virtualization - + + PreserveNewest - - - - - + diff --git a/GVFS/GVFS.Service.UI/GVFSServiceUI.cs b/GVFS/GVFS.Service.UI/GVFSServiceUI.cs index 58178919eb..c81e80b7d2 100644 --- a/GVFS/GVFS.Service.UI/GVFSServiceUI.cs +++ b/GVFS/GVFS.Service.UI/GVFSServiceUI.cs @@ -2,12 +2,7 @@ using GVFS.Common.NamedPipes; using GVFS.Common.Tracing; using System; -using System.Collections.Generic; -using System.Linq; -using System.ServiceProcess; -using System.Text; using System.Threading; -using System.Threading.Tasks; namespace GVFS.Service.UI { diff --git a/GVFS/GVFS.Service.UI/app.config b/GVFS/GVFS.Service.UI/app.config deleted file mode 100644 index 1da8c9b53a..0000000000 --- a/GVFS/GVFS.Service.UI/app.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/GVFS/GVFS.Service.UI/packages.config b/GVFS/GVFS.Service.UI/packages.config deleted file mode 100644 index 119108d189..0000000000 --- a/GVFS/GVFS.Service.UI/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/GVFS/GVFS.Service/GVFS.Service.Windows.csproj b/GVFS/GVFS.Service/GVFS.Service.Windows.csproj deleted file mode 100644 index 90a034794e..0000000000 --- a/GVFS/GVFS.Service/GVFS.Service.Windows.csproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B} - Exe - Properties - GVFS.Service - GVFS.Service - v4.6.1 - 512 - true - - - - - x64 - true - full - false - DEBUG;TRACE - prompt - 4 - - - x64 - pdbonly - true - TRACE - prompt - 4 - - - - - - $(BuildOutputDir)\GVFS.Service.exe.manifest - - - - 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 - - - - - - - - - - - - - - - - - Component - - - - - - - - - - - - - - - - - - - - - {374bf1e5-0b2d-4d4a-bd5e-4212299def09} - GVFS.Common - - - {4ce404e7-d3fc-471c-993c-64615861ea63} - GVFS.Platform.Windows - - - {93b403fd-dafb-46c5-9636-b122792a548a} - GVFS.Service.UI - - - - - - GVFS.Service.exe.manifest - - - - - - - - - - - - - diff --git a/GVFS/GVFS.Service/GVFS.Service.csproj b/GVFS/GVFS.Service/GVFS.Service.csproj new file mode 100644 index 0000000000..99fa85b3ee --- /dev/null +++ b/GVFS/GVFS.Service/GVFS.Service.csproj @@ -0,0 +1,23 @@ + + + + Exe + net461 + true + + + + + + + + + + + + + + + + + diff --git a/GVFS/GVFS.Service/GVFSMountProcess.Mac.cs b/GVFS/GVFS.Service/GVFSMountProcess.Mac.cs deleted file mode 100644 index 4b9dfd231a..0000000000 --- a/GVFS/GVFS.Service/GVFSMountProcess.Mac.cs +++ /dev/null @@ -1,87 +0,0 @@ -using GVFS.Common; -using GVFS.Common.Tracing; -using System.Diagnostics; -using System.IO; - -namespace GVFS.Service -{ - public class GVFSMountProcess : IRepoMounter - { - private const string ExecutablePath = "/bin/launchctl"; - - private MountLauncher processLauncher; - private ITracer tracer; - - public GVFSMountProcess(ITracer tracer, MountLauncher processLauncher = null) - { - this.tracer = tracer; - this.processLauncher = processLauncher ?? new MountLauncher(tracer); - } - - public bool MountRepository(string repoRoot, int sessionId) - { - string arguments = string.Format( - "asuser {0} {1} mount {2}", - sessionId, - Path.Combine(GVFSPlatform.Instance.Constants.GVFSBinDirectoryPath, GVFSPlatform.Instance.Constants.GVFSExecutableName), - repoRoot); - - if (!this.processLauncher.LaunchProcess(ExecutablePath, arguments, repoRoot)) - { - this.tracer.RelatedError($"{nameof(this.MountRepository)}: Unable to start the GVFS process."); - return false; - } - - string errorMessage; - if (!this.processLauncher.WaitUntilMounted(this.tracer, repoRoot, false, out errorMessage)) - { - this.tracer.RelatedError(errorMessage); - return false; - } - - return true; - } - - public class MountLauncher - { - private ITracer tracer; - - public MountLauncher(ITracer tracer) - { - this.tracer = tracer; - } - - public virtual bool LaunchProcess(string executablePath, string arguments, string workingDirectory) - { - ProcessStartInfo processInfo = new ProcessStartInfo(executablePath); - processInfo.Arguments = arguments; - processInfo.WindowStyle = ProcessWindowStyle.Hidden; - processInfo.WorkingDirectory = workingDirectory; - processInfo.UseShellExecute = false; - processInfo.RedirectStandardOutput = true; - - ProcessResult result = ProcessHelper.Run(processInfo); - if (result.ExitCode != 0) - { - EventMetadata metadata = new EventMetadata(); - metadata.Add("Area", nameof(GVFSMountProcess)); - metadata.Add(nameof(executablePath), executablePath); - metadata.Add(nameof(arguments), arguments); - metadata.Add(nameof(workingDirectory), workingDirectory); - metadata.Add(nameof(result.ExitCode), result.ExitCode); - metadata.Add(nameof(result.Errors), result.Errors); - - this.tracer.RelatedError(metadata, $"{nameof(this.LaunchProcess)} ERROR: Could not launch {executablePath}"); - return false; - } - - return true; - } - - public virtual bool WaitUntilMounted(ITracer tracer, string enlistmentRoot, bool unattended, out string errorMessage) - { - return GVFSEnlistment.WaitUntilMounted(tracer, enlistmentRoot, unattended: false, errorMessage: out errorMessage); - } - } - } -} diff --git a/GVFS/GVFS.Service/GVFSMountProcess.Windows.cs b/GVFS/GVFS.Service/GVFSMountProcess.cs similarity index 100% rename from GVFS/GVFS.Service/GVFSMountProcess.Windows.cs rename to GVFS/GVFS.Service/GVFSMountProcess.cs diff --git a/GVFS/GVFS.Service/GVFSService.Mac.cs b/GVFS/GVFS.Service/GVFSService.Mac.cs deleted file mode 100644 index 5a706d4afc..0000000000 --- a/GVFS/GVFS.Service/GVFSService.Mac.cs +++ /dev/null @@ -1,109 +0,0 @@ -using GVFS.Common; -using GVFS.Common.NamedPipes; -using GVFS.Common.Tracing; -using GVFS.Service.Handlers; -using System; -using System.Threading; - -namespace GVFS.Service -{ - public class GVFSService - { - public const string ServiceNameArgPrefix = "--servicename="; - - private const string EtwArea = nameof(GVFSService); - - private ITracer tracer; - private Thread serviceThread; - private ManualResetEvent serviceStopped; - private string serviceName; - private IRepoRegistry repoRegistry; - private RequestHandler requestHandler; - - public GVFSService( - ITracer tracer, - string serviceName, - IRepoRegistry repoRegistry) - { - this.tracer = tracer; - this.repoRegistry = repoRegistry; - this.serviceName = serviceName; - - this.serviceStopped = new ManualResetEvent(false); - this.serviceThread = new Thread(this.ServiceThreadMain); - this.requestHandler = new RequestHandler(this.tracer, EtwArea, this.repoRegistry); - } - - public void Run() - { - try - { - this.AutoMountReposForUser(); - - if (!string.IsNullOrEmpty(this.serviceName)) - { - string pipeName = GVFSPlatform.Instance.GetGVFSServiceNamedPipeName(this.serviceName); - this.tracer.RelatedInfo("Starting pipe server with name: " + pipeName); - - using (NamedPipeServer pipeServer = NamedPipeServer.StartNewServer( - pipeName, - this.tracer, - this.requestHandler.HandleRequest)) - { - this.serviceThread.Start(); - this.serviceThread.Join(); - } - } - else - { - this.tracer.RelatedError("No name specified for Service Pipe."); - } - } - catch (Exception e) - { - this.LogExceptionAndExit(e, nameof(this.Run)); - } - } - - private void ServiceThreadMain() - { - try - { - EventMetadata metadata = new EventMetadata(); - metadata.Add("Version", ProcessHelper.GetCurrentProcessVersion()); - this.tracer.RelatedEvent(EventLevel.Informational, $"{nameof(GVFSService)}_{nameof(this.ServiceThreadMain)}", metadata); - - this.serviceStopped.WaitOne(); - this.serviceStopped.Dispose(); - } - catch (Exception e) - { - this.LogExceptionAndExit(e, nameof(this.ServiceThreadMain)); - } - } - - private void AutoMountReposForUser() - { - string currentUser = GVFSPlatform.Instance.GetCurrentUser(); - if (int.TryParse(currentUser, out int sessionId)) - { - // On Mac, there is no separate session Id. currentUser is used as sessionId - this.repoRegistry.AutoMountRepos(currentUser, sessionId); - this.repoRegistry.TraceStatus(); - } - else - { - this.tracer.RelatedError($"{nameof(this.AutoMountReposForUser)} Error: could not parse current user({currentUser}) info from RepoRegistry."); - } - } - - private void LogExceptionAndExit(Exception e, string method) - { - EventMetadata metadata = new EventMetadata(); - metadata.Add("Area", EtwArea); - metadata.Add("Exception", e.ToString()); - this.tracer.RelatedError(metadata, "Unhandled exception in " + method); - Environment.Exit((int)ReturnCode.GenericError); - } - } -} diff --git a/GVFS/GVFS.Service/Handlers/NotificationHandler.Mac.cs b/GVFS/GVFS.Service/Handlers/NotificationHandler.Mac.cs deleted file mode 100644 index f38be1a57e..0000000000 --- a/GVFS/GVFS.Service/Handlers/NotificationHandler.Mac.cs +++ /dev/null @@ -1,45 +0,0 @@ -using GVFS.Common.NamedPipes; -using GVFS.Common.Tracing; -using System; -using System.IO; - -namespace GVFS.Service.Handlers -{ - public class NotificationHandler : INotificationHandler - { - private const string NotificationServerPipeName = "vfsforgit.notification"; - private ITracer tracer; - - public NotificationHandler(ITracer tracer) - { - this.tracer = tracer; - } - - public void SendNotification(NamedPipeMessages.Notification.Request request) - { - string pipeName = Path.Combine(Path.GetTempPath(), NotificationServerPipeName); - using (NamedPipeClient client = new NamedPipeClient(pipeName)) - { - if (client.Connect()) - { - try - { - client.SendRequest(request.ToMessage()); - } - catch (Exception ex) - { - EventMetadata metadata = new EventMetadata(); - metadata.Add("Area", nameof(NotificationHandler)); - metadata.Add("Exception", ex.ToString()); - metadata.Add(TracingConstants.MessageKey.ErrorMessage, "MacOS notification display error"); - this.tracer.RelatedError(metadata, $"MacOS notification: {request.Title} - {request.Message}."); - } - } - else - { - this.tracer.RelatedError($"ERROR: Communication failure with native notification display tool. Notification info: {request.Title} - {request.Message}."); - } - } - } - } -} diff --git a/GVFS/GVFS.Service/Handlers/NotificationHandler.Windows.cs b/GVFS/GVFS.Service/Handlers/NotificationHandler.cs similarity index 100% rename from GVFS/GVFS.Service/Handlers/NotificationHandler.Windows.cs rename to GVFS/GVFS.Service/Handlers/NotificationHandler.cs diff --git a/GVFS/GVFS.Service/Mac/org.vfsforgit.service.plist b/GVFS/GVFS.Service/Mac/org.vfsforgit.service.plist deleted file mode 100644 index fee588529e..0000000000 --- a/GVFS/GVFS.Service/Mac/org.vfsforgit.service.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - EnvironmentVariables - - - PATH - /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin - - Label - org.vfsforgit.service - ProgramArguments - - /usr/local/vfsforgit/GVFS.Service - - WorkingDirectory - /usr/local/vfsforgit - ProcessType - Interactive - LimitLoadToSessionType - Aqua - Disabled - - OnDemand - - KeepAlive - - RunAtLoad - - - diff --git a/GVFS/GVFS.Service/Program.Mac.cs b/GVFS/GVFS.Service/Program.Mac.cs deleted file mode 100644 index d3b4b3a974..0000000000 --- a/GVFS/GVFS.Service/Program.Mac.cs +++ /dev/null @@ -1,67 +0,0 @@ -using GVFS.Common; -using GVFS.Common.FileSystem; -using GVFS.Common.Tracing; -using GVFS.PlatformLoader; -using GVFS.Service.Handlers; -using System; -using System.IO; -using System.Linq; - -namespace GVFS.Service -{ - public static class Program - { - public static void Main(string[] args) - { - GVFSPlatformLoader.Initialize(); - - AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler; - - using (JsonTracer tracer = new JsonTracer(GVFSConstants.Service.ServiceName, GVFSConstants.Service.ServiceName)) - { - CreateService(tracer, args).Run(); - } - } - - private static GVFSService CreateService(JsonTracer tracer, string[] args) - { - string serviceName = args.FirstOrDefault(arg => arg.StartsWith(GVFSService.ServiceNameArgPrefix, StringComparison.OrdinalIgnoreCase)); - if (serviceName != null) - { - serviceName = serviceName.Substring(GVFSService.ServiceNameArgPrefix.Length); - } - else - { - serviceName = GVFSConstants.Service.ServiceName; - } - - GVFSPlatform gvfsPlatform = GVFSPlatform.Instance; - - string logFilePath = GVFSPlatform.Instance.GetLogsDirectoryForGVFSComponent(serviceName); - Directory.CreateDirectory(logFilePath); - - tracer.AddLogFileEventListener( - GVFSEnlistment.GetNewGVFSLogFileName(logFilePath, GVFSConstants.LogFileTypes.Service), - EventLevel.Informational, - Keywords.Any); - - string serviceDataLocation = gvfsPlatform.GetSecureDataRootForGVFSComponent(serviceName); - RepoRegistry repoRegistry = new RepoRegistry( - tracer, - new PhysicalFileSystem(), - serviceDataLocation, - new GVFSMountProcess(tracer), - new NotificationHandler(tracer)); - - return new GVFSService(tracer, serviceName, repoRegistry); - } - - private static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs e) - { - using (JsonTracer tracer = new JsonTracer(GVFSConstants.Service.ServiceName, GVFSConstants.Service.ServiceName)) - { - tracer.RelatedError($"Unhandled exception in GVFS.Service: {e.ExceptionObject.ToString()}"); - } - } - } -} diff --git a/GVFS/GVFS.Service/Program.Windows.cs b/GVFS/GVFS.Service/Program.cs similarity index 100% rename from GVFS/GVFS.Service/Program.Windows.cs rename to GVFS/GVFS.Service/Program.cs diff --git a/GVFS/GVFS.Service/Properties/AssemblyInfo.cs b/GVFS/GVFS.Service/Properties/AssemblyInfo.cs deleted file mode 100644 index c31bc35a19..0000000000 --- a/GVFS/GVFS.Service/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.Service")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("GVFS.Service")] -[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("b8c1dfba-cafd-4f7e-a1a3-e11907b5467b")] diff --git a/GVFS/GVFS.Service/app.config b/GVFS/GVFS.Service/app.config deleted file mode 100644 index 1da8c9b53a..0000000000 --- a/GVFS/GVFS.Service/app.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/GVFS/GVFS.Service/packages.config b/GVFS/GVFS.Service/packages.config deleted file mode 100644 index 5bd2182d5c..0000000000 --- a/GVFS/GVFS.Service/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/GVFS/GVFS.SignFiles/GVFS.SignFiles.csproj b/GVFS/GVFS.SignFiles/GVFS.SignFiles.csproj deleted file mode 100644 index e64f658d69..0000000000 --- a/GVFS/GVFS.SignFiles/GVFS.SignFiles.csproj +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - {2F63B22B-EE26-4266-BF17-28A9146483A1} - Library - Properties - GVFS.SignFiles - GVFS.SignFiles - $(BuildOutputDir) - - 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}. - - - - - - diff --git a/GVFS/GVFS.SignFiles/packages.config b/GVFS/GVFS.SignFiles/packages.config deleted file mode 100644 index 7e1df5b5d9..0000000000 --- a/GVFS/GVFS.SignFiles/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/GVFS/GVFS.Tests/GVFS.Tests.csproj b/GVFS/GVFS.Tests/GVFS.Tests.csproj index acf5c82801..c02954c262 100644 --- a/GVFS/GVFS.Tests/GVFS.Tests.csproj +++ b/GVFS/GVFS.Tests/GVFS.Tests.csproj @@ -1,24 +1,12 @@ - - netcoreapp2.1;netstandard2.0 - x64 - true - true - win-x64;osx-x64 - - - $(GVFSVersion) - - - $(GVFSVersion) + net461 - - all - + - \ No newline at end of file + + diff --git a/GVFS/GVFS.UnitTests.Windows/App.config b/GVFS/GVFS.UnitTests.Windows/App.config deleted file mode 100644 index 0acacc87be..0000000000 --- a/GVFS/GVFS.UnitTests.Windows/App.config +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/GVFS/GVFS.UnitTests.Windows/GVFS.UnitTests.Windows.csproj b/GVFS/GVFS.UnitTests.Windows/GVFS.UnitTests.Windows.csproj deleted file mode 100644 index 2150248d73..0000000000 --- a/GVFS/GVFS.UnitTests.Windows/GVFS.UnitTests.Windows.csproj +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - - - - - {8E0D0989-21F6-4DD8-946C-39F992523CC6} - Exe - Properties - GVFS.UnitTests.Windows - GVFS.UnitTests.Windows - v4.6.1 - 512 - true - - - - - true - DEBUG;TRACE - full - x64 - prompt - true - true - - - TRACE - true - pdbonly - x64 - prompt - true - true - - - - ..\..\..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll - - - ..\..\..\packages\Microsoft.Data.Sqlite.Core.2.2.4\lib\netstandard2.0\Microsoft.Data.Sqlite.dll - - - ..\..\..\packages\Moq.4.10.1\lib\net45\Moq.dll - - - ..\..\..\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\NuGet.Common.4.9.2\lib\net46\NuGet.Common.dll - - - ..\..\..\packages\NuGet.Configuration.4.9.2\lib\net46\NuGet.Configuration.dll - - - ..\..\..\packages\NuGet.Frameworks.4.9.2\lib\net46\NuGet.Frameworks.dll - - - ..\..\..\packages\NuGet.Packaging.4.9.2\lib\net46\NuGet.Packaging.dll - - - ..\..\..\packages\NuGet.Packaging.Core.4.9.2\lib\net46\NuGet.Packaging.Core.dll - - - ..\..\..\packages\NuGet.Protocol.4.9.2\lib\net46\NuGet.Protocol.dll - - - ..\..\..\packages\NuGet.Versioning.4.9.2\lib\net46\NuGet.Versioning.dll - - - ..\..\..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll - - - ..\..\..\packages\NUnitLite.3.12.0\lib\net45\nunitlite.dll - - - ..\..\..\packages\Microsoft.Windows.ProjFS.1.1.19156.1\lib\net461\ProjectedFSLib.Managed.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 - - - - - - ..\..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - - - - - - - - ..\..\..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - - - {374bf1e5-0b2d-4d4a-bd5e-4212299def09} - GVFS.Common - - - {1118b427-7063-422f-83b9-5023c8ec5a7a} - GVFS.GVFlt - - - {15fae44c-0d21-4312-9fd3-28f05a5ab7a6} - GVFS.Platform.POSIX - - - {4ce404e7-d3fc-471c-993c-64615861ea63} - GVFS.Platform.Windows - - - {93b403fd-dafb-46c5-9636-b122792a548a} - GVFS.Service.UI - - - {b8c1dfba-cafd-4f7e-a1a3-e11907b5467b} - GVFS.Service.Windows - - - {72701bc3-5da9-4c7a-bf10-9e98c9fc8eac} - GVFS.Tests - - - {aecec217-2499-403d-b0bb-2962b9be5970} - GVFS.Upgrader - - - {F468B05A-95E5-46BC-8C67-B80A78527B7D} - GVFS.Virtualization - - - {32220664-594C-4425-B9A0-88E0BE2F3D2A} - GVFS.Windows - - - - - - - - NetCore\Category\\CategoryConstants.cs - - - NetCore\CommandLine\\HooksInstallerTests.cs - - - NetCore\Common\\AzDevOpsOrgFromNuGetFeedTests.cs - - - NetCore\Common\\BackgroundTaskQueueTests.cs - - - NetCore\Common\\CacheServerResolverTests.cs - - - NetCore\Common\Database\\GVFSDatabaseTests.cs - - - NetCore\Common\Database\\PlaceholderTableTests.cs - - - NetCore\Common\Database\\SparseTableTests.cs - - - NetCore\Common\Database\\TableTests.cs - - - NetCore\Common\\EpochConverterTests.cs - - - NetCore\Common\\FileBasedDictionaryTests.cs - - - NetCore\Common\\GitCommandLineParserTests.cs - - - NetCore\Common\\GitConfigHelperTests.cs - - - NetCore\Common\\GitObjectsTests.cs - - - NetCore\Common\\GitPathConverterTests.cs - - - NetCore\Common\\GitStatusCacheTests.cs - - - NetCore\Common\\GitVersionTests.cs - - - NetCore\Common\Git\\GitSslTests.cs - - - NetCore\Common\Git\\Sha1IdTests.cs - - - NetCore\Common\\GVFSEnlistmentHealthTests.cs - - - NetCore\Common\\GVFSEnlistmentTests.cs - - - NetCore\Common\\GVFSLockTests.cs - - - NetCore\Common\\InstallManifestTests.cs - - - NetCore\Common\\JsonTracerTests.cs - - - NetCore\Common\\LegacyPlaceholderDatabaseTests.cs - - - NetCore\Common\\LibGit2RepoInvokerTests.cs - - - NetCore\Common\\ModifiedPathsDatabaseTests.cs - - - NetCore\Common\\NamedPipeStreamReaderWriterTests.cs - - - NetCore\Common\\NamedPipeTests.cs - - - NetCore\Common\NuGetUpgrade\\NuGetUpgraderTests.cs - - - NetCore\Common\NuGetUpgrade\\OrgNuGetUpgraderTests.cs - - - NetCore\Common\\OrgInfoApiClientTests.cs - - - NetCore\Common\\PathsTests.cs - - - NetCore\Common\\PhysicalFileSystemDeleteTests.cs - - - NetCore\Common\\ProductUpgraderInfoTests.cs - - - NetCore\Common\\RefLogEntryTests.cs - - - NetCore\Common\\RetryBackoffTests.cs - - - NetCore\Common\\RetryConfigTests.cs - - - NetCore\Common\\RetryWrapperTests.cs - - - NetCore\Common\\SHA1UtilTests.cs - - - NetCore\Common\\TryCreateProductUpgraderTests.cs - - - NetCore\Git\\GitAuthenticationTests.cs - - - NetCore\Git\\GitObjectsTests.cs - - - NetCore\Git\\GitProcessTests.cs - - - NetCore\Git\\GVFSGitObjectsTests.cs - - - NetCore\Maintenance\\GitMaintenanceQueueTests.cs - - - NetCore\Maintenance\\GitMaintenanceStepTests.cs - - - NetCore\Maintenance\\LooseObjectStepTests.cs - - - NetCore\Maintenance\\PackfileMaintenanceStepTests.cs - - - NetCore\Maintenance\\PostFetchStepTests.cs - - - NetCore\Mock\Common\\MockFileBasedLock.cs - - - NetCore\Mock\Common\\MockGitStatusCache.cs - - - NetCore\Mock\Common\\MockGVFSEnlistment.cs - - - NetCore\Mock\Common\\MockLocalGVFSConfig.cs - - - NetCore\Mock\Common\\MockLocalGVFSConfigBuilder.cs - - - NetCore\Mock\Common\\MockPhysicalGitObjects.cs - - - NetCore\Mock\Common\\MockPlatform.cs - - - NetCore\Mock\Common\\MockProductUpgraderPlatformStrategy.cs - - - NetCore\Mock\Common\\MockTracer.cs - - - NetCore\Mock\Common\Tracing\\MockListener.cs - - - NetCore\Mock\FileSystem\\ConfigurableFileSystem.cs - - - NetCore\Mock\FileSystem\\MockDirectory.cs - - - NetCore\Mock\FileSystem\\MockFile.cs - - - NetCore\Mock\FileSystem\\MockFileSystem.cs - - - NetCore\Mock\FileSystem\\MockFileSystemCallbacks.cs - - - NetCore\Mock\FileSystem\\MockFileSystemWithCallbacks.cs - - - NetCore\Mock\FileSystem\\MockPlatformFileSystem.cs - - - NetCore\Mock\Git\\MockBatchHttpGitObjects.cs - - - NetCore\Mock\Git\\MockGitInstallation.cs - - - NetCore\Mock\Git\\MockGitProcess.cs - - - NetCore\Mock\Git\\MockGitRepo.cs - - - NetCore\Mock\Git\\MockGVFSGitObjects.cs - - - NetCore\Mock\Git\\MockHttpGitObjects.cs - - - NetCore\Mock\Git\\MockLibGit2Repo.cs - - - NetCore\Mock\\MockCacheServerInfo.cs - - - NetCore\Mock\\MockGitHubUpgrader.cs - - - NetCore\Mock\\MockInstallerPreRunChecker.cs - - - NetCore\Mock\\MockTextWriter.cs - - - NetCore\Mock\\ReusableMemoryStream.cs - - - NetCore\Mock\Virtualization\Background\\MockBackgroundTaskManager.cs - - - NetCore\Mock\Virtualization\BlobSize\\MockBlobSizesDatabase.cs - - - NetCore\Mock\Virtualization\FileSystem\\MockFileSystemVirtualizer.cs - - - NetCore\Mock\Virtualization\Projection\\MockGitIndexProjection.cs - - - NetCore\Prefetch\\BatchObjectDownloadStageTests.cs - - - NetCore\Prefetch\\BlobPrefetcherTests.cs - - - NetCore\Prefetch\\DiffHelperTests.cs - - - NetCore\Prefetch\\DiffTreeResultTests.cs - - - NetCore\Prefetch\\PrefetchPacksDeserializerTests.cs - - - NetCore\Prefetch\\PrefetchTracingTests.cs - - - NetCore\\Program.cs - - - NetCore\Service\\RepoRegistryTests.cs - - - NetCore\\Setup.cs - - - NetCore\Tracing\\EventListenerTests.cs - - - NetCore\Tracing\\QueuedPipeStringWriterTests.cs - - - NetCore\Tracing\\TelemetryDaemonEventListenerTests.cs - - - NetCore\Upgrader\\ProductUpgraderTests.cs - - - NetCore\Upgrader\\UpgradeOrchestratorTests.cs - - - NetCore\Upgrader\\UpgradeOrchestratorWithGitHubUpgraderTests.cs - - - NetCore\Upgrader\\UpgradeTests.cs - - - NetCore\Virtualization\\FileSystemCallbacksTests.cs - - - NetCore\Virtualization\Projection\\GitIndexEntryTests.cs - - - NetCore\Virtualization\Projection\\LazyUTF8StringTests.cs - - - NetCore\Virtualization\Projection\\ObjectPoolTests.cs - - - NetCore\Virtualization\Projection\\SortedFolderEntriesTests.cs - - - NetCore\Virtual\\CommonRepoSetup.cs - - - NetCore\Virtual\\FileSystemVirtualizerTester.cs - - - NetCore\Virtual\\TestsWithCommonRepo.cs - - - Data\%(RecursiveDir)\%(Filename)%(Extension) - Always - - - Readme.md - - - - - - - - - - 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.UnitTests.Windows/Properties/AssemblyInfo.cs b/GVFS/GVFS.UnitTests.Windows/Properties/AssemblyInfo.cs deleted file mode 100644 index e8d089a151..0000000000 --- a/GVFS/GVFS.UnitTests.Windows/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.UnitTests.Windows")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("GVFS.UnitTests.Windows")] -[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("8e0d0989-21f6-4dd8-946c-39f992523cc6")] diff --git a/GVFS/GVFS.UnitTests.Windows/packages.config b/GVFS/GVFS.UnitTests.Windows/packages.config deleted file mode 100644 index c66117ee1f..0000000000 --- a/GVFS/GVFS.UnitTests.Windows/packages.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/GVFS/GVFS.UnitTests/GVFS.UnitTests.csproj b/GVFS/GVFS.UnitTests/GVFS.UnitTests.csproj index 8013af848b..57ed82f97b 100644 --- a/GVFS/GVFS.UnitTests/GVFS.UnitTests.csproj +++ b/GVFS/GVFS.UnitTests/GVFS.UnitTests.csproj @@ -1,26 +1,38 @@  - - - Exe - netcoreapp2.1 - x64 - false - true - win-x64;osx-x64 - + net461 + Exe true - GVFS.UnitTests - GVFS.UnitTests - - - $(GVFSVersion) - - - $(GVFSVersion) + + + + + + + + + + + + + + + + + + + + + ProjectedFSLib.dll + PreserveNewest + + + Always @@ -36,26 +48,4 @@ - - - - - - - - - - - all - - - - - - - - - - - diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/CommandLine/SparseVerbTests.cs b/GVFS/GVFS.UnitTests/Windows/CommandLine/SparseVerbTests.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/CommandLine/SparseVerbTests.cs rename to GVFS/GVFS.UnitTests/Windows/CommandLine/SparseVerbTests.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/Mock/MockProcessLauncher.cs b/GVFS/GVFS.UnitTests/Windows/Mock/MockProcessLauncher.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/Mock/MockProcessLauncher.cs rename to GVFS/GVFS.UnitTests/Windows/Mock/MockProcessLauncher.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/Mock/MockVirtualizationInstance.cs b/GVFS/GVFS.UnitTests/Windows/Mock/MockVirtualizationInstance.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/Mock/MockVirtualizationInstance.cs rename to GVFS/GVFS.UnitTests/Windows/Mock/MockVirtualizationInstance.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/Mock/MockWriteBuffer.cs b/GVFS/GVFS.UnitTests/Windows/Mock/MockWriteBuffer.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/Mock/MockWriteBuffer.cs rename to GVFS/GVFS.UnitTests/Windows/Mock/MockWriteBuffer.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/Mock/WindowsFileSystemVirtualizerTester.cs b/GVFS/GVFS.UnitTests/Windows/Mock/WindowsFileSystemVirtualizerTester.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/Mock/WindowsFileSystemVirtualizerTester.cs rename to GVFS/GVFS.UnitTests/Windows/Mock/WindowsFileSystemVirtualizerTester.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/Platform/ProjFSFilterTests.cs b/GVFS/GVFS.UnitTests/Windows/Platform/ProjFSFilterTests.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/Platform/ProjFSFilterTests.cs rename to GVFS/GVFS.UnitTests/Windows/Platform/ProjFSFilterTests.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/ServiceUI/GVFSToastRequestHandlerTests.cs b/GVFS/GVFS.UnitTests/Windows/ServiceUI/GVFSToastRequestHandlerTests.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/ServiceUI/GVFSToastRequestHandlerTests.cs rename to GVFS/GVFS.UnitTests/Windows/ServiceUI/GVFSToastRequestHandlerTests.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/Upgrader/UpgradeVerbTests.cs b/GVFS/GVFS.UnitTests/Windows/Upgrader/UpgradeVerbTests.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/Upgrader/UpgradeVerbTests.cs rename to GVFS/GVFS.UnitTests/Windows/Upgrader/UpgradeVerbTests.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/Upgrader/WindowsNuGetUpgraderTests.cs b/GVFS/GVFS.UnitTests/Windows/Upgrader/WindowsNuGetUpgraderTests.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/Upgrader/WindowsNuGetUpgraderTests.cs rename to GVFS/GVFS.UnitTests/Windows/Upgrader/WindowsNuGetUpgraderTests.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/Virtualization/ActiveEnumerationTests.cs b/GVFS/GVFS.UnitTests/Windows/Virtualization/ActiveEnumerationTests.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/Virtualization/ActiveEnumerationTests.cs rename to GVFS/GVFS.UnitTests/Windows/Virtualization/ActiveEnumerationTests.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/Virtualization/PatternMatcherTests.cs b/GVFS/GVFS.UnitTests/Windows/Virtualization/PatternMatcherTests.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/Virtualization/PatternMatcherTests.cs rename to GVFS/GVFS.UnitTests/Windows/Virtualization/PatternMatcherTests.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/Virtualization/WindowsFileSystemVirtualizerTests.cs b/GVFS/GVFS.UnitTests/Windows/Virtualization/WindowsFileSystemVirtualizerTests.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/Virtualization/WindowsFileSystemVirtualizerTests.cs rename to GVFS/GVFS.UnitTests/Windows/Virtualization/WindowsFileSystemVirtualizerTests.cs diff --git a/GVFS/GVFS.UnitTests.Windows/Windows/WindowsFileBasedLockTests.cs b/GVFS/GVFS.UnitTests/Windows/WindowsFileBasedLockTests.cs similarity index 100% rename from GVFS/GVFS.UnitTests.Windows/Windows/WindowsFileBasedLockTests.cs rename to GVFS/GVFS.UnitTests/Windows/WindowsFileBasedLockTests.cs diff --git a/GVFS/GVFS.Upgrader/App.config b/GVFS/GVFS.Upgrader/App.config deleted file mode 100644 index f5c0a8bea5..0000000000 --- a/GVFS/GVFS.Upgrader/App.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/GVFS/GVFS.Upgrader/GVFS.Upgrader.csproj b/GVFS/GVFS.Upgrader/GVFS.Upgrader.csproj index 3b9629484a..f67c032125 100644 --- a/GVFS/GVFS.Upgrader/GVFS.Upgrader.csproj +++ b/GVFS/GVFS.Upgrader/GVFS.Upgrader.csproj @@ -1,69 +1,16 @@ - - + Exe - GVFS.Upgrader - - x64 - x64 - GVFS.Upgrader - false - - true - - - - $(GVFSVersion) - - - $(GVFSVersion) + net461 - - - - - net461;netcoreapp2.1 - $(DefineConstants);WINDOWS_BUILD - - - - - PlatformLoader.Windows.cs - - - - - - netcoreapp2.1 - osx-x64 - $(DefineConstants);MACOS_BUILD - - - - - PlatformLoader.Mac.cs - - - - - - - - - - - - - all - + diff --git a/GVFS/GVFS.Upgrader/MacUpgradeOrchestrator.cs b/GVFS/GVFS.Upgrader/MacUpgradeOrchestrator.cs deleted file mode 100644 index 3d8a44a041..0000000000 --- a/GVFS/GVFS.Upgrader/MacUpgradeOrchestrator.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace GVFS.Upgrader -{ - public class MacUpgradeOrchestrator : UpgradeOrchestrator - { - public MacUpgradeOrchestrator(UpgradeOptions options) - : base(options) - { - } - - protected override bool TryMountRepositories(out string consoleError) - { - // Mac upgrader does not mount repositories - consoleError = null; - return true; - } - } -} diff --git a/GVFS/GVFS.Upgrader/Properties/AssemblyInfo.cs b/GVFS/GVFS.Upgrader/Properties/AssemblyInfo.cs deleted file mode 100644 index 60bb28ce6b..0000000000 --- a/GVFS/GVFS.Upgrader/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.Upgrader")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("GVFS.Upgrader")] -[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("aecec217-2499-403d-b0bb-2962b9be5970")] diff --git a/GVFS/GVFS.Upgrader/UpgradeOrchestratorFactory.cs b/GVFS/GVFS.Upgrader/UpgradeOrchestratorFactory.cs index c2ce00dbcf..a2d9c5cb38 100644 --- a/GVFS/GVFS.Upgrader/UpgradeOrchestratorFactory.cs +++ b/GVFS/GVFS.Upgrader/UpgradeOrchestratorFactory.cs @@ -4,13 +4,7 @@ public static class UpgradeOrchestratorFactory { public static UpgradeOrchestrator Create(UpgradeOptions options) { -#if MACOS_BUILD - return new MacUpgradeOrchestrator(options); -#elif WINDOWS_BUILD return new WindowsUpgradeOrchestrator(options); -#else - throw new NotImplementedException(); -#endif - } + } } } diff --git a/GVFS/GVFS.Upgrader/packages.config b/GVFS/GVFS.Upgrader/packages.config deleted file mode 100644 index 92000da1c0..0000000000 --- a/GVFS/GVFS.Upgrader/packages.config +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Mac.xcodeproj/project.pbxproj b/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Mac.xcodeproj/project.pbxproj deleted file mode 100644 index 09425066c7..0000000000 --- a/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Mac.xcodeproj/project.pbxproj +++ /dev/null @@ -1,280 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 267A836C20EE9F27005E6B60 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267A836B20EE9F27005E6B60 /* main.cpp */; }; - 26E839D920FD4026004E53CE /* common.posix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E839D620FD29D6004E53CE /* common.posix.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 267A836620EE9F27005E6B60 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 267A836820EE9F27005E6B60 /* GVFS.VirtualFileSystemHook */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = GVFS.VirtualFileSystemHook; sourceTree = BUILT_PRODUCTS_DIR; }; - 267A836B20EE9F27005E6B60 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = SOURCE_ROOT; }; - 2686926B20EFF2610080F95D /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../GVFS.NativeHooks.Common/common.h; sourceTree = SOURCE_ROOT; }; - 26E839D620FD29D6004E53CE /* common.posix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = common.posix.cpp; path = ../GVFS.NativeHooks.Common/common.posix.cpp; sourceTree = SOURCE_ROOT; }; - 26E839DB20FD5918004E53CE /* stdafx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stdafx.h; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 267A836520EE9F27005E6B60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2673FD8620EBD84A00B64B7F = { - isa = PBXGroup; - children = ( - 26E839DB20FD5918004E53CE /* stdafx.h */, - 26E839D620FD29D6004E53CE /* common.posix.cpp */, - 2686926B20EFF2610080F95D /* common.h */, - 267A836B20EE9F27005E6B60 /* main.cpp */, - 267A836920EE9F27005E6B60 /* Products */, - ); - sourceTree = ""; - }; - 267A836920EE9F27005E6B60 /* Products */ = { - isa = PBXGroup; - children = ( - 267A836820EE9F27005E6B60 /* GVFS.VirtualFileSystemHook */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 267A836720EE9F27005E6B60 /* GVFS.VirtualFileSystemHook */ = { - isa = PBXNativeTarget; - buildConfigurationList = 267A836F20EE9F27005E6B60 /* Build configuration list for PBXNativeTarget "GVFS.VirtualFileSystemHook" */; - buildPhases = ( - 267A836420EE9F27005E6B60 /* Sources */, - 267A836520EE9F27005E6B60 /* Frameworks */, - 267A836620EE9F27005E6B60 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = GVFS.VirtualFileSystemHook; - productName = GVFS.VirtualFileSystemHook; - productReference = 267A836820EE9F27005E6B60 /* GVFS.VirtualFileSystemHook */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 2673FD8720EBD84A00B64B7F /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0940; - TargetAttributes = { - 267A836720EE9F27005E6B60 = { - CreatedOnToolsVersion = 9.4.1; - }; - }; - }; - buildConfigurationList = 2673FD8A20EBD84A00B64B7F /* Build configuration list for PBXProject "GVFS.VirtualFileSystemHook.Mac" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 2673FD8620EBD84A00B64B7F; - productRefGroup = 267A836920EE9F27005E6B60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 267A836720EE9F27005E6B60 /* GVFS.VirtualFileSystemHook */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 267A836420EE9F27005E6B60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 267A836C20EE9F27005E6B60 /* main.cpp in Sources */, - 26E839D920FD4026004E53CE /* common.posix.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 2673FD8B20EBD84A00B64B7F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - 2673FD8C20EBD84A00B64B7F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - 267A836D20EE9F27005E6B60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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"; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = UBF8T346G9; - 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_TREAT_WARNINGS_AS_ERRORS = 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 = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Debug; - }; - 267A836E20EE9F27005E6B60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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"; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = UBF8T346G9; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = 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; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2673FD8A20EBD84A00B64B7F /* Build configuration list for PBXProject "GVFS.VirtualFileSystemHook.Mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2673FD8B20EBD84A00B64B7F /* Debug */, - 2673FD8C20EBD84A00B64B7F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 267A836F20EE9F27005E6B60 /* Build configuration list for PBXNativeTarget "GVFS.VirtualFileSystemHook" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 267A836D20EE9F27005E6B60 /* Debug */, - 267A836E20EE9F27005E6B60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 2673FD8720EBD84A00B64B7F /* Project object */; -} diff --git a/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 811d6a7e6a..0000000000 --- a/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Mac.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Mac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Mac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d..0000000000 --- a/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Mac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Windows.vcxproj b/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.vcxproj similarity index 81% rename from GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Windows.vcxproj rename to GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.vcxproj index eda75135c0..8fb0cdb176 100644 --- a/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Windows.vcxproj +++ b/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.vcxproj @@ -14,22 +14,21 @@ {2D23AB54-541F-4ABC-8DCA-08C199E97ABB} Win32Proj GVFSVirtualFileSystemHook - 10.0.10240.0 - GVFS.VirtualFileSystemHook.Windows + 10.0.16299.0 + GVFS.VirtualFileSystemHook GVFS.VirtualFileSystemHook - Application true - v141 + v142 MultiByte Application false - v141 + v142 true MultiByte @@ -59,22 +58,22 @@ _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true true - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt;$(SolutionDir)\GVFS\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) + C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;..\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) /Zc:__cplusplus MultiThreadedDebug Console true - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;%(AdditionalLibraryDirectories) + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64;%(AdditionalLibraryDirectories) - $(BuildOutputDir)\$(ProjectName)\intermediate\$(Platform)\$(Configuration)\$(MSBuildProjectName).log + $(IntDir)\$(MSBuildProjectName).log - $(BuildOutputDir) + $(GeneratedIncludePath) @@ -87,7 +86,7 @@ NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true true - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt;$(SolutionDir)\GVFS\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) + C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;..\GVFS.NativeHooks.Common;%(AdditionalIncludeDirectories) /Zc:__cplusplus MultiThreaded @@ -96,15 +95,15 @@ true true true - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;%(AdditionalLibraryDirectories) + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64;%(AdditionalLibraryDirectories) - $(BuildOutputDir)\$(ProjectName)\intermediate\$(Platform)\$(Configuration)\$(MSBuildProjectName).log + $(IntDir)\$(MSBuildProjectName).log - $(BuildOutputDir) + $(GeneratedIncludePath) diff --git a/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Windows.vcxproj.filters b/GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.vcxproj.filters similarity index 100% rename from GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.Windows.vcxproj.filters rename to GVFS/GVFS.VirtualFileSystemHook/GVFS.VirtualFileSystemHook.vcxproj.filters diff --git a/GVFS/GVFS.Virtualization/GVFS.Virtualization.csproj b/GVFS/GVFS.Virtualization/GVFS.Virtualization.csproj index 7636c6eedf..0097850b8f 100644 --- a/GVFS/GVFS.Virtualization/GVFS.Virtualization.csproj +++ b/GVFS/GVFS.Virtualization/GVFS.Virtualization.csproj @@ -1,28 +1,17 @@ - + - netcoreapp2.1;netstandard2.0 - x64 + net461 true - true - - - $(GVFSVersion) - - - $(GVFSVersion) - - - - all - + - + + - \ No newline at end of file + diff --git a/GVFS/GVFS.Virtualization/AssemblyInfo.cs b/GVFS/GVFS.Virtualization/InternalsVisibleTo.cs similarity index 60% rename from GVFS/GVFS.Virtualization/AssemblyInfo.cs rename to GVFS/GVFS.Virtualization/InternalsVisibleTo.cs index a19d69f781..0ba48d81be 100644 --- a/GVFS/GVFS.Virtualization/AssemblyInfo.cs +++ b/GVFS/GVFS.Virtualization/InternalsVisibleTo.cs @@ -1,4 +1,3 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("GVFS.UnitTests")] -[assembly: InternalsVisibleTo("GVFS.UnitTests.Windows")] diff --git a/GVFS/GVFS.Virtualization/Properties/AssemblyInfo.cs b/GVFS/GVFS.Virtualization/Properties/AssemblyInfo.cs deleted file mode 100644 index eb36b90551..0000000000 --- a/GVFS/GVFS.Virtualization/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.Virtualization")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("GVFS.Virtualization")] -[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("f468b05a-95e5-46bc-8c67-b80a78527b7d")] diff --git a/GVFS/GVFS/App.config b/GVFS/GVFS/App.config deleted file mode 100644 index 3e680fdd37..0000000000 --- a/GVFS/GVFS/App.config +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/GVFS/GVFS/CommandLine/GVFSVerb.cs b/GVFS/GVFS/CommandLine/GVFSVerb.cs index 4e140a726a..97297a6ffb 100644 --- a/GVFS/GVFS/CommandLine/GVFSVerb.cs +++ b/GVFS/GVFS/CommandLine/GVFSVerb.cs @@ -877,33 +877,42 @@ private void CheckGitVersion(ITracer tracer, GVFSEnlistment enlistment, out stri GitVersion gitVersion = null; if (string.IsNullOrEmpty(enlistment.GitBinPath) || !GitProcess.TryGetVersion(enlistment.GitBinPath, out gitVersion, out string _)) { - this.ReportErrorAndExit(tracer, "Error: Unable to retrieve the git version"); + this.ReportErrorAndExit(tracer, "Error: Unable to retrieve the Git version"); } version = gitVersion.ToString(); if (gitVersion.Platform != GVFSConstants.SupportedGitVersion.Platform) { - this.ReportErrorAndExit(tracer, "Error: Invalid version of git {0}. Must use gvfs version.", version); + this.ReportErrorAndExit(tracer, "Error: Invalid version of Git {0}. Must use vfs version.", version); } if (gitVersion.IsLessThan(GVFSConstants.SupportedGitVersion)) { this.ReportErrorAndExit( tracer, - "Error: Installed git version {0} is less than the supported version of {1}.", + "Error: Installed Git version {0} is less than the minimum supported version of {1}.", gitVersion, GVFSConstants.SupportedGitVersion); } + /* We require that the revision (Z) of the Git version string (2.X.Y.vfs.Z.W) + * is an exact match. We will use this to signal that a microsoft/git version introduces + * a breaking change that requires a VFS for Git upgrade. + * Using the revision part allows us to modify the other version items arbitrarily, + * including taking version numbers 2.X.Y from upstream and updating .W if we have any + * hotfixes to microsoft/git. + */ else if (gitVersion.Revision != GVFSConstants.SupportedGitVersion.Revision) { this.ReportErrorAndExit( tracer, - "Error: Installed git version {0} has revision number {1} instead of {2}." + - " This Git version is too new, so either downgrade Git or upgrade VFS for Git", + "Error: Installed Git version {0} has revision number {1} instead of {2}." + + " This Git version is too new, so either downgrade Git or upgrade VFS for Git." + + " The minimum supported version of Git is {3}.", gitVersion, gitVersion.Revision, - GVFSConstants.SupportedGitVersion.Revision); + GVFSConstants.SupportedGitVersion.Revision, + GVFSConstants.SupportedGitVersion); } } diff --git a/GVFS/GVFS/GVFS.Windows.csproj b/GVFS/GVFS/GVFS.Windows.csproj deleted file mode 100644 index 2e0af3feb1..0000000000 --- a/GVFS/GVFS/GVFS.Windows.csproj +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - {32220664-594C-4425-B9A0-88E0BE2F3D2A} - Exe - Properties - GVFS - GVFS - v4.6.1 - 512 - true - - - - - true - DEBUG;TRACE - full - x64 - prompt - true - - - TRACE - true - pdbonly - x64 - prompt - true - - - - 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\NuGet.Commands.4.9.2\lib\net46\NuGet.Commands.dll - - - ..\..\..\packages\NuGet.Common.4.9.2\lib\net46\NuGet.Common.dll - - - ..\..\..\packages\NuGet.Configuration.4.9.2\lib\net46\NuGet.Configuration.dll - - - ..\..\..\packages\NuGet.Credentials.4.9.2\lib\net46\NuGet.Credentials.dll - - - ..\..\..\packages\NuGet.DependencyResolver.Core.4.9.2\lib\net46\NuGet.DependencyResolver.Core.dll - - - ..\..\..\packages\NuGet.Frameworks.4.9.2\lib\net46\NuGet.Frameworks.dll - - - ..\..\..\packages\NuGet.LibraryModel.4.9.2\lib\net46\NuGet.LibraryModel.dll - - - ..\..\..\packages\NuGet.Packaging.4.9.2\lib\net46\NuGet.Packaging.dll - - - ..\..\..\packages\NuGet.Packaging.Core.4.9.2\lib\net46\NuGet.Packaging.Core.dll - - - ..\..\..\packages\NuGet.ProjectModel.4.9.2\lib\net46\NuGet.ProjectModel.dll - - - ..\..\..\packages\NuGet.Protocol.4.9.2\lib\net46\NuGet.Protocol.dll - - - ..\..\..\packages\NuGet.Versioning.4.9.2\lib\net46\NuGet.Versioning.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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PlatformLoader.Windows.cs - - - - - - - Designer - - - PreserveNewest - - - - - {374bf1e5-0b2d-4d4a-bd5e-4212299def09} - GVFS.Common - - - {4ce404e7-d3fc-471c-993c-64615861ea63} - GVFS.Platform.Windows - - - {f468b05a-95e5-46bc-8c67-b80a78527b7d} - GVFS.Virtualization - - - - - - - - - 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) -xcopy /Y $(BuildOutputDir)\GitHooksLoader\bin\$(Platform)\$(Configuration)\GitHooksLoader.* $(TargetDir) - - - - - - - - - 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/GVFS.csproj b/GVFS/GVFS/GVFS.csproj new file mode 100644 index 0000000000..8c143ebbc7 --- /dev/null +++ b/GVFS/GVFS/GVFS.csproj @@ -0,0 +1,28 @@ + + + + Exe + net461 + + + + + false + Content + PreserveNewest + Build;DebugSymbolsProjectOutputGroup + + + + + + + + + + + PreserveNewest + + + + diff --git a/GVFS/GVFS/InternalsVisibleTo.cs b/GVFS/GVFS/InternalsVisibleTo.cs new file mode 100644 index 0000000000..0ba48d81be --- /dev/null +++ b/GVFS/GVFS/InternalsVisibleTo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("GVFS.UnitTests")] diff --git a/GVFS/GVFS/Properties/AssemblyInfo.cs b/GVFS/GVFS/Properties/AssemblyInfo.cs deleted file mode 100644 index 82d77cac1a..0000000000 --- a/GVFS/GVFS/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,26 +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")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("GVFS")] -[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("32220664-594c-4425-b9a0-88e0be2f3d2a")] - -[assembly: InternalsVisibleTo("GVFS.UnitTests")] -[assembly: InternalsVisibleTo("GVFS.UnitTests.Windows")] \ No newline at end of file diff --git a/GVFS/GVFS/packages.config b/GVFS/GVFS/packages.config deleted file mode 100644 index 39e6630529..0000000000 --- a/GVFS/GVFS/packages.config +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/GitHooksLoader/GitHooksLoader.cpp b/GVFS/GitHooksLoader/GitHooksLoader.cpp similarity index 100% rename from GitHooksLoader/GitHooksLoader.cpp rename to GVFS/GitHooksLoader/GitHooksLoader.cpp diff --git a/GitHooksLoader/GitHooksLoader.vcxproj b/GVFS/GitHooksLoader/GitHooksLoader.vcxproj similarity index 83% rename from GitHooksLoader/GitHooksLoader.vcxproj rename to GVFS/GitHooksLoader/GitHooksLoader.vcxproj index dd251f6843..78a51bf7f8 100644 --- a/GitHooksLoader/GitHooksLoader.vcxproj +++ b/GVFS/GitHooksLoader/GitHooksLoader.vcxproj @@ -14,20 +14,19 @@ {798DE293-6EDA-4DC4-9395-BE7A71C563E3} Win32Proj GitHooksLoader - 10.0.10240.0 + 10.0.16299.0 - Application true - v141 + v142 Unicode Application false - v141 + v142 true Unicode @@ -57,19 +56,19 @@ _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true true - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt;%(AdditionalIncludeDirectories) + C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;%(AdditionalIncludeDirectories) MultiThreadedDebug Console true - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;%(AdditionalLibraryDirectories) + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64;%(AdditionalLibraryDirectories) - $(BuildOutputDir)\$(ProjectName)\intermediate\$(Platform)\$(Configuration)\$(MSBuildProjectName).log + $(IntDir)\$(MSBuildProjectName).log - $(BuildOutputDir) + $(GeneratedIncludePath) @@ -82,7 +81,7 @@ NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true true - C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt;%(AdditionalIncludeDirectories) + C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;%(AdditionalIncludeDirectories) MultiThreaded @@ -90,13 +89,13 @@ true true true - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64;%(AdditionalLibraryDirectories) + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\ucrt\x64;%(AdditionalLibraryDirectories) - $(BuildOutputDir)\$(ProjectName)\intermediate\$(Platform)\$(Configuration)\$(MSBuildProjectName).log + $(IntDir)\$(MSBuildProjectName).log - $(BuildOutputDir) + $(GeneratedIncludePath) diff --git a/GitHooksLoader/GitHooksLoader.vcxproj.filters b/GVFS/GitHooksLoader/GitHooksLoader.vcxproj.filters similarity index 100% rename from GitHooksLoader/GitHooksLoader.vcxproj.filters rename to GVFS/GitHooksLoader/GitHooksLoader.vcxproj.filters diff --git a/GitHooksLoader/Version.rc b/GVFS/GitHooksLoader/Version.rc similarity index 100% rename from GitHooksLoader/Version.rc rename to GVFS/GitHooksLoader/Version.rc diff --git a/GitHooksLoader/resource.h b/GVFS/GitHooksLoader/resource.h similarity index 100% rename from GitHooksLoader/resource.h rename to GVFS/GitHooksLoader/resource.h diff --git a/GitHooksLoader/stdafx.cpp b/GVFS/GitHooksLoader/stdafx.cpp similarity index 100% rename from GitHooksLoader/stdafx.cpp rename to GVFS/GitHooksLoader/stdafx.cpp diff --git a/GitHooksLoader/stdafx.h b/GVFS/GitHooksLoader/stdafx.h similarity index 100% rename from GitHooksLoader/stdafx.h rename to GVFS/GitHooksLoader/stdafx.h diff --git a/GitHooksLoader/targetver.h b/GVFS/GitHooksLoader/targetver.h similarity index 100% rename from GitHooksLoader/targetver.h rename to GVFS/GitHooksLoader/targetver.h diff --git a/GVFS/LibGit2Sharp.NativeBinaries.props b/GVFS/LibGit2Sharp.NativeBinaries.props deleted file mode 100644 index caa67d3538..0000000000 --- a/GVFS/LibGit2Sharp.NativeBinaries.props +++ /dev/null @@ -1,17 +0,0 @@ - - - - - git2.dll - PreserveNewest - - - git2.so - PreserveNewest - - - git2.dylib - PreserveNewest - - - diff --git a/GVFS/ProjectedFSLib.NativeBinaries.props b/GVFS/ProjectedFSLib.NativeBinaries.props deleted file mode 100644 index 0d585bd3de..0000000000 --- a/GVFS/ProjectedFSLib.NativeBinaries.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - - ProjectedFSLib.dll - PreserveNewest - - - diff --git a/Scripts/BuildGVFSForWindows.bat b/Scripts/BuildGVFSForWindows.bat deleted file mode 100644 index 3e89b56327..0000000000 --- a/Scripts/BuildGVFSForWindows.bat +++ /dev/null @@ -1,49 +0,0 @@ -@if "%_echo%"=="" (echo off) else (echo on) -SETLOCAL -setlocal enabledelayedexpansion -CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 - -IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") -IF "%2"=="" (SET "GVFSVersion=0.2.173.2") ELSE (SET "GVFSVersion=%2") - -SET SolutionConfiguration=%Configuration%.Windows - -FOR /F "tokens=* USEBACKQ" %%F IN (`where nuget.exe`) DO ( - SET nuget=%%F - ECHO Found nuget.exe at '%%F' -) - -IF NOT EXIST %nuget% ( - ECHO ERROR: Could not find nuget.exe on the PATH - exit /b 10 -) - -:: Acquire vswhere to find dev15 installations reliably. -SET vswherever=2.6.7 -%nuget% install vswhere -Version %vswherever% || exit /b 1 -SET vswhere=%VFS_PACKAGESDIR%\vswhere.%vswherever%\tools\vswhere.exe - -:: Assumes default installation location for Windows 10 SDKs -IF NOT EXIST "c:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0" ( - echo ERROR: Could not find Windows 10 SDK Version 10240 - exit /b 1 -) - -:: Use vswhere to find the latest VS installation with the msbuild component. -:: See https://github.com/Microsoft/vswhere/wiki/Find-MSBuild -for /f "usebackq tokens=*" %%i in (`%vswhere% -all -prerelease -latest -products * -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.Net.Core.Component.SDK.2.1 -find MSBuild\**\Bin\amd64\MSBuild.exe`) do ( - set msbuild="%%i" -) - -IF NOT DEFINED msbuild ( - echo ERROR: Could not locate a Visual Studio installation with required components. - echo Refer to Readme.md for a list of the required Visual Studio components. - exit /b 10 -) - -dotnet restore %VFS_SRCDIR% - -%msbuild% %VFS_SRCDIR%\GVFS.sln /p:GVFSVersion=%GVFSVersion% /p:Configuration=%SolutionConfiguration% /p:Platform=x64 || exit /b 1 - -dotnet publish %VFS_SRCDIR%\GVFS\FastFetch\FastFetch.csproj /p:Configuration=%Configuration% /p:Platform=x64 /p:SolutionDir=%VFS_SRCDIR%\ --runtime win-x64 --framework netcoreapp2.1 --self-contained --output %VFS_PUBLISHDIR%\FastFetch || exit /b 1 -ENDLOCAL diff --git a/Scripts/CI/CreateBuildDrop.bat b/Scripts/CI/CreateBuildDrop.bat deleted file mode 100644 index 168599ed7f..0000000000 --- a/Scripts/CI/CreateBuildDrop.bat +++ /dev/null @@ -1,33 +0,0 @@ -@ECHO OFF -CALL %~dp0\..\InitializeEnvironment.bat || EXIT /b 10 - -IF "%1"=="" GOTO USAGE -IF "%2"=="" GOTO USAGE - -SETLOCAL enableextensions -SET Configuration=%1 -SET VFS_STAGEDIR=%2 - -REM Prepare the staging directories for functional tests. -IF EXIST %VFS_STAGEDIR% ( - rmdir /s /q %VFS_STAGEDIR% -) -mkdir %VFS_STAGEDIR%\src\Scripts -mkdir %VFS_STAGEDIR%\BuildOutput\GVFS.Build -mkdir %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1 -mkdir %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\ - -REM Make a minimal 'test' enlistment to pass along our pipeline. -copy %VFS_SRCDIR%\init.cmd %VFS_STAGEDIR%\src\ -copy %VFS_SCRIPTSDIR%\*.* %VFS_STAGEDIR%\src\Scripts\ -copy %VFS_OUTPUTDIR%\GVFS.Build\*.* %VFS_STAGEDIR%\BuildOutput\GVFS.Build -dotnet publish %VFS_SRCDIR%\GVFS\GVFS.FunctionalTests\GVFS.FunctionalTests.csproj -p:StyleCopEnabled=False --self-contained --framework netcoreapp2.1 -r win-x64 -c Release -o %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\ -robocopy %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\ %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\ /E /XC /XN /XO -copy %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\*.* %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\ -GOTO END - -:USAGE -echo "ERROR: Usage: CreateBuildDrop.bat [configuration] [build drop root directory]" -exit 1 - -:END \ No newline at end of file diff --git a/Scripts/CapturePerfView.bat b/Scripts/CapturePerfView.bat deleted file mode 100644 index 1c0af046f5..0000000000 --- a/Scripts/CapturePerfView.bat +++ /dev/null @@ -1,114 +0,0 @@ -@if not defined _echo echo off -setlocal - -set filename=%~n0 -goto :parseargs - -:showhelp -echo. -echo Captures a system wide PerfView while running a command then compresses it into a zip. -echo. -echo USAGE: %filename% command -echo. -echo EXAMPLES: -echo %filename% git status -echo %filename% git fetch -goto :end - -:parseargs -if "%1" == "" goto :showhelp -if /i "%1" == "/?" goto :showhelp -if /i "%1" == "-?" goto :showhelp -if /i "%1" == "/h" goto :showhelp -if /i "%1" == "-h" goto :showhelp -if /i "%1" == "/help" goto :showhelp -if /i "%1" == "-help" goto :showhelp - -:: Find the given command on the path, then look for a .PDB file next to it -:VerifyPDB -set P2=.;%PATH% -for %%e in (%PATHEXT%) do @for %%i in (%~n1%%e) do @if NOT "%%~$P2:i"=="" if NOT exist "%%~dpn$P2:i.pdb" ( - echo Unable to locate PDB file %%~dpn$P2:i.pdb. Aborting %filename% 1>&2 - exit /B 1 -) - -:VerifyPerfView -where /q perfview || ( - echo Please see the PerfView GitHub Download Page to download an up-to-date version 1>&2 - echo of PerfView and copy it to a directory in your path. 1>&2 - echo. 1>&2 - echo https://github.com/Microsoft/perfview/blob/master/documentation/Downloading.md 1>&2 - exit /B 2 -) - -:: Generate output filenames -if NOT "%_NTUSER%" == "" ( - set perfviewfilename=%_NTUSER%-%~n1-%2 -) ELSE ( - if NOT "%USERNAME%" == "" ( - set perfviewfilename=%USERNAME%-%~n1-%2 - ) ELSE ( - set perfviewfilename=%~n1-%2 - ) -) -set perfviewstartlog=%perfviewfilename%.start.log.txt -set perfviewstoplog=%perfviewfilename%.end.log.txt - -:: Capture the perfview without requiring any human intervention -:CapturePerfView -echo Capture perf view for '%*'... -perfview start /AcceptEULA /NoGui /NoNGenRundown /Merge /Zip /Providers:*Microsoft.Git.GVFS:@StacksEnabled=true,*Microsoft.Internal.Git.Plugin:@StacksEnabled=true,*Microsoft.OSGENG.Testing.GitMsWrapper:@StacksEnabled=true /kernelEvents=default+FileIOInit /logfile:"%perfviewstartlog%" "%perfviewfilename%" || goto :HandlePerfViewStartError -echo. -set STARTTIME=%TIME% -%* -set ENDTIME=%TIME% -echo. -CALL :PrintElapsedTime - -:: Merge perfview into ZIP file -echo Merging and compressing perf view... -perfview stop /AcceptEULA /NoGui /NoNGenRundown /Merge /Zip /Providers:*Microsoft.Git.GVFS:@StacksEnabled=true,*Microsoft.Internal.Git.Plugin:@StacksEnabled=true,*Microsoft.OSGENG.Testing.GitMsWrapper:@StacksEnabled=true /kernelEvents=default+FileIOInit /logfile:"%perfviewstoplog%" || goto :HandlePerfViewStopError -CALL :CheckForFile -echo PerfView trace can be found in "%perfviewfilename%.etl.zip" -goto :end - -:HandlePerfViewStartError -echo Could not start perfview, please see %perfviewstartlog% for details. -EXIT /B 3 - -:HandlePerfViewStopError -echo Could not stop perfview, please see %perfviewstoplog% for details. -EXIT /B 4 - -:: Now wait for perfview to complete writing out the file -:CheckForFile -IF EXIST "%perfviewfilename%.etl.zip" EXIT /B 0 -TIMEOUT /T 1 >nul -goto :CheckForFile - -:PrintElapsedTime -:: Change formatting for the start and end times -for /F "tokens=1-4 delims=:.," %%a in ("%STARTTIME%") do ( - set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100" -) - -for /F "tokens=1-4 delims=:.," %%a in ("%ENDTIME%") do ( - set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100" -) - -:: Calculate the elapsed time by subtracting values -set /A elapsed=end-start - -:: Format the results for output -set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100 -if %hh% lss 10 set hh=0%hh% -if %mm% lss 10 set mm=0%mm% -if %ss% lss 10 set ss=0%ss% -if %cc% lss 10 set cc=0%cc% - -set DURATION=%hh%:%mm%:%ss%.%cc% -echo Command duration : %DURATION% -EXIT /B 0 - -:end -endlocal diff --git a/Scripts/NukeBuildOutputs.bat b/Scripts/NukeBuildOutputs.bat deleted file mode 100644 index f0eca0ac9f..0000000000 --- a/Scripts/NukeBuildOutputs.bat +++ /dev/null @@ -1,42 +0,0 @@ -@ECHO OFF -CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 - -taskkill /f /im GVFS.Mount.exe 2>&1 -verify >nul - -powershell -NonInteractive -NoProfile -Command "& { (Get-MpPreference).ExclusionPath | ? {$_.StartsWith('C:\Repos\')} | %%{Remove-MpPreference -ExclusionPath $_} }" - -IF EXIST C:\Repos\GVFSFunctionalTests\enlistment ( - rmdir /s /q C:\Repos\GVFSFunctionalTests\enlistment -) ELSE ( - ECHO no test enlistment found -) - -IF EXIST C:\Repos\GVFSPerfTest ( - rmdir /s /q C:\Repos\GVFSPerfTest -) ELSE ( - ECHO no perf test enlistment found -) - -IF EXIST %VFS_OUTPUTDIR% ( - ECHO deleting build outputs - rmdir /s /q %VFS_OUTPUTDIR% -) ELSE ( - ECHO no build outputs found -) - -IF EXIST %VFS_PUBLISHDIR% ( - ECHO deleting published output - rmdir /s /q %VFS_PUBLISHDIR% -) ELSE ( - ECHO no packages found -) - -IF EXIST %VFS_PACKAGESDIR% ( - ECHO deleting packages - rmdir /s /q %VFS_PACKAGESDIR% -) ELSE ( - ECHO no packages found -) - -call %VFS_SCRIPTSDIR%\StopAllServices.bat diff --git a/Scripts/ReinstallGVFS.bat b/Scripts/ReinstallGVFS.bat deleted file mode 100644 index 29fb026a1a..0000000000 --- a/Scripts/ReinstallGVFS.bat +++ /dev/null @@ -1,33 +0,0 @@ -@ECHO OFF -CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 - -IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") - -REM Passing the remove prjflt flag to the uninstall script -call %VFS_SCRIPTSDIR%\UninstallGVFS.bat "%2" - -if not exist "c:\Program Files\Git" goto :noGit -for /F "delims=" %%g in ('dir "c:\Program Files\Git\unins*.exe" /B /S /O:-D') do %%g /VERYSILENT /SUPPRESSMSGBOXES /NORESTART & goto :deleteGit - -:deleteGit -rmdir /q/s "c:\Program Files\Git" - -:noGit -REM This is a hacky way to sleep for 2 seconds in a non-interactive window. The timeout command does not work if it can't redirect stdin. -ping 1.1.1.1 -n 1 -w 2000 >NUL - -call %VFS_SCRIPTSDIR%\StopService.bat gvflt -call %VFS_SCRIPTSDIR%\StopService.bat prjflt - -if not exist c:\Windows\System32\drivers\gvflt.sys goto :removePrjFlt -del c:\Windows\System32\drivers\gvflt.sys - -:removePrjFlt -if not "%2"=="--remove-prjflt" goto :runInstallers -if not exist c:\Windows\System32\drivers\PrjFlt.sys goto :runInstallers -sc delete prjflt -verify >nul -del c:\Windows\System32\drivers\PrjFlt.sys - -:runInstallers -call %VFS_OUTPUTDIR%\GVFS.Build\InstallProduct.bat diff --git a/Scripts/RestorePackages.bat b/Scripts/RestorePackages.bat deleted file mode 100644 index 653182076b..0000000000 --- a/Scripts/RestorePackages.bat +++ /dev/null @@ -1,19 +0,0 @@ -@ECHO OFF -CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 - -SETLOCAL - -IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") - -SET SolutionConfiguration=%Configuration%.Windows - -FOR /F "tokens=* USEBACKQ" %%F IN (`where nuget.exe`) DO ( - SET nuget=%%F - ECHO Found nuget.exe at '%%F' -) - -dotnet restore %VFS_SRCDIR%\GVFS.sln /p:Configuration=%SolutionConfiguration% /p:VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140" --packages %VFS_PACKAGESDIR% || exit /b 1 - -%nuget% restore %VFS_SRCDIR%\GVFS.sln || exit /b 1 - -ENDLOCAL \ No newline at end of file diff --git a/Scripts/RunFunctionalTests.bat b/Scripts/RunFunctionalTests.bat deleted file mode 100644 index aa858d3b9a..0000000000 --- a/Scripts/RunFunctionalTests.bat +++ /dev/null @@ -1,50 +0,0 @@ -@ECHO OFF -CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 - -IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") - -SETLOCAL -SET PATH=C:\Program Files\GVFS;C:\Program Files\Git\cmd;%PATH% - -if not "%2"=="--test-gvfs-on-path" goto :startFunctionalTests - -REM Force GVFS.FunctionalTests.exe to use the installed version of GVFS -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GitHooksLoader.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.Hooks.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.ReadObjectHook.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.VirtualFileSystemHook.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.PostIndexChangedHook.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.Mount.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.Service.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.Service.UI.exe - -REM Same for GVFS.FunctionalTests.Windows.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GitHooksLoader.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GVFS.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GVFS.Hooks.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GVFS.ReadObjectHook.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GVFS.VirtualFileSystemHook.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GVFS.PostIndexChangedHook.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GVFS.Mount.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GVFS.Service.exe -del %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GVFS.Service.UI.exe - -echo PATH = %PATH% -echo gvfs location: -where gvfs -echo GVFS.Service location: -where GVFS.Service -echo git location: -where git - -:startFunctionalTests -dotnet %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.FunctionalTests.dll /result:TestResultNetCore.xml %2 %3 %4 %5 || goto :endFunctionalTests -%VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\GVFS.FunctionalTests.Windows.exe /result:TestResultNetFramework.xml --windows-only %2 %3 %4 %5 || goto :endFunctionalTests - -:endFunctionalTests -set error=%errorlevel% - -call %VFS_SCRIPTSDIR%\StopAllServices.bat - -exit /b %error% \ No newline at end of file diff --git a/Scripts/RunUnitTests.bat b/Scripts/RunUnitTests.bat deleted file mode 100644 index 3e9af434d6..0000000000 --- a/Scripts/RunUnitTests.bat +++ /dev/null @@ -1,11 +0,0 @@ -@ECHO OFF -CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 - -IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") - -set RESULT=0 - -%VFS_OUTPUTDIR%\GVFS.UnitTests.Windows\bin\x64\%Configuration%\GVFS.UnitTests.Windows.exe || set RESULT=1 -dotnet %VFS_OUTPUTDIR%\GVFS.UnitTests\bin\x64\%Configuration%\netcoreapp2.1\GVFS.UnitTests.dll || set RESULT=1 - -exit /b %RESULT% \ No newline at end of file diff --git a/Scripts/StopAllServices.bat b/Scripts/StopAllServices.bat deleted file mode 100644 index 7aed517dbb..0000000000 --- a/Scripts/StopAllServices.bat +++ /dev/null @@ -1,5 +0,0 @@ -@ECHO OFF -CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 - -call %VFS_SCRIPTSDIR%\StopService.bat GVFS.Service -call %VFS_SCRIPTSDIR%\StopService.bat Test.GVFS.Service diff --git a/Scripts/UninstallGVFS.bat b/Scripts/UninstallGVFS.bat deleted file mode 100644 index 66538f16ce..0000000000 --- a/Scripts/UninstallGVFS.bat +++ /dev/null @@ -1,28 +0,0 @@ -@ECHO OFF -CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 - -taskkill /F /T /FI "IMAGENAME eq git.exe" -taskkill /F /T /FI "IMAGENAME eq GVFS.exe" -taskkill /F /T /FI "IMAGENAME eq GVFS.Mount.exe" - -if not exist "c:\Program Files\GVFS" goto :end - -call %VFS_SCRIPTSDIR%\StopAllServices.bat - -if not "%2"=="--remove-prjflt" goto :uninstallGVFS -REM The GVFS uninstaller will not remove prjflt, and so we must remove it ourselves first. If we don't, the non-inbox ProjFS -REM will cause problems next time the inbox ProjFS is enabled -call %VFS_SCRIPTSDIR%\StopService.bat prjflt -rundll32.exe SETUPAPI.DLL,InstallHinfSection DefaultUninstall 128 C:\Program Files\GVFS\Filter\prjflt.inf - -:uninstallGVFS -REM Find the latest uninstaller file by date and run it. Goto the next step after a single execution. -for /F "delims=" %%f in ('dir "c:\Program Files\GVFS\unins*.exe" /B /S /O:-D') do %%f /VERYSILENT /SUPPRESSMSGBOXES /NORESTART & goto :deleteGVFS - -:deleteGVFS -rmdir /q/s "c:\Program Files\GVFS" - -REM Delete ProgramData\GVFS directory (logs, downloaded upgrades, repo-registry, gvfs.config). It can affect the behavior of a future GVFS install. -if exist "C:\ProgramData\GVFS" rmdir /q/s "C:\ProgramData\GVFS" - -:end diff --git a/Scripts/push-all-packages.sh b/Scripts/push-all-packages.sh deleted file mode 100644 index 635314f39b..0000000000 --- a/Scripts/push-all-packages.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# Run this script from the repo root (in Git Bash) to -# push all local packages to the custom package repository. - -for pkg in $(find /c/Users/dstolee/.nuget/packages -type f -name '*.nupkg') -do - nuget push -Source "Dependencies" -SkipDuplicate -ApiKey az "$pkg" -done diff --git a/Version.props b/Version.props new file mode 100644 index 0000000000..547f704f3e --- /dev/null +++ b/Version.props @@ -0,0 +1,25 @@ + + + + + 0.2.173.2 + + + 2.20210322.1 + v2.31.0.vfs.0.1 + + + diff --git a/global.json b/global.json new file mode 100644 index 0000000000..f7ef5e1e9e --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "msbuild-sdks": { + "Microsoft.Build.Traversal": "2.0.19", + "Microsoft.Build.NoTargets": "1.0.85" + } +} diff --git a/nuget.config b/nuget.config index fd92d2c47a..a8ec2d485a 100644 --- a/nuget.config +++ b/nuget.config @@ -1,16 +1,14 @@ - + - + - - - - - - + + + + diff --git a/scripts/Build.bat b/scripts/Build.bat new file mode 100644 index 0000000000..a8f263e78a --- /dev/null +++ b/scripts/Build.bat @@ -0,0 +1,98 @@ +@ECHO OFF +CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 +SETLOCAL +SETLOCAL EnableDelayedExpansion + +IF "%~1"=="" ( + SET CONFIGURATION=Debug +) ELSE ( + SET CONFIGURATION=%1 +) + +IF "%~2"=="" ( + SET GVFSVERSION=0.2.173.2 +) ELSE ( + SET GVFSVERSION=%2 +) + +IF "%~3"=="" ( + SET VERBOSITY=minimal +) ELSE ( + SET VERBOSITY=%3 +) + +REM If we have MSBuild on the PATH then go straight to the build phase +FOR /F "tokens=* USEBACKQ" %%F IN (`where msbuild.exe`) DO ( + SET MSBUILD_EXEC=%%F + ECHO INFO: Found msbuild.exe at '%%F' + GOTO :BUILD +) + +:LOCATE_MSBUILD +REM Locate MSBuild via the vswhere tool +FOR /F "tokens=* USEBACKQ" %%F IN (`where nuget.exe`) DO ( + SET NUGET_EXEC=%%F + ECHO INFO: Found nuget.exe at '%%F' +) + +REM NuGet is required to be on the PATH to install vswhere +IF NOT EXIST "%NUGET_EXEC%" ( + ECHO ERROR: Could not find nuget.exe on the PATH + EXIT /B 10 +) + +REM Acquire vswhere to find VS installations reliably +SET VSWHERE_VER=2.6.7 +"%NUGET_EXEC%" install vswhere -Version %VSWHERE_VER% || exit /b 1 +SET VSWHERE_EXEC=%VFS_PACKAGESDIR%\vswhere.%VSWHERE_VER%\tools\vswhere.exe + +REM Assumes default installation location for Windows 10 SDKs +IF NOT EXIST "C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0" ( + ECHO ERROR: Could not find Windows 10 SDK Version 16299 + EXIT /B 1 +) + +REM Use vswhere to find the latest VS installation with the MSBuild component +REM See https://github.com/Microsoft/vswhere/wiki/Find-MSBuild +FOR /F "tokens=* USEBACKQ" %%F IN (`%VSWHERE_EXEC% -all -prerelease -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\amd64\MSBuild.exe`) DO ( + SET MSBUILD_EXEC=%%F + ECHO INFO: Found msbuild.exe at '%%F' +) + +:BUILD +IF NOT DEFINED MSBUILD_EXEC ( + ECHO ERROR: Could not locate a Visual Studio installation with required components. + ECHO Refer to Readme.md for a list of the required Visual Studio components. + EXIT /B 10 +) + +ECHO ^********************** +ECHO ^* Restoring Packages * +ECHO ^********************** +"%MSBUILD_EXEC%" %VFS_SRCDIR%\GVFS.sln ^ + /t:Restore ^ + /v:%VERBOSITY% ^ + /p:Configuration=%CONFIGURATION% || GOTO ERROR + +ECHO ^********************* +ECHO ^* Building Solution * +ECHO ^********************* +"%MSBUILD_EXEC%" %VFS_SRCDIR%\GVFS.sln ^ + /t:Build ^ + /v:%VERBOSITY% ^ + /p:Configuration=%CONFIGURATION% || GOTO ERROR + +GOTO :EOF + +:USAGE +ECHO usage: %~n0%~x0 [^] [^] [^] +ECHO. +ECHO configuration Solution configuration (default: Debug). +ECHO version GVFS version (default: 0.2.173.2). +ECHO verbosity MSBuild verbosity (default: minimal). +ECHO. +EXIT 1 + +:ERROR +ECHO ERROR: Build failed with exit code %ERRORLEVEL% +EXIT /B %ERRORLEVEL% diff --git a/scripts/CreateBuildArtifacts.bat b/scripts/CreateBuildArtifacts.bat new file mode 100644 index 0000000000..a7ba9795e5 --- /dev/null +++ b/scripts/CreateBuildArtifacts.bat @@ -0,0 +1,88 @@ +@ECHO OFF +CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 +SETLOCAL + +IF "%~1"=="" ( + SET CONFIGURATION=Debug +) ELSE ( + SET CONFIGURATION=%1 +) + +IF "%~2"=="" ( + SET OUTROOT=%VFS_PUBLISHDIR% +) ELSE ( + SET OUTROOT=%2 +) + +REM Check NuGet is on the PATH +where /q nuget.exe +IF ERRORLEVEL 1 ( + ECHO ERROR: Could not find nuget.exe on the PATH + EXIT /B 1 +) + +IF EXIST %OUTROOT% ( + rmdir /s /q %OUTROOT% +) + +ECHO ^********************** +ECHO ^* Collecting Symbols * +ECHO ^********************** +mkdir %OUTROOT%\Symbols +SET COPY_SYM_CMD="&{Get-ChildItem -Recurse -Path '%VFS_OUTDIR%' -Include *.pdb | Where-Object FullName -Match '\\bin\\.*\\?%CONFIGURATION%\\' | Copy-Item -Destination '%OUTROOT%\Symbols'}" +powershell ^ + -NoProfile ^ + -ExecutionPolicy Bypass ^ + -Command %COPY_SYM_CMD% || GOTO ERROR + +ECHO ^****************************** +ECHO ^* Collecting GVFS.Installers * +ECHO ^****************************** +mkdir %OUTROOT%\GVFS.Installers +xcopy /S /Y ^ + %VFS_OUTDIR%\GVFS.Installers\bin\%CONFIGURATION%\win-x64 ^ + %OUTROOT%\GVFS.Installers\ || GOTO ERROR + +ECHO ^************************ +ECHO ^* Collecting FastFetch * +ECHO ^************************ +ECHO Collecting FastFetch... +mkdir %OUTROOT%\FastFetch +xcopy /S /Y ^ + %VFS_OUTDIR%\FastFetch\bin\%CONFIGURATION%\net461\win-x64 ^ + %OUTROOT%\FastFetch\ || GOTO ERROR + +ECHO ^*********************************** +ECHO ^* Collecting GVFS.FunctionalTests * +ECHO ^*********************************** +mkdir %OUTROOT%\GVFS.FunctionalTests +xcopy /S /Y ^ + %VFS_OUTDIR%\GVFS.FunctionalTests\bin\%CONFIGURATION%\net461\win-x64 ^ + %OUTROOT%\GVFS.FunctionalTests\ || GOTO ERROR + +ECHO ^************************************* +ECHO ^* Creating Installers NuGet Package * +ECHO ^************************************* +mkdir %OUTROOT%\NuGetPackages +nuget.exe pack ^ + %VFS_OUTDIR%\GVFS.Installers\bin\%CONFIGURATION%\win-x64\GVFS.Installers.nuspec ^ + -BasePath %VFS_OUTDIR%\GVFS.Installers\bin\%CONFIGURATION%\win-x64 ^ + -OutputDirectory %OUTROOT%\NuGetPackages || GOTO ERROR + +REM Move the nuspec file to the NuGetPackages artifact directory +move %OUTROOT%\GVFS.Installers\GVFS.Installers.nuspec ^ + %OUTROOT%\NuGetPackages + +GOTO :EOF + +:USAGE +ECHO usage: %~n0%~x0 [^] [^] +ECHO. +ECHO configuration Solution configuration (default: Debug). +ECHO destination Destination directory to copy artifacts (default: %VFS_PUBLISHDIR%). +ECHO. +EXIT 1 + +:ERROR +ECHO ERROR: Create build artifacts failed with exit code %ERRORLEVEL% +EXIT /B %ERRORLEVEL% diff --git a/Scripts/InitializeEnvironment.bat b/scripts/InitializeEnvironment.bat similarity index 66% rename from Scripts/InitializeEnvironment.bat rename to scripts/InitializeEnvironment.bat index faf4db72a9..8bb31abb3c 100644 --- a/Scripts/InitializeEnvironment.bat +++ b/scripts/InitializeEnvironment.bat @@ -1,4 +1,4 @@ -@if "%_echo%"=="" (echo off) else (echo on) +@IF "%_echo%"=="" (ECHO OFF) ELSE (ECHO ON) REM Set environment variables for interesting paths that scripts might need access to. PUSHD %~dp0 @@ -11,10 +11,9 @@ SET VFS_SRCDIR=%_PARSED_PATH_% CALL :RESOLVEPATH "%VFS_SRCDIR%\.." SET VFS_ENLISTMENTDIR=%_PARSED_PATH_% -SET VFS_OUTPUTDIR=%VFS_ENLISTMENTDIR%\BuildOutput +SET VFS_OUTDIR=%VFS_ENLISTMENTDIR%\out SET VFS_PACKAGESDIR=%VFS_ENLISTMENTDIR%\packages -SET VFS_PUBLISHDIR=%VFS_ENLISTMENTDIR%\Publish -SET VFS_TOOLSDIR=%VFS_ENLISTMENTDIR%\.tools +SET VFS_PUBLISHDIR=%VFS_ENLISTMENTDIR%\publish REM Clean up SET _PARSED_PATH_= diff --git a/scripts/RunFunctionalTests.bat b/scripts/RunFunctionalTests.bat new file mode 100644 index 0000000000..f8be210a09 --- /dev/null +++ b/scripts/RunFunctionalTests.bat @@ -0,0 +1,37 @@ +@ECHO OFF +CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 + +IF "%1"=="" (SET "CONFIGURATION=Debug") ELSE (SET "CONFIGURATION=%1") + +REM Ensure GVFS installation is on the PATH for the Functional Tests to find +SETLOCAL +SET PATH=C:\Program Files\GVFS;C:\Program Files\Git\cmd;%PATH% + +ECHO PATH = %PATH% + +ECHO gvfs location: +where gvfs +IF NOT %ERRORLEVEL% == 0 ( + ECHO error: unable to locate GVFS on the PATH (has it been installed?) + EXIT /b 1 +) + +ECHO GVFS.Service location: +where GVFS.Service +IF NOT %ERRORLEVEL% == 0 ( + ECHO error: unable to locate GVFS.Service on the PATH (has it been installed?) + EXIT /b 1 +) + +ECHO git location: +where git +IF NOT %ERRORLEVEL% == 0 ( + ECHO error: unable to locate Git on the PATH (has it been installed?) + EXIT /b 1 +) + +%VFS_OUTDIR%\GVFS.FunctionalTests\bin\%CONFIGURATION%\net461\win-x64\GVFS.FunctionalTests.exe /result:TestResult.xml %2 %3 %4 %5 + +SET error=%ERRORLEVEL% +CALL %VFS_SCRIPTSDIR%\StopAllServices.bat +EXIT /b %error% diff --git a/scripts/RunUnitTests.bat b/scripts/RunUnitTests.bat new file mode 100644 index 0000000000..f9f6845806 --- /dev/null +++ b/scripts/RunUnitTests.bat @@ -0,0 +1,10 @@ +@ECHO OFF +CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 + +IF "%1"=="" (SET "CONFIGURATION=Debug") ELSE (SET "CONFIGURATION=%1") + +SET RESULT=0 + +%VFS_OUTDIR%\GVFS.UnitTests\bin\%CONFIGURATION%\net461\win-x64\GVFS.UnitTests.exe || SET RESULT=1 + +EXIT /b %RESULT% diff --git a/scripts/StopAllServices.bat b/scripts/StopAllServices.bat new file mode 100644 index 0000000000..237fb757f0 --- /dev/null +++ b/scripts/StopAllServices.bat @@ -0,0 +1,5 @@ +@ECHO OFF +CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 + +CALL %VFS_SCRIPTSDIR%\StopService.bat GVFS.Service +CALL %VFS_SCRIPTSDIR%\StopService.bat Test.GVFS.Service diff --git a/Scripts/StopService.bat b/scripts/StopService.bat similarity index 100% rename from Scripts/StopService.bat rename to scripts/StopService.bat