Skip to content

Commit

Permalink
Packaging SilverLight separately
Browse files Browse the repository at this point in the history
  • Loading branch information
rprouse committed Oct 28, 2015
1 parent affd2ea commit 87b1136
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 14 deletions.
52 changes: 45 additions & 7 deletions NUnit.proj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<DisplayVersion>3.0 Beta 5</DisplayVersion>
<PackageName>$(ProjectName)-$(PackageVersion)$(PackageModifier)</PackageName>
<PackageNameCF>$(ProjectName)CF-$(PackageVersion)$(PackageModifier)</PackageNameCF>
<PackageNameSL>$(ProjectName)SL-$(PackageVersion)$(PackageModifier)</PackageNameSL>
</PropertyGroup>

<PropertyGroup Label="Platform-specific properties">
Expand Down Expand Up @@ -86,10 +87,6 @@
<ProjectSuffix>netcf-3.5</ProjectSuffix>
<Runtime>netcf</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='netcf-2.0'">
<ProjectSuffix>netcf-2.0</ProjectSuffix>
<Runtime>netcf</Runtime>
</PropertyGroup>
<PropertyGroup Condition="'$(Framework)'=='sl-5.0'">
<ProjectSuffix>sl-5.0</ProjectSuffix>
<Runtime>silverlight</Runtime>
Expand Down Expand Up @@ -510,7 +507,7 @@
DependsOnTargets="_CreateImageIfNotPresent">

<Message Text="******************************************************************" />
<Message Text="* Creating the nunit Nuget $(Configuration) package" />
<Message Text="* Creating the nunit Nuget CF $(Configuration) package" />
<Message Text="******************************************************************" />

<Exec WorkingDirectory="$(ProjectBaseDir)"
Expand All @@ -522,14 +519,52 @@
DependsOnTargets="_CreateImageIfNotPresent">

<Message Text="******************************************************************" />
<Message Text="* Creating the nunitlite Nuget $(Configuration) package" />
<Message Text="* Creating the nunitlite Nuget CF $(Configuration) package" />
<Message Text="******************************************************************" />

<Exec WorkingDirectory="$(ProjectBaseDir)"
Command="$(ManagedExeLauncher) &quot;$(NugetExecutable)&quot; pack $(NuspecDirectory)\nunitlitecf.nuspec -BasePath &quot;$(CurrentImageDir)&quot; -OutputDirectory &quot;$(ProjectPackageDir)&quot; -Properties version=$(NugetVersion)" />

</Target>

<!-- Packaging for SilverLight -->
<Target Name="PackageSL" Label="Creates all packages for SilverLight"
DependsOnTargets="PackageBinariesSL;PackageNuGetNUnitSL;PackageNuGetNUnitLiteSL" />

<Target Name="PackageBinariesSL" Label="Packages the SilverLight binaries as a zip" DependsOnTargets="_CreateImageIfNotPresent">
<Message Text="******************************************************************" />
<Message Text="* Creating the binary $(Configuration) package as $(PackageNameSL)$(ConfigSuffix).zip" />
<Message Text="******************************************************************" />

<Zip Files="@(SLBinZipFiles)" WorkingDirectory="$(CurrentImageDir)"
ZipFileName="$(ProjectPackageDir)\$(PackageNameSL)$(ConfigSuffix).zip" />

</Target>

<Target Name="PackageNuGetNUnitSL" Label="Creates the NUnit Framework NuGet package for SilverLight"
DependsOnTargets="_CreateImageIfNotPresent">

<Message Text="******************************************************************" />
<Message Text="* Creating the nunit Nuget SilverLight $(Configuration) package" />
<Message Text="******************************************************************" />

<Exec WorkingDirectory="$(ProjectBaseDir)"
Command="$(ManagedExeLauncher) &quot;$(NugetExecutable)&quot; pack $(NuspecDirectory)\nunitSL.nuspec -BasePath &quot;$(CurrentImageDir)&quot; -OutputDirectory &quot;$(ProjectPackageDir)&quot; -Properties version=$(NugetVersion)" />

</Target>

<Target Name="PackageNuGetNUnitLiteSL" Label="Creates the NUnitlite NuGet package for SilverLight"
DependsOnTargets="_CreateImageIfNotPresent">

