This commit is contained in:
EgorBo 2018-02-20 02:42:35 +03:00
Родитель f2c4f07a31
Коммит 3726194b33
6 изменённых файлов: 45 добавлений и 53 удалений

Просмотреть файл

@ -2,6 +2,7 @@
ARCH=i386
SDK_VER=11.2
MIN_IOS_VER=8.0
# MIN_IOS_VER must be 8.0 or higher
OUTPUT_DIR=Bin/iOS
URHO_DIR=Urho3D/Urho3D_iOS
URHO_SOURCE_DIR=Urho3D/Source

Просмотреть файл

@ -10,25 +10,32 @@ documentation](http://developer.xamarin.com/guides/cross-platform/urho/introduct
The bindings for Urho3D are licensed under the MIT license, as found
on the LICENSE file.
Supported platforms:
**Key advantages:**
- Lightweight - ~10mb per platform including basic assets
- Embeddable - can be embedded into any app as a subview (UIView, NSView, Panel, etc).
- Open-source - C# bindings and the underlying C++ engine Urho3D are licensed under the MIT License
- Powerfull 3rd parties: Bullet, Box2D, Recast/Detour, kNet, FreeType
- PBR, Skeletal animation, Inverse Kinematics
**Supported platforms:**
- Windows, WPF, WinForms
- iOS, tvOS
- macOS
- Android
- UWP (x86 only)
- HoloLens (3D holograms)
- UWP
- AR: HoloLens, ARKit, ARCore
- Mixed Reality
- Xamarin.Forms (iOS, Android, UWP)
UrhoSharp can be embedded into any of these platforms as a custom view (UIView, Grid, Surface, etc).
Samples
=======
Sample code lives in https://github.com/xamarin/urho-samples and
repository has them as a git submodule. Samples use UrhoSharp via nuget.
![Sample](https://github.com/xamarin/urho-samples/raw/master/SamplyGame/Screenshots/Video.gif) ![Sample](https://github.com/xamarin/urho-samples/raw/master/FormsSample/Screenshots/Android.gif)
![Sample](https://github.com/xamarin/urho-samples/blob/master/HoloLens/03_Mutant/Screenshots/Video.gif)
![Sample](Screenshots/Android.gif) ![Sample](Screenshots/SamplyGame.gif)
![Sample](Screenshots/ARKit.gif)
# Setup
@ -59,11 +66,10 @@ Windows and OS X environment. Please follow these steps:
**1. Install:**
- XCode
- Xamarin Studio
- Visual Studio for Mac
- CMake (`brew install cmake`)
- Mono 64 bit (Mono 4.4+ or `brew install mono`)
- Command Line tools (`xcode-select --install`)
- Android NDK (and ANDROID_NDK variable)
- Android NDK + ANDROID_NDK_HOME environment variable
**2. Clone the repository including submodules**
@ -71,84 +77,69 @@ Windows and OS X environment. Please follow these steps:
git clone git@github.com:xamarin/urho.git --recursive
```
**3. Compile Urho.pch**
**3. Compile Urho.pch, SharpieBinder and generate bindigs**
The following command will download Clang 3.7.0 if you do not have it
installed, and use this to scan the Urho header files:
installed, and use this to scan the Urho header files, then compile the sources
to PCH, parse it via SharpieBinder and generate C# bindings. Additionally
there is a perl script to generate bindings to Urho3D events.
```
make PchMac
make Generated
```
**4. Generate C# bindings from Urho.pch**
Open SharpieBinder/SharpieBinder.sln via Xamarin Studio and change
.NET runtime to 64 bit mono (installed from homebrew is usually
located in "/usr/local/Cellar/4.x.x.x"). Run SharpieBinder project and
make sure it generated *.cs files in /bindings/generated dir.
Alternatively, you can do `make SharpieBinder`.
Then execute:
```
make ParseEventsMac
```
it should generate bindings/generated/events.cpp file
**5. Compile UrhoSharp for Mac (fat dylib)**
**4. Compile UrhoSharp for Mac (fat dylib)**
```
make Mac
```
it takes 5-10 minutes.
**6. Compile UrhoSharp for iOS (fat dylib: i386, x86_64, armv7, arm64)**
**5. Compile UrhoSharp for iOS (fat dylib: i386, x86_64, armv7, arm64)**
```
make iOS
make iOS SDK_VER=11.2
```
Note: Make sure you have an iOS 9.0 simulator target or modify
[SDKVER](https://github.com/xamarin/urho/blob/master/MakeiOS#L3) to
target another simulator.
**7. Compile UrhoSharp for Android (armeabi, armeabi-v7a, arm64, x86, x86_64)**
**6. Compile UrhoSharp for Android (armeabi, armeabi-v7a, arm64, x86, x86_64)**
```
make -j5 Android
```
-j5 means a job per ABI. Make sure you have installed Android SDK and NDK (see MakeAndroid file)
This target can also be executed on Windows.
**8. Compile UrhoSharp for Windows (64 bit)**
**7. Compile UrhoSharp for Windows (64 bit)**
Obviously you can't do it on OS X so you have to switch to Windows
environment. Make sure you have installed:
- Visual Studio 2015
- CMake
- GNU make (cygwin)
SharpieBinder doesn't work on Windows yet so you will have to copy
bindings/generated folder from OS X environment to Windows.
- Visual Studio 2017
- CMake 3.10
- GNU make (cygwin) - the easiest way to install it is to follow instructions to install mono:
- Download Cygwin from www.cygwin.com (setup-x86-64.exe)
- Run the following command in cmd.exe to install the required packages:
`setup-x86_64.exe -P autoconf,automake,bison,gcc-core,gcc-g++,mingw64-i686-runtime,mingw64-i686-binutils,mingw64-i686-gcc-core,mingw64-i686-gcc-g++,mingw64-i686-pthreads,mingw64-i686-w32api,mingw64-x86_64-runtime,mingw64-x86_64-binutils,mingw64-x86_64-gcc-core,mingw64-x86_64-gcc-g++,mingw64-x86_64-pthreads,mingw64-x86_64-w32api,libtool,make,python,gettext-devel,gettext,intltool,libiconv,pkg-config,git,curl,wget,libxslt,bc,patch`
Execute:
```
make Windows64 (or Windows32)
make Windows
```
(you can also compile Android on Windows via *"make Android"*)
Then, open Urho.sln and compile MonoUrho.Windows project in Release configuration.
Then, open Urho.sln and compile `UrhoSharp.Windows` project in Release configuration.
By default, Urho on windows uses OpenGL, but you can also use DirectX11. In order order
to use it, execute:
```
make Windows_D3D11
```
And compile `UrhoSharp.WindowsD3D' project.
All compiled binaries could be found in the Bin/{platform} folder.
**9. Compile UrhoSharp for UWP and HoloLens
**8. Compile UrhoSharp for UWP and HoloLens**
Execute:
```
make UWP32
make UWP
make SharpReality
```
And compile MonoUrho.UWP and MonoUrho.HoloLens projects in Release (x86 only) configuration.
And compile UrhoSharp.UWP and UrhoSharp.SharpRealitys projects in Release configuration.
Updating Documentation
======================

Двоичные данные
Screenshots/ARCore.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 268 KiB

Двоичные данные
Screenshots/ARKit.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.2 MiB

Двоичные данные
Screenshots/Android.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.2 MiB

Двоичные данные
Screenshots/SamplyGame.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.8 MiB