Skip to content

Commit 513fb18

Browse files
authored
Merge pull request #204 from punker76/dev
Merging v1.0.0 dev content to master
2 parents 8bcd265 + 68d8a0a commit 513fb18

File tree

159 files changed

+28926
-7978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+28926
-7978
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
[Rr]eleases/
1818
x64/
1919
x86/
20-
build/
2120
bld/
2221
[Bb]in/
2322
[Oo]bj/

.nuget/NuGet.exe

-1.59 MB
Binary file not shown.

Build/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
*.nupkg
2-
lib
2+
*.zip
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0"?>
2+
<package>
3+
<metadata>
4+
<id>gong-wpf-dragdrop</id>
5+
<version>1.0.0-ALPHA017</version>
6+
<title>gong-wpf-dragdrop</title>
7+
<authors>Jan Karger (punker76), Steven Kirk, mitchell.jon</authors>
8+
<owners>punker76</owners>
9+
<licenseUrl>https://github.com/punker76/gong-wpf-dragdrop#license</licenseUrl>
10+
<projectUrl>https://github.com/punker76/gong-wpf-dragdrop</projectUrl>
11+
<iconUrl>https://raw.github.com/punker76/gong-wpf-dragdrop/master/GongSolutions.Wpf.DragDrop.png</iconUrl>
12+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13+
<description>An easy to use drag'n'drop framework for WPF applications.</description>
14+
<copyright>Copyright © 2013-2016</copyright>
15+
<tags>WPF UI Framework Library Toolkit .NET XAML</tags>
16+
<dependencies>
17+
<group targetFramework="net35">
18+
<dependency id="WPFToolkit" version="3.5.50211.1"/>
19+
</group>
20+
<group targetFramework="net40" />
21+
<group targetFramework="net45" />
22+
<group targetFramework="net46" />
23+
</dependencies>
24+
</metadata>
25+
<files>
26+
<file src="Debug_NET35\GongSolutions.Wpf.DragDrop.dll" target="lib\net35\GongSolutions.Wpf.DragDrop.dll"/>
27+
<file src="Debug_NET35\GongSolutions.Wpf.DragDrop.xml" target="lib\net35\GongSolutions.Wpf.DragDrop.xml"/>
28+
<file src="Debug_NET35\GongSolutions.Wpf.DragDrop.pdb" target="lib\net35\GongSolutions.Wpf.DragDrop.pdb"/>
29+
<file src="Debug_NET40\GongSolutions.Wpf.DragDrop.dll" target="lib\net40\GongSolutions.Wpf.DragDrop.dll"/>
30+
<file src="Debug_NET40\GongSolutions.Wpf.DragDrop.xml" target="lib\net40\GongSolutions.Wpf.DragDrop.xml"/>
31+
<file src="Debug_NET40\GongSolutions.Wpf.DragDrop.pdb" target="lib\net40\GongSolutions.Wpf.DragDrop.pdb"/>
32+
<file src="Debug_NET45\GongSolutions.Wpf.DragDrop.dll" target="lib\net45\GongSolutions.Wpf.DragDrop.dll"/>
33+
<file src="Debug_NET45\GongSolutions.Wpf.DragDrop.xml" target="lib\net45\GongSolutions.Wpf.DragDrop.xml"/>
34+
<file src="Debug_NET45\GongSolutions.Wpf.DragDrop.pdb" target="lib\net45\GongSolutions.Wpf.DragDrop.pdb"/>
35+
<file src="Debug_NET46\GongSolutions.Wpf.DragDrop.dll" target="lib\net46\GongSolutions.Wpf.DragDrop.dll"/>
36+
<file src="Debug_NET46\GongSolutions.Wpf.DragDrop.xml" target="lib\net46\GongSolutions.Wpf.DragDrop.xml"/>
37+
<file src="Debug_NET46\GongSolutions.Wpf.DragDrop.pdb" target="lib\net46\GongSolutions.Wpf.DragDrop.pdb"/>
38+
</files>
39+
</package>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0"?>
2+
<package>
3+
<metadata>
4+
<id>gong-wpf-dragdrop</id>
5+
<version>1.0.0</version>
6+
<title>gong-wpf-dragdrop</title>
7+
<authors>Jan Karger (punker76), Steven Kirk, mitchell.jon</authors>
8+
<owners>punker76</owners>
9+
<licenseUrl>https://github.com/punker76/gong-wpf-dragdrop#license</licenseUrl>
10+
<projectUrl>https://github.com/punker76/gong-wpf-dragdrop</projectUrl>
11+
<iconUrl>https://raw.github.com/punker76/gong-wpf-dragdrop/master/GongSolutions.Wpf.DragDrop.png</iconUrl>
12+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13+
<description>An easy to use drag'n'drop framework for WPF applications.</description>
14+
<copyright>Copyright © 2013-2016</copyright>
15+
<tags>WPF UI Framework Library Toolkit .NET XAML</tags>
16+
<dependencies>
17+
<group targetFramework="net35">
18+
<dependency id="WPFToolkit" version="3.5.50211.1"/>
19+
</group>
20+
<group targetFramework="net40" />
21+
<group targetFramework="net45" />
22+
<group targetFramework="net46" />
23+
</dependencies>
24+
</metadata>
25+
<files>
26+
<file src="Debug_NET35\GongSolutions.Wpf.DragDrop.dll" target="lib\net35\GongSolutions.Wpf.DragDrop.dll"/>
27+
<file src="Debug_NET35\GongSolutions.Wpf.DragDrop.xml" target="lib\net35\GongSolutions.Wpf.DragDrop.xml"/>
28+
<file src="Debug_NET35\GongSolutions.Wpf.DragDrop.pdb" target="lib\net35\GongSolutions.Wpf.DragDrop.pdb"/>
29+
<file src="Debug_NET40\GongSolutions.Wpf.DragDrop.dll" target="lib\net40\GongSolutions.Wpf.DragDrop.dll"/>
30+
<file src="Debug_NET40\GongSolutions.Wpf.DragDrop.xml" target="lib\net40\GongSolutions.Wpf.DragDrop.xml"/>
31+
<file src="Debug_NET40\GongSolutions.Wpf.DragDrop.pdb" target="lib\net40\GongSolutions.Wpf.DragDrop.pdb"/>
32+
<file src="Debug_NET45\GongSolutions.Wpf.DragDrop.dll" target="lib\net45\GongSolutions.Wpf.DragDrop.dll"/>
33+
<file src="Debug_NET45\GongSolutions.Wpf.DragDrop.xml" target="lib\net45\GongSolutions.Wpf.DragDrop.xml"/>
34+
<file src="Debug_NET45\GongSolutions.Wpf.DragDrop.pdb" target="lib\net45\GongSolutions.Wpf.DragDrop.pdb"/>
35+
<file src="Debug_NET46\GongSolutions.Wpf.DragDrop.dll" target="lib\net46\GongSolutions.Wpf.DragDrop.dll"/>
36+
<file src="Debug_NET46\GongSolutions.Wpf.DragDrop.xml" target="lib\net46\GongSolutions.Wpf.DragDrop.xml"/>
37+
<file src="Debug_NET46\GongSolutions.Wpf.DragDrop.pdb" target="lib\net46\GongSolutions.Wpf.DragDrop.pdb"/>
38+
</files>
39+
</package>