<Message Text="******************************************************************" />
<Message Text="* Creating the nunitlite Nuget SilverLight $(Configuration) package" />
<Message Text="******************************************************************" />

<Exec WorkingDirectory="$(ProjectBaseDir)"
Command="$(ManagedExeLauncher) &quot;$(NugetExecutable)&quot; pack $(NuspecDirectory)\nunitliteSL.nuspec -BasePath &quot;$(CurrentImageDir)&quot; -OutputDirectory &quot;$(ProjectPackageDir)&quot; -Properties version=$(NugetVersion)" />

</Target>

<Target Name="CreateImage" DependsOnTargets="_CleanCurrentImageDir">

<!-- Copy root txt files to root -->
Expand Down Expand Up @@ -612,13 +647,16 @@
<BinZipFiles Include="$(CurrentImageDir)\bin\net-4.0\*.*" />
<BinZipFiles Include="$(CurrentImageDir)\bin\net-4.5\*.*" />
<BinZipFiles Include="$(CurrentImageDir)\bin\portable\*.*" />
<BinZipFiles Include="$(CurrentImageDir)\bin\sl-5.0\*.*" Condition="$(IsWindows)" />
</ItemGroup>

<ItemGroup>
<CFBinZipFiles Include="$(CurrentImageDir)\bin\netcf-3.5\*.*" />
</ItemGroup>

<ItemGroup>
<SLBinZipFiles Include="$(CurrentImageDir)\bin\sl-5.0\*.*" />
</ItemGroup>

<ItemGroup Label="Supported Frameworks">
<SupportedFrameworks Include="net-4.5" />
<SupportedFrameworks Include="net-4.0" />
Expand Down
3 changes: 0 additions & 3 deletions nuget/nunit.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ This package includes the NUnit 3.0 framework assembly, which is referenced by y
Supported platforms:
- .NET 2.0+
- .NET Core (Universal Windows Apps 10+, DNX Core 5+)
- SilverLight 5.0
- Windows 8
- Windows Phone 8 (Silverlight)
- Universal (Windows Phone 8.1+, Windows 8.1+)
Expand All @@ -39,8 +38,6 @@ Supported platforms:
<file src="bin/net-4.0/nunit.framework.xml" target="lib/net40" />
<file src="bin/net-4.5/nunit.framework.dll" target="lib/net45" />
<file src="bin/net-4.5/nunit.framework.xml" target="lib/net45" />
<file src="bin/sl-5.0/nunit.framework.dll" target="lib\sl50" />
<file src="bin/sl-5.0/nunit.framework.xml" target="lib\sl50" />
<file src="bin/portable/nunit.framework.dll" target="lib/dotnet" />
<file src="bin/portable/nunit.framework.xml" target="lib/dotnet" />
<file src="bin/portable/nunit.framework.dll" target="lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10" />
Expand Down
1 change: 0 additions & 1 deletion nuget/nunitCF.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>NUnit is a unit-testing framework for all .Net languages with a strong TDD focus.</summary>
<description>NUnit features a fluent assert syntax, parameterized, generic and theory tests and is user-extensible.&#10;&#13;This package includes the NUnit 3.0 framework assembly for .NET Compact Framework 3.5, which is referenced by your tests. You will need to install the NUnitLiteCF package in order to run the tests. Two separate packages are used because future versions will be supported by additional runners.</description>
<releaseNotes>This is an beta release, but is ready for production use for people with prior NUnit experience.</releaseNotes>
<language>en-US</language>
<tags>nunit test testing tdd framework fluent assert theory plugin addin cf compact framework</tags>
<copyright>Copyright (c) 2015 Charlie Poole</copyright>
Expand Down
26 changes: 26 additions & 0 deletions nuget/nunitSL.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>NUnit.SL50</id>
<title>NUnit Version 3 for SilverLight 5.0</title>
<version>$version$</version>
<authors>Charlie Poole</authors>
<owners>Charlie Poole</owners>
<licenseUrl>http://nunit.org/nuget/nunit3-license.txt</licenseUrl>
<projectUrl>http://nunit.org</projectUrl>
<iconUrl>http://nunit.org/nuget/nunitv3_32x32.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>NUnit is a unit-testing framework for .Net languages with a strong TDD focus.</summary>
<description>NUnit features a fluent assert syntax, parameterized, generic and theory tests and is user-extensible.&#10;&#13;This package includes the NUnit 3.0 framework assembly for SilverLight 5.0, which is referenced by your tests. You will need to install the NUnitLite.SL50 package in order to run the tests.</description>
<language>en-US</language>
<tags>nunit test testing tdd framework fluent assert theory</tags>
<copyright>Copyright (c) 2015 Charlie Poole</copyright>
</metadata>
<files>
<file src="LICENSE.txt" />
<file src="NOTICES.txt" />
<file src="CHANGES.txt" />
<file src="bin\sl-5.0\nunit.framework.dll" target="lib\sl50" />
<file src="bin\sl-5.0\nunit.framework.xml" target="lib\sl50" />
</files>
</package>
2 changes: 0 additions & 2 deletions nuget/nunitlite.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
Supported platforms:
- .NET 2.0+
- .NET Core (Universal Windows Apps 10+, DNX Core 5+)
- SilverLight 5.0
- Portable Libraries (supporting Profile259)

