diff --git a/.gitignore b/.gitignore index b0ba8fdd..d535a995 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,8 @@ SharpShell/.nuget SharpShell/ipch/ *.sdf *.opensdf -Build/Tools/ServerManager.vshost.exe.manifest \ No newline at end of file +Build/Tools/ServerManager.vshost.exe.manifest +!Release/ +Release/2.* +Release/nuspec/SharpShell/lib +Release/nuspec/SharpShellTools/lib diff --git a/Build/Packages/SharpShell.1.9.0.nupkg b/Build/Packages/SharpShell.1.9.0.nupkg deleted file mode 100644 index 93433685..00000000 Binary files a/Build/Packages/SharpShell.1.9.0.nupkg and /dev/null differ diff --git a/Build/Packages/SharpShell.2.0.nupkg b/Build/Packages/SharpShell.2.0.nupkg deleted file mode 100644 index 10fcfb4d..00000000 Binary files a/Build/Packages/SharpShell.2.0.nupkg and /dev/null differ diff --git a/Build/Packages/SharpShell.2.1.nupkg b/Build/Packages/SharpShell.2.1.nupkg deleted file mode 100644 index dd3019df..00000000 Binary files a/Build/Packages/SharpShell.2.1.nupkg and /dev/null differ diff --git a/Build/Packages/SharpShellTools.1.9.0.nupkg b/Build/Packages/SharpShellTools.1.9.0.nupkg deleted file mode 100644 index c93f8c6a..00000000 Binary files a/Build/Packages/SharpShellTools.1.9.0.nupkg and /dev/null differ diff --git a/Build/Packages/SharpShellTools.2.0.0.nupkg b/Build/Packages/SharpShellTools.2.0.0.nupkg deleted file mode 100644 index 2467ee25..00000000 Binary files a/Build/Packages/SharpShellTools.2.0.0.nupkg and /dev/null differ diff --git a/Build/Packages/SharpShellTools.2.1.0.nupkg b/Build/Packages/SharpShellTools.2.1.0.nupkg deleted file mode 100644 index a673f6b4..00000000 Binary files a/Build/Packages/SharpShellTools.2.1.0.nupkg and /dev/null differ diff --git a/Release/BuildRelease.ps1 b/Release/BuildRelease.ps1 new file mode 100644 index 00000000..90e0d755 --- /dev/null +++ b/Release/BuildRelease.ps1 @@ -0,0 +1,64 @@ +# IMPORTANT: Make sure that the path to msbuild is correct! +$msbuild = "C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" +if ((Test-Path $msbuild) -eq $false) { + Write-Host "Cannot find msbuild at '$msbuild'." + Break +} + +# Load useful functions. +. .\Resources\PowershellFunctions.ps1 + +# Keep track of the 'release' folder location - it's the root of everything else. +# We can also build paths to the key locations we'll use. +$scriptParentPath = Split-Path -parent $MyInvocation.MyCommand.Definition +$folderReleaseRoot = $scriptParentPath +$folderSourceRoot = Split-Path -parent $folderReleaseRoot +$folderSolutionsRoot = Join-Path $folderSourceRoot "SharpShell" +$folderNuspecRoot = Join-Path $folderSourceRoot "release\nuspec" + +# Part 1 - Build the solution +Write-Host "Preparing to build the SharpShell solution..." +$solutionCoreLibraries = Join-Path $folderSolutionsRoot "SharpShell.sln" +. $msbuild $solutionCoreLibraries /p:Configuration=Release /verbosity:minimal + +# Part 2 - Get the version number of the core library, use this to build the destination release folder. +$folderBuild = Join-Path $folderSourceRoot "Build" +$releaseVersion = [Reflection.Assembly]::LoadFile((Join-Path $folderBuild "Core\SharpShell.dll")).GetName().Version +Write-Host "Built SharpShell. Release Version: $releaseVersion" + +# Part 3 - Copy the core, tools and samples to the release. +$folderRelease = Join-Path $folderReleaseRoot $releaseVersion +Copy-Item "$folderBuild\Core" "$folderRelease\Core" -Force -Recurse +Copy-Item "$folderBuild\Samples" "$folderRelease\Samples" -Force -Recurse +Copy-Item "$folderBuild\Tools" "$folderRelease\Tools" -Force -Recurse + +# Part 4 - Build the SharpShell Nuget Package +Write-Host "Preparing to build the SharpShell Nuget Package..." +$folderReleasePackage = Join-Path $folderRelease "Package" +EnsureEmptyFolderExists $folderReleasePackage +$nuget = Join-Path $scriptParentPath "Resources\nuget.exe" +CopyItems (Join-Path "$folderRelease\Core" "*.*") (Join-Path $folderNuspecRoot "SharpShell\lib\net40") +. $nuget pack (Join-Path $folderNuspecRoot "SharpShell\SharpShell.nuspec") -Version $releaseVersion -OutputDirectory $folderReleasePackage +$packagePath = (Join-Path $folderReleasePackage "SharpShell.$releaseVersion.nupkg") + +# Part 5 - Build the SharpShell Tools Nuget Package +Write-Host "Preparing to build the SharpShell Tools Nuget Package..." +CopyItems (Join-Path "$folderRelease\Tools" "*.*") (Join-Path $folderNuspecRoot "SharpShellTools\lib") +. $nuget pack (Join-Path $folderNuspecRoot "SharpShellTools\SharpShellTools.nuspec") -Version $releaseVersion -OutputDirectory $folderReleasePackage +$packagePathTools = (Join-Path $folderReleasePackage "SharpShell.$releaseVersion.nupkg") + +# Part 6 - Zip up the Core. +# TODO + +# Part 7 - Zip up the Server Manager. +# TODO + +# Part 8 - Zip up the SRM. +# TODO + +# We're done! +Write-Host "Successfully built version: $releaseVersion" + +# If the user wants, we can also publish. +# . $nuget push $packagePath +# . $nuget push $packagePathTools \ No newline at end of file diff --git a/Release/Resources/PowershellFunctions.ps1 b/Release/Resources/PowershellFunctions.ps1 new file mode 100644 index 00000000..3a2094c1 --- /dev/null +++ b/Release/Resources/PowershellFunctions.ps1 @@ -0,0 +1,25 @@ +# Copy items to a destination folder, creating the folder if needed. +function CopyItems($source, $destinationFolder) { + + # Create the any folders or subfolders up to the destination that don't exist. + EnsureFolderExists($destinationFolder) + + # Now copy the items. + Copy-Item $source -Destination $destinationFolder +} + +# Ensures that a folder exists. +function EnsureFolderExists($folder) { + + # Create the any folders or subfolders up to the destination that don't exist. + if (!(Test-Path -path $folder)) { + New-Item $folder -Type Directory + } +} + +# Ensures that a folder exists and deletes anything in it. +function EnsureEmptyFolderExists($folder) { + EnsureFolderExists($folder) + Remove-Item -Recurse -Force $folder + EnsureFolderExists($folder) +} \ No newline at end of file diff --git a/Release/Resources/nuget.exe b/Release/Resources/nuget.exe new file mode 100644 index 00000000..9cba6edb Binary files /dev/null and b/Release/Resources/nuget.exe differ diff --git a/Release/nuspec/SharpShell/SharpShell.nuspec b/Release/nuspec/SharpShell/SharpShell.nuspec new file mode 100644 index 00000000..bac81ad0 --- /dev/null +++ b/Release/nuspec/SharpShell/SharpShell.nuspec @@ -0,0 +1,20 @@ + + + + SharpShell + 2.2 + SharpShell + Dave Kerr + Dave Kerr + https://github.com/dwmkerr/sharpshell + false + SharpShell is a framework that lets you build Windows Shell Extensions using the .NET Framework. + SharpShell is a framework that lets you build Windows Shell Extensions using the .NET Framework. + Copyright © Dave Kerr 2014 + Shell,SharpShell,COM,Context Menu,Icon Handler + + + + + + \ No newline at end of file diff --git a/Release/nuspec/SharpShellTools/SharpShellTools.nuspec b/Release/nuspec/SharpShellTools/SharpShellTools.nuspec new file mode 100644 index 00000000..0b3f9526 --- /dev/null +++ b/Release/nuspec/SharpShellTools/SharpShellTools.nuspec @@ -0,0 +1,20 @@ + + + + SharpShellTools + 2.2.0.0 + SharpShell Tools + Dave Kerr + Dave Kerr + https://github.com/dwmkerr/sharpshell + false + SharpShell is a framework that lets you build Windows Shell Extensions using the .NET Framework. The SharpShell Tools are a set of tools for working with these extensions. + SharpShell is a framework that lets you build Windows Shell Extensions using the .NET Framework. The SharpShell Tools are a set of tools for working with these extensions. + Copyright © Dave Kerr 2014 + Shell,SharpShell,COM,Context Menu,Icon Handler + + + + + + \ No newline at end of file diff --git a/SharpShell/SharedAssemblyInfo.cs b/SharpShell/SharedAssemblyInfo.cs index a4513367..a55e443c 100644 --- a/SharpShell/SharedAssemblyInfo.cs +++ b/SharpShell/SharedAssemblyInfo.cs @@ -17,5 +17,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.1.0.0")] -[assembly: AssemblyFileVersion("2.1.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("2.2.0.0")] +[assembly: AssemblyFileVersion("2.2.0.0")] \ No newline at end of file diff --git a/SharpShell/Tools/ServerRegistrationManager/EmbeddedReferences/SharpShell.dll b/SharpShell/Tools/ServerRegistrationManager/EmbeddedReferences/SharpShell.dll index 7d85b809..5e9bb393 100644 Binary files a/SharpShell/Tools/ServerRegistrationManager/EmbeddedReferences/SharpShell.dll and b/SharpShell/Tools/ServerRegistrationManager/EmbeddedReferences/SharpShell.dll differ