Commit 22006326 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Add .NET 6 build

parent 151e59f9
...@@ -44,17 +44,17 @@ ...@@ -44,17 +44,17 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="KeraLua"> <PackageReference Include="KeraLua">
<Version>1.2.15</Version> <Version>1.3.1</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform"> <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.9</Version> <Version>6.2.13</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' "> <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion> <VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0"> <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference> </PackageReference>
......
...@@ -6,8 +6,11 @@ resources: ...@@ -6,8 +6,11 @@ resources:
name: codefoco/AzureDevopsTemplates name: codefoco/AzureDevopsTemplates
endpoint: codefoco endpoint: codefoco
jobs: - stage: Build_Mac
- job: 'NLuaMac' displayName: 'Build Mac'
jobs:
- job: 'NLuaMac'
displayName: 'Mac' displayName: 'Mac'
variables: variables:
- group: 'Keys' - group: 'Keys'
...@@ -109,39 +112,50 @@ jobs: ...@@ -109,39 +112,50 @@ jobs:
artifact: Test.Results.tvOS artifact: Test.Results.tvOS
publishLocation: 'pipeline' publishLocation: 'pipeline'
- task: PublishPipelineArtifact@1 - task: DotNetCoreCLI@2
displayName: 'Publish Pipeline Artifact: Xamarin.iOS.NLua' displayName: 'dotnet build ./build/iOS/NLua.net6.0-ios.csproj'
inputs: inputs:
targetPath: lib/Release/xamarinios command: custom
artifact: 'Xamarin.iOS.NLua' custom: build
publishLocation: 'pipeline' arguments: './build/iOS/NLua.net6.0-ios.csproj /p:Configuration=Release'
- task: PublishPipelineArtifact@1 - task: DotNetCoreCLI@2
displayName: 'Publish Pipeline Artifact: Xamarin.tvOS.NLua' displayName: 'dotnet build ./build/iOS/NLua.net6.0-maccatalyst.csproj'
inputs: inputs:
targetPath: lib/Release/xamarintvos command: custom
artifact: Xamarin.tvOS.NLua custom: build
publishLocation: 'pipeline' arguments: './build/iOS/NLua.net6.0-maccatalyst.csproj /p:Configuration=Release'
- task: PublishPipelineArtifact@1 - task: DotNetCoreCLI@2
displayName: 'Publish Pipeline Artifact: Xamarin.watchOS.NLua' displayName: 'dotnet build ./build/macOS/NLua.net6.0-macos.csproj'
inputs: inputs:
targetPath: lib/Release/xamarinwatchos command: custom
artifact: Xamarin.watchOS.NLua custom: build
publishLocation: 'pipeline' arguments: './build/macOS/NLua.net6.0-macos.csproj /p:Configuration=Release'
- task: DotNetCoreCLI@2
displayName: 'dotnet build ./build/TVOS/NLua.net6.0-tvos.csproj'
inputs:
command: custom
custom: build
arguments: './build/TVOS/NLua.net6.0-tvos.csproj /p:Configuration=Release'
- task: PublishPipelineArtifact@1 - task: PublishPipelineArtifact@1
displayName: 'Publish Pipeline Artifact: Xamarin.Mac.NLua' displayName: 'Publish Pipeline Artifact: libs.mac'
inputs: inputs:
targetPath: lib/Release/xamarinmac targetPath: lib/Release/
artifact: Xamarin.Mac.NLua artifact: 'libs.mac'
publishLocation: 'pipeline' publishLocation: 'pipeline'
- template: send-telegram.yml@templates - template: send-telegram.yml@templates
- job: 'NLuaWindows' - stage: Build_Windows
displayName: Build Windows
dependsOn: ['Build_Mac']
jobs:
- job: 'NLuaWindows'
displayName: 'Windows' displayName: 'Windows'
dependsOn: 'NLuaMac'
variables: variables:
- group: 'Keys' - group: 'Keys'
...@@ -174,14 +188,9 @@ jobs: ...@@ -174,14 +188,9 @@ jobs:
restoreSolution: NLua.Android.sln restoreSolution: NLua.Android.sln
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: 'NuGet restore NET Core' displayName: 'NuGet restore NET 6'
inputs:
restoreSolution: NLua.netcoreapp3.1.sln
- task: NuGetCommand@2
displayName: 'NuGet restore NET 5'
inputs: inputs:
restoreSolution: NLua.net5.0.sln restoreSolution: NLua.net6.0.sln
- task: PowerShell@2 - task: PowerShell@2
displayName: 'PreBuild Script' displayName: 'PreBuild Script'
...@@ -205,23 +214,31 @@ jobs: ...@@ -205,23 +214,31 @@ jobs:
msbuildArguments: /restore msbuildArguments: /restore
- task: MSBuild@1 - task: MSBuild@1
displayName: 'Build .NET Core' displayName: 'Build .NET 6'
inputs: inputs:
solution: 'NLua.netcoreapp3.1.sln' solution: 'NLua.net6.0.sln'
configuration: Release configuration: Release
- task: MSBuild@1 - task: DotNetCoreCLI@2
displayName: 'Build .NET Core' displayName: 'dotnet build NLua.netstandard.sln'
inputs: inputs:
solution: 'NLua.net5.0.sln' command: custom
configuration: Release custom: build
arguments: '.\NLua.netstandard.sln /p:Configuration=Release'
- task: DotNetCoreCLI@2
displayName: 'dotnet build NLua.net6.0-android.sln'
inputs:
command: custom
custom: build
arguments: '.\NLua.net6.0-android.sln /p:Configuration=Release'
- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
displayName: 'dotnet vstest' displayName: 'dotnet vstest'
inputs: inputs:
command: custom command: custom
custom: vstest custom: vstest
arguments: '.\tests\build\netcoreapp3.1\bin\Release\netcoreapp3.1\NLuaTest.dll' arguments: '.\tests\build\net6.0\bin\Release\net6.0\NLuaTest.dll'
- task: MSBuild@1 - task: MSBuild@1
displayName: 'Build Android' displayName: 'Build Android'
...@@ -252,32 +269,11 @@ jobs: ...@@ -252,32 +269,11 @@ jobs:
publishLocation: 'pipeline' publishLocation: 'pipeline'
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
displayName: 'Download Build Xamarin.iOS' displayName: 'Download Build libs.mac'
inputs: inputs:
buildType: 'current' buildType: 'current'
artifactName: 'Xamarin.iOS.NLua' artifactName: 'libs.mac'
targetPath: 'lib/Release/xamarinios/' targetPath: './lib/Release/'
- task: DownloadPipelineArtifact@2
displayName: 'Download Build Xamarin.Mac'
inputs:
buildType: 'current'
artifactName: 'Xamarin.Mac.NLua'
targetPath: 'lib/Release/xamarinmac/'
- task: DownloadPipelineArtifact@2
displayName: 'Download Build Xamarin.watchOS'
inputs:
buildType: 'current'
artifactName: 'Xamarin.watchOS.NLua'
targetPath: 'lib/Release/xamarinwatchos/'
- task: DownloadPipelineArtifact@2
displayName: 'Download Build Xamarin.tvOS'
inputs:
buildType: 'current'
artifactName: 'Xamarin.tvOS.NLua'
targetPath: 'lib/Release/xamarintvos/'
- script: 'nuget setapikey $(apikey)' - script: 'nuget setapikey $(apikey)'
displayName: 'Set NuGet API Key' displayName: 'Set NuGet API Key'
...@@ -312,7 +308,11 @@ jobs: ...@@ -312,7 +308,11 @@ jobs:
- template: send-telegram.yml@templates - template: send-telegram.yml@templates
- job: 'NLuaLinux' - stage: Build_Linux
displayName: Build Linux
jobs:
- job: 'NLuaLinux'
displayName: 'Linux' displayName: 'Linux'
variables: variables:
- group: 'Keys' - group: 'Keys'
...@@ -329,12 +329,12 @@ jobs: ...@@ -329,12 +329,12 @@ jobs:
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: 'NuGet restore' displayName: 'NuGet restore'
inputs: inputs:
restoreSolution: NLua.netcoreapp3.1.sln restoreSolution: NLua.net6.0.sln
- task: MSBuild@1 - task: MSBuild@1
displayName: 'Build .NET Core' displayName: 'Build .NET 6'
inputs: inputs:
solution: NLua.netcoreapp3.1.sln solution: NLua.net6.0.sln
configuration: Release configuration: Release
- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
...@@ -342,6 +342,6 @@ jobs: ...@@ -342,6 +342,6 @@ jobs:
inputs: inputs:
command: custom command: custom
custom: vstest custom: vstest
arguments: 'tests/build/netcoreapp3.1/bin/Release/netcoreapp3.1/NLuaTest.dll' arguments: 'tests/build/net6.0/bin/Release/net6.0/NLuaTest.dll'
- template: send-telegram.yml@templates - template: send-telegram.yml@templates
...@@ -10,7 +10,7 @@ using NLua.Method; ...@@ -10,7 +10,7 @@ using NLua.Method;
using NLua.Exceptions; using NLua.Exceptions;
using NLua.Extensions; using NLua.Extensions;
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
using ObjCRuntime; using ObjCRuntime;
#endif #endif
...@@ -335,7 +335,7 @@ namespace NLua ...@@ -335,7 +335,7 @@ namespace NLua
_luaState = null; _luaState = null;
} }
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int PanicCallback(IntPtr state) static int PanicCallback(IntPtr state)
...@@ -1108,7 +1108,7 @@ namespace NLua ...@@ -1108,7 +1108,7 @@ namespace NLua
/// <param name = "luaState">lua state</param> /// <param name = "luaState">lua state</param>
/// <param name = "luaDebug">Pointer to LuaDebug (lua_debug) structure</param> /// <param name = "luaDebug">Pointer to LuaDebug (lua_debug) structure</param>
/// ///
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaHookFunction))] [MonoPInvokeCallback(typeof(LuaHookFunction))]
#endif #endif
static void DebugHookCallback(IntPtr luaState, IntPtr luaDebug) static void DebugHookCallback(IntPtr luaState, IntPtr luaDebug)
......
...@@ -11,7 +11,7 @@ using KeraLua; ...@@ -11,7 +11,7 @@ using KeraLua;
using NLua.Method; using NLua.Method;
using NLua.Extensions; using NLua.Extensions;
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
using ObjCRuntime; using ObjCRuntime;
#endif #endif
...@@ -85,7 +85,7 @@ namespace NLua ...@@ -85,7 +85,7 @@ namespace NLua
/* /*
* __call metafunction of CLR delegates, retrieves and calls the delegate. * __call metafunction of CLR delegates, retrieves and calls the delegate.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int RunFunctionDelegate(IntPtr luaState) private static int RunFunctionDelegate(IntPtr luaState)
...@@ -108,7 +108,7 @@ namespace NLua ...@@ -108,7 +108,7 @@ namespace NLua
/* /*
* __gc metafunction of CLR objects. * __gc metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int CollectObject(IntPtr state) private static int CollectObject(IntPtr state)
...@@ -131,7 +131,7 @@ namespace NLua ...@@ -131,7 +131,7 @@ namespace NLua
/* /*
* __tostring metafunction of CLR objects. * __tostring metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int ToStringLua(IntPtr state) private static int ToStringLua(IntPtr state)
...@@ -157,7 +157,7 @@ namespace NLua ...@@ -157,7 +157,7 @@ namespace NLua
/* /*
* __add metafunction of CLR objects. * __add metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int AddLua(IntPtr luaState) static int AddLua(IntPtr luaState)
...@@ -175,7 +175,7 @@ namespace NLua ...@@ -175,7 +175,7 @@ namespace NLua
/* /*
* __sub metafunction of CLR objects. * __sub metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int SubtractLua(IntPtr luaState) static int SubtractLua(IntPtr luaState)
...@@ -193,7 +193,7 @@ namespace NLua ...@@ -193,7 +193,7 @@ namespace NLua
/* /*
* __mul metafunction of CLR objects. * __mul metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int MultiplyLua(IntPtr luaState) static int MultiplyLua(IntPtr luaState)
...@@ -211,7 +211,7 @@ namespace NLua ...@@ -211,7 +211,7 @@ namespace NLua
/* /*
* __div metafunction of CLR objects. * __div metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int DivideLua(IntPtr luaState) static int DivideLua(IntPtr luaState)
...@@ -229,7 +229,7 @@ namespace NLua ...@@ -229,7 +229,7 @@ namespace NLua
/* /*
* __mod metafunction of CLR objects. * __mod metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int ModLua(IntPtr luaState) static int ModLua(IntPtr luaState)
...@@ -247,7 +247,7 @@ namespace NLua ...@@ -247,7 +247,7 @@ namespace NLua
/* /*
* __unm metafunction of CLR objects. * __unm metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int UnaryNegationLua(IntPtr luaState) static int UnaryNegationLua(IntPtr luaState)
...@@ -289,7 +289,7 @@ namespace NLua ...@@ -289,7 +289,7 @@ namespace NLua
/* /*
* __eq metafunction of CLR objects. * __eq metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int EqualLua(IntPtr luaState) static int EqualLua(IntPtr luaState)
...@@ -307,7 +307,7 @@ namespace NLua ...@@ -307,7 +307,7 @@ namespace NLua
/* /*
* __lt metafunction of CLR objects. * __lt metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int LessThanLua(IntPtr luaState) static int LessThanLua(IntPtr luaState)
...@@ -325,7 +325,7 @@ namespace NLua ...@@ -325,7 +325,7 @@ namespace NLua
/* /*
* __le metafunction of CLR objects. * __le metafunction of CLR objects.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int LessThanOrEqualLua(IntPtr luaState) static int LessThanOrEqualLua(IntPtr luaState)
...@@ -375,7 +375,7 @@ namespace NLua ...@@ -375,7 +375,7 @@ namespace NLua
* either the value of the member or a delegate to call it. * either the value of the member or a delegate to call it.
* If the member does not exist returns nil. * If the member does not exist returns nil.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int GetMethod(IntPtr state) private static int GetMethod(IntPtr state)
...@@ -679,7 +679,7 @@ namespace NLua ...@@ -679,7 +679,7 @@ namespace NLua
* __index metafunction of base classes (the base field of Lua tables). * __index metafunction of base classes (the base field of Lua tables).
* Adds a prefix to the method name to call the base version of the method. * Adds a prefix to the method name to call the base version of the method.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int GetBaseMethod(IntPtr state) private static int GetBaseMethod(IntPtr state)
...@@ -982,7 +982,7 @@ namespace NLua ...@@ -982,7 +982,7 @@ namespace NLua
* the member name and the value to be stored as arguments. Throws * the member name and the value to be stored as arguments. Throws
* and error if the assignment is invalid. * and error if the assignment is invalid.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int SetFieldOrProperty(IntPtr state) private static int SetFieldOrProperty(IntPtr state)
...@@ -1187,7 +1187,7 @@ namespace NLua ...@@ -1187,7 +1187,7 @@ namespace NLua
/* /*
* __index metafunction of type references, works on static members. * __index metafunction of type references, works on static members.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int GetClassMethod(IntPtr state) private static int GetClassMethod(IntPtr state)
...@@ -1233,7 +1233,7 @@ namespace NLua ...@@ -1233,7 +1233,7 @@ namespace NLua
/* /*
* __newindex function of type references, works on static members. * __newindex function of type references, works on static members.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int SetClassFieldOrProperty(IntPtr state) private static int SetClassFieldOrProperty(IntPtr state)
...@@ -1265,7 +1265,7 @@ namespace NLua ...@@ -1265,7 +1265,7 @@ namespace NLua
/* /*
* __call metafunction of Delegates. * __call metafunction of Delegates.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
static int CallDelegate(IntPtr state) static int CallDelegate(IntPtr state)
...@@ -1334,7 +1334,7 @@ namespace NLua ...@@ -1334,7 +1334,7 @@ namespace NLua
* found or if the arguments are invalid. Throws an error if the constructor * found or if the arguments are invalid. Throws an error if the constructor
* generates an exception. * generates an exception.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int CallConstructor(IntPtr state) private static int CallConstructor(IntPtr state)
......
...@@ -10,7 +10,7 @@ using NLua.Method; ...@@ -10,7 +10,7 @@ using NLua.Method;
using NLua.Exceptions; using NLua.Exceptions;
using NLua.Extensions; using NLua.Extensions;
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
using ObjCRuntime; using ObjCRuntime;
#endif #endif
...@@ -245,7 +245,7 @@ namespace NLua ...@@ -245,7 +245,7 @@ namespace NLua
* Implementation of load_assembly. Throws an error * Implementation of load_assembly. Throws an error
* if the assembly is not found. * if the assembly is not found.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int LoadAssembly(IntPtr luaState) private static int LoadAssembly(IntPtr luaState)
...@@ -349,7 +349,7 @@ namespace NLua ...@@ -349,7 +349,7 @@ namespace NLua
* Implementation of import_type. Returns nil if the * Implementation of import_type. Returns nil if the
* type is not found. * type is not found.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int ImportType(IntPtr luaState) private static int ImportType(IntPtr luaState)
...@@ -377,7 +377,7 @@ namespace NLua ...@@ -377,7 +377,7 @@ namespace NLua
* argument in the stack) as an object subclassing the * argument in the stack) as an object subclassing the
* type passed as second argument in the stack. * type passed as second argument in the stack.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int RegisterTable(IntPtr luaState) private static int RegisterTable(IntPtr luaState)
...@@ -444,7 +444,7 @@ namespace NLua ...@@ -444,7 +444,7 @@ namespace NLua
* Implementation of free_object. Clears the metatable and the * Implementation of free_object. Clears the metatable and the
* base field, freeing the created object for garbage-collection * base field, freeing the created object for garbage-collection
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int UnregisterTable(IntPtr luaState) private static int UnregisterTable(IntPtr luaState)
...@@ -501,7 +501,7 @@ namespace NLua ...@@ -501,7 +501,7 @@ namespace NLua
* Implementation of get_method_bysig. Returns nil * Implementation of get_method_bysig. Returns nil
* if no matching method is not found. * if no matching method is not found.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int GetMethodSignature(IntPtr luaState) private static int GetMethodSignature(IntPtr luaState)
...@@ -566,7 +566,7 @@ namespace NLua ...@@ -566,7 +566,7 @@ namespace NLua
* Implementation of get_constructor_bysig. Returns nil * Implementation of get_constructor_bysig. Returns nil
* if no matching constructor is found. * if no matching constructor is found.
*/ */
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int GetConstructorSignature(IntPtr luaState) private static int GetConstructorSignature(IntPtr luaState)
...@@ -1107,7 +1107,7 @@ namespace NLua ...@@ -1107,7 +1107,7 @@ namespace NLua
return 2; return 2;
} }
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int CType(IntPtr luaState) private static int CType(IntPtr luaState)
...@@ -1127,7 +1127,7 @@ namespace NLua ...@@ -1127,7 +1127,7 @@ namespace NLua
return 1; return 1;
} }
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[MonoPInvokeCallback(typeof(LuaNativeFunction))] [MonoPInvokeCallback(typeof(LuaNativeFunction))]
#endif #endif
private static int EnumFromInt(IntPtr luaState) private static int EnumFromInt(IntPtr luaState)
......
...@@ -4,25 +4,27 @@ ...@@ -4,25 +4,27 @@
// Change them to the values specific to your project. // Change them to the values specific to your project.
#if NETFRAMEWORK #if NETFRAMEWORK
[assembly: AssemblyTitle ("NLua (.NET Framework 4.5)")] [assembly: AssemblyTitle ("NLua (.NET Framework 4.6)")]
#elif WINDOWS_UWP #elif WINDOWS_UWP
[assembly: AssemblyTitle ("NLua (Windows Universal)")] [assembly: AssemblyTitle ("NLua (UWP)")]
#elif __ANDROID__ #elif __ANDROID__
[assembly: AssemblyTitle ("NLua (Xamarin.Android)")] [assembly: AssemblyTitle ("NLua (Android)")]
#elif NETCOREAPP #elif NETCOREAPP
[assembly: AssemblyTitle ("NLua (.NET Core)")] [assembly: AssemblyTitle ("NLua (.NET Core)")]
#elif NETSTANDARD #elif NETSTANDARD
[assembly: AssemblyTitle ("NLua (.NET Standard)")] [assembly: AssemblyTitle ("NLua (.NET Standard)")]
#elif __TVOS__ #elif __TVOS__
[assembly: AssemblyTitle ("NLua (Xamarin.tvOS)")] [assembly: AssemblyTitle ("NLua (tvOS)")]
#elif __WATCHOS__ #elif __WATCHOS__
[assembly: AssemblyTitle ("NLua (Xamarin.watchOS)")] [assembly: AssemblyTitle ("NLua (watchOS)")]
#elif __MACCATALYST__
[assembly: AssemblyTitle ("NLua (Mac Catalyst)")]
#elif __IOS__ #elif __IOS__
[assembly: AssemblyTitle ("NLua (Xamarin.iOS)")] [assembly: AssemblyTitle ("NLua (iOS)")]
#elif __MACOS__ #elif __MACOS__
[assembly: AssemblyTitle ("NLua (Xamarin.Mac)")] [assembly: AssemblyTitle ("NLua (Mac)")]
#else #else
[assembly: AssemblyTitle ("NLua (.NET Framework)")] [assembly: AssemblyTitle ("NLua (.NET)")]
#endif #endif
[assembly: AssemblyDescription ("NLua library")] [assembly: AssemblyDescription ("NLua library")]
......
...@@ -51,13 +51,13 @@ ...@@ -51,13 +51,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="KeraLua"> <PackageReference Include="KeraLua">
<Version>1.2.15</Version> <Version>1.3.1</Version>
</PackageReference> </PackageReference>
<PackageReference Include="NUnit"> <PackageReference Include="NUnit">
<Version>3.13.1</Version> <Version>3.13.2</Version>
</PackageReference> </PackageReference>
<PackageReference Include="NUnit3TestAdapter"> <PackageReference Include="NUnit3TestAdapter">
<Version>3.17.0</Version> <Version>4.1.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
......
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute> <GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
...@@ -13,25 +13,26 @@ ...@@ -13,25 +13,26 @@
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute> <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<AssemblyName>NLuaTest</AssemblyName> <AssemblyName>NLuaTest</AssemblyName>
<Configurations>Release;Debug</Configurations>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\net6.0</OutputPath>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\net6.0</OutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="KeraLua" Version="1.2.15"> <PackageReference Include="KeraLua" Version="1.3.1">
</PackageReference> </PackageReference>
<PackageReference Include="nunit" Version="3.13.1" /> <PackageReference Include="nunit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <PackageReference Include="NUnit3TestAdapter" Version="4.1.0"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\..\scripts\core\bisect.lua"> <None Include="..\..\scripts\core\bisect.lua">
...@@ -84,7 +85,7 @@ ...@@ -84,7 +85,7 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\build\netcoreapp3.1\NLua.netcoreapp3.1.csproj" /> <ProjectReference Include="..\..\..\build\net6.0\NLua.net6.0.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\..\src\NLuaTest.Shared.projitems" Label="Shared" /> <Import Project="..\..\src\NLuaTest.Shared.projitems" Label="Shared" />
</Project> </Project>
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="KeraLua"> <PackageReference Include="KeraLua">
<Version>1.2.15</Version> <Version>1.3.1</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Codefoco.Touch.Server"> <PackageReference Include="Codefoco.Touch.Server">
<Version>1.0.29</Version> <Version>1.0.29</Version>
......
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="KeraLua"> <PackageReference Include="KeraLua">
<Version>1.2.15</Version> <Version>1.3.1</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Codefoco.Touch.Server"> <PackageReference Include="Codefoco.Touch.Server">
<Version>1.0.29</Version> <Version>1.0.29</Version>
......
...@@ -5,14 +5,14 @@ using System.IO; ...@@ -5,14 +5,14 @@ using System.IO;
using LoadFileTests; using LoadFileTests;
using NUnit.Framework; using NUnit.Framework;
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
using Foundation; using Foundation;
#endif #endif
namespace NLuaTest namespace NLuaTest
{ {
[TestFixture] [TestFixture]
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[Preserve (AllMembers = true)] [Preserve (AllMembers = true)]
#endif #endif
public class Core public class Core
......
...@@ -5,21 +5,21 @@ using NLua; ...@@ -5,21 +5,21 @@ using NLua;
using NUnit.Framework; using NUnit.Framework;
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
using Foundation; using Foundation;
#endif #endif
namespace LoadFileTests namespace LoadFileTests
{ {
[TestFixture] [TestFixture]
#if __IOS__ || __TVOS__ || __WATCHOS__ #if __IOS__ || __TVOS__ || __WATCHOS__ || __MACCATALYST__
[Preserve (AllMembers = true)] [Preserve (AllMembers = true)]
#endif #endif
public class LoadLuaFile public class LoadLuaFile
{ {
public static string GetScriptsPath(string name) public static string GetScriptsPath(string name)
{ {
string path = new Uri(typeof(LoadLuaFile).Assembly.CodeBase).AbsolutePath; string path = new Uri(typeof(LoadLuaFile).Assembly.Location).AbsolutePath;
path = Path.GetDirectoryName(path); path = Path.GetDirectoryName(path);
path = Path.Combine(path, "scripts"); path = Path.Combine(path, "scripts");
path = Path.Combine (path, name); path = Path.Combine (path, name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment