Unverified Commit 1cc74393 authored by Vinicius Jarina's avatar Vinicius Jarina Committed by GitHub
Browse files

* Giant cleanup/reshuffle of all files. (#265)

* * Giant cleanup/reshuffle of all files.

* * Update upstream `KeraLua` to `0.1.14`

* Fixed .NET Core build.

* Add runsettings file

* * Fixed nuspec `dependencies` node

* Ignore _ in branch names for package names.

* * Fixed nuspec.
parent 3f254585
# Autosave files
*~
*.pc
*.obj
*.pidb
*.mdb
*/bin/*
Run/
# build stuff
Applications/LuaRunner/luarunner
ConsoleTest/consoletest
tests/KeraLua.dll
tests/KopiLua.dll
tests/NLua.dll
tests/NLuaTest.dll
tests/nunit.framework.dll
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
UpgradeLog.XML
*.ReSharper
*.userprefs
# http://www.gnu.org/software/automake
Makefile
Makefile.in
# http://www.gnu.org/software/autoconf
/autom4te.cache
/aclocal.m4
/compile
/configure
/depcomp
/install-sh
/missing
/config.status
*.userprefs
src/bin
src/obj
tests/bin
tests/obj
build/net45/obj/
build/netstandard1.0/bin/
build/netstandard1.0/obj/
build/netstandard1.3/bin/
build/netstandard1.3/obj/
build/netstandard1.6/bin/
build/netstandard1.6/obj/
build/netstandard2.0/bin/
build/netstandard2.0/obj/
build/portable-net45+win8+wp8/obj/
build/portable-net45+win8+wpa81/obj/Debug/CoreCompileInputs.cache
build/portable-net45+win8+wpa81/obj/
lib/Debug/
lib/Release/
.vs/
build/Android/obj/
build/TVOS/obj/
build/WatchOS/obj/
build/XamariniOS/obj/
build/XamarinMac/obj/
build/netcore/obj/
tests/build/net45/bin/Debug/KeraLua.dll
tests/build/net45/bin/
tests/build/net45/obj/
tests/build/netcore/bin/
tests/build/netcore/obj/
[submodule "Core/KopiLua"]
path = Core/KopiLua
url = git://github.com/NLua/KopiLua.git
[submodule "Core/KeraLua"]
path = Core/KeraLua
url = git://github.com/NLua/KeraLua.git
[submodule "tests/LuaTests"]
path = tests/LuaTests
url = git://github.com/NLua/LuaTests.git
#
# lua Travis-CI Hook
# NLua Travis-CI Hook
#
# Travis language: c(sharp) :-P
language: csharp
before_install:
- date -u
- uname -a
- export PATH=/opt/mono/bin:$PATH
- env | sort
- export PATH=/opt/mono/bin:$PATH
install: ./CI/travis.${TRAVIS_OS_NAME}.install.deps.sh
install:
- sudo apt-get install mono-devel nunit nuget
script:
- git submodule update --init --recursive
- ./run_all.linux64.sh
- nuget restore
- msbuild /p:Configuration=Release /t:Restore
- msbuild /p:Configuration=Release
- nunit-console ./tests/build/net45/bin/Release/NLuaTest.dll
# Execute additional tests or commands
#after_script:
......@@ -32,4 +31,4 @@ notifications:
- viniciusjarina@gmail.com
email:
on_success: change
on_failure: always
\ No newline at end of file
on_failure: always
/*
* This file is part of NLua.
*
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using System;
using System.Threading;
using NLua;
using System.Collections.Generic;
/*
* Application to run Lua scripts that can use NLua
* from the console
*
* Author: Fabio Mascarenhas
* Version: 1.0
*/
namespace NLua
{
public class LuaNetRunner
{
const string lua_script = @"-- lua.lua - Lua 5.1 interpreter (lua.c) reimplemented in Lua.
--
-- WARNING: This is not completed but was quickly done just an experiment.
-- Fix omissions/bugs and test if you want to use this in production.
-- Particularly pay attention to error handling.
--
-- (c) David Manura, 2008-08
-- Licensed under the same terms as Lua itself.
-- Based on lua.c from Lua 5.1.3.
-- Improvements by Shmuel Zeigerman.
-- Variables analogous to those in luaconf.h
local LUA_INIT = ""LUA_INIT""
local LUA_PROGNAME = ""lua""
local LUA_PROMPT = ""> ""
local LUA_PROMPT2 = "">> ""
local function LUA_QL(x) return ""'"" .. x .. ""'"" end
local lua51 = _VERSION:match '5%.1$'
-- Variables analogous to those in lua.h
local LUA_RELEASE, LUA_COPYRIGHT, eof_ender
if lua51 then
LUA_RELEASE = ""Lua 5.1.4""
LUA_COPYRIGHT = ""Copyright (C) 1994-2008 Lua.org, PUC-Rio""
eof_ender = LUA_QL(""<eof>"")
else
LUA_RELEASE = ""Lua 5.2.2""
LUA_COPYRIGHT = ""Copyright (C) 1994-2013 Lua.org, PUC-Rio""
eof_ender = '<eof>'
end
local EXTRA_COPYRIGHT = ""lua.lua (c) David Manura, 2008-08""
-- Note: don't allow user scripts to change implementation.
-- Check for globals with ""cat lua.lua | luac -p -l - | grep ETGLOBAL""
local _G = _G
local assert = assert
local collectgarbage = collectgarbage
local loadfile = loadfile
local loadstring = loadstring or load
local pcall = pcall
local rawget = rawget
local select = select
local tostring = tostring
local type = type
local unpack = unpack or table.unpack
local xpcall = xpcall
local io_stderr = io.stderr
local io_stdout = io.stdout
local io_stdin = io.stdin
local string_format = string.format
local string_sub = string.sub
local os_getenv = os.getenv
local os_exit = os.exit
local progname = LUA_PROGNAME
-- Use external functions, if available
local lua_stdin_is_tty = function() return true end
local setsignal = function() end
local function print_usage()
io_stderr:write(string_format(
""usage: %s [options] [script [args]].\n"" ..
""Available options are:\n"" ..
"" -e stat execute string "" .. LUA_QL(""stat"") .. ""\n"" ..
"" -l name require library "" .. LUA_QL(""name"") .. ""\n"" ..
"" -i enter interactive mode after executing "" ..
LUA_QL(""script"") .. ""\n"" ..
"" -v show version information\n"" ..
"" -- stop handling options\n"" ..
"" - execute stdin and stop handling options\n""
,
progname))
io_stderr:flush()
end
local our_tostring = tostring
local tuple = table.pack or function(...)
return {n=select('#', ...), ...}
end
local using_lsh,lsh
local function our_print (...)
local args = tuple(...)
for i = 1,args.n do
io.write(our_tostring(args[i]),'\t')
end
_G._ = args[1]
io.write '\n'
end
local function saveline(s)
if using_lsh then
lsh.saveline(s)
end
end
local function getline(prmt)
if using_lsh then
return lsh.readline(prmt)
else
io_stdout:write(prmt)
io_stdout:flush()
return io_stdin:read'*l'
end
end
local function l_message (pname, msg)
if pname then io_stderr:write(string_format(""%s: "", pname)) end
io_stderr:write(string_format(""%s\n"", msg))
io_stderr:flush()
end
local function report(status, msg)
if not status and msg ~= nil then
msg = tostring(msg)
--~ msg = (type(msg) == 'string' or type(msg) == 'number') and tostring(msg)
--~ or ""(error object is not a string)""
l_message(progname, msg);
end
return status
end
local function traceback (message)
local tp = type(message)
if tp ~= ""string"" and tp ~= ""number"" then return message end
local debug = _G.debug
if type(debug) ~= ""table"" then return message end
local tb = debug.traceback
if type(tb) ~= ""function"" then return message end
return tb(message, 2)
end
local function docall(f, ...)
local tp = {...} -- no need in tuple (string arguments only)
local F = function() return f(unpack(tp)) end
setsignal(true)
local result = tuple(xpcall(F, traceback))
setsignal(false)
-- force a complete garbage collection in case of errors
if not result[1] then collectgarbage(""collect"") end
return unpack(result, 1, result.n)
end
function dofile(name)
local f, msg = loadfile(name)
if f then f, msg = docall(f) end
return report(f, msg)
end
local function dostring(s, name)
local f, msg = loadstring(s, name)
if f then f, msg = docall(f) end
return report(f, msg)
end
local function dolibrary (name)
return report(docall(_G.require, name))
end
local function print_version()
l_message(nil, LUA_RELEASE .. "" "" .. LUA_COPYRIGHT..""\n""..EXTRA_COPYRIGHT)
end
local function getargs (argv, n)
local arg = {}
for i=1,#argv do arg[i - n] = argv[i] end
if _G.arg then
local i = 0
while _G.arg[i] do
arg[i - n] = _G.arg[i]
i = i - 1
end
end
return arg
end
local function get_prompt (firstline)
-- use rawget to play fine with require 'strict'
local pmt = rawget(_G, firstline and ""_PROMPT"" or ""_PROMPT2"")
local tp = type(pmt)
if tp == ""string"" or tp == ""number"" then
return tostring(pmt)
end
return firstline and LUA_PROMPT or LUA_PROMPT2
end
local function fetchline(firstline)
return getline(get_prompt(firstline))
end
local function incomplete (msg)
if msg then
if string_sub(msg, -#eof_ender) == eof_ender then
return true
end
end
return false
end
local function pushline (firstline)
local fine,b = true
repeat
b = fetchline(firstline)
if not b then return end -- no input
if using_lsh then
fine = lsh.checkline(b)
end
until fine
if firstline and string_sub(b, 1, 1) == '=' then
return ""return "" .. string_sub(b, 2) -- change '=' to `return'
else
return b
end
end
local function loadline ()
local b = pushline(true)
if not b then return -1 end -- no input
local f, msg
while true do -- repeat until gets a complete line
f, msg = loadstring(b, ""=stdin"")
if not incomplete(msg) then break end -- cannot try to add lines?
local b2 = pushline(false)
if not b2 then -- no more input?
return -1
end
b = b .. ""\n"" .. b2 -- join them
end
saveline(b)
return f, msg
end
local function dotty ()
local oldprogname = progname
progname = nil
using_lsh,lsh = false -- pcall(require, 'luaish') blows with LI ??
if using_lsh then
our_tostring = lsh.tostring
else
--print('problem loading luaish:',lsh)
our_tostring = tostring
end
while true do
local result
local status, msg = loadline()
if status == -1 then break end
if status then
result = tuple(docall(status))
status, msg = result[1], result[2]
end
report(status, msg)
if status and result.n > 1 then -- any result to print?
status, msg = pcall(our_print, unpack(result, 2, result.n))
if not status then
l_message(progname, string_format(
""error calling %s (%s)"",
LUA_QL(""print""), msg))
end
end
end
io_stdout:write""\n""
io_stdout:flush()
progname = oldprogname
end
local function handle_script(argv, n)
_G.arg = getargs(argv, n) -- collect arguments
local fname = argv[n]
if fname == ""-"" and argv[n-1] ~= ""--"" then
fname = nil -- stdin
end
local status, msg = loadfile(fname)
if status then
status, msg = docall(status, unpack(_G.arg))
end
return report(status, msg)
end
local function collectargs (argv, p)
local i = 1
while i <= #argv do
if string_sub(argv[i], 1, 1) ~= '-' then -- not an option?
return i
end
local prefix = string_sub(argv[i], 1, 2)
if prefix == '--' then
if #argv[i] > 2 then return -1 end
return argv[i+1] and i+1 or 0
elseif prefix == '-' then
return i
elseif prefix == '-i' then
if #argv[i] > 2 then return -1 end
p.i = true
p.v = true
elseif prefix == '-v' then
if #argv[i] > 2 then return -1 end
p.v = true
elseif prefix == '-e' then
p.e = true
if #argv[i] == 2 then
i = i + 1
if argv[i] == nil then return -1 end
end
elseif prefix == '-l' then
if #argv[i] == 2 then
i = i + 1
if argv[i] == nil then return -1 end
end
else
return -1 -- invalid option
end
i = i + 1
end
return 0
end
local function runargs(argv, n)
local i = 1
while i <= n do if argv[i] then
assert(string_sub(argv[i], 1, 1) == '-')
local c = string_sub(argv[i], 2, 2) -- option
if c == 'e' then
local chunk = string_sub(argv[i], 3)
if chunk == '' then i = i + 1; chunk = argv[i] end
assert(chunk)
if not dostring(chunk, ""=(command line)"") then return false end
elseif c == 'l' then
local filename = string_sub(argv[i], 3)
if filename == '' then i = i + 1; filename = argv[i] end
assert(filename)
if not dolibrary(filename) then return false end
end
i = i + 1
end end
return true
end
local function handle_luainit()
local init = os_getenv(LUA_INIT)
if init == nil then
return -- status OK
elseif string_sub(init, 1, 1) == '@' then
dofile(string_sub(init, 2))
else
dostring(init, ""="" .. LUA_INIT)
end
end
if _G.arg and _G.arg[0] and #_G.arg[0] > 0 then progname = _G.arg[0] end
local argv = arg
handle_luainit()
local has = {i=false, v=false, e=false}
local script = collectargs(argv, has)
if script < 0 then -- invalid args?
print_usage()
os_exit(1)
end
if has.v then print_version() end
local status = runargs(argv, (script > 0) and script-1 or #argv)
if not status then os_exit(1) end
if script ~= 0 then
status = handle_script(argv, script)
if not status then os_exit(1) end
else
_G.arg = nil
end
if has.i then
dotty()
elseif script == 0 and not has.e and not has.v then
if lua_stdin_is_tty() then
print_version()
import 'System'
dotty()
else dofile(nil) -- executes stdin as a file
end
end
";
/*
* Runs the Lua script passed as the first command-line argument.
* It passed all the command-line arguments to the script.
*/
[STAThread]
public static void Main(string[] args)
{
try {
using (Lua lua = new Lua ()) {
//lua.OpenLibs(); // steffenj: Lua 5.1.1 API change (all libs already opened in Lua constructor!)
lua.NewTable ("arg");
LuaTable argc = (LuaTable)lua ["arg"];
argc [0] = "NLua";
for (int i = 0; i < args.Length; i++) {
argc [i + 1] = args [i];
}
argc ["n"] = args.Length;
lua.LoadCLRPackage ();
try {
lua.DoString (lua_script,"lua");
} catch (Exception e) {
// limit size of stack traceback message to roughly 1 console screen height
string trace = e.StackTrace;
if (e.StackTrace.Length > 1300)
trace = e.StackTrace.Substring (0, 1300) + " [...] (traceback cut short)";
Console.WriteLine ();
Console.WriteLine (e.Message);
Console.WriteLine (e.Source + " raised a " + e.GetType ().ToString ());
Console.WriteLine (trace);
// wait for key press if there is an error
Console.ReadKey ();
}
}
} catch (Exception e) {
Console.WriteLine ();
Console.WriteLine (e.Message);
Console.WriteLine (e.Source + " raised a " + e.GetType ().ToString ());
Console.ReadKey ();
}
}
}
}
\ No newline at end of file
EXTRA_DIST =
#Warning: This is an automatically generated file, do not edit!
if ENABLE_DEBUG
SUBDIRS = .
endif
if ENABLE_DEBUGKOPILUA
SUBDIRS = .
endif
if ENABLE_RELEASE
SUBDIRS = .
endif
if ENABLE_RELEASEKOPILUA
SUBDIRS = .
endif
if ENABLE_DEBUG_X64
SUBDIRS = .
endif
if ENABLE_RELEASE_X64
SUBDIRS = .
endif
if ENABLE_DEBUGKOPILUA_X64
SUBDIRS = .
endif
if ENABLE_RELEASEKOPILUA_X64
SUBDIRS = .
endif
# Projekt-specifikus makefile beszúrása
include NLua.40.make
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3CE4CCB6-3465-43E3-B5ED-5FB9B70D20E5}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLua</RootNamespace>
<AssemblyName>NLua</AssemblyName>
<ReleaseVersion>2.x</ReleaseVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>..\..\tests\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>..\..\tests\</OutputPath>
<DefineConstants>RELEASE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>..\..\Run\Debug_x64</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>..\..\Run\Release_x64</OutputPath>
<DefineConstants>RELEASE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugKopiLua|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\tests\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugKopiLua|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\DebugKopiLua\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseKopiLua|AnyCPU'">
<OutputPath>..\..\tests\</OutputPath>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseKopiLua|x64'">
<OutputPath>bin\x64\ReleaseKopiLua\</OutputPath>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>NLua.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="LuaNetRunner.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Core\NLua\NLua.Net40.csproj">
<Project>{F55CABBB-4108-4A39-94E1-581FD46DC021}</Project>
<Name>NLua.Net40</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="NLua.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
# Warning: This is an automatically generated file, do not edit!
if ENABLE_DEBUG
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG"
ASSEMBLY = ../../tests/NLua.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../../Run/Debug/net40/NLua.dll
BUILD_DIR = ../../tests/
NLUA_EXE_MDB_SOURCE=../../tests/NLua.exe.mdb
NLUA_EXE_MDB=$(BUILD_DIR)/NLua.exe.mdb
NLUA_EXE_CONFIG_SOURCE=app.config
NLUA_DLL_SOURCE=../../Run/Debug/net40/NLua.dll
NLUA_DLL_MDB_SOURCE=../../Run/Debug/net40/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
KERALUA_DLL_SOURCE=../../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../../Core/KopiLua/Bin/Debug/net40/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../../Core/KopiLua/Bin/Debug/net40/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
endif
if ENABLE_DEBUGKOPILUA
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG"
ASSEMBLY = ../../tests/NLua.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../../Core/NLua/bin/DebugKopiLua/NLua.dll
BUILD_DIR = ../../tests/
NLUA_EXE_MDB_SOURCE=../../tests/NLua.exe.mdb
NLUA_EXE_MDB=$(BUILD_DIR)/NLua.exe.mdb
NLUA_EXE_CONFIG_SOURCE=app.config
NLUA_DLL_SOURCE=../../Core/NLua/bin/DebugKopiLua/NLua.dll
NLUA_DLL_MDB_SOURCE=../../Core/NLua/bin/DebugKopiLua/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
KERALUA_DLL_SOURCE=../../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
endif
if ENABLE_RELEASE
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ "-define:RELEASE"
ASSEMBLY = ../../tests/NLua.exe
ASSEMBLY_MDB =
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../../Run/Release/net40/NLua.dll
BUILD_DIR = ../../tests/
NLUA_EXE_MDB=
NLUA_EXE_CONFIG_SOURCE=app.config
NLUA_DLL_SOURCE=../../Run/Release/net40/NLua.dll
NLUA_DLL_MDB=
KERALUA_DLL_SOURCE=../../Core/KeraLua/src/bin/Release/net40/KeraLua.dll
KERALUA_DLL_MDB=
KOPILUA_DLL_SOURCE=../../Core/KopiLua/Bin/Release/net40/KopiLua.dll
KOPILUA_DLL_MDB=
endif
if ENABLE_RELEASEKOPILUA
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize-
ASSEMBLY = ../../tests/NLua.exe
ASSEMBLY_MDB =
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../../Core/NLua/bin/ReleaseKopiLua/NLua.dll
BUILD_DIR = ../../tests/
NLUA_EXE_MDB=
NLUA_EXE_CONFIG_SOURCE=app.config
NLUA_DLL_SOURCE=../../Core/NLua/bin/ReleaseKopiLua/NLua.dll
NLUA_DLL_MDB=
KERALUA_DLL_SOURCE=../../Core/KeraLua/src/bin/ReleaseKopiLua/KeraLua.dll
KERALUA_DLL_MDB=
KOPILUA_DLL_SOURCE=../../Core/KopiLua/KopiLua/bin/ReleaseKopiLua/KopiLua.dll
KOPILUA_DLL_MDB=
endif
if ENABLE_DEBUG_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG"
ASSEMBLY = ../../Run/Debug_x64/NLua.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../../Run/Debug/net40/NLua.dll
BUILD_DIR = ../../Run/Debug_x64
NLUA_EXE_MDB_SOURCE=../../Run/Debug_x64/NLua.exe.mdb
NLUA_EXE_MDB=$(BUILD_DIR)/NLua.exe.mdb
NLUA_EXE_CONFIG_SOURCE=app.config
NLUA_DLL_SOURCE=../../Run/Debug/net40/NLua.dll
NLUA_DLL_MDB_SOURCE=../../Run/Debug/net40/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
KERALUA_DLL_SOURCE=../../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../../Core/KopiLua/Bin/Debug/net40/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../../Core/KopiLua/Bin/Debug/net40/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
endif
if ENABLE_RELEASE_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ "-define:RELEASE"
ASSEMBLY = ../../Run/Release_x64/NLua.exe
ASSEMBLY_MDB =
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../../Run/Release/net40/NLua.dll
BUILD_DIR = ../../Run/Release_x64
NLUA_EXE_MDB=
NLUA_EXE_CONFIG_SOURCE=app.config
NLUA_DLL_SOURCE=../../Run/Debug/net40/NLua.dll
NLUA_DLL_MDB_SOURCE=../../Run/Debug/net40/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
KERALUA_DLL_SOURCE=../../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../../Core/KopiLua/Bin/Debug/net40/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../../Core/KopiLua/Bin/Debug/net40/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
endif
if ENABLE_DEBUGKOPILUA_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG"
ASSEMBLY = bin/x64/DebugKopiLua/NLua.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../../Core/NLua/bin/DebugKopiLua/NLua.dll
BUILD_DIR = bin/x64/DebugKopiLua/
NLUA_EXE_MDB_SOURCE=bin/x64/DebugKopiLua/NLua.exe.mdb
NLUA_EXE_MDB=$(BUILD_DIR)/NLua.exe.mdb
NLUA_EXE_CONFIG_SOURCE=app.config
NLUA_DLL_SOURCE=../../Run/Debug/net40/NLua.dll
NLUA_DLL_MDB_SOURCE=../../Run/Debug/net40/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
KERALUA_DLL_SOURCE=../../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../../Core/KopiLua/Bin/Debug/net40/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../../Core/KopiLua/Bin/Debug/net40/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
endif
if ENABLE_RELEASEKOPILUA_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize-
ASSEMBLY = bin/x64/ReleaseKopiLua/NLua.exe
ASSEMBLY_MDB =
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../../Core/NLua/bin/ReleaseKopiLua/NLua.dll
BUILD_DIR = bin/x64/ReleaseKopiLua/
NLUA_EXE_MDB=
NLUA_EXE_CONFIG_SOURCE=app.config
NLUA_DLL_SOURCE=../../Run/Debug/net40/NLua.dll
NLUA_DLL_MDB_SOURCE=../../Run/Debug/net40/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
KERALUA_DLL_SOURCE=../../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../../Core/KopiLua/Bin/Debug/net40/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../../Core/KopiLua/Bin/Debug/net40/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
endif
AL=al
SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
PROGRAMFILES = \
$(NLUA_EXE_MDB) \
$(NLUA_EXE_CONFIG) \
$(NLUA_DLL) \
$(NLUA_DLL_MDB) \
$(KERALUA_DLL) \
$(KERALUA_DLL_MDB) \
$(KOPILUA_DLL) \
$(KOPILUA_DLL_MDB)
BINARIES = \
$(NLUA_40)
RESGEN=resgen2
all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES)
FILES = \
LuaNetRunner.cs \
Properties/AssemblyInfo.cs
DATA_FILES =
RESOURCES =
EXTRAS = \
app.config \
NLua.ico \
nlua.40.in
REFERENCES = \
System \
System.Data \
System.Xml
DLL_REFERENCES =
CLEANFILES = $(PROGRAMFILES) $(BINARIES)
include $(top_srcdir)/Makefile.include
NLUA_EXE_CONFIG = $(BUILD_DIR)/NLua.exe.config
NLUA_DLL = $(BUILD_DIR)/NLua.dll
KERALUA_DLL = $(BUILD_DIR)/KeraLua.dll
KOPILUA_DLL = $(BUILD_DIR)/KopiLua.dll
NLUA_40 = $(BUILD_DIR)/nlua.40
$(eval $(call emit-deploy-target,NLUA_EXE_CONFIG))
$(eval $(call emit-deploy-target,NLUA_DLL))
$(eval $(call emit-deploy-target,NLUA_DLL_MDB))
$(eval $(call emit-deploy-target,KERALUA_DLL))
$(eval $(call emit-deploy-target,KERALUA_DLL_MDB))
$(eval $(call emit-deploy-target,KOPILUA_DLL))
$(eval $(call emit-deploy-target,KOPILUA_DLL_MDB))
$(eval $(call emit-deploy-wrapper,NLUA_40,nlua.40,x))
$(eval $(call emit_resgen_targets))
$(build_xamlg_list): %.xaml.g.cs: %.xaml
xamlg '$<'
$(ASSEMBLY_MDB): $(ASSEMBLY)
$(ASSEMBLY): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
mkdir -p $(shell dirname $(ASSEMBLY))
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3CE4CCB6-3465-43E3-B5ED-5FB9B70D20E5}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLua</RootNamespace>
<AssemblyName>NLua</AssemblyName>
<ReleaseVersion>1.3.2</ReleaseVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>..\..\tests\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>..\..\tests\</OutputPath>
<DefineConstants>RELEASE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>..\..\Run\Debug_x64</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>..\..\Run\Release_x64</OutputPath>
<DefineConstants>RELEASE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugKopiLua|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\tests\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugKopiLua|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\DebugKopiLua\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseKopiLua|AnyCPU'">
<OutputPath>..\..\tests\</OutputPath>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseKopiLua|x64'">
<OutputPath>bin\x64\ReleaseKopiLua\</OutputPath>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>NLua.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="LuaNetRunner.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<Content Include="NLua.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<ProjectReference Include="..\..\Core\NLua\NLua.Net45.csproj">
<Project>{F55CABBB-4108-4A39-94E1-581FD46DC021}</Project>
<Name>NLua.Net45</Name>
</ProjectReference>
</ItemGroup>
</Project>
\ No newline at end of file
/*
* This file is part of NLua.
*
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using NLua.Config;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("LuaRunner")]
[assembly: AssemblyDescription(Consts.NLuaDescription)]
[assembly: AssemblyConfiguration(Consts.NLuaConfiguration)]
[assembly: AssemblyCompany(Consts.NLuaCompany)]
[assembly: AssemblyProduct(Consts.NLuaProduct)]
[assembly: AssemblyCopyright(Consts.NLuaCopyright)]
[assembly: AssemblyTrademark(Consts.NLuaTrademark)]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.2")]
[assembly: AssemblyFileVersion("1.5.2")]
\ No newline at end of file
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
#!/bin/sh
exec mono "@expanded_libdir@/@PACKAGE@/NLua.exe" "$@"
function Get-Current-Branch-Name ()
{
$branch = ([string](git rev-parse --abbrev-ref HEAD)).Trim()
$parts = $branch.Split('/')
$branch = $parts[$parts.Length - 1]
return $branch
}
function Get-Current-Commit-Hash ()
{
return ([string](git log -1 --pretty=%h)).Trim()
}
function Get-Current-Commit-Message ()
{
return ([string](git log -1 --pretty=%B)).Trim()
}
function Test-Should-Deploy ()
{
$nugetGitVersion = Get-Git-Package-Version
$buildMetaData = Get-Git-Build-MetaData
$fullSemVer = Get-Git-Full-Sem-Ver
if (Test-Tag-Build $nugetGitVersion $buildMetaData $fullSemVer) {
return $true
}
return $false
}
function Get-Published-PreRelase-Package ($PackageId)
{
$out = [string](nuget list -PreRelease id:$PackageId)
$version = $out.Split(' ')[1]
return $version
}
function Get-Published-PreRelase-Package-Version ($PackageId)
{
$version = Get-Published-PreRelase-Package $PackageId
$version = $version.Split('-')[0]
return $version
}
function Get-Published-Package ($PackageId)
{
$out = [string](nuget list id:$PackageId)
$version = $out.Split(' ')[1]
return $version
}
function Get-Published-Package-Version ($PackageId)
{
$version = Get-Published-Package $PackageId
$version = $version.Split('-')[0]
return $version
}
function Get-Git-Package-Version ()
{
Update-Ensure-Git-Not-Detached
return [string](gitversion /showvariable MajorMinorPatch)
}
function Get-Git-Build-MetaData ()
{
Update-Ensure-Git-Not-Detached
return [string](gitversion /showvariable BuildMetaData)
}
function Get-Git-Full-Sem-Ver ()
{
Update-Ensure-Git-Not-Detached
return [string](gitversion /showvariable FullSemVer)
}
function Update-NuSpec-Release-Notes($File, $releaseNotes)
{
$File = Resolve-Path $File
[xml] $fileContents = Get-Content -Encoding UTF8 -Path $File
$releaseNotesPath = "package.metadata.releaseNotes"
if ($releaseNotes -ne $null -and $releaseNotes -ne "") {
Set-XmlElementsTextValue -XmlDocument $fileContents -ElementPath $releaseNotesPath -TextValue $releaseNotes
}
$fileContents.Save($File)
}
function Update-NuSpec-Version($File, $Version)
{
$File = Resolve-Path $File
[xml] $fileContents = Get-Content -Encoding UTF8 -Path $File
$versionPath = "package.metadata.version"
if ($Version -ne $null -and $Version -ne "") {
Set-XmlElementsTextValue -XmlDocument $fileContents -ElementPath $versionPath -TextValue $Version
}
$fileContents.Save($File)
}
function Get-XmlNamespaceManager([xml]$XmlDocument, [string]$NamespaceURI = "")
{
# If a Namespace URI was not given, use the Xml document's default namespace.
if ([string]::IsNullOrEmpty($NamespaceURI)) { $NamespaceURI = $XmlDocument.DocumentElement.NamespaceURI }
# In order for SelectSingleNode() to actually work, we need to use the fully qualified node path along with an Xml Namespace Manager, so set them up.
[System.Xml.XmlNamespaceManager]$xmlNsManager = New-Object System.Xml.XmlNamespaceManager($XmlDocument.NameTable)
$xmlNsManager.AddNamespace("ns", $NamespaceURI)
return ,$xmlNsManager # Need to put the comma before the variable name so that PowerShell doesn't convert it into an Object[].
}
function Get-FullyQualifiedXmlNodePath([string]$NodePath, [string]$NodeSeparatorCharacter = '.')
{
return "/ns:$($NodePath.Replace($($NodeSeparatorCharacter), '/ns:'))"
}
function Get-XmlNode([xml]$XmlDocument, [string]$NodePath, [string]$NamespaceURI = "", [string]$NodeSeparatorCharacter = '.')
{
$xmlNsManager = Get-XmlNamespaceManager -XmlDocument $XmlDocument -NamespaceURI $NamespaceURI
[string]$fullyQualifiedNodePath = Get-FullyQualifiedXmlNodePath -NodePath $NodePath -NodeSeparatorCharacter $NodeSeparatorCharacter
# Try and get the node, then return it. Returns $null if the node was not found.
$node = $XmlDocument.SelectSingleNode($fullyQualifiedNodePath, $xmlNsManager)
return $node
}
function Set-XmlElementsTextValue([xml]$XmlDocument, [string]$ElementPath, [string]$TextValue, [string]$NamespaceURI = "", [string]$NodeSeparatorCharacter = '.')
{
# Try and get the node.
$node = Get-XmlNode -XmlDocument $XmlDocument -NodePath $ElementPath -NamespaceURI $NamespaceURI -NodeSeparatorCharacter $NodeSeparatorCharacter
# If the node already exists, update its value.
if ($node)
{
$node.InnerText = $TextValue
}
# Else the node doesn't exist yet, so create it with the given value.
else
{
# Create the new element with the given value.
$elementName = $ElementPath.Substring($ElementPath.LastIndexOf($NodeSeparatorCharacter) + 1)
$element = $XmlDocument.CreateElement($elementName, $XmlDocument.DocumentElement.NamespaceURI)
$textNode = $XmlDocument.CreateTextNode($TextValue)
$element.AppendChild($textNode) > $null
# Try and get the parent node.
$parentNodePath = $ElementPath.Substring(0, $ElementPath.LastIndexOf($NodeSeparatorCharacter))
$parentNode = Get-XmlNode -XmlDocument $XmlDocument -NodePath $parentNodePath -NamespaceURI $NamespaceURI -NodeSeparatorCharacter $NodeSeparatorCharacter
if ($parentNode)
{
$parentNode.AppendChild($element) > $null
}
else
{
throw "$parentNodePath does not exist in the xml."
}
}
}
function Test-Tag-Build ($nugetGitVersion, $buildMetaData, $fullSemVer) {
if ([string]::IsNullOrEmpty($buildMetaData) -and $fullSemVer -eq $nugetGitVersion) {
return $true
}
return $false
}
function Test-Stable-Release ($stableVersion, $preReleaseVersion, $nugetGitVersion, $buildMetaData, $fullSemVer)
{
# This is unlikelly to heppen, but could happen if the tag creation didn't triggered the Package
if ($stableVersion -ne $preReleaseVersion -and $preReleaseVersion -ne $nugetGitVersion) {
return 1
}
if (Test-Tag-Build $nugetGitVersion $buildMetaData $fullSemVer) {
return 2
}
return 0
}
function Set-Forced-Git-Version ($version)
{
Write-Output "next-version: $version" > GitVersion.yml
}
function Get-Prefix-Name ()
{
$branchName = Get-Current-Branch-Name
if ($branchName -ne "master") {
return $branchName
}
return "beta"
}
function Get-Next-Version-String ($PackageId)
{
$stableVersion = Get-Published-Package-Version ($PackageId)
$preReleaseVersion = Get-Published-PreRelase-Package-Version ($PackageId)
$nugetGitVersion = Get-Git-Package-Version
$buildMetaData = Get-Git-Build-MetaData
$fullSemVer = Get-Git-Full-Sem-Ver
$prefix = Get-Prefix-Name
$prefix = $prefix.Replace("-", "")
$prefix = $prefix.Replace("_", "")
$prefix = $prefix.Replace(".", "")
$nextVersion = ""
$stable = Test-Stable-Release $stableVersion $preReleaseVersion $nugetGitVersion $buildMetaData $fullSemVer
if ($stable -eq 1){
$nextVersion = $preReleaseVersion
Set-Forced-Git-Version $nextVersion
} elseif ($stable -eq 2) {
$nextVersion = $nugetGitVersion
} else {
$nextVersion = "$($nugetGitVersion)-$($prefix)-build$($buildMetaData)"
}
return $nextVersion
}
function Test-Version-Stable-Release ($version)
{
$count = $version.Split("-").Length
if ($count -eq 3) {
return $false
}
return $true
}
function Test-Package-Already-Published ($PackageId, $nextVersion)
{
if (Test-Version-Stable-Release $nextVersion) {
$publishedVersion = Get-Published-Package $PackageId
if ($publishedVersion -eq $nextVersion) {
return $true
}
return $false
}
$buildMetaData = Get-Git-Build-MetaData
$currentVersion = $nextVersion.Split('-')[0]
[int]$currentBuild = [Convert]::ToInt32($buildMetaData, 10)
$currentPrefix = Get-Prefix-Name
$version = Get-Published-PreRelase-Package $PackageId
#if the latest pre-relese returned is a stable release
if (Test-Version-Stable-Release $version) {
return $false
}
$publishedVersion = $version.Split('-')[0]
$publishedPrefix = $version.Split('-')[1]
$build = $version.Split('-')[2]
$build = $build.Replace("build", "")
[int]$publishedBuild = [Convert]::ToInt32($build, 10)
if ($currentVersion -ne $publishedVersion) {
return $false
}
if ($currentPrefix -ne $publishedPrefix) {
return $false
}
if ($currentBuild -gt $publishedPrefix) {
return $false
}
return $true
}
function Test-Git-Detached ()
{
$output = [string](git branch | head -1)
$detached = $output.Contains("detached")
return $detached
}
function Get-Git-Current-Tag
{
return [string](git describe --tags | head -1)
}
# GitVersion only works in attached branches, if we try to build a tag from the commit hash gitversion will fail
# so we ensure we are always attached to a branch
function Update-Ensure-Git-Not-Detached ()
{
$detached = Test-Git-Detached
if (!$detached) {
return
}
$currentTag = Get-Git-Current-Tag
& git checkout -B $currentTag
# We are using -B because maybe the branch alrady exist
}
set -ev
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.12.0 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-devel cmake nunit
\ No newline at end of file
NLua License
--------------------
NLua is licensed under the terms of the MIT license reproduced below.
This mean that NLua is free software and can be used for both academic and
commercial purposes at absolutely no cost.
===============================================================================
Copyright (C) 2013 - Vinicius Jarina (viniciusjarina@gmail.com)
Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===============================================================================
Kopi Lua License
----------------
Kopi Lua is licensed under the terms of the MIT license. Both the MIT
license and the original Lua copyright notice are reproduced below.
Please see http://www.ppl-pilot.com/KopiLua for details.
===============================================================================
Lua License
-----------
Lua is licensed under the terms of the MIT license reproduced below.
This means that Lua is free software and can be used for both academic
and commercial purposes at absolutely no cost.
For details and rationale, see http://www.lua.org/license.html .
===============================================================================
Copyright (C) 1994-2008 Lua.org, PUC-Rio.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
===============================================================================
(end of COPYRIGHT)
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A42D438C-34B3-4D3D-8165-8D3779FE16A7}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConsoleTest</RootNamespace>
<AssemblyName>ConsoleTest</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ReleaseVersion>2.x</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\tests\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugKopiLua|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\DebugKopiLua\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseKopiLua|AnyCPU'">
<OutputPath>bin\ReleaseKopiLua\</OutputPath>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\tests\Entity.cs">
<Link>Entity.cs</Link>
</Compile>
<Compile Include="..\tests\TestLua.cs">
<Link>TestLua.cs</Link>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\NLua\NLua.Net40.csproj">
<Project>{F55CABBB-4108-4A39-94E1-581FD46DC021}</Project>
<Name>NLua.Net40</Name>
</ProjectReference>
<ProjectReference Include="..\NLuaTest\NLuaTest.40.csproj">
<Project>{d5fcadfa-5047-40c2-b392-256875862920}</Project>
<Name>NLuaTest.40</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A42D438C-34B3-4D3D-8165-8D3779FE16A7}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConsoleTest</RootNamespace>
<AssemblyName>ConsoleTest</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ReleaseVersion>1.3.2</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\tests\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugKopiLua|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\DebugKopiLua\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseKopiLua|AnyCPU'">
<OutputPath>bin\ReleaseKopiLua\</OutputPath>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\tests\Entity.cs">
<Link>Entity.cs</Link>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<ProjectReference Include="..\Core\KopiLua\KopiLua\KopiLua.Net45.csproj">
<Project>{E8DDBC21-EF74-4ABA-9C49-BFC702BE25D8}</Project>
<Name>KopiLua.Net45</Name>
</ProjectReference>
<ProjectReference Include="..\Core\NLua\NLua.Net45.csproj">
<Project>{F55CABBB-4108-4A39-94E1-581FD46DC021}</Project>
<Name>NLua.Net45</Name>
</ProjectReference>
<ProjectReference Include="..\Core\KeraLua\src\KeraLua.Net45.csproj">
<Project>{47153754-10F5-44D8-B578-F5A32B69061A}</Project>
<Name>KeraLua.Net45</Name>
</ProjectReference>
<ProjectReference Include="..\NLuaTest\NLuaTest.csproj">
<Project>{D5FCADFA-5047-40C2-B392-256875862920}</Project>
<Name>NLuaTest</Name>
</ProjectReference>
</ItemGroup>
</Project>
\ No newline at end of file
EXTRA_DIST =
# Warning: This is an automatically generated file, do not edit!
if ENABLE_DEBUG
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
ASSEMBLY = ../tests/ConsoleTest.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../Run/Debug/net40/NLua.dll \
../tests/NLuaTest.dll
BUILD_DIR = ../tests/
CONSOLETEST_EXE_MDB_SOURCE=../tests/ConsoleTest.exe.mdb
CONSOLETEST_EXE_MDB=$(BUILD_DIR)/ConsoleTest.exe.mdb
CONSOLETEST_EXE_CONFIG_SOURCE=App.config
NLUA_DLL_SOURCE=../Run/Debug/net40/NLua.dll
NLUA_DLL_MDB_SOURCE=../Run/Debug/net40/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../Core/KopiLua/Bin/Debug/net40/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../Core/KopiLua/Bin/Debug/net40/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
NLUATEST_DLL_SOURCE=../tests/NLuaTest.dll
NLUATEST_DLL_MDB_SOURCE=../tests/NLuaTest.dll.mdb
NLUATEST_DLL_MDB=$(BUILD_DIR)/NLuaTest.dll.mdb
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
endif
if ENABLE_DEBUGKOPILUA
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
ASSEMBLY = bin/DebugKopiLua/ConsoleTest.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../Core/NLua/bin/DebugKopiLua/NLua.dll \
../NLuaTest/bin/DebugKopiLua/NLuaTest.dll
BUILD_DIR = bin/DebugKopiLua/
CONSOLETEST_EXE_MDB_SOURCE=bin/DebugKopiLua/ConsoleTest.exe.mdb
CONSOLETEST_EXE_MDB=$(BUILD_DIR)/ConsoleTest.exe.mdb
CONSOLETEST_EXE_CONFIG_SOURCE=App.config
NLUA_DLL_SOURCE=../Core/NLua/bin/DebugKopiLua/NLua.dll
NLUA_DLL_MDB_SOURCE=../Core/NLua/bin/DebugKopiLua/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
NLUATEST_DLL_SOURCE=../NLuaTest/bin/DebugKopiLua/NLuaTest.dll
NLUATEST_DLL_MDB_SOURCE=../NLuaTest/bin/DebugKopiLua/NLuaTest.dll.mdb
NLUATEST_DLL_MDB=$(BUILD_DIR)/NLuaTest.dll.mdb
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
endif
if ENABLE_RELEASE
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ "-define:TRACE"
ASSEMBLY = bin/Release/ConsoleTest.exe
ASSEMBLY_MDB =
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../Run/Release/net40/NLua.dll \
../tests/NLuaTest.dll
BUILD_DIR = bin/Release/
CONSOLETEST_EXE_MDB=
CONSOLETEST_EXE_CONFIG_SOURCE=App.config
NLUA_DLL_SOURCE=../Run/Release/net40/NLua.dll
NLUA_DLL_MDB=
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/Release/net40/KeraLua.dll
KERALUA_DLL_MDB=
KOPILUA_DLL_SOURCE=../Core/KopiLua/Bin/Release/net40/KopiLua.dll
KOPILUA_DLL_MDB=
NLUATEST_DLL_SOURCE=../tests/NLuaTest.dll
NLUATEST_DLL_MDB=
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
endif
if ENABLE_RELEASEKOPILUA
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize-
ASSEMBLY = bin/ReleaseKopiLua/ConsoleTest.exe
ASSEMBLY_MDB =
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../Core/NLua/bin/ReleaseKopiLua/NLua.dll \
../tests/NLuaTest.dll
BUILD_DIR = bin/ReleaseKopiLua/
CONSOLETEST_EXE_MDB=
CONSOLETEST_EXE_CONFIG_SOURCE=App.config
NLUA_DLL_SOURCE=../Core/NLua/bin/ReleaseKopiLua/NLua.dll
NLUA_DLL_MDB=
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/ReleaseKopiLua/KeraLua.dll
KERALUA_DLL_MDB=
KOPILUA_DLL_SOURCE=../Core/KopiLua/KopiLua/bin/ReleaseKopiLua/KopiLua.dll
KOPILUA_DLL_MDB=
NLUATEST_DLL_SOURCE=../tests/NLuaTest.dll
NLUATEST_DLL_MDB=
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
endif
if ENABLE_DEBUG_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
ASSEMBLY = ../tests/ConsoleTest.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../Run/Debug/net40/NLua.dll \
../tests/NLuaTest.dll
BUILD_DIR = ../tests/
CONSOLETEST_EXE_MDB_SOURCE=../tests/ConsoleTest.exe.mdb
CONSOLETEST_EXE_MDB=$(BUILD_DIR)/ConsoleTest.exe.mdb
CONSOLETEST_EXE_CONFIG_SOURCE=App.config
NLUA_DLL_SOURCE=../Run/Debug/net40/NLua.dll
NLUA_DLL_MDB_SOURCE=../Run/Debug/net40/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../Core/KopiLua/Bin/Debug/net40/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../Core/KopiLua/Bin/Debug/net40/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
NLUATEST_DLL_SOURCE=../tests/NLuaTest.dll
NLUATEST_DLL_MDB_SOURCE=../tests/NLuaTest.dll.mdb
NLUATEST_DLL_MDB=$(BUILD_DIR)/NLuaTest.dll.mdb
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
endif
if ENABLE_RELEASE_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ "-define:TRACE"
ASSEMBLY = bin/Release/ConsoleTest.exe
ASSEMBLY_MDB =
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../Run/Release/net40/NLua.dll \
../tests/NLuaTest.dll
BUILD_DIR = bin/Release/
CONSOLETEST_EXE_MDB=
CONSOLETEST_EXE_CONFIG_SOURCE=App.config
NLUA_DLL_SOURCE=../Run/Release/net40/NLua.dll
NLUA_DLL_MDB=
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/Release/net40/KeraLua.dll
KERALUA_DLL_MDB=
KOPILUA_DLL_SOURCE=../Core/KopiLua/Bin/Release/net40/KopiLua.dll
KOPILUA_DLL_MDB=
NLUATEST_DLL_SOURCE=../tests/NLuaTest.dll
NLUATEST_DLL_MDB=
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
endif
if ENABLE_DEBUGKOPILUA_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
ASSEMBLY = bin/DebugKopiLua/ConsoleTest.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../Core/NLua/bin/DebugKopiLua/NLua.dll \
../NLuaTest/bin/DebugKopiLua/NLuaTest.dll
BUILD_DIR = bin/DebugKopiLua/
CONSOLETEST_EXE_MDB_SOURCE=bin/DebugKopiLua/ConsoleTest.exe.mdb
CONSOLETEST_EXE_MDB=$(BUILD_DIR)/ConsoleTest.exe.mdb
CONSOLETEST_EXE_CONFIG_SOURCE=App.config
NLUA_DLL_SOURCE=../Core/NLua/bin/DebugKopiLua/NLua.dll
NLUA_DLL_MDB_SOURCE=../Core/NLua/bin/DebugKopiLua/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
NLUATEST_DLL_SOURCE=../NLuaTest/bin/DebugKopiLua/NLuaTest.dll
NLUATEST_DLL_MDB_SOURCE=../NLuaTest/bin/DebugKopiLua/NLuaTest.dll.mdb
NLUATEST_DLL_MDB=$(BUILD_DIR)/NLuaTest.dll.mdb
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
endif
if ENABLE_RELEASEKOPILUA_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize-
ASSEMBLY = bin/ReleaseKopiLua/ConsoleTest.exe
ASSEMBLY_MDB =
COMPILE_TARGET = exe
PROJECT_REFERENCES = \
../Core/NLua/bin/ReleaseKopiLua/NLua.dll \
../tests/NLuaTest.dll
BUILD_DIR = bin/ReleaseKopiLua/
CONSOLETEST_EXE_MDB=
CONSOLETEST_EXE_CONFIG_SOURCE=App.config
NLUA_DLL_SOURCE=../Core/NLua/bin/ReleaseKopiLua/NLua.dll
NLUA_DLL_MDB=
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/ReleaseKopiLua/KeraLua.dll
KERALUA_DLL_MDB=
KOPILUA_DLL_SOURCE=../Core/KopiLua/KopiLua/bin/ReleaseKopiLua/KopiLua.dll
KOPILUA_DLL_MDB=
NLUATEST_DLL_SOURCE=../tests/NLuaTest.dll
NLUATEST_DLL_MDB=
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
endif
AL=al
SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
PROGRAMFILES = \
$(CONSOLETEST_EXE_MDB) \
$(CONSOLETEST_EXE_CONFIG) \
$(NLUA_DLL) \
$(NLUA_DLL_MDB) \
$(KERALUA_DLL) \
$(KERALUA_DLL_MDB) \
$(KOPILUA_DLL) \
$(KOPILUA_DLL_MDB) \
$(NLUATEST_DLL) \
$(NLUATEST_DLL_MDB) \
$(NUNIT_FRAMEWORK_DLL)
BINARIES = \
$(CONSOLETEST_40)
RESGEN=resgen2
all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES)
FILES = \
../tests/Entity.cs \
../tests/TestLua.cs \
Program.cs \
Properties/AssemblyInfo.cs
DATA_FILES =
RESOURCES =
EXTRAS = \
App.config \
consoletest.40.in
REFERENCES = \
System \
System.Core \
System.Numerics \
System.Xml.Linq \
System.Data \
System.Xml
DLL_REFERENCES =
CLEANFILES = $(PROGRAMFILES) $(BINARIES)
include $(top_srcdir)/Makefile.include
CONSOLETEST_EXE_CONFIG = $(BUILD_DIR)/ConsoleTest.exe.config
NLUA_DLL = $(BUILD_DIR)/NLua.dll
KERALUA_DLL = $(BUILD_DIR)/KeraLua.dll
KOPILUA_DLL = $(BUILD_DIR)/KopiLua.dll
NLUATEST_DLL = $(BUILD_DIR)/NLuaTest.dll
NUNIT_FRAMEWORK_DLL = $(BUILD_DIR)/nunit.framework.dll
CONSOLETEST_40 = $(BUILD_DIR)/consoletest.40
$(eval $(call emit-deploy-target,CONSOLETEST_EXE_CONFIG))
$(eval $(call emit-deploy-target,NLUA_DLL))
$(eval $(call emit-deploy-target,NLUA_DLL_MDB))
$(eval $(call emit-deploy-target,KERALUA_DLL))
$(eval $(call emit-deploy-target,KERALUA_DLL_MDB))
$(eval $(call emit-deploy-target,KOPILUA_DLL))
$(eval $(call emit-deploy-target,KOPILUA_DLL_MDB))
$(eval $(call emit-deploy-target,NLUATEST_DLL))
$(eval $(call emit-deploy-target,NLUATEST_DLL_MDB))
$(eval $(call emit-deploy-target,NUNIT_FRAMEWORK_DLL))
$(eval $(call emit-deploy-wrapper,CONSOLETEST_40,consoletest.40,x))
$(eval $(call emit_resgen_targets))
$(build_xamlg_list): %.xaml.g.cs: %.xaml
xamlg '$<'
$(ASSEMBLY_MDB): $(ASSEMBLY)
$(ASSEMBLY): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
mkdir -p $(shell dirname $(ASSEMBLY))
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NLua;
using NLuaTest.Mock;
using NLuaTest;
namespace ConsoleTest
{
public class Program
{
static public void Method(int a, params int[] others) {
Console.WriteLine (a);
foreach (int val in others)
Console.WriteLine (val);
}
static void Main (string [] args)
{
using (var l = new Lua ()) {
l.LoadCLRPackage ();
l.DoString (" import ('ConsoleTest', 'NLuaTest.Mock') ");
l.DoString (@"
e1 = Entity()
e2 = Entity ('Another world')
e3 = Entity (10)
");
}
}
}
}
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