diff --git a/.gitignore b/.gitignore index 233e84698..3c5934e42 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ bin/ obj/ Debug/ Release/ +packages/ +paket-files/ *.vs *.user *.opensdf diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets new file mode 100644 index 000000000..55292f317 --- /dev/null +++ b/.paket/Paket.Restore.targets @@ -0,0 +1,296 @@ + + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + true + $(MSBuildThisFileDirectory) + $(MSBuildThisFileDirectory)..\ + $(PaketRootPath)paket-files\paket.restore.cached + $(PaketRootPath)paket.lock + /Library/Frameworks/Mono.framework/Commands/mono + mono + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + "$(PaketExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + + + <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) + dotnet "$(PaketExePath)" + + + "$(PaketExePath)" + + $(PaketRootPath)paket.bootstrapper.exe + $(PaketToolsPath)paket.bootstrapper.exe + "$(PaketBootStrapperExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" + + + + + true + true + + + + + + + true + $(NoWarn);NU1603;NU1604;NU1605;NU1608 + + + + + /usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }' + /usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }' + + + + + + + + + + + + + + + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) + $([System.IO.File]::ReadAllText('$(PaketLockFilePath)')) + true + false + true + + + + + + + + + + + + + + + + + $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached + + $(MSBuildProjectFullPath).paket.references + + $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references + + $(MSBuildProjectDirectory)\paket.references + + false + true + true + references-file-or-cache-not-found + + + + + $([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)')) + $([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)')) + references-file + false + + + + + false + + + + + true + target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths) + + + + + + + + + + false + true + + + + + + + + + + + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) + + + %(PaketReferencesFileLinesInfo.PackageVersion) + All + runtime + true + + + + + $(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools + + + + + + + + + $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0]) + $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1]) + + + %(PaketCliToolFileLinesInfo.PackageVersion) + + + + + + + + + + false + + + + + + <_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/> + + + + $(MSBuildProjectDirectory)/$(MSBuildProjectFile) + true + false + true + $(BaseIntermediateOutputPath)$(Configuration) + $(BaseIntermediateOutputPath) + + + + <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.nuspec"/> + + + + + + + + + + + + + + + + diff --git a/.paket/paket.bootstrapper.exe b/.paket/paket.bootstrapper.exe new file mode 100644 index 000000000..ab95c933a Binary files /dev/null and b/.paket/paket.bootstrapper.exe differ diff --git a/.paket/paket.exe b/.paket/paket.exe new file mode 100644 index 000000000..33bc39465 Binary files /dev/null and b/.paket/paket.exe differ diff --git a/Artwork/Banner.bmp b/Artwork/Banner.bmp new file mode 100644 index 000000000..08a9ff59e Binary files /dev/null and b/Artwork/Banner.bmp differ diff --git a/Artwork/Dialog.bmp b/Artwork/Dialog.bmp new file mode 100644 index 000000000..f26335c7f Binary files /dev/null and b/Artwork/Dialog.bmp differ diff --git a/Snoop/Snoop.ico b/Artwork/Snoop.ico similarity index 100% rename from Snoop/Snoop.ico rename to Artwork/Snoop.ico diff --git a/Artwork/snoop.png b/Artwork/snoop.png new file mode 100644 index 000000000..bf09b3eb6 Binary files /dev/null and b/Artwork/snoop.png differ diff --git a/Build/Debug/ManagedInjector32-4.0.dll b/Build/Debug/ManagedInjector32-4.0.dll deleted file mode 100644 index b5d58487f..000000000 Binary files a/Build/Debug/ManagedInjector32-4.0.dll and /dev/null differ diff --git a/Build/Debug/ManagedInjector64-4.0.dll b/Build/Debug/ManagedInjector64-4.0.dll deleted file mode 100644 index eb2dd3b29..000000000 Binary files a/Build/Debug/ManagedInjector64-4.0.dll and /dev/null differ diff --git a/Build/Debug/ManagedInjectorLauncher32-4.0.exe b/Build/Debug/ManagedInjectorLauncher32-4.0.exe deleted file mode 100644 index 9acac68c3..000000000 Binary files a/Build/Debug/ManagedInjectorLauncher32-4.0.exe and /dev/null differ diff --git a/Build/Debug/ManagedInjectorLauncher64-4.0.exe b/Build/Debug/ManagedInjectorLauncher64-4.0.exe deleted file mode 100644 index 07e10f9a6..000000000 Binary files a/Build/Debug/ManagedInjectorLauncher64-4.0.exe and /dev/null differ diff --git a/License.rtf b/License.rtf new file mode 100644 index 000000000..c1d42a400 Binary files /dev/null and b/License.rtf differ diff --git a/License.txt b/License.txt new file mode 100644 index 000000000..da3dc935e --- /dev/null +++ b/License.txt @@ -0,0 +1,31 @@ +Microsoft Public License (Ms-PL) + +This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. + +1. Definitions + +The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. + +A "contribution" is the original software, or any additions or changes to the software. + +A "contributor" is any person that distributes its contribution under this license. + +"Licensed patents" are a contributor's patent claims that read directly on its contribution. + +2. Grant of Rights + +(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. + +(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. + +3. Conditions and Limitations + +(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. + +(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. + +(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. + +(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. + +(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. \ No newline at end of file diff --git a/ManagedInjector/ManagedInjector32-4.0.vcxproj b/ManagedInjector/ManagedInjector32-4.0.vcxproj index 720fe75c5..329d45890 100644 --- a/ManagedInjector/ManagedInjector32-4.0.vcxproj +++ b/ManagedInjector/ManagedInjector32-4.0.vcxproj @@ -14,14 +14,6 @@ {8072B47B-5611-4BAB-8EF4-CB3125D676A5} v4.0 ManagedInjector - - - - - - - - ManagedCProj ManagedInjector32-4.0 8.1 diff --git a/ManagedInjector/ManagedInjector64-4.0.vcxproj b/ManagedInjector/ManagedInjector64-4.0.vcxproj index 65c6e3bd2..41093518b 100644 --- a/ManagedInjector/ManagedInjector64-4.0.vcxproj +++ b/ManagedInjector/ManagedInjector64-4.0.vcxproj @@ -14,14 +14,6 @@ {A27C8B34-2527-4258-8C07-D2720C576B90} v4.0 ManagedInjector - - - - - - - - ManagedCProj ManagedInjector64-4.0 8.1 diff --git a/ManagedInjectorLauncher/ManagedInjectorLauncher32-4.0.csproj b/ManagedInjectorLauncher/ManagedInjectorLauncher32-4.0.csproj index f2ce5f79f..ec99ef9ee 100644 --- a/ManagedInjectorLauncher/ManagedInjectorLauncher32-4.0.csproj +++ b/ManagedInjectorLauncher/ManagedInjectorLauncher32-4.0.csproj @@ -14,29 +14,6 @@ v4.0 Client 512 - - - - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true x86 @@ -82,34 +59,5 @@ ManagedInjector32-4.0 - - - False - Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - \ No newline at end of file diff --git a/ManagedInjectorLauncher/ManagedInjectorLauncher64-4.0.csproj b/ManagedInjectorLauncher/ManagedInjectorLauncher64-4.0.csproj index 33655f58d..0253a95b9 100644 --- a/ManagedInjectorLauncher/ManagedInjectorLauncher64-4.0.csproj +++ b/ManagedInjectorLauncher/ManagedInjectorLauncher64-4.0.csproj @@ -2,7 +2,7 @@ Debug - x86 + x64 8.0.30703 2.0 {21E131D3-760F-4E93-8BDD-502591BD1F97} @@ -14,32 +14,6 @@ v4.0 Client 512 - - - - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true @@ -79,34 +53,5 @@ ManagedInjector64-4.0 - - - False - Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - \ No newline at end of file diff --git a/ManagedInjectorLauncher/Properties/AssemblyInfo.cs b/ManagedInjectorLauncher/Properties/AssemblyInfo.cs index ef2739caa..49606b52b 100644 --- a/ManagedInjectorLauncher/Properties/AssemblyInfo.cs +++ b/ManagedInjectorLauncher/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("2.9.0.0")] -[assembly: AssemblyFileVersion("2.9.0.0")] +[assembly: AssemblyVersion("2.10.0.0")] +[assembly: AssemblyFileVersion("2.10.0.0")] diff --git a/Snoop.wxs b/Snoop.wxs new file mode 100644 index 000000000..f0a441892 --- /dev/null +++ b/Snoop.wxs @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Snoop/Properties/AssemblyInfo.cs b/Snoop/Properties/AssemblyInfo.cs index 5784e33ef..52b51ea30 100644 --- a/Snoop/Properties/AssemblyInfo.cs +++ b/Snoop/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("2.9.0.0")] -[assembly: AssemblyFileVersion("2.9.0.0")] +[assembly: AssemblyVersion("2.10.0.0")] +[assembly: AssemblyFileVersion("2.10.0.0")] diff --git a/Snoop/Snoop.csproj b/Snoop/Snoop.csproj index cdb6fa058..c6e16689d 100644 --- a/Snoop/Snoop.csproj +++ b/Snoop/Snoop.csproj @@ -11,7 +11,7 @@ Snoop Snoop $(SolutionDir)\Intermediate\Snoop\$(ConfigurationName) - Snoop.ico + ..\Artwork\Snoop.ico false @@ -69,37 +69,18 @@ AllRules.ruleset - - False - ..\..\..\..\..\..\Program Files\Reference Assemblies\Microsoft\WinFX\v3.0\PresentationCore.dll - 3.0 - - - False - ..\..\..\..\..\..\Program Files\Reference Assemblies\Microsoft\WinFX\v3.0\PresentationFramework.dll - 3.0 - + + - - ..\..\..\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35\System.Management.Automation.dll - False - + - - 3.0 - - - False - ..\..\..\..\..\..\Program Files\Reference Assemblies\Microsoft\WinFX\v3.0\WindowsBase.dll - 3.0 - - - 3.0 - + + + @@ -160,7 +141,7 @@ - + diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..8e932ca93 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,26 @@ +# configuration for develop and master branch + +- + branches: + only: + - master + - develop + - Chocolatey + + skip_tags: true + image: Visual Studio 2017 + configuration: Release + platform: Mixed Platforms + test: off + + pull_requests: + do_not_increment_build_number: false + + build_script: + - ps: .\build.ps1 -Package -Verbose + + artifacts: + - path: \build\publish\*.* + + nuget: + disable_publish_on_pr: true \ No newline at end of file diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 000000000..8e7a17698 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,73 @@ +#Requires -Version 5 + +Param( + [Parameter(Mandatory=$False)] + [string]$Configuration = "Release", + [Parameter(Mandatory=$False)] + [switch]$Package +) + +$ErrorActionPreference = "Stop" + +$packages = Join-Path $PSScriptRoot "packages" + +$vswhere = Join-Path $packages "vswhere/tools/vswhere.exe" +$nuget = Join-Path $packages "nuget.commandline/tools/nuget.exe" +$candle = Join-Path $packages "wix/tools/candle.exe" +$light = Join-Path $packages "wix/tools/light.exe" + +"Restoring packages" +& ./paket.cmd restore + +$path = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath +if ($path) { + $msbuild = Join-Path $path 'MSBuild/15.0/Bin/MSBuild.exe' +} + +if ($null -eq $msbuild -or !(Test-Path $msbuild)) { + Write-Error "MSBuild could not be found." +} + +"Building solution" +& $msbuild Snoop.sln /property:Configuration=$Configuration /v:m /nologo + +if ($LASTEXITCODE -ne 0) { + Write-Error "Build failed." +} + +if ($Package) { + $buildOutput = Join-Path $PSScriptRoot "build/$Configuration" + $intermediateOutput = Join-Path $PSScriptRoot "Intermediate" + $version = (Get-Item (Join-Path $buildOutput "snoop.exe")).VersionInfo.FileVersion + $outputDirectory = Join-Path $PSScriptRoot "build/publish" + + # Create chocolatey signal files for shim generation + Get-ChildItem -Path $buildOutput/*.exe -Exclude "Snoop.exe" | ForEach-Object { New-Item "$_.ignore" -ErrorAction SilentlyContinue | Out-Null } + New-Item (Join-Path $buildOutput "Snoop.exe.gui") -ErrorAction SilentlyContinue | Out-Null + + "Creating chocolatey package for version $version" + & $nuget pack "$(Join-Path $PSScriptRoot 'chocolatey\snoop.nuspec')" -Version $version -Properties Configuration=$Configuration -OutputDirectory "$outputDirectory" -NoPackageAnalysis + + if ($LASTEXITCODE -ne 0) { + Write-Error "Creating chocolatey package failed." + } + + "Creating zip for version $version" + $zipOutput = (Join-Path $outputDirectory "Snoop.$version.zip") + Remove-Item $zipOutput -ErrorAction SilentlyContinue + Compress-Archive -Path $buildOutput\Scripts, $buildOutput\*.dll, $buildOutput\*.pdb, $buildOutput\*.exe, $buildOutput\*.config -DestinationPath $zipOutput + + "Creating msi for version $version" + $msiOutput = Join-Path $outputDirectory "Snoop.$version.msi" + & $candle Snoop.wxs -ext WixUIExtension -o "$intermediateOutput/Snoop.wixobj" -dProductVersion="$version" -nologo + + if ($LASTEXITCODE -ne 0) { + Write-Error "Candle failed." + } + + & $light -out "$msioutput" -b "$buildOutput" "$intermediateOutput/Snoop.wixobj" -ext WixUIExtension -dProductVersion=$version -pdbout "$intermediateOutput/Snoop.wixpdb" -nologo + + if ($LASTEXITCODE -ne 0) { + Write-Error "Light failed." + } +} \ No newline at end of file diff --git a/chocolatey/snoop.nuspec b/chocolatey/snoop.nuspec new file mode 100644 index 000000000..c2aee3e5e --- /dev/null +++ b/chocolatey/snoop.nuspec @@ -0,0 +1,30 @@ + + + + snoop + $Version$ + Snoop + Cory Plotts + cplotts + false + https://github.com/cplotts/snoopwpf/License.txt + https://github.com/cplotts/snoopwpf/ + https://github.com/cplotts/snoopwpf/raw/master/Artwork/Snoop.ico + Snoop allows you to spy/browse the visual tree of a running WPF application (without the need for a debugger) ... and change properties ... amongst other things. + snoop spy wpf + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/chocolatey/tools/VERIFICATION.txt b/chocolatey/tools/VERIFICATION.txt new file mode 100644 index 000000000..efe5980a6 --- /dev/null +++ b/chocolatey/tools/VERIFICATION.txt @@ -0,0 +1,7 @@ +VERIFICATION +Verification is intended to assist the Chocolatey moderators and community +in verifying that this package's contents are trustworthy. + +This package is published by the vendor itself. +There is no need to include checksums in this file as the binaries are +all contained in this package and not aquired from a third party website. \ No newline at end of file diff --git a/chocolatey/tools/chocolateyInstall.ps1 b/chocolatey/tools/chocolateyInstall.ps1 new file mode 100644 index 000000000..3ab1afff6 --- /dev/null +++ b/chocolatey/tools/chocolateyInstall.ps1 @@ -0,0 +1,7 @@ +# Create a desktop link to snoop executable +$parentfolder = Split-Path -parent $MyInvocation.MyCommand.Definition +$target = Join-Path $parentfolder 'snoop.exe' + +$desktopPath = [System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::Desktop) +$shortcutFilePath = Join-Path $desktopPath "Snoop.lnk" +Install-ChocolateyShortcut -ShortcutFilePath $shortcutFilePath -TargetPath $target \ No newline at end of file diff --git a/chocolatey/tools/chocolateyUninstall.ps1 b/chocolatey/tools/chocolateyUninstall.ps1 new file mode 100644 index 000000000..859f7bce2 --- /dev/null +++ b/chocolatey/tools/chocolateyUninstall.ps1 @@ -0,0 +1,6 @@ +$desktopPath = $([System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::DesktopDirectory)) +$shortcutFilePath = Join-Path $desktopPath "Snoop.lnk" + +if (Test-Path($shortcutFilePath)) { + Remove-Item $shortcutFilePath -ErrorAction SilentlyContinue +} \ No newline at end of file diff --git a/paket.cmd b/paket.cmd new file mode 100644 index 000000000..00ae0d5a8 --- /dev/null +++ b/paket.cmd @@ -0,0 +1 @@ +call ".paket/paket.exe" %* \ No newline at end of file diff --git a/paket.dependencies b/paket.dependencies new file mode 100644 index 000000000..fa81ee2af --- /dev/null +++ b/paket.dependencies @@ -0,0 +1,9 @@ +source https://api.nuget.org/v3/index.json + +framework: auto-detect +specific_version: false +redirects: off + +nuget nuget.commandline +nuget vswhere +nuget wix \ No newline at end of file diff --git a/paket.lock b/paket.lock new file mode 100644 index 000000000..84fb1bf87 --- /dev/null +++ b/paket.lock @@ -0,0 +1,7 @@ +REDIRECTS: OFF +SPECIFIC-VERSION: FALSE +NUGET + remote: https://api.nuget.org/v3/index.json + nuget.commandline (4.7.1) + vswhere (2.5.2) + wix (3.11.1)