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" standalone="no"?> <!--*- mode: xml -*--> <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface> <glade-interface>
<widget class="GtkWindow" id="window1"> <widget class="GtkWindow" id="window1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Glade Window</property> <property name="title" translatable="yes">Glade Window</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_CENTER</property> <property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="modal">False</property> <property name="modal">False</property>
<property name="default_width">256</property> <property name="default_width">256</property>
<property name="default_height">256</property> <property name="default_height">256</property>
<property name="resizable">True</property> <property name="resizable">True</property>
<property name="destroy_with_parent">False</property> <property name="destroy_with_parent">False</property>
<property name="decorated">True</property> <property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property> <property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property> <property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property> <property name="focus_on_map">True</property>
<child> <child>
<widget class="GtkScrolledWindow" id="scrolledwindow1"> <widget class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property> <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
<property name="shadow_type">GTK_SHADOW_IN</property> <property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child> <child>
<widget class="GtkLayout" id="layout1"> <widget class="GtkLayout" id="layout1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="width">400</property> <property name="width">400</property>
<property name="height">400</property> <property name="height">400</property>
<property name="hadjustment">0 0 400 10 212.4 236</property> <property name="hadjustment">0 0 400 10 212.4 236</property>
<property name="vadjustment">0 0 400 10 212.4 236</property> <property name="vadjustment">0 0 400 10 212.4 236</property>
<child> <child>
<widget class="GtkLabel" id="label1"> <widget class="GtkLabel" id="label1">
<property name="width_request">38</property> <property name="width_request">38</property>
<property name="height_request">17</property> <property name="height_request">17</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">label1</property> <property name="label" translatable="yes">label1</property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property> <property name="wrap">False</property>
<property name="selectable">False</property> <property name="selectable">False</property>
<property name="xalign">0.5</property> <property name="xalign">0.5</property>
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property> <property name="width_chars">-1</property>
<property name="single_line_mode">False</property> <property name="single_line_mode">False</property>
<property name="angle">0</property> <property name="angle">0</property>
</widget> </widget>
<packing> <packing>
<property name="x">96</property> <property name="x">96</property>
<property name="y">88</property> <property name="y">88</property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkButton" id="button1"> <widget class="GtkButton" id="button1">
<property name="width_request">60</property> <property name="width_request">60</property>
<property name="height_request">27</property> <property name="height_request">27</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">button1</property> <property name="label" translatable="yes">button1</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property> <property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>
</widget> </widget>
<packing> <packing>
<property name="x">88</property> <property name="x">88</property>
<property name="y">168</property> <property name="y">168</property>
</packing> </packing>
</child> </child>
</widget> </widget>
</child> </child>
</widget> </widget>
</child> </child>
</widget> </widget>
</glade-interface> </glade-interface>
luanet.load_assembly "System" luanet.load_assembly "System"
Console = luanet.import_type "System.Console" Console = luanet.import_type "System.Console"
Math = luanet.import_type "System.Math" Math = luanet.import_type "System.Math"
Directory = luanet.import_type "System.IO.Directory" Directory = luanet.import_type "System.IO.Directory"
Console.WriteLine("we are at {0}",Directory.GetCurrentDirectory()) Console.WriteLine("we are at {0}",Directory.GetCurrentDirectory())
Console.WriteLine("sqrt(2) is {0}",Math.Sqrt(2)) Console.WriteLine("sqrt(2) is {0}",Math.Sqrt(2))
require 'CLRPackage' require 'CLRPackage'
import "System" import "System"
Console.WriteLine("sqrt(2) is {0}",Math.Sqrt(2)) Console.WriteLine("sqrt(2) is {0}",Math.Sqrt(2))
#!/home/azisa/bin/luai #!/home/azisa/bin/luai
require 'CLRPackage' require 'CLRPackage'
import "System" import "System"
import "System.IO" import "System.IO"
Console.WriteLine("we are at {0}",Directory.GetCurrentDirectory()) Console.WriteLine("we are at {0}",Directory.GetCurrentDirectory())
#!/home/azisa/bin/luai #!/home/azisa/bin/luai
--- another variant of hello3: look, Ma, no globals! --- another variant of hello3: look, Ma, no globals!
require 'CLRPackage' require 'CLRPackage'
local sys,sysi = luanet.namespace {'System','System.IO'} local sys,sysi = luanet.namespace {'System','System.IO'}
sys.Console.WriteLine("we are at {0}",sysi.Directory.GetCurrentDirectory()) sys.Console.WriteLine("we are at {0}",sysi.Directory.GetCurrentDirectory())
--require("compat-5.1") --require("compat-5.1")
luanet.load_assembly("System") luanet.load_assembly("System")
WebClient=luanet.import_type("System.Net.WebClient") WebClient=luanet.import_type("System.Net.WebClient")
StreamReader=luanet.import_type("System.IO.StreamReader") StreamReader=luanet.import_type("System.IO.StreamReader")
Math=luanet.import_type("System.Math") Math=luanet.import_type("System.Math")
print(Math:Pow(2,3)) print(Math:Pow(2,3))
myWebClient = WebClient() myWebClient = WebClient()
myStream = myWebClient:OpenRead(arg[1]) myStream = myWebClient:OpenRead(arg[1])
sr = StreamReader(myStream) sr = StreamReader(myStream)
line=sr:ReadLine() line=sr:ReadLine()
repeat repeat
print(line) print(line)
line=sr:ReadLine() line=sr:ReadLine()
until not line until not line
myStream:Close() myStream:Close()
--require("compat-5.1") --require("compat-5.1")
System=luanet.System System=luanet.System
WebClient=System.Net.WebClient WebClient=System.Net.WebClient
StreamReader=System.IO.StreamReader StreamReader=System.IO.StreamReader
Math=System.Math Math=System.Math
print(Math:Pow(2,3)) print(Math:Pow(2,3))
myWebClient = WebClient() myWebClient = WebClient()
myStream = myWebClient:OpenRead(arg[1]) myStream = myWebClient:OpenRead(arg[1])
sr = StreamReader(myStream) sr = StreamReader(myStream)
line=sr:ReadLine() line=sr:ReadLine()
repeat repeat
print(line) print(line)
line=sr:ReadLine() line=sr:ReadLine()
until not line until not line
myStream:Close() myStream:Close()
require("CLRPackage") require("CLRPackage")
Forms = CLRPackage("System.Windows.Forms", "System.Windows.Forms") Forms = CLRPackage("System.Windows.Forms", "System.Windows.Forms")
Drawing = CLRPackage("System.Drawing", "System.Drawing") Drawing = CLRPackage("System.Drawing", "System.Drawing")
NLua = CLRPackage("NLua", "NLua") NLua = CLRPackage("NLua", "NLua")
IO = CLRPackage("System.IO", "System.IO") IO = CLRPackage("System.IO", "System.IO")
System = CLRPackage("System", "System") System = CLRPackage("System", "System")
Form=Forms.Form Form=Forms.Form
TextBox=Forms.TextBox TextBox=Forms.TextBox
Label=Forms.Label Label=Forms.Label
ListBox=Forms.ListBox ListBox=Forms.ListBox
Button=Forms.Button Button=Forms.Button
Point=Drawing.Point Point=Drawing.Point
Size=Drawing.Size Size=Drawing.Size
Lua=NLua.Lua Lua=NLua.Lua
OpenFileDialog=Forms.OpenFileDialog OpenFileDialog=Forms.OpenFileDialog
File=IO.File File=IO.File
StreamReader=IO.StreamReader StreamReader=IO.StreamReader
FileMode=IO.FileMode FileMode=IO.FileMode
ScrollBars=Forms.ScrollBars ScrollBars=Forms.ScrollBars
FormBorderStyle=Forms.FormBorderStyle FormBorderStyle=Forms.FormBorderStyle
FormStartPosition=Forms.FormStartPosition FormStartPosition=Forms.FormStartPosition
function clear_click(sender,args) function clear_click(sender,args)
code:Clear() code:Clear()
end end
function execute_click(sender,args) function execute_click(sender,args)
results.Items:Clear() results.Items:Clear()
result=lua:DoString(code.Text) result=lua:DoString(code.Text)
if result then if result then
for i=0,result.Length-1 do for i=0,result.Length-1 do
results.Items:Add(result[i]) results.Items:Add(result[i])
end end
end end
end end
function load_click(sender,args) function load_click(sender,args)
open_file:ShowDialog() open_file:ShowDialog()
file=StreamReader(open_file.FileName) file=StreamReader(open_file.FileName)
code.Text=file:ReadToEnd() code.Text=file:ReadToEnd()
file:Close() file:Close()
end end
form = Form() form = Form()
code = TextBox() code = TextBox()
label1 = Label() label1 = Label()
execute = Button() execute = Button()
clear = Button() clear = Button()
results = ListBox() results = ListBox()
label2 = Label() label2 = Label()
load = Button() load = Button()
lua = Lua() lua = Lua()
--lua:OpenBaseLib() -- steffenj: Open*Lib() functions no longer exist --lua:OpenBaseLib() -- steffenj: Open*Lib() functions no longer exist
open_file = OpenFileDialog() open_file = OpenFileDialog()
form:SuspendLayout() form:SuspendLayout()
code.Location = Point(16, 24) code.Location = Point(16, 24)
code.Multiline = true code.Multiline = true
code.Name = "Code" code.Name = "Code"
code.Size = Size(440, 128) code.Size = Size(440, 128)
code.ScrollBars = ScrollBars.Vertical code.ScrollBars = ScrollBars.Vertical
code.TabIndex = 0 code.TabIndex = 0
code.Text = "" code.Text = ""
label1.Location = Point(16, 8) label1.Location = Point(16, 8)
label1.Name = "label1" label1.Name = "label1"
label1.Size = Size(100, 16) label1.Size = Size(100, 16)
label1.TabIndex = 1 label1.TabIndex = 1
label1.Text = "Lua Code:" label1.Text = "Lua Code:"
execute.Location = Point(96, 160) execute.Location = Point(96, 160)
execute.Name = "Execute" execute.Name = "Execute"
execute.TabIndex = 2 execute.TabIndex = 2
execute.Text = "Execute" execute.Text = "Execute"
execute.Click:Add(execute_click) execute.Click:Add(execute_click)
clear.Location = Point(176, 160) clear.Location = Point(176, 160)
clear.Name = "Clear" clear.Name = "Clear"
clear.TabIndex = 3 clear.TabIndex = 3
clear.Text = "Clear" clear.Text = "Clear"
clear.Click:Add(clear_click) clear.Click:Add(clear_click)
results.Location = Point(16, 208) results.Location = Point(16, 208)
results.Name = "Results" results.Name = "Results"
results.Size = Size(440, 95) results.Size = Size(440, 95)
results.TabIndex = 4 results.TabIndex = 4
label2.Location = Point(16, 192) label2.Location = Point(16, 192)
label2.Name = "label2" label2.Name = "label2"
label2.Size = Size(100, 16) label2.Size = Size(100, 16)
label2.TabIndex = 5 label2.TabIndex = 5
label2.Text = "Results:" label2.Text = "Results:"
load.Location = Point(16, 160) load.Location = Point(16, 160)
load.Name = "Load" load.Name = "Load"
load.TabIndex = 6 load.TabIndex = 6
load.Text = "Load..." load.Text = "Load..."
load.Click:Add(load_click) load.Click:Add(load_click)
open_file.DefaultExt = "lua" open_file.DefaultExt = "lua"
open_file.Filter = "Lua Scripts|*.lua|All Files|*.*" open_file.Filter = "Lua Scripts|*.lua|All Files|*.*"
open_file.Title = "Pick a File" open_file.Title = "Pick a File"
form.AutoScaleBaseSize = Size(5, 13) form.AutoScaleBaseSize = Size(5, 13)
form.ClientSize = Size(472, 315) form.ClientSize = Size(472, 315)
form.Controls:Add(load) form.Controls:Add(load)
form.Controls:Add(label2) form.Controls:Add(label2)
form.Controls:Add(results) form.Controls:Add(results)
form.Controls:Add(clear) form.Controls:Add(clear)
form.Controls:Add(execute) form.Controls:Add(execute)
form.Controls:Add(label1) form.Controls:Add(label1)
form.Controls:Add(code) form.Controls:Add(code)
form.Name = "MainForm" form.Name = "MainForm"
form.Text = "LuaNet" form.Text = "LuaNet"
form.FormBorderStyle = FormBorderStyle.Fixed3D form.FormBorderStyle = FormBorderStyle.Fixed3D
form.StartPosition = FormStartPosition.CenterScreen form.StartPosition = FormStartPosition.CenterScreen
form:ResumeLayout(false) form:ResumeLayout(false)
form:ShowDialog() form:ShowDialog()
--require("compat-5.1") --require("compat-5.1")
Forms=luanet.System.Windows.Forms Forms=luanet.System.Windows.Forms
Drawing=luanet.System.Drawing Drawing=luanet.System.Drawing
NLua=luanet.NLua NLua=luanet.NLua
IO=luanet.System.IO IO=luanet.System.IO
Form=Forms.Form Form=Forms.Form
TextBox=Forms.TextBox TextBox=Forms.TextBox
Label=Forms.Label Label=Forms.Label
ListBox=Forms.ListBox ListBox=Forms.ListBox
Button=Forms.Button Button=Forms.Button
Point=Drawing.Point Point=Drawing.Point
Size=Drawing.Size Size=Drawing.Size
Lua=NLua.Lua Lua=NLua.Lua
OpenFileDialog=Forms.OpenFileDialog OpenFileDialog=Forms.OpenFileDialog
File=IO.File File=IO.File
StreamReader=IO.StreamReader StreamReader=IO.StreamReader
FileMode=IO.FileMode FileMode=IO.FileMode
ScrollBars=Forms.ScrollBars ScrollBars=Forms.ScrollBars
FormBorderStyle=Forms.FormBorderStyle FormBorderStyle=Forms.FormBorderStyle
FormStartPosition=Forms.FormStartPosition FormStartPosition=Forms.FormStartPosition
function clear_click(sender,args) function clear_click(sender,args)
code:Clear() code:Clear()
end end
function execute_click(sender,args) function execute_click(sender,args)
results.Items:Clear() results.Items:Clear()
result=lua:DoString(code.Text) result=lua:DoString(code.Text)
if result then if result then
for i=0,result.Length-1 do for i=0,result.Length-1 do
results.Items:Add(result[i]) results.Items:Add(result[i])
end end
end end
end end
function load_click(sender,args) function load_click(sender,args)
open_file:ShowDialog() open_file:ShowDialog()
file=StreamReader(open_file.FileName) file=StreamReader(open_file.FileName)
code.Text=file:ReadToEnd() code.Text=file:ReadToEnd()
file:Close() file:Close()
end end
form = Form() form = Form()
code = TextBox() code = TextBox()
label1 = Label() label1 = Label()
execute = Button() execute = Button()
clear = Button() clear = Button()
results = ListBox() results = ListBox()
label2 = Label() label2 = Label()
load = Button() load = Button()
lua = Lua() lua = Lua()
--lua:OpenBaseLib() -- steffenj: Open*Lib() functions no longer exist --lua:OpenBaseLib() -- steffenj: Open*Lib() functions no longer exist
open_file = OpenFileDialog() open_file = OpenFileDialog()
form:SuspendLayout() form:SuspendLayout()
code.Location = Point(16, 24) code.Location = Point(16, 24)
code.Multiline = true code.Multiline = true
code.Name = "Code" code.Name = "Code"
code.Size = Size(440, 128) code.Size = Size(440, 128)
code.ScrollBars = ScrollBars.Vertical code.ScrollBars = ScrollBars.Vertical
code.TabIndex = 0 code.TabIndex = 0
code.Text = "" code.Text = ""
label1.Location = Point(16, 8) label1.Location = Point(16, 8)
label1.Name = "label1" label1.Name = "label1"
label1.Size = Size(100, 16) label1.Size = Size(100, 16)
label1.TabIndex = 1 label1.TabIndex = 1
label1.Text = "Lua Code:" label1.Text = "Lua Code:"
execute.Location = Point(96, 160) execute.Location = Point(96, 160)
execute.Name = "Execute" execute.Name = "Execute"
execute.TabIndex = 2 execute.TabIndex = 2
execute.Text = "Execute" execute.Text = "Execute"
execute.Click:Add(execute_click) execute.Click:Add(execute_click)
clear.Location = Point(176, 160) clear.Location = Point(176, 160)
clear.Name = "Clear" clear.Name = "Clear"
clear.TabIndex = 3 clear.TabIndex = 3
clear.Text = "Clear" clear.Text = "Clear"
clear.Click:Add(clear_click) clear.Click:Add(clear_click)
results.Location = Point(16, 208) results.Location = Point(16, 208)
results.Name = "Results" results.Name = "Results"
results.Size = Size(440, 95) results.Size = Size(440, 95)
results.TabIndex = 4 results.TabIndex = 4
label2.Location = Point(16, 192) label2.Location = Point(16, 192)
label2.Name = "label2" label2.Name = "label2"
label2.Size = Size(100, 16) label2.Size = Size(100, 16)
label2.TabIndex = 5 label2.TabIndex = 5
label2.Text = "Results:" label2.Text = "Results:"
load.Location = Point(16, 160) load.Location = Point(16, 160)
load.Name = "Load" load.Name = "Load"
load.TabIndex = 6 load.TabIndex = 6
load.Text = "Load..." load.Text = "Load..."
load.Click:Add(load_click) load.Click:Add(load_click)
open_file.DefaultExt = "lua" open_file.DefaultExt = "lua"
open_file.Filter = "Lua Scripts|*.lua|All Files|*.*" open_file.Filter = "Lua Scripts|*.lua|All Files|*.*"
open_file.Title = "Pick a File" open_file.Title = "Pick a File"
form.AutoScaleBaseSize = Size(5, 13) form.AutoScaleBaseSize = Size(5, 13)
form.ClientSize = Size(472, 315) form.ClientSize = Size(472, 315)
form.Controls:Add(load) form.Controls:Add(load)
form.Controls:Add(label2) form.Controls:Add(label2)
form.Controls:Add(results) form.Controls:Add(results)
form.Controls:Add(clear) form.Controls:Add(clear)
form.Controls:Add(execute) form.Controls:Add(execute)
form.Controls:Add(label1) form.Controls:Add(label1)
form.Controls:Add(code) form.Controls:Add(code)
form.Name = "MainForm" form.Name = "MainForm"
form.Text = "LuaNet" form.Text = "LuaNet"
form.FormBorderStyle = FormBorderStyle.Fixed3D form.FormBorderStyle = FormBorderStyle.Fixed3D
form.StartPosition = FormStartPosition.CenterScreen form.StartPosition = FormStartPosition.CenterScreen
form:ResumeLayout(false) form:ResumeLayout(false)
form:ShowDialog() form:ShowDialog()
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