How to use this package:
Expand All @@ -40,7 +39,6 @@ How to use this package:
<file src="bin/net-2.0/nunitlite.dll" target="lib/net20" />
<file src="bin/net-4.0/nunitlite.dll" target="lib/net40" />
<file src="bin/net-4.5/nunitlite.dll" target="lib/net45" />
<file src="bin/sl-5.0/nunitlite.dll" target="lib/sl5" />
<file src="bin/portable/nunitlite.dll" target="lib/dotnet" />
<file src="bin/portable/nunitlite.dll" target="lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac" />
<file src="..\..\nuget\Program.cs" target="content" />
Expand Down
1 change: 0 additions & 1 deletion nuget/nunitliteCF.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>NUnitlite is a lightweight runner for tests that use the NUnit testing framework.</summary>
<description>NUnitLite provides a simple way to run NUnit tests, without the overhead of a full NUnit installation. This package contains a build of the NUnitLite runner for the .NET compact framework 3.5.</description>
<releaseNotes>This is an beta release, but is ready for production use for people with prior NUnit experience.</releaseNotes>
<language>en-US</language>
<tags>test unit testing tdd framework fluent assert device phone embedded cf compact</tags>
<copyright>Copyright (c) 2015 Charlie Poole</copyright>
Expand Down
30 changes: 30 additions & 0 deletions nuget/nunitliteSL.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>NUnitLite.SL50</id>
<title>NUnitLite Version 3 for SilverLight 5.0</title>
<version>$version$</version>
<authors>Charlie Poole</authors>
<owners>Charlie Poole</owners>
<licenseUrl>http://nunit.org/nuget/nunit3-license.txt</licenseUrl>
<projectUrl>http://nunit.org</projectUrl>
<iconUrl>http://nunit.org/nuget/nunitv3_32x32.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>NUnitlite is a lightweight runner for tests that use the NUnit testing framework.</summary>
<description>NUnitLite provides a simple way to run NUnit tests, without the overhead of a full NUnit installation. This package contains a build of the NUnitLite runner for SilverLight 5.0.</description>
<language>en-US</language>
<tags>test unit testing tdd framework fluent assert</tags>
<copyright>Copyright (c) 2015 Charlie Poole</copyright>
<dependencies>
<group>
<dependency id="NUnit.SL50" version="[$version$]" />
</group>
</dependencies>
</metadata>
<files>
<file src="LICENSE.txt" />
<file src="NOTICES.txt" />
<file src="CHANGES.txt" />
<file src="bin\sl-5.0\nunitlite.dll" target="lib\sl50" />
</files>
</package>
2 changes: 2 additions & 0 deletions nunit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuget", "nuget", "{A972031D
nuget\nunit.console.nuspec = nuget\nunit.console.nuspec
nuget\nunit.nuspec = nuget\nunit.nuspec
nuget\nunitlite.nuspec = nuget\nunitlite.nuspec
nuget\nunitliteSL.nuspec = nuget\nunitliteSL.nuspec
nuget\nunitSL.nuspec = nuget\nunitSL.nuspec
nuget\Program.cs = nuget\Program.cs
nuget\Program.vb = nuget\Program.vb
EndProjectSection
Expand Down

0 comments on commit 87b1136

Please sign in to comment.