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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>NLuaTest</string>
<key>CFBundleIdentifier</key>
<string>org.nlua.nluatest</string>
<key>MinimumOSVersion</key>
<string>7.1</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleIconFiles</key>
<array>
<string>Icons/Icon-Small@2x</string>
<string>Icons/Icon</string>
<string>Icons/Icon@2x</string>
<string>Icons/Icon-72</string>
<string>Icons/Icon-72@2x</string>
<string>Icons/Icon-Small</string>
<string>Icons/Icon-Small-50</string>
<string>Icons/Icon-Small-50@2x</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
<key>NSMainNibFile</key>
<string></string>
<key>NSMainNibFile~ipad</key>
<string></string>
<key>MKDirectionsApplicationSupportedModes</key>
<array/>
</dict>
</plist>
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace NLuaTestsiOS
{
public class Application
{
// This is the main entry point of the application.
static void Main (string[] args)
{
// if you want to use a different Application Delegate class from "UnitTestAppDelegate"
// you can specify it here.
UIApplication.Main (args, null, "UnitTestAppDelegate");
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProjectGuid>{2DC0E43A-21B8-41FF-8793-60AB50350977}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>NLuaTest</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>NLuaTest</AssemblyName>
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG;MONOTOUCH</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchDebug>True</MtouchDebug>
<MtouchLink>None</MtouchLink>
<MtouchI18n>
</MtouchI18n>
<MtouchArch>x86_64</MtouchArch>
<MtouchUseRefCounting>true</MtouchUseRefCounting>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchI18n>
</MtouchI18n>
<MtouchArch>x86_64</MtouchArch>
<MtouchUseLlvm>True</MtouchUseLlvm>
<MtouchUseSGen>True</MtouchUseSGen>
<MtouchUseRefCounting>True</MtouchUseRefCounting>
<DefineConstants>MONOTOUCH</DefineConstants>
<MtouchLink>None</MtouchLink>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG;MONOTOUCH</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>True</MtouchDebug>
<MtouchI18n>
</MtouchI18n>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<MtouchLink>None</MtouchLink>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<IpaPackageName>
</IpaPackageName>
<MtouchI18n>
</MtouchI18n>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<BuildIpa>True</BuildIpa>
<DefineConstants>MONOTOUCH</DefineConstants>
<MtouchUseLlvm>True</MtouchUseLlvm>
<MtouchUseSGen>True</MtouchUseSGen>
<MtouchUseRefCounting>True</MtouchUseRefCounting>
<MtouchLink>None</MtouchLink>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<BuildIpa>True</BuildIpa>
<ConsolePause>False</ConsolePause>
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
<CodesignKey>iPhone Distribution</CodesignKey>
<IpaPackageName>
</IpaPackageName>
<MtouchI18n>
</MtouchI18n>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<MtouchUseLlvm>true</MtouchUseLlvm>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\iPhone\AppStore</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<CodesignKey>iPhone Distribution</CodesignKey>
<CodesignProvision>Automatic:AppStore</CodesignProvision>
<MtouchI18n>
</MtouchI18n>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<MtouchUseLlvm>true</MtouchUseLlvm>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="MonoTouch.NUnitLite" />
<Reference Include="System.Numerics" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<BundleResource Include="..\..\tests\test_32.luac">
<Link>Resources\test_32.luac</Link>
</BundleResource>
<None Include="Info.plist" />
<BundleResource Include="..\..\tests\test_64.luac">
<Link>Resources\test_64.luac</Link>
</BundleResource>
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="UnitTestAppDelegate.cs" />
<Compile Include="..\..\tests\Entity.cs">
<Link>Entity.cs</Link>
</Compile>
<Compile Include="..\..\tests\LuaTests.cs">
<Link>LuaTests.cs</Link>
</Compile>
<Compile Include="..\..\tests\TestLua.cs">
<Link>TestLua.cs</Link>
</Compile>
<Compile Include="..\..\tests\Core.cs">
<Link>Core.cs</Link>
</Compile>
<Compile Include="NLuaTests.cs" />
<Compile Include="..\..\NLuaTest\LoadFileTests.cs">
<Link>LoadFileTests.cs</Link>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\..\Core\NLua\NLua.iOS.csproj">
<Project>{7064B157-DD57-4828-94C5-CA149B25CB40}</Project>
<Name>NLua.iOS</Name>
</ProjectReference>
<ProjectReference Include="..\..\Core\KeraLua\src\KeraLua.iOS.csproj">
<Project>{3F57C208-AA13-4B67-B3E7-ED41307F00A0}</Project>
<Name>KeraLua.iOS</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BundleResource Include="..\..\tests\test.lua">
<Link>test.lua</Link>
</BundleResource>
<BundleResource Include="Icons\Icon-72.png" />
<BundleResource Include="Icons\Icon-72%402x.png" />
<BundleResource Include="Icons\Icon-Small-50.png" />
<BundleResource Include="Icons\Icon-Small-50%402x.png" />
<BundleResource Include="Icons\Icon-Small.png" />
<BundleResource Include="Icons\Icon-Small%402x.png" />
<BundleResource Include="Icons\Icon.png" />
<BundleResource Include="Icons\Icon%402x.png" />
<BundleResource Include="..\..\tests\LuaTests\core\bisect.lua">
<Link>LuaTests\core\bisect.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\cf.lua">
<Link>LuaTests\core\cf.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\env.lua">
<Link>LuaTests\core\env.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\factorial.lua">
<Link>LuaTests\core\factorial.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\fib.lua">
<Link>LuaTests\core\fib.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\fibfor.lua">
<Link>LuaTests\core\fibfor.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\life.lua">
<Link>LuaTests\core\life.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\printf.lua">
<Link>LuaTests\core\printf.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\readonly.lua">
<Link>LuaTests\core\readonly.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\sieve.lua">
<Link>LuaTests\core\sieve.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\sort.lua">
<Link>LuaTests\core\sort.lua</Link>
</BundleResource>
<BundleResource Include="..\..\tests\LuaTests\core\trace-globals.lua">
<Link>LuaTests\core\trace-globals.lua</Link>
</BundleResource>
</ItemGroup>
<ItemGroup>
<ITunesArtwork Include="iTunesArtwork" />
<ITunesArtwork Include="iTunesArtwork%402x" />
</ItemGroup>
</Project>
\ No newline at end of file
using System;
using NUnit.Framework;
using NLua;
using NLuaTest.Mock;
#if MONOTOUCH
using Foundation;
using MonoTouch;
#endif
namespace NLuaTest
{
[TestFixture]
#if MONOTOUCH
[Preserve (AllMembers = true)]
#endif
public class ANLuaTests
{
/*
* Tests capturing an exception
*/
[Test]
public void TestCLRPackage ()
{
using (Lua lua = new Lua ()) {
lua.LoadCLRPackage ();
lua.DoString ("import ('NLuaTest', 'NLuaTest.Mock') ");
lua.DoString ("test = TestClass()");
lua.DoString ("test:setVal(3)");
object[] res = lua.DoString ("return test");
TestClass test = (TestClass)res [0];
Assert.AreEqual (3, test.testval);
}
}
#if MONOTOUCH
[Test]
public void TestUseNSUrl ()
{
using (Lua lua = new Lua ()) {
lua.LoadCLRPackage ();
lua.DoString ("import ('Xamarin.iOS', 'Foundation') ");
lua.DoString ("testURL = NSUrl('http://nlua.org/?query=param')");
lua.DoString ("host = testURL.Host");
object res = lua["host"];
string host = (string)res;
Assert.AreEqual ("nlua.org", host);
}
}
#endif
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
using MonoTouch.NUnit.UI;
namespace NLuaTestsiOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register ("UnitTestAppDelegate")]
public partial class UnitTestAppDelegate : UIApplicationDelegate
{
// class-level declarations
UIWindow window;
TouchRunner runner;
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// create a new window instance based on the screen size
window = new UIWindow (UIScreen.MainScreen.Bounds);
runner = new TouchRunner (window);
//runner.AutoStart = true;
runner.TerminateAfterExecution = true;
// register every tests included in the main application/assembly
runner.Add (System.Reflection.Assembly.GetExecutingAssembly ());
window.RootViewController = new UINavigationController (runner.GetViewController ());
// make the window visible
window.MakeKeyAndVisible ();
return true;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>NLua</id>
<version>1.2.2.14</version>
<title>NLua is the bind between Lua and the .NET</title>
<authors>viniciusjarina</authors>
<owners>viniciusjarina</owners>
<projectUrl>http://nlua.org</projectUrl>
<iconUrl>https://secure.gravatar.com/avatar/77ecf0fb9d8419be7715c6e822e66562?s=32</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>NLua Package.</description>
<summary>NLua allow use Lua from C#, using Windows, Linux, Mac, iOS , Android, Windows Phone 7 and Windows Phone 8.</summary>
<releaseNotes>NLua 1.2.0
Port to Android 15+ (armeabi, v7a, x86)
Updated Lua 5.2.2 (patch 7)
Lot of Bug fixes.
NLua 1.1.0
Port to WP7 (Thanks to Mangatome)
NLua now using Lua 5.2.2
Bug fixes.</releaseNotes>
<copyright>Copyright (c) 2014 Vinicius Jarina (viniciusjarina@gmail.com)</copyright>
<language />
<tags>Lua Script NLua LuaInterface</tags>
</metadata>
<files>
<file src="lib\MonoAndroid\KeraLua.Android.dll" target="lib\MonoAndroid\KeraLua.Android.dll" />
<file src="lib\MonoAndroid\KeraLua.Android.dll.mdb" target="lib\MonoAndroid\KeraLua.Android.dll.mdb" />
<file src="lib\MonoAndroid\NLua.Android.dll" target="lib\MonoAndroid\NLua.Android.dll" />
<file src="lib\MonoMac\KeraLua.dll" target="lib\MonoMac\KeraLua.dll" />
<file src="lib\MonoMac\liblua52.dylib" target="lib\MonoMac\liblua52.dylib" />
<file src="lib\MonoMac\NLua.dll" target="lib\MonoMac\NLua.dll" />
<file src="lib\MonoTouch\KeraLua.iOS.dll" target="lib\MonoTouch\KeraLua.iOS.dll" />
<file src="lib\MonoTouch\NLua.iOS.dll" target="lib\MonoTouch\NLua.iOS.dll" />
<file src="lib\native\x64\lua52.dll" target="lib\native\x64\lua52.dll" />
<file src="lib\native\x86\lua52.dll" target="lib\native\x86\lua52.dll" />
<file src="lib\net35\x64\KeraLua.dll" target="lib\net35\x64\KeraLua.dll" />
<file src="lib\net35\x64\NLua.dll" target="lib\net35\x64\NLua.dll" />
<file src="lib\net35\x86\KeraLua.dll" target="lib\net35\x86\KeraLua.dll" />
<file src="lib\net35\x86\NLua.dll" target="lib\net35\x86\NLua.dll" />
<file src="lib\net40\x64\KeraLua.dll" target="lib\net40\x64\KeraLua.dll" />
<file src="lib\net40\x64\NLua.dll" target="lib\net40\x64\NLua.dll" />
<file src="lib\net40\x86\KeraLua.dll" target="lib\net40\x86\KeraLua.dll" />
<file src="lib\net40\x86\NLua.dll" target="lib\net40\x86\NLua.dll" />
<file src="lib\net45\x64\KeraLua.dll" target="lib\net45\x64\KeraLua.dll" />
<file src="lib\net45\x64\NLua.dll" target="lib\net45\x64\NLua.dll" />
<file src="lib\net45\x86\KeraLua.dll" target="lib\net45\x86\KeraLua.dll" />
<file src="lib\net45\x86\NLua.dll" target="lib\net45\x86\NLua.dll" />
<file src="lib\sl4-wp71\KopiLua-wp7.dll" target="lib\sl4-wp71\KopiLua-wp7.dll" />
<file src="lib\sl4-wp71\NLua.WP7.dll" target="lib\sl4-wp71\NLua.WP7.dll" />
<file src="tools\net35\GetLibLuaPostBuildCmd.ps1" target="tools\net35\GetLibLuaPostBuildCmd.ps1" />
<file src="tools\net35\install.ps1" target="tools\net35\install.ps1" />
<file src="tools\net35\uninstall.ps1" target="tools\net35\uninstall.ps1" />
<file src="tools\net40\GetLibLuaPostBuildCmd.ps1" target="tools\net40\GetLibLuaPostBuildCmd.ps1" />
<file src="tools\net40\install.ps1" target="tools\net40\install.ps1" />
<file src="tools\net40\uninstall.ps1" target="tools\net40\uninstall.ps1" />
<file src="tools\net45\GetLibLuaPostBuildCmd.ps1" target="tools\net45\GetLibLuaPostBuildCmd.ps1" />
<file src="tools\net45\install.ps1" target="tools\net45\install.ps1" />
<file src="tools\net45\uninstall.ps1" target="tools\net45\uninstall.ps1" />
</files>
</package>
\ No newline at end of file

if ([System.IntPtr]::Size -eq 8) {
$arch = "x64\*.*"
} elseif (([System.IntPtr]::Size -eq 4) -and (Test-Path Env:\PROCESSOR_ARCHITEW6432)) {
$arch = "x64\*.*"
} elseif ([System.IntPtr]::Size -eq 4) {
$arch = "x86\*.*"
}
$nativePath = $(Join-Path $installPath "lib\native")
$nativePath = $(Join-Path $nativePath $arch)
$LibLuaPostBuildCmd = "
xcopy /s /y `"$nativePath`" `"`$(TargetDir)`""
param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath "GetLibLuaPostBuildCmd.ps1")
# Get the current Post Build Event cmd
$currentPostBuildCmd = $project.Properties.Item("PostBuildEvent").Value
# Append our post build command if it's not already there
if (!$currentPostBuildCmd.Contains($LibLuaPostBuildCmd)) {
$project.Properties.Item("PostBuildEvent").Value += $LibLuaPostBuildCmd
}
\ No newline at end of file
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