From a21c9f0c5fc570dbc9793696a1096c6d3cbd2196 Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Wed, 21 Feb 2018 15:51:26 +0100 Subject: [PATCH] fix Cocoa sample --- FeatureSamples/Cocoa/ViewController.cs | 8 +++++-- FeatureSamples/FeatureSamples.userprefs | 21 +++++++++++++++++++ FeatureSamples/iOS/Urho.Samples.iOS.csproj | 3 +-- .../FormsSample.iOS/FormsSample.iOS.csproj | 9 ++------ FormsSample/FormsSample.userprefs | 11 ++++++++++ 5 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 FeatureSamples/FeatureSamples.userprefs create mode 100644 FormsSample/FormsSample.userprefs diff --git a/FeatureSamples/Cocoa/ViewController.cs b/FeatureSamples/Cocoa/ViewController.cs index 7592a25..0ba7c57 100644 --- a/FeatureSamples/Cocoa/ViewController.cs +++ b/FeatureSamples/Cocoa/ViewController.cs @@ -48,15 +48,19 @@ public override async void ViewDidLoad() UrhoSurface.AddSubview(view); string assets = "../../../../../Assets"; - Urho.Desktop.DesktopUrhoInitializer.CopyEmbeddedCoreDataTo(assets); + string coreDataPak = "../../../CoreData.pak"; + if (!File.Exists(coreDataPak)) + File.Copy("../../../CoreData.pak", Path.Combine(assets, "CoreData.pak")); + options = new ApplicationOptions("Data") { ExternalWindow = view.Handle, LimitFps = true, + HighDpi = true, ResourcePrefixPaths = new string[] { assets }, }; } - + async void RunSample(Type type) { if (currentApp != null) diff --git a/FeatureSamples/FeatureSamples.userprefs b/FeatureSamples/FeatureSamples.userprefs new file mode 100644 index 0000000..3e94dc9 --- /dev/null +++ b/FeatureSamples/FeatureSamples.userprefs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FeatureSamples/iOS/Urho.Samples.iOS.csproj b/FeatureSamples/iOS/Urho.Samples.iOS.csproj index fd8e2c3..164fc0b 100644 --- a/FeatureSamples/iOS/Urho.Samples.iOS.csproj +++ b/FeatureSamples/iOS/Urho.Samples.iOS.csproj @@ -21,10 +21,9 @@ prompt 4 false - i386 + x86_64 None true - true false diff --git a/FormsSample/FormsSample.iOS/FormsSample.iOS.csproj b/FormsSample/FormsSample.iOS/FormsSample.iOS.csproj index 20811dd..b66fc48 100644 --- a/FormsSample/FormsSample.iOS/FormsSample.iOS.csproj +++ b/FormsSample/FormsSample.iOS/FormsSample.iOS.csproj @@ -24,16 +24,13 @@ prompt 4 false - i386 + x86_64 None True - False False False False - False - False True False @@ -47,14 +44,11 @@ None i386 false - False False False False False - False - False True False @@ -126,6 +120,7 @@ FormsSample + {8DD49470-0958-42D9-841F-F15589DC9F99} diff --git a/FormsSample/FormsSample.userprefs b/FormsSample/FormsSample.userprefs new file mode 100644 index 0000000..132161c --- /dev/null +++ b/FormsSample/FormsSample.userprefs @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file