Build/build.cake

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#tool "nuget:?package=gitlink"
2+
3+
// Arguments
4+
var target = Argument("target", "Default");
5+
var version = "1.0.0.0";
6+
var infoVersion = "1.0.0";
7+
var alphaVersion = "1.0.0-ALPHA017";
8+
var configGitLink = new GitLinkSettings {
9+
RepositoryUrl = "https://github.com/punker76/gong-wpf-dragdrop",
10+
Branch = "master",
11+
Configuration = "Release"
12+
};
13+
var newAssemblyInfoSettings = new AssemblyInfoSettings {
14+
Product = string.Format("GongSolutions.WPF.DragDrop {0}", version),
15+
Version = version,
16+
FileVersion = version,
17+
InformationalVersion = string.Format("GongSolutions.WPF.DragDrop {0}", infoVersion),
18+
Copyright = string.Format("Copyright © GongSolutions.WPF.DragDrop 2013 - {0}", DateTime.Now.Year)
19+
};
20+
21+
// Tasks
22+
Task("GitLink")
23+
.Does(() =>
24+
{
25+
configGitLink.Configuration = "Release";
26+
GitLink("../", configGitLink);
27+
DeleteFiles("../src/bin/**/*.srcsrv");
28+
});
29+
30+
Task("GitLink_Debug")
31+
.Does(() =>
32+
{
33+
configGitLink.Configuration = "Debug";
34+
GitLink("../", configGitLink);
35+
DeleteFiles("../src/bin/**/*.srcsrv");
36+
});
37+
38+
Task("UpdateAssemblyInfo")
39+
.Does(() =>
40+
{
41+
CreateAssemblyInfo("../src/GlobalAssemblyInfo.cs", newAssemblyInfoSettings);
42+
});
43+
44+
Task("UpdateAssemblyInfo_Debug")
45+
.Does(() =>
46+
{
47+
newAssemblyInfoSettings.InformationalVersion = string.Format("GongSolutions.WPF.DragDrop {0}", alphaVersion);
48+
CreateAssemblyInfo("../src/GlobalAssemblyInfo.cs", newAssemblyInfoSettings);
49+
});
50+
51+
Task("Build")
52+
.Does(() =>
53+
{
54+
MSBuild("../src/GongSolutions.WPF.DragDrop.sln", settings => settings.SetConfiguration("Release").UseToolVersion(MSBuildToolVersion.VS2015));
55+
});
56+
57+
Task("Build_Debug")
58+
.Does(() =>
59+
{
60+
MSBuild("../src/GongSolutions.WPF.DragDrop.sln", settings => settings.SetConfiguration("Debug").UseToolVersion(MSBuildToolVersion.VS2015));
61+
});
62+
63+
Task("NuGetPack")
64+
.Does(() =>
65+
{
66+
var nuGetPackSettings = new NuGetPackSettings {
67+
BasePath = "../src/bin/GongSolutions.WPF.DragDrop/",
68+
Id = "gong-wpf-dragdrop",
69+
Version = version,
70+
Title = "gong-wpf-dragdrop",
71+
Copyright = string.Format("Copyright © GongSolutions.WPF.DragDrop 2013 - {0}", DateTime.Now.Year)
72+
};
73+
NuGetPack("./GongSolutions.Wpf.DragDrop.nuspec", nuGetPackSettings);
74+
nuGetPackSettings.Version = alphaVersion;
75+
NuGetPack("./GongSolutions.Wpf.DragDrop.ALPHA.nuspec", nuGetPackSettings);
76+
});
77+
78+
Task("ZipShowcase")
79+
.Does(() =>
80+
{
81+
Zip("../src/bin/Showcase.WPF.DragDrop/Release_NET45/", "Showcase.WPF.DragDrop.Release.zip");
82+
});
83+
84+
Task("ZipShowcase_Debug")
85+
.Does(() =>
86+
{
87+
Zip("../src/bin/Showcase.WPF.DragDrop/Debug_NET45/", "Showcase.WPF.DragDrop.Debug.zip");
88+
});
89+
90+
Task("CleanOutput")
91+
.ContinueOnError()
92+
.Does(() =>
93+
{
94+
CleanDirectories("../src/bin");
95+
});
96+
97+
// Task Targets
98+
Task("Default").IsDependentOn("CleanOutput").IsDependentOn("UpdateAssemblyInfo").IsDependentOn("Build").IsDependentOn("GitLink").IsDependentOn("ZipShowcase");
99+
Task("Debug").IsDependentOn("CleanOutput").IsDependentOn("UpdateAssemblyInfo_Debug").IsDependentOn("Build_Debug").IsDependentOn("GitLink_Debug").IsDependentOn("ZipShowcase_Debug");
100+
Task("Appveyor")
101+
.IsDependentOn("CleanOutput")
102+
.IsDependentOn("UpdateAssemblyInfo").IsDependentOn("Build").IsDependentOn("GitLink").IsDependentOn("ZipShowcase")
103+
.IsDependentOn("UpdateAssemblyInfo_Debug").IsDependentOn("Build_Debug").IsDependentOn("GitLink_Debug").IsDependentOn("ZipShowcase_Debug")
104+
.IsDependentOn("NuGetPack");
105+
106+
// Execution
107+
RunTarget(target);

