Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
NLua
Commits
22006326
Commit
22006326
authored
Nov 10, 2021
by
Vinicius Jarina
Browse files
Add .NET 6 build
parent
151e59f9
Changes
32
Show whitespace changes
Inline
Side-by-side
build/uap10.0/NLua.UWP.csproj
View file @
22006326
...
...
@@ -44,17 +44,17 @@
</PropertyGroup>
<ItemGroup>
<PackageReference
Include=
"KeraLua"
>
<Version>
1.
2
.1
5
</Version>
<Version>
1.
3
.1
</Version>
</PackageReference>
<PackageReference
Include=
"Microsoft.NETCore.UniversalWindowsPlatform"
>
<Version>
6.2.
9
</Version>
<Version>
6.2.
13
</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup
Condition=
" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' "
>
<VisualStudioVersion>
14.0
</VisualStudioVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference
Include=
"Microsoft.SourceLink.GitHub"
Version=
"1.
0
.0"
>
<PackageReference
Include=
"Microsoft.SourceLink.GitHub"
Version=
"1.
1
.0"
>
<PrivateAssets>
all
</PrivateAssets>
<IncludeAssets>
runtime; build; native; contentfiles; analyzers
</IncludeAssets>
</PackageReference>
...
...
devops/azure-devops.yml
View file @
22006326
...
...
@@ -6,8 +6,11 @@ resources:
name
:
codefoco/AzureDevopsTemplates
endpoint
:
codefoco
jobs
:
-
job
:
'
NLuaMac'
-
stage
:
Build_Mac
displayName
:
'
Build
Mac'
jobs
:
-
job
:
'
NLuaMac'
displayName
:
'
Mac'
variables
:
-
group
:
'
Keys'
...
...
@@ -109,39 +112,50 @@ jobs:
artifact
:
Test.Results.tvOS
publishLocation
:
'
pipeline'
-
task
:
PublishPipelineArtifact@1
displayName
:
'
Publish
Pipeline
Artifact:
Xamarin.
iOS
.
NLua'
-
task
:
DotNetCoreCLI@2
displayName
:
'
dotnet
build
./build/
iOS
/
NLua
.net6.0-ios.csproj
'
inputs
:
targetPath
:
lib/Release/xamarinios
artifact
:
'
Xamarin.iOS.NLua'
publishLocation
:
'
pipelin
e'
command
:
custom
custom
:
build
arguments
:
'
./build/iOS/NLua.net6.0-ios.csproj
/p:Configuration=Releas
e'
-
task
:
PublishPipelineArtifact@1
displayName
:
'
Publish
Pipeline
Artifact:
Xamarin.tvOS.NLua
'
-
task
:
DotNetCoreCLI@2
displayName
:
'
dotnet
build
./build/iOS/NLua.net6.0-maccatalyst.csproj
'
inputs
:
targetPath
:
lib/Release/xamarintvos
artifact
:
Xamarin.tvOS.NLua
publishLocation
:
'
pipelin
e'
command
:
custom
custom
:
build
arguments
:
'
./build/iOS/NLua.net6.0-maccatalyst.csproj
/p:Configuration=Releas
e'
-
task
:
PublishPipelineArtifact@1
displayName
:
'
Publish
Pipeline
Artifact:
Xamarin.watch
OS
.
NLua'
-
task
:
DotNetCoreCLI@2
displayName
:
'
dotnet
build
./build/mac
OS
/
NLua
.net6.0-macos.csproj
'
inputs
:
targetPath
:
lib/Release/xamarinwatchos
artifact
:
Xamarin.watchOS.NLua
publishLocation
:
'
pipeline'
command
:
custom
custom
:
build
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
displayName
:
'
Publish
Pipeline
Artifact:
Xamarin.Mac.NLua
'
displayName
:
'
Publish
Pipeline
Artifact:
libs.mac
'
inputs
:
targetPath
:
lib/Release/
xamarinmac
artifact
:
Xamarin.Mac.NLua
targetPath
:
lib/Release/
artifact
:
'
libs.mac'
publishLocation
:
'
pipeline'
-
template
:
send-telegram.yml@templates
-
job
:
'
NLuaWindows'
-
stage
:
Build_Windows
displayName
:
Build Windows
dependsOn
:
[
'
Build_Mac'
]
jobs
:
-
job
:
'
NLuaWindows'
displayName
:
'
Windows'
dependsOn
:
'
NLuaMac'
variables
:
-
group
:
'
Keys'
...
...
@@ -174,14 +188,9 @@ jobs:
restoreSolution
:
NLua.Android.sln
-
task
:
NuGetCommand@2
displayName
:
'
NuGet
restore
NET
Core'
inputs
:
restoreSolution
:
NLua.netcoreapp3.1.sln
-
task
:
NuGetCommand@2
displayName
:
'
NuGet
restore
NET
5'
displayName
:
'
NuGet
restore
NET
6'
inputs
:
restoreSolution
:
NLua.net
5
.0.sln
restoreSolution
:
NLua.net
6
.0.sln
-
task
:
PowerShell@2
displayName
:
'
PreBuild
Script'
...
...
@@ -205,23 +214,31 @@ jobs:
msbuildArguments
:
/restore
-
task
:
MSBuild@1
displayName
:
'
Build
.NET
Core
'
displayName
:
'
Build
.NET
6
'
inputs
:
solution
:
'
NLua.net
coreapp3.1
.sln'
solution
:
'
NLua.net
6.0
.sln'
configuration
:
Release
-
task
:
MSBuild@1
displayName
:
'
Build
.NET
Core
'
-
task
:
DotNetCoreCLI@2
displayName
:
'
dotnet
build
NLua.netstandard.sln
'
inputs
:
solution
:
'
NLua.net5.0.sln'
configuration
:
Release
command
:
custom
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
displayName
:
'
dotnet
vstest'
inputs
:
command
:
custom
custom
:
vstest
arguments
:
'
.\tests\build\net
coreapp3.1
\bin\Release\net
coreapp3.1
\NLuaTest.dll'
arguments
:
'
.\tests\build\net
6.0
\bin\Release\net
6.0
\NLuaTest.dll'
-
task
:
MSBuild@1
displayName
:
'
Build
Android'
...
...
@@ -252,32 +269,11 @@ jobs:
publishLocation
:
'
pipeline'
-
task
:
DownloadPipelineArtifact@2
displayName
:
'
Download
Build
Xamarin.iOS
'
displayName
:
'
Download
Build
libs.mac
'
inputs
:
buildType
:
'
current'
artifactName
:
'
Xamarin.iOS.NLua'
targetPath
:
'
lib/Release/xamarinios/'
-
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/'
artifactName
:
'
libs.mac'
targetPath
:
'
./lib/Release/'
-
script
:
'
nuget
setapikey
$(apikey)'
displayName
:
'
Set
NuGet
API
Key'
...
...
@@ -312,7 +308,11 @@ jobs:
-
template
:
send-telegram.yml@templates
-
job
:
'
NLuaLinux'
-
stage
:
Build_Linux
displayName
:
Build Linux
jobs
:
-
job
:
'
NLuaLinux'
displayName
:
'
Linux'
variables
:
-
group
:
'
Keys'
...
...
@@ -329,12 +329,12 @@ jobs:
-
task
:
NuGetCommand@2
displayName
:
'
NuGet
restore'
inputs
:
restoreSolution
:
NLua.net
coreapp3.1
.sln
restoreSolution
:
NLua.net
6.0
.sln
-
task
:
MSBuild@1
displayName
:
'
Build
.NET
Core
'
displayName
:
'
Build
.NET
6
'
inputs
:
solution
:
NLua.net
coreapp3.1
.sln
solution
:
NLua.net
6.0
.sln
configuration
:
Release
-
task
:
DotNetCoreCLI@2
...
...
@@ -342,6 +342,6 @@ jobs:
inputs
:
command
:
custom
custom
:
vstest
arguments
:
'
tests/build/net
coreapp3.1
/bin/Release/net
coreapp3.1
/NLuaTest.dll'
arguments
:
'
tests/build/net
6.0
/bin/Release/net
6.0
/NLuaTest.dll'
-
template
:
send-telegram.yml@templates
src/Lua.cs
View file @
22006326
...
...
@@ -10,7 +10,7 @@ using NLua.Method;
using
NLua.Exceptions
;
using
NLua.Extensions
;
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
using
ObjCRuntime
;
#endif
...
...
@@ -335,7 +335,7 @@ namespace NLua
_luaState
=
null
;
}
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
PanicCallback
(
IntPtr
state
)
...
...
@@ -1108,7 +1108,7 @@ namespace NLua
/// <param name = "luaState">lua state</param>
/// <param name = "luaDebug">Pointer to LuaDebug (lua_debug) structure</param>
///
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaHookFunction
))]
#endif
static
void
DebugHookCallback
(
IntPtr
luaState
,
IntPtr
luaDebug
)
...
...
src/Metatables.cs
View file @
22006326
...
...
@@ -11,7 +11,7 @@ using KeraLua;
using
NLua.Method
;
using
NLua.Extensions
;
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
using
ObjCRuntime
;
#endif
...
...
@@ -85,7 +85,7 @@ namespace NLua
/*
* __call metafunction of CLR delegates, retrieves and calls the delegate.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
RunFunctionDelegate
(
IntPtr
luaState
)
...
...
@@ -108,7 +108,7 @@ namespace NLua
/*
* __gc metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
CollectObject
(
IntPtr
state
)
...
...
@@ -131,7 +131,7 @@ namespace NLua
/*
* __tostring metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
ToStringLua
(
IntPtr
state
)
...
...
@@ -157,7 +157,7 @@ namespace NLua
/*
* __add metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
AddLua
(
IntPtr
luaState
)
...
...
@@ -175,7 +175,7 @@ namespace NLua
/*
* __sub metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
SubtractLua
(
IntPtr
luaState
)
...
...
@@ -193,7 +193,7 @@ namespace NLua
/*
* __mul metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
MultiplyLua
(
IntPtr
luaState
)
...
...
@@ -211,7 +211,7 @@ namespace NLua
/*
* __div metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
DivideLua
(
IntPtr
luaState
)
...
...
@@ -229,7 +229,7 @@ namespace NLua
/*
* __mod metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
ModLua
(
IntPtr
luaState
)
...
...
@@ -247,7 +247,7 @@ namespace NLua
/*
* __unm metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
UnaryNegationLua
(
IntPtr
luaState
)
...
...
@@ -289,7 +289,7 @@ namespace NLua
/*
* __eq metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
EqualLua
(
IntPtr
luaState
)
...
...
@@ -307,7 +307,7 @@ namespace NLua
/*
* __lt metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
LessThanLua
(
IntPtr
luaState
)
...
...
@@ -325,7 +325,7 @@ namespace NLua
/*
* __le metafunction of CLR objects.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
LessThanOrEqualLua
(
IntPtr
luaState
)
...
...
@@ -375,7 +375,7 @@ namespace NLua
* either the value of the member or a delegate to call it.
* If the member does not exist returns nil.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
GetMethod
(
IntPtr
state
)
...
...
@@ -679,7 +679,7 @@ namespace NLua
* __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.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
GetBaseMethod
(
IntPtr
state
)
...
...
@@ -982,7 +982,7 @@ namespace NLua
* the member name and the value to be stored as arguments. Throws
* and error if the assignment is invalid.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
SetFieldOrProperty
(
IntPtr
state
)
...
...
@@ -1187,7 +1187,7 @@ namespace NLua
/*
* __index metafunction of type references, works on static members.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
GetClassMethod
(
IntPtr
state
)
...
...
@@ -1233,7 +1233,7 @@ namespace NLua
/*
* __newindex function of type references, works on static members.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
SetClassFieldOrProperty
(
IntPtr
state
)
...
...
@@ -1265,7 +1265,7 @@ namespace NLua
/*
* __call metafunction of Delegates.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
static
int
CallDelegate
(
IntPtr
state
)
...
...
@@ -1334,7 +1334,7 @@ namespace NLua
* found or if the arguments are invalid. Throws an error if the constructor
* generates an exception.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
CallConstructor
(
IntPtr
state
)
...
...
src/ObjectTranslator.cs
View file @
22006326
...
...
@@ -10,7 +10,7 @@ using NLua.Method;
using
NLua.Exceptions
;
using
NLua.Extensions
;
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
using
ObjCRuntime
;
#endif
...
...
@@ -245,7 +245,7 @@ namespace NLua
* Implementation of load_assembly. Throws an error
* if the assembly is not found.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
LoadAssembly
(
IntPtr
luaState
)
...
...
@@ -349,7 +349,7 @@ namespace NLua
* Implementation of import_type. Returns nil if the
* type is not found.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
ImportType
(
IntPtr
luaState
)
...
...
@@ -377,7 +377,7 @@ namespace NLua
* argument in the stack) as an object subclassing the
* type passed as second argument in the stack.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
RegisterTable
(
IntPtr
luaState
)
...
...
@@ -444,7 +444,7 @@ namespace NLua
* Implementation of free_object. Clears the metatable and the
* base field, freeing the created object for garbage-collection
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
UnregisterTable
(
IntPtr
luaState
)
...
...
@@ -501,7 +501,7 @@ namespace NLua
* Implementation of get_method_bysig. Returns nil
* if no matching method is not found.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
GetMethodSignature
(
IntPtr
luaState
)
...
...
@@ -566,7 +566,7 @@ namespace NLua
* Implementation of get_constructor_bysig. Returns nil
* if no matching constructor is found.
*/
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
GetConstructorSignature
(
IntPtr
luaState
)
...
...
@@ -1107,7 +1107,7 @@ namespace NLua
return
2
;
}
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
CType
(
IntPtr
luaState
)
...
...
@@ -1127,7 +1127,7 @@ namespace NLua
return
1
;
}
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
MonoPInvokeCallback
(
typeof
(
LuaNativeFunction
))]
#endif
private
static
int
EnumFromInt
(
IntPtr
luaState
)
...
...
src/Properties/AssemblyInfo.cs
View file @
22006326
...
...
@@ -4,25 +4,27 @@
// Change them to the values specific to your project.
#if NETFRAMEWORK
[
assembly
:
AssemblyTitle
(
"NLua (.NET Framework 4.
5
)"
)]
[
assembly
:
AssemblyTitle
(
"NLua (.NET Framework 4.
6
)"
)]
#elif WINDOWS_UWP
[
assembly
:
AssemblyTitle
(
"NLua (
Windows Universal
)"
)]
[
assembly
:
AssemblyTitle
(
"NLua (
UWP
)"
)]
#elif __ANDROID__
[
assembly
:
AssemblyTitle
(
"NLua (
Xamarin.
Android)"
)]
[
assembly
:
AssemblyTitle
(
"NLua (Android)"
)]
#elif NETCOREAPP
[
assembly
:
AssemblyTitle
(
"NLua (.NET Core)"
)]
#elif NETSTANDARD
[
assembly
:
AssemblyTitle
(
"NLua (.NET Standard)"
)]
#elif __TVOS__
[
assembly
:
AssemblyTitle
(
"NLua (
Xamarin.
tvOS)"
)]
[
assembly
:
AssemblyTitle
(
"NLua (tvOS)"
)]
#elif __WATCHOS__
[
assembly
:
AssemblyTitle
(
"NLua (Xamarin.watchOS)"
)]
[
assembly
:
AssemblyTitle
(
"NLua (watchOS)"
)]
#elif __MACCATALYST__
[
assembly
:
AssemblyTitle
(
"NLua (Mac Catalyst)"
)]
#elif __IOS__
[
assembly
:
AssemblyTitle
(
"NLua (
Xamarin.
iOS)"
)]
[
assembly
:
AssemblyTitle
(
"NLua (iOS)"
)]
#elif __MACOS__
[
assembly
:
AssemblyTitle
(
"NLua (
Xamarin.
Mac)"
)]
[
assembly
:
AssemblyTitle
(
"NLua (Mac)"
)]
#else
[
assembly
:
AssemblyTitle
(
"NLua (.NET
Framework
)"
)]
[
assembly
:
AssemblyTitle
(
"NLua (.NET)"
)]
#endif
[
assembly
:
AssemblyDescription
(
"NLua library"
)]
...
...
tests/build/net46/NLuaTest.csproj
View file @
22006326
...
...
@@ -51,13 +51,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference
Include=
"KeraLua"
>
<Version>
1.
2
.1
5
</Version>
<Version>
1.
3
.1
</Version>
</PackageReference>
<PackageReference
Include=
"NUnit"
>
<Version>
3.13.
1
</Version>
<Version>
3.13.
2
</Version>
</PackageReference>
<PackageReference
Include=
"NUnit3TestAdapter"
>
<Version>
3
.1
7
.0
</Version>
<Version>
4
.1.0
</Version>
<IncludeAssets>
runtime; build; native; contentfiles; analyzers; buildtransitive
</IncludeAssets>
<PrivateAssets>
all
</PrivateAssets>
</PackageReference>
...
...
tests/build/net
coreapp3.1
/NLuaTest.net
coreapp3.1
.csproj
→
tests/build/net
6.0
/NLuaTest.net
6.0
.csproj
View file @
22006326
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net
coreapp3.1
</TargetFramework>
<TargetFramework>net
6.0
</TargetFramework>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
...
...
@@ -13,25 +13,26 @@
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<IsPackable>false</IsPackable>
<AssemblyName>NLuaTest</AssemblyName>
<Configurations>Release;Debug</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<OutputPath>bin\Release\
net6.0
</OutputPath>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>bin\Debug\
net6.0
</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="KeraLua" Version="1.
2
.1
5
">
<PackageReference Include="KeraLua" Version="1.
3
.1">
</PackageReference>
<PackageReference Include="nunit" Version="3.13.
1
" />
<PackageReference Include="NUnit3TestAdapter" Version="
3
.1
6.1
"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="nunit" Version="3.13.
2
" />
<PackageReference Include="NUnit3TestAdapter" Version="
4
.1
.0
"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="1
6.5
.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="1
7.0
.0" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\scripts\core\bisect.lua">
...
...
@@ -84,7 +85,7 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\build\net
coreapp3.1\NLua.netcoreapp3.1
.csproj" />
<ProjectReference Include="..\..\..\build\net
6.0\NLua.net6.0
.csproj" />
</ItemGroup>
<Import Project="..\..\src\NLuaTest.Shared.projitems" Label="Shared" />
</Project>
tests/build/xamarinios/NLuaTest.XamariniOS.csproj
View file @
22006326
...
...
@@ -191,7 +191,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference
Include=
"KeraLua"
>
<Version>
1.
2
.1
5
</Version>
<Version>
1.
3
.1
</Version>
</PackageReference>
<PackageReference
Include=
"Codefoco.Touch.Server"
>
<Version>
1.0.29
</Version>
...
...
tests/build/xamarintvos/NLuaTest.XamarinTVOS.csproj
View file @
22006326
...
...
@@ -216,7 +216,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference
Include=
"KeraLua"
>
<Version>
1.
2
.1
5
</Version>
<Version>
1.
3
.1
</Version>
</PackageReference>
<PackageReference
Include=
"Codefoco.Touch.Server"
>
<Version>
1.0.29
</Version>
...
...
tests/src/Core.cs
View file @
22006326
...
...
@@ -5,14 +5,14 @@ using System.IO;
using
LoadFileTests
;
using
NUnit.Framework
;
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
using
Foundation
;
#endif
namespace
NLuaTest
{
[
TestFixture
]
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
Preserve
(
AllMembers
=
true
)]
#endif
public
class
Core
...
...
tests/src/LoadFileTests.cs
View file @
22006326
...
...
@@ -5,21 +5,21 @@ using NLua;
using
NUnit.Framework
;
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
using
Foundation
;
#endif
namespace
LoadFileTests
{
[
TestFixture
]
#if __IOS__ || __TVOS__ || __WATCHOS__
#if __IOS__ || __TVOS__ || __WATCHOS__
|| __MACCATALYST__
[
Preserve
(
AllMembers
=
true
)]
#endif
public
class
LoadLuaFile
{
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
.
Combine
(
path
,
"scripts"
);
path
=
Path
.
Combine
(
path
,
name
);
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment