This patch includes: 1. CustomTarget to build and place the LibreOffice.Bindings NuGet package in <sdk>/dotnet/ 2. net_bridge (.NET library) to declare bootstrap() on the C# side, and net_bootstrap (C++ library) to wrap bootstrap() on the native side 3. Changes to LO SDK scripts to find .NET SDK and DOTNET_ROOT on the users machine Change-Id: Ia29ae56a2ad0f808f1563ef6167a3bd7c476642e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170172 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
33 lines
903 B
C#
33 lines
903 B
C#
/*
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
using System.Linq;
|
|
|
|
namespace com.sun.star.uno
|
|
{
|
|
public static class NativeBootstrap
|
|
{
|
|
public static XComponentContext bootstrap()
|
|
{
|
|
Interop.bootstrap(null);
|
|
return null;
|
|
}
|
|
|
|
private static class Interop
|
|
{
|
|
private const string BOOTSTRAP_LIBRARY = "net_bootstrap";
|
|
|
|
[DllImport(BOOTSTRAP_LIBRARY, CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern IntPtr bootstrap([MarshalAs(UnmanagedType.LPWStr)] string sParams);
|
|
}
|
|
}
|
|
}
|