Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
unified support
Browse files Browse the repository at this point in the history
  • Loading branch information
moljac committed Dec 3, 2014
1 parent 415d14d commit 1b66e23
Show file tree
Hide file tree
Showing 13 changed files with 351 additions and 23 deletions.
6 changes: 6 additions & 0 deletions TSMiniWebBrowser/binding/ApiDefinition.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
using System;
using System.Drawing;
#if __UNIFIED__
using ObjCRuntime;
using Foundation;
using UIKit;
#else
using MonoTouch.ObjCRuntime;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
#endif

namespace TSMiniWebBrowser
{
Expand Down
8 changes: 5 additions & 3 deletions TSMiniWebBrowser/binding/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ BTOUCH=/Developer/MonoTouch/usr/bin/btouch
SMCS=/Developer/MonoTouch/usr/bin/smcs
MONOXBUILD=/Library/Frameworks/Mono.framework/Commands/xbuild

all: TSMiniWebBrowser.dll
all: TSMiniWebBrowser.dll TSMiniWebBrowser-Classic.dll

TSMiniWebBrowser.dll: Makefile ApiDefinition.cs StructsAndEnums.cs libTSMiniWebBrowser.a
$(MONOXBUILD) /p:Configuration=Release TSMiniWebBrowser-Classic.csproj
$(MONOXBUILD) /p:Configuration=Release TSMiniWebBrowser.csproj
cp bin/Release/TSMiniWebBrowser.dll TSMiniWebBrowser.dll
cp bin/classic/AnyCPU/Release/TSMiniWebBrowser.dll TSMiniWebBrowser-Classic.dll
cp bin/unified/AnyCPU/Release/TSMiniWebBrowser.dll TSMiniWebBrowser.dll

clean:
-rm -rf list ios bin/ obj/ *.sln *.userprefs *.dll *.o *.zip *.mdb
-rm -rf list ios bin/ obj/ *.userprefs *.dll *.o *.zip *.mdb
29 changes: 29 additions & 0 deletions TSMiniWebBrowser/binding/TSMiniWebBrowser-Bindings.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TSMiniWebBrowser-Classic", "TSMiniWebBrowser-Classic.csproj", "{4E990B2B-A8B7-45C6-8383-DBFF73974741}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TSMiniWebBrowser", "TSMiniWebBrowser.csproj", "{FF4DE794-A2BB-4316-9836-C96E79303225}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Release|Any CPU.Build.0 = Release|Any CPU
{FF4DE794-A2BB-4316-9836-C96E79303225}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF4DE794-A2BB-4316-9836-C96E79303225}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF4DE794-A2BB-4316-9836-C96E79303225}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF4DE794-A2BB-4316-9836-C96E79303225}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = TSMiniWebBrowser-Classic.csproj
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
70 changes: 70 additions & 0 deletions TSMiniWebBrowser/binding/TSMiniWebBrowser-Classic.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{4E990B2B-A8B7-45C6-8383-DBFF73974741}</ProjectGuid>
<ProjectTypeGuids>{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>TSMiniWebBrowser</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>TSMiniWebBrowser</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\classic\AnyCPU\Debug</OutputPath>
<BaseIntermediateOutputPath>obj\classic\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\classic\AnyCPU\Debug</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\classic\AnyCPU\Release</OutputPath>
<BaseIntermediateOutputPath>obj\classic\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\classic\AnyCPU\Release</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="monotouch" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<ObjcBindingApiDefinition Include="ApiDefinition.cs" />
</ItemGroup>
<ItemGroup>
<ObjcBindingCoreSource Include="StructsAndEnums.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Xamarin.ObjcBinding.CSharp.targets" />
<ItemGroup>
<ObjcBindingNativeLibrary Include="libTSMiniWebBrowser.a" />
</ItemGroup>
<ItemGroup>
<Compile Include="libTSMiniWebBrowser.linkwith.cs">
<DependentUpon>libTSMiniWebBrowser.a</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\back_icon.png" />
<BundleResource Include="Resources\back_icon%402x.png" />
<BundleResource Include="Resources\forward_icon.png" />
<BundleResource Include="Resources\forward_icon%402x.png" />
<BundleResource Include="Resources\reload_icon.png" />
<BundleResource Include="Resources\reload_icon%402x.png" />
</ItemGroup>
</Project>
26 changes: 20 additions & 6 deletions TSMiniWebBrowser/binding/TSMiniWebBrowser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{FF4DE794-A2BB-4316-9836-C96E79303225}</ProjectGuid>
<ProjectTypeGuids>{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectTypeGuids>{8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
<OutputType>Library</OutputType>
<RootNamespace>TSMiniWebBrowser</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
Expand All @@ -16,25 +17,30 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<DefineConstants>DEBUG;__UNIFIED__</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\unified\AnyCPU\Debug</OutputPath>
<BaseIntermediateOutputPath>obj\unified\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\unified\AnyCPU\Debug</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>__UNIFIED__</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\unified\AnyCPU\Release</OutputPath>
<BaseIntermediateOutputPath>obj\unified\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\unified\AnyCPU\Release</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="monotouch" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
Expand All @@ -45,7 +51,15 @@
<ItemGroup>
<ObjcBindingCoreSource Include="StructsAndEnums.cs" />
</ItemGroup>
<!--
Classic
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Xamarin.ObjcBinding.CSharp.targets" />
-->
<!--
NoGo
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" />
-->
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Xamarin.ObjCBinding.CSharp.targets" />
<ItemGroup>
<ObjcBindingNativeLibrary Include="libTSMiniWebBrowser.a" />
</ItemGroup>
Expand Down
Binary file modified TSMiniWebBrowser/binding/libTSMiniWebBrowser.a
Binary file not shown.
5 changes: 5 additions & 0 deletions TSMiniWebBrowser/binding/libTSMiniWebBrowser.linkwith.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
using System;

#if __UNIFIED__
using ObjCRuntime;
#else
using MonoTouch.ObjCRuntime;
#endif

[assembly: LinkWith ("libTSMiniWebBrowser.a", LinkTarget.ArmV7 | LinkTarget.ArmV7s | LinkTarget.Simulator, Frameworks = "CoreGraphics", ForceLoad = true)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TSMiniWebBrowser-Classic", "..\..\binding\TSMiniWebBrowser-Classic.csproj", "{4E990B2B-A8B7-45C6-8383-DBFF73974741}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TSMiniWebBrowserSample-Classic", "TSMiniWebBrowserSample\TSMiniWebBrowserSample-Classic.csproj", "{954205CF-16D5-4BAC-8AF6-E61DC42129CE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
Release|iPhone = Release|iPhone
Ad-Hoc|iPhone = Ad-Hoc|iPhone
AppStore|iPhone = AppStore|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.AppStore|iPhone.Build.0 = Debug|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Debug|iPhone.Build.0 = Debug|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Release|iPhone.ActiveCfg = Release|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Release|iPhone.Build.0 = Release|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{4E990B2B-A8B7-45C6-8383-DBFF73974741}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.AppStore|iPhone.Build.0 = AppStore|iPhone
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.Debug|iPhone.ActiveCfg = Debug|iPhone
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.Debug|iPhone.Build.0 = Debug|iPhone
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.Release|iPhone.ActiveCfg = Release|iPhone
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.Release|iPhone.Build.0 = Release|iPhone
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{954205CF-16D5-4BAC-8AF6-E61DC42129CE}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = TSMiniWebBrowserSample\TSMiniWebBrowserSample-Classic.csproj
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
#if __UNIFIED__
using Foundation;
using UIKit;
#else
using MonoTouch.Foundation;
using MonoTouch.UIKit;

#endif
namespace TSMiniWebBrowserSample
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
#if __UNIFIED__
using Foundation;
using UIKit;
#else
using MonoTouch.Foundation;
using MonoTouch.UIKit;
#endif
using MonoTouch.Dialog;

using TSMiniWebBrowser;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
#if __UNIFIED__
using Foundation;
using UIKit;
#else
using MonoTouch.Foundation;
using MonoTouch.UIKit;
#endif

namespace TSMiniWebBrowserSample
{
Expand Down
Loading

0 comments on commit 1b66e23

Please sign in to comment.