diff --git a/NuGet/NuGet.Library/Realm.nuspec b/NuGet/NuGet.Library/Realm.nuspec index 492ac5b972..258f265685 100755 --- a/NuGet/NuGet.Library/Realm.nuspec +++ b/NuGet/NuGet.Library/Realm.nuspec @@ -29,6 +29,8 @@ + + diff --git a/NuGet/NuGet.Library/Realm.targets b/NuGet/NuGet.Library/Realm.targets index 2b64eed224..943b892932 100644 --- a/NuGet/NuGet.Library/Realm.targets +++ b/NuGet/NuGet.Library/Realm.targets @@ -1,14 +1,26 @@ - - ../packages/Realm.0.72.0/lib/MonoAndroid44/armeabi/libwrappers.so + + ../packages/Realm.0.72.1/lib/MonoAndroid44/armeabi/libwrappers.so - - ../packages/Realm.0.72.0/lib/MonoAndroid44/armeabi-v7a/libwrappers.so + + ../packages/Realm.0.72.1/lib/MonoAndroid44/armeabi-v7a/libwrappers.so - - ../packages/Realm.0.72.0/lib/MonoAndroid44/x86/libwrappers.so + + ../packages/Realm.0.72.1/lib/MonoAndroid44/x86/libwrappers.so + + + + + ../packages/Realm.0.72.1/lib/MonoAndroid44/arm64-v8a/libwrappers.so + + + ../packages/Realm.0.72.1/lib/MonoAndroid44/x86_64/libwrappers.so \ No newline at end of file diff --git a/README.md b/README.md index 60cbf89994..3d33034236 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,29 @@ We support the current Xamarin _Stable_ and _Beta_ update channels, at the time * Xamarin Android version 6.0.0.34 * Xamarin Studio version 5.10 +Building Realm dotnet is not yet automated. + +### Building Realm Steps + +**Note for Debugging** that the following steps mention building for **Release.** If you are debugging, just substitute **Debug** and you probably also want to choose **Debug | iPhoneSimulator** as a platform. + +1. Open a terminal window in the `wrappers` directory +1. `make clean` +1. `make all` - this will probably download a current version of core binaries, unless you have built recently. The download and subsequent builds will take some time, depending on your system, as it builds a binary wrapper library for each platform including all Android CPU variations. +1. Open the `Realm.sln` in `Xamarin Studio` on OS X + 1. Choose the Solution `Realm` in the Solution navigator and context menu to `Clean Realm` + 1. platform popup **Release | Default** + 1. select `Realm.PCL` project and Build + 1. select `RealmWeaver.Fody` project and Build + 1. select platform popup **Release | ARM** + 1. select `Realm.XamarinAndroid` project and Build + 1. ensure you have an iOS device attached + 1. select platform popup **Release | iPhone** + 1. select `Realm.XamarinIOS` project and Build + +1. If you want to build the NuGet packages, go on from this point and follow the steps in `internals/RealmDotnetNugetBuild.md` + +If you are actively testing code against the Realm source, see also the unit test projects and other tests under the Tests folder. ## Contributing diff --git a/Realm.XamarinAndroid/Realm.XamarinAndroid.csproj b/Realm.XamarinAndroid/Realm.XamarinAndroid.csproj index dfcc29e953..206cd85b29 100644 --- a/Realm.XamarinAndroid/Realm.XamarinAndroid.csproj +++ b/Realm.XamarinAndroid/Realm.XamarinAndroid.csproj @@ -13,7 +13,7 @@ Resources\Resource.Designer.cs Off True - v4.4 + v6.0 true @@ -24,6 +24,7 @@ prompt 4 true + false true @@ -32,6 +33,7 @@ prompt 4 true + false diff --git a/Tests/IntegrationTests.XamarinAndroid/IntegrationTests.XamarinAndroid.csproj b/Tests/IntegrationTests.XamarinAndroid/IntegrationTests.XamarinAndroid.csproj index a55e7c4168..1c71b95391 100644 --- a/Tests/IntegrationTests.XamarinAndroid/IntegrationTests.XamarinAndroid.csproj +++ b/Tests/IntegrationTests.XamarinAndroid/IntegrationTests.XamarinAndroid.csproj @@ -14,7 +14,7 @@ True False IntegrationTests.XamarinAndroid - v4.4 + v5.1 Properties\AndroidManifest.xml @@ -27,6 +27,7 @@ 4 None false + false full @@ -36,6 +37,7 @@ 4 false false + false diff --git a/Tests/IntegrationTests.XamarinAndroid/Properties/AndroidManifest.xml b/Tests/IntegrationTests.XamarinAndroid/Properties/AndroidManifest.xml index d5fc02febb..cbe91df4ab 100644 --- a/Tests/IntegrationTests.XamarinAndroid/Properties/AndroidManifest.xml +++ b/Tests/IntegrationTests.XamarinAndroid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/Tests/IntegrationTests.XamarinAndroid/Resources/Resource.designer.cs b/Tests/IntegrationTests.XamarinAndroid/Resources/Resource.designer.cs index 0647c2bd26..2c8181576a 100644 --- a/Tests/IntegrationTests.XamarinAndroid/Resources/Resource.designer.cs +++ b/Tests/IntegrationTests.XamarinAndroid/Resources/Resource.designer.cs @@ -2,7 +2,7 @@ // ------------------------------------------------------------------------------ // // This code was generated by a tool. -// Mono Runtime Version: 4.0.30319.17020 +// Mono Runtime Version: 4.6.57.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/internals/Realm-dotnet Code Change Diary - Andy Dent.txt b/internals/Realm-dotnet Code Change Diary - Andy Dent.txt index d625ffa1f6..05668a8fbf 100644 --- a/internals/Realm-dotnet Code Change Diary - Andy Dent.txt +++ b/internals/Realm-dotnet Code Change Diary - Andy Dent.txt @@ -1583,3 +1583,29 @@ Realm.nuspec RealmWeaverFody.nuspec - set version number as 0.72.0 + + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +#394 BUILD FOR ARM64, x86_64 with some Android cleanup + +wrappers/Makefile +- incremented NDK command min API from 9 to 10 to match Xamarin + +Realm.targets +- set version number in paths as 0.72.1 +- added arm64-v8a and x86_64 lib build instructions and dependencies + +Realm.nuspec +- added arm64-v8a and x86_64 elements + (skipping mips for now until clarify if shipping) + +wrappers/jni/Application.mk +- added x86_64 arm64-v8a to APP_ABI + (so they are built into the libs dir) + +IntegrationTests.XamarinAndroid +- Project Options - Build - General + set Target Framework to API 22 +- Project Options - Build - Android Application + set Minimum Android Version to 2.3 (API 10) + \ No newline at end of file diff --git a/internals/RealmDotnetNugetBuild.md b/internals/RealmDotnetNugetBuild.md index 1b79f9ace0..fe6dde53b8 100644 --- a/internals/RealmDotnetNugetBuild.md +++ b/internals/RealmDotnetNugetBuild.md @@ -12,17 +12,7 @@ Paths below assume you're starting in the root dir `realm-dotnet` checked out fr Building the DLLS ----------------- -* go into the Wrappers dir in terminal -* `make clean` -* `make all` -* In Xamarin Studio, open`Realm.sln` -* select platform popup **Release | ARM** -* select Realm.XamarinAndroid project and Rebuild -* ensure you have an iOS device attached -* select platform popup **Release | iPhone** -* select Realm.XamarinIOS project and Rebuild -* platform popup **Release | AnyCPU** -* select Realm.PCL project and Rebuild +Follow the _Building Realm Steps_ section in `README.md` if you haven't built them already. Once you have your DLLS, follow these next steps to set version numbers and build NuGet. diff --git a/wrappers/Makefile b/wrappers/Makefile index d9552de031..a64b91c59a 100644 --- a/wrappers/Makefile +++ b/wrappers/Makefile @@ -73,7 +73,7 @@ build/Debug-ios-universal/libwrappers.a: build/Debug-iphoneos/libwrappers.a buil # Android ==================== -android: build/Release-android/armeabi/libwrappers.so build/Release-android/armeabi-v7a/libwrappers.so build/Release-android/x86/libwrappers.so +android: build/Release-android/armeabi/libwrappers.so build/Release-android/armeabi-v7a/libwrappers.so build/Release-android/x86/libwrappers.so build/Release-android/x86_64/libwrappers.so build/Release-android/arm64-v8a/libwrappers.so build/Release-android/mips/libwrappers.so core-android: realm-core-android-$(CORE_ANDROID_VER).tar.gz mkdir -p core-android @@ -84,6 +84,12 @@ core-android: realm-core-android-$(CORE_ANDROID_VER).tar.gz mv core-android/librealm-android-arm-v7a.a core-android/armeabi-v7a/librealm-android.a mkdir -p core-android/x86 mv core-android/librealm-android-x86.a core-android/x86/librealm-android.a + mkdir -p core-android/arm64-v8a + mv core-android/librealm-android-arm64.a core-android/arm64-v8a/librealm-android.a + mkdir -p core-android/x86_64 + mv core-android/librealm-android-x86_64.a core-android/x86_64/librealm-android.a + mkdir -p core-android/mips + mv core-android/librealm-android-mips.a core-android/mips/librealm-android.a touch core-android realm-core-android-$(CORE_ANDROID_VER).tar.gz: @@ -107,8 +113,26 @@ build/Release-android/x86: build/Release-android/x86/libwrappers.so: | build/Release-android/x86 libs cp ./libs/x86/librealm-android.so ./build/Release-android/x86/libwrappers.so +build/Release-android/x86_64: + mkdir -p build/Release-android/x86_64 + +build/Release-android/x86_64/libwrappers.so: | build/Release-android/x86_64 libs + cp ./libs/x86_64/librealm-android.so ./build/Release-android/x86_64/libwrappers.so + +build/Release-android/arm64-v8a: + mkdir -p build/Release-android/arm64-v8a + +build/Release-android/arm64-v8a/libwrappers.so: | build/Release-android/arm64-v8a libs + cp ./libs/arm64-v8a/librealm-android.so ./build/Release-android/arm64-v8a/libwrappers.so + +build/Release-android/mips: + mkdir -p build/Release-android/mips + +build/Release-android/mips/libwrappers.so: | build/Release-android/mips libs + cp ./libs/mips/librealm-android.so ./build/Release-android/mips/libwrappers.so + libs: | core-android - $(NDK_ROOT)/ndk-build APP_PLATFORM=android-9 V=1 + $(NDK_ROOT)/ndk-build APP_PLATFORM=android-10 V=1 .PHONY: android diff --git a/wrappers/jni/Application.mk b/wrappers/jni/Application.mk index 9cb500794b..f2099141ea 100644 --- a/wrappers/jni/Application.mk +++ b/wrappers/jni/Application.mk @@ -1,6 +1,6 @@ #NDK_TOOLCHAIN_VERSION := clang NDK_TOOLCHAIN_VERSION := 4.9 -APP_ABI := armeabi armeabi-v7a x86 +APP_ABI := armeabi armeabi-v7a x86 x86_64 arm64-v8a # Enable C++14 APP_CPPFLAGS += -std=c++14