Skip to content

Commit

Permalink
generating and building events for wp81 (aka silverlight) working
Browse files Browse the repository at this point in the history
  • Loading branch information
ghuntley committed Mar 27, 2016
1 parent 98b893f commit 82f5c7c
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 29 deletions.
4 changes: 2 additions & 2 deletions EventBuilder/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public enum AutoPlatform
NET45,
XamForms,
UWP,
WP8,
WP81,
WPA81
}

Expand All @@ -24,7 +24,7 @@ public class CommandLineOptions

[Option('p', "platform", Required = true,
HelpText =
"Platform to automatically generate. Possible options include: NONE, ANDROID, IOS, NET45, MAC, UWP, WP8, WPA81, XAMFORMS"
"Platform to automatically generate. Possible options include: NONE, ANDROID, IOS, NET45, MAC, UWP, WP81, WPA81, XAMFORMS"
)]
public AutoPlatform Platform { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion EventBuilder/EventBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<Compile Include="Platforms\Mac.cs" />
<Compile Include="Platforms\Net45.cs" />
<Compile Include="Platforms\UWP.cs" />
<Compile Include="Platforms\WP8.cs" />
<Compile Include="Platforms\WP81.cs" />
<Compile Include="Platforms\WPA81.cs" />
<Compile Include="Platforms\XamForms.cs" />
<Compile Include="Program.cs" />
Expand Down
28 changes: 28 additions & 0 deletions EventBuilder/EventBuilder.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventBuilder", "EventBuilder.csproj", "{A6B86E12-057F-4591-98A3-FD50E9CEAE69}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Debug|x86.ActiveCfg = Debug|x86
{A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Debug|x86.Build.0 = Debug|x86
{A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Release|Any CPU.Build.0 = Release|Any CPU
{A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Release|x86.ActiveCfg = Release|x86
{A6B86E12-057F-4591-98A3-FD50E9CEAE69}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace EventBuilder.Platforms
{
public class WP8 : BasePlatform
public class WP81 : BasePlatform
{
public WP8()
public WP81()
{
if (PlatformHelper.IsRunningOnMono())
{
throw new NotSupportedException("Building events for WP8 on Mac is not implemented for obvious reasons.");
throw new NotSupportedException("Building events for WP81 on Mac is not implemented yet.");
}
Assemblies.Add(
@"C:\Program Files (x86)\Windows Phone Silverlight Kits\8.1\Windows MetaData\Windows.winmd");
Expand Down
4 changes: 2 additions & 2 deletions EventBuilder/Platforms/WPA81.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public WPA81()

if (PlatformHelper.IsRunningOnMono())
{
throw new NotSupportedException(
"Building events for WPA81 on Mac is not implemented for obvious reasons.");
throw new NotSupportedException("Building events for WPA81 on Mac is not implemented yet.");

}
Assemblies.Add(
@"C:\Program Files (x86)\Windows Phone Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd");
Expand Down
4 changes: 2 additions & 2 deletions EventBuilder/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ private static void Main(string[] args)
platform = new UWP();
break;

case AutoPlatform.WP8:
platform = new WP8();
case AutoPlatform.WP81:
platform = new WP81();
break;

case AutoPlatform.WPA81:
Expand Down
10 changes: 5 additions & 5 deletions ReactiveUI.Events/ReactiveUI.Events_Net45.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<RestorePackages>false</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -77,9 +77,7 @@
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\CommonAssemblyInfo.cs" />
<Compile Include="Events_NET45.cs" />
<Compile Include="SingleAwaitSubject.cs" />
<AppDesigner Include="Properties\" />
Expand All @@ -88,7 +86,9 @@
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup>
<None Include="packages.ReactiveUI.Events_Net45.config" />
<None Include="packages.ReactiveUI.Events_Net45.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
3 changes: 1 addition & 2 deletions ReactiveUI.Events/ReactiveUI.Events_WP81.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Events_WP81.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SingleAwaitSubject.cs" />
</ItemGroup>
<ItemGroup>
Expand All @@ -142,4 +141,4 @@
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions />
</Project>
</Project>
34 changes: 34 additions & 0 deletions ReactiveUI.Events/ReactiveUI.Events_WP81.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactiveUI.Events_WP81", "ReactiveUI.Events_WP81.csproj", "{4F7CE962-4373-4D80-828F-C09FC880A539}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4F7CE962-4373-4D80-828F-C09FC880A539}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F7CE962-4373-4D80-828F-C09FC880A539}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F7CE962-4373-4D80-828F-C09FC880A539}.Debug|ARM.ActiveCfg = Debug|ARM
{4F7CE962-4373-4D80-828F-C09FC880A539}.Debug|ARM.Build.0 = Debug|ARM
{4F7CE962-4373-4D80-828F-C09FC880A539}.Debug|x86.ActiveCfg = Debug|x86
{4F7CE962-4373-4D80-828F-C09FC880A539}.Debug|x86.Build.0 = Debug|x86
{4F7CE962-4373-4D80-828F-C09FC880A539}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F7CE962-4373-4D80-828F-C09FC880A539}.Release|Any CPU.Build.0 = Release|Any CPU
{4F7CE962-4373-4D80-828F-C09FC880A539}.Release|ARM.ActiveCfg = Release|ARM
{4F7CE962-4373-4D80-828F-C09FC880A539}.Release|ARM.Build.0 = Release|ARM
{4F7CE962-4373-4D80-828F-C09FC880A539}.Release|x86.ActiveCfg = Release|x86
{4F7CE962-4373-4D80-828F-C09FC880A539}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion ReactiveUI.Events/ReactiveUI.Events_XamForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
</Target>
-->
<ItemGroup>
<None Include="ReactiveUI.Events_XamForms.config" />
<None Include="packages.ReactiveUI.Events_XamForms.config" />
</ItemGroup>
<Import Project="packages\Xamarin.Forms.2.1.0.6529\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('packages\Xamarin.Forms.2.1.0.6529\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand Down
30 changes: 19 additions & 11 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ Task ("GenerateEvents")
generate("net45");
generate("uwp");
//generate("wp8");
generate("wp81");
generate("wpa81");
generate("uwp");
generate("xamforms");
}
});
Expand All @@ -150,33 +151,40 @@ Task ("BuildEvents")
}
else
{
Action<string> build = (string filename) =>
// WP81 is the only platform that needs to specify the MSBUILD platform
// when the platform is retired remove the platform signature,
// remove the .SetMSBuildPlatform method and simply the invoking methods.
Action<string, MSBuildPlatform> build = (filename, platform) =>
{
var solution = System.IO.Path.Combine("./ReactiveUI.Events", filename);
// handle dependencies specified in project.json or project.config
// UWP (project.json) needs to be restored before it will build.
NuGetRestore (solution);
Information("Building {0} with MSBuild {1} ", solution, platform);
MSBuild(solution, new MSBuildSettings()
.SetConfiguration(configuration)
.SetMSBuildPlatform(platform)
.WithProperty("NoWarn", "1591")
.WithProperty("TreatWarningsAsErrors", "False")
.SetVerbosity(Verbosity.Minimal)
.SetNodeReuse(false));
};
build("ReactiveUI.Events_Android.sln");
build("ReactiveUI.Events_iOS.sln");
build("ReactiveUI.Events_Android.sln", MSBuildPlatform.Automatic);
build("ReactiveUI.Events_iOS.sln", MSBuildPlatform.Automatic);
Warning("Building events for '{0}' is not implemented on Windows yet.", "MAC");
//build("ReactiveUI.Events_MAC.sln");
build("ReactiveUI.Events_NET45.sln");
build("ReactiveUI.Events_NET45.sln", MSBuildPlatform.Automatic);
build("ReactiveUI.Events_WP81.sln", MSBuildPlatform.x86);
build("ReactiveUI.Events_WPA81.sln", MSBuildPlatform.Automatic);
build("ReactiveUI.Events_UWP.sln", MSBuildPlatform.Automatic);
build("ReactiveUI.Events_UWP.sln");
//build("ReactiveUI.Events_WP8.csproj");
build("ReactiveUI.Events_WPA81.sln");
build("ReactiveUI.Events_XamForms.sln");
build("ReactiveUI.Events_XamForms.sln", MSBuildPlatform.Automatic);
}
});

Expand Down

0 comments on commit 82f5c7c

Please sign in to comment.