Build/build.ps1

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
##########################################################################
2+
# This is the Cake bootstrapper script for PowerShell.
3+
# This file was downloaded from https://github.com/cake-build/resources
4+
# Feel free to change this file to fit your needs.
5+
##########################################################################
6+
7+
<#
8+
9+
.SYNOPSIS
10+
This is a Powershell script to bootstrap a Cake build.
11+
12+
.DESCRIPTION
13+
This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
14+
and execute your Cake build script with the parameters you provide.
15+
16+
.PARAMETER Script
17+
The build script to execute.
18+
.PARAMETER Target
19+
The build script target to run.
20+
.PARAMETER Configuration
21+
The build configuration to use.
22+
.PARAMETER Verbosity
23+
Specifies the amount of information to be displayed.
24+
.PARAMETER Experimental
25+
Tells Cake to use the latest Roslyn release.
26+
.PARAMETER WhatIf
27+
Performs a dry run of the build script.
28+
No tasks will be executed.
29+
.PARAMETER Mono
30+
Tells Cake to use the Mono scripting engine.
31+
.PARAMETER SkipToolPackageRestore
32+
Skips restoring of packages.
33+
.PARAMETER ScriptArgs
34+
Remaining arguments are added here.
35+
36+
.LINK
37+
http://cakebuild.net
38+
39+
#>
40+
41+
[CmdletBinding()]
42+
Param(
43+
[string]$Script = "build.cake",
44+
[string]$Target = "Default",
45+
[ValidateSet("Release", "Debug")]
46+
[string]$Configuration = "Release",
47+
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
48+
[string]$Verbosity = "Verbose",
49+
[switch]$Experimental,
50+
[Alias("DryRun","Noop")]
51+
[switch]$WhatIf,
52+
[switch]$Mono,
53+
[switch]$SkipToolPackageRestore,
54+
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
55+
[string[]]$ScriptArgs
56+
)
57+
58+
[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
59+
function MD5HashFile([string] $filePath)
60+
{
61+
if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf))
62+
{
63+
return $null
64+
}
65+
66+
[System.IO.Stream] $file = $null;
67+
[System.Security.Cryptography.MD5] $md5 = $null;
68+
try
69+
{
70+
$md5 = [System.Security.Cryptography.MD5]::Create()
71+
$file = [System.IO.File]::OpenRead($filePath)
72+
return [System.BitConverter]::ToString($md5.ComputeHash($file))
73+
}
74+
finally
75+
{
76+
if ($file -ne $null)
77+
{
78+
$file.Dispose()
79+
}
80+
}
81+
}
82+
83+
Write-Host "Preparing to run build script..."
84+
85+
if(!$PSScriptRoot){
86+
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
87+
}
88+
89+
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
90+
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
91+
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
92+
$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
93+
$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config"
94+
$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum"
95+
96+
# Should we use mono?
97+
$UseMono = "";
98+
if($Mono.IsPresent) {
99+
Write-Verbose -Message "Using the Mono based scripting engine."
100+
$UseMono = "-mono"
101+
}
102+
103+
# Should we use the new Roslyn?
104+
$UseExperimental = "";
105+
if($Experimental.IsPresent -and !($Mono.IsPresent)) {
106+
Write-Verbose -Message "Using experimental version of Roslyn."
107+
$UseExperimental = "-experimental"
108+
}
109+
110+
# Is this a dry run?
111+
$UseDryRun = "";
112+
if($WhatIf.IsPresent) {
113+
$UseDryRun = "-dryrun"
114+
}
115+
116+
# Make sure tools folder exists
117+
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
118+
Write-Verbose -Message "Creating tools directory..."
119+
New-Item -Path $TOOLS_DIR -Type directory | out-null
120+
}
121+
122+
# Make sure that packages.config exist.
123+
if (!(Test-Path $PACKAGES_CONFIG)) {
124+
Write-Verbose -Message "Downloading packages.config..."
125+
try { (New-Object System.Net.WebClient).DownloadFile("http://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch {
126+
Throw "Could not download packages.config."
127+
}
128+
}
129+
130+
# Try find NuGet.exe in path if not exists
131+
if (!(Test-Path $NUGET_EXE)) {
132+
Write-Verbose -Message "Trying to find nuget.exe in PATH..."
133+
$existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_) }
134+
$NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1
135+
if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) {
136+
Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)."
137+
$NUGET_EXE = $NUGET_EXE_IN_PATH.FullName
138+
}
139+
}
140+
141+
# Try download NuGet.exe if not exists
142+
if (!(Test-Path $NUGET_EXE)) {
143+
Write-Verbose -Message "Downloading NuGet.exe..."
144+
try {
145+
(New-Object System.Net.WebClient).DownloadFile($NUGET_URL, $NUGET_EXE)
146+
} catch {
147+
Throw "Could not download NuGet.exe."
148+
}
149+
}
150+
151+
# Save nuget.exe path to environment to be available to child processed
152+
$ENV:NUGET_EXE = $NUGET_EXE
153+
154+
# Restore tools from NuGet?
155+
if(-Not $SkipToolPackageRestore.IsPresent) {
156+
Push-Location
157+
Set-Location $TOOLS_DIR
158+
159+
# Check for changes in packages.config and remove installed tools if true.
160+
[string] $md5Hash = MD5HashFile($PACKAGES_CONFIG)
161+
if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or
162+
($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
163+
Write-Verbose -Message "Missing or changed package.config hash..."
164+
Remove-Item * -Recurse -Exclude packages.config,nuget.exe
165+
}
166+
167+
Write-Verbose -Message "Restoring tools from NuGet..."
168+
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
169+
170+
if ($LASTEXITCODE -ne 0) {
171+
Throw "An error occured while restoring NuGet tools."
172+
}
173+
else
174+
{
175+
$md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII"
176+
}
177+
Write-Verbose -Message ($NuGetOutput | out-string)
178+
Pop-Location
179+
}
180+
181+
# Make sure that Cake has been installed.
182+
if (!(Test-Path $CAKE_EXE)) {
183+
Throw "Could not find Cake.exe at $CAKE_EXE"
184+
}
185+
186+
# Start Cake
187+
Write-Host "Running build script..."
188+
Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs"
189+
exit $LASTEXITCODE

0 commit comments

Comments
 (0)