This commit is contained in:
Igor Timofeev 2017-01-23 14:18:31 +03:00
parent 96352955e8
commit 8da91a4c5a
2 changed files with 98 additions and 172 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -6833,7 +6833,7 @@ return {
-- hash256 = hash256,
-- hash224 = hash224,
-- new256 = new256,
}Flib/advancedLua.lua*
}Flib/advancedLua.lua*
--[[
Advanced Lua Library v1.1 by ECS
@ -6951,15 +6951,15 @@ end
-------------------------------------------------- Table extensions --------------------------------------------------
local function doSerialize(array, text, prettyLook, indentationSymbol, oldIndentationSymbol, equalsSymbol, currentRecusrionStack, recursionStackLimit)
text = {"{"}
local function doSerialize(array, prettyLook, indentationSymbol, indentationSymbolAdder, equalsSymbol, currentRecusrionStack, recursionStackLimit)
local text, keyType, valueType, stringValue = {"{"}
table.insert(text, (prettyLook and "\n" or nil))
for key, value in pairs(array) do
local keyType, valueType, stringValue = type(key), type(value), tostring(value)
keyType, valueType, stringValue = type(key), type(value), tostring(value)
if keyType == "number" or keyType == "string" then
table.insert(text, (prettyLook and indentationSymbol or nil))
table.insert(text, (prettyLook and table.concat({indentationSymbol, indentationSymbolAdder}) or nil))
table.insert(text, "[")
table.insert(text, (keyType == "string" and table.concat({"\"", key, "\""}) or key))
table.insert(text, "]")
@ -6974,33 +6974,48 @@ local function doSerialize(array, text, prettyLook, indentationSymbol, oldIndent
elseif valueType == "table" then
-- Ограничение Ñ<>Ñека рекурÑ<E282AC>ии
if currentRecusrionStack < recursionStackLimit then
table.insert(text, table.concat(doSerialize(value, text, prettyLook, table.concat({indentationSymbol, indentationSymbol}), table.concat({oldIndentationSymbol, indentationSymbol}), equalsSymbol, currentRecusrionStack + 1, recursionStackLimit)))
table.insert(text, table.concat(doSerialize(value, prettyLook, table.concat({indentationSymbol, indentationSymbolAdder}), indentationSymbolAdder, equalsSymbol, currentRecusrionStack + 1, recursionStackLimit)))
else
table.insert(text, "...")
end
else
-- error("Unsupported table value type: " .. valueType)
end
table.insert(text, ",")
table.insert(text, (prettyLook and "\n" or nil))
else
-- error("Unsupported table key type: " .. keyType)
end
end
table.remove(text, (prettyLook and #text - 1 or #text))
table.insert(text, (prettyLook and oldIndentationSymbol or nil))
-- УдалÑ<C2BB>ем запÑ<C2BF>Ñую
if prettyLook then
if #text > 2 then
table.remove(text, #text - 1)
end
-- ÐÑ<E28099>ÑавлÑ<C2BB>ем заодно уж Ñ<>имвол индентации, благо чек на притти лук идет
table.insert(text, indentationSymbol)
else
if #text > 1 then
table.remove(text, #text)
end
end
table.insert(text, "}")
return text
end
function table.serialize(array, prettyLook, indentationWidth, indentUsingTabs, recursionStackLimit)
checkArg(1, array, "table")
indentationWidth = indentationWidth or 2
local indentationSymbol = indentUsingTabs and " " or " "
indentationSymbol, indentationSymbolHalf = string.rep(indentationSymbol, indentationWidth)
return table.concat(doSerialize(array, {}, prettyLook, indentationSymbol, "", prettyLook and " = " or "=", 1, recursionStackLimit or math.huge))
return table.concat(
doSerialize(
array,
prettyLook,
"",
string.rep(indentUsingTabs and " " or " ", indentationWidth or 2),
prettyLook and " = " or "=",
1,
recursionStackLimit or math.huge
)
)
end
function table.unserialize(serializedString)
@ -7009,13 +7024,8 @@ function table.unserialize(serializedString)
if success then return result else return nil, result end
end
function table.toString(...)
return table.serialize(...)
end
function table.fromString(...)
return table.unserialize(...)
end
table.toString = table.serialize
table.fromString = table.unserialize
function table.toFile(path, array, prettyLook, indentationWidth, indentUsingTabs, recursionStackLimit, appendToFile)
checkArg(1, path, "string")
@ -7200,16 +7210,26 @@ end
-------------------------------------------------- Playground --------------------------------------------------
-- local function safeCall(method, ...)
-- local arguments = {...}
-- return xpcall(function() return method(table.unpack(arguments)) end, debug.traceback)
-- end
-- local t = {
-- abc = 123,
-- def = {
-- cyka = "pidor",
-- vagina = {
-- chlen = 555,
-- devil = 666,
-- god = 777,
-- serost = {
-- tripleTable = "aefaef",
-- aaa = "bbb",
-- ccc = 123,
-- }
-- }
-- },
-- ghi = "HEHE",
-- emptyTable = {},
-- }
-- local function safeCallString(str)
-- return safeCall(load(str))
-- end
-- print(safeCallString("return 123"))
-- print(table.toString(t, true))
------------------------------------------------------------------------------------------------------------------
@ -8560,7 +8580,7 @@ do
end
end
return colorsFlib/compressor.lua1
return colorsFlib/compressor.luaP
local unicode = require("unicode")
local fs = require("filesystem")
local compressor = {}
@ -8743,6 +8763,7 @@ function compressor.unpack(pathToCompressedFile, pathWhereToUnpack, showInfo)
file:write(compressedFile:read(size))
file:close()
else
compressedFile:read(size)
info(showInfo, "Failed to open file for writing while unpacking: " .. tostring(reason))
end
elseif not type then
@ -18329,7 +18350,7 @@ setmetatable(sides, metatable)
-------------------------------------------------------------------------------
return sides
Flib/syntax.luaÒ
Flib/syntax.lua
require("advancedLua")
local buffer = require("doubleBuffering")
local unicode = require("unicode")
@ -18360,13 +18381,13 @@ syntax.colorScheme = {
}
syntax.patterns = {
--Комментарии
-- Комментарии
{ "%-%-.+", "comments", 0, 0 },
--Строки
-- Строки
{ "\"[^\"]+\"", "strings", 0, 0 },
--Циклы, уÑ<C692>ловиÑ<C2B8>, объÑ<C5A0>влениÑ<C2B8>
-- Циклы, уÑ<C692>ловиÑ<C2B8> и прочаÑ<C2B0> поебень
{ "while ", "loops", 0, 1 },
{ "do$", "loops", 0, 0 },
{ "do ", "loops", 0, 1 },
@ -18387,7 +18408,7 @@ syntax.patterns = {
{ " break$", "loops", 0, 0 },
{ " break ", "loops", 0, 0 },
--СоÑ<EFBFBD>ÑоÑ<EFBFBD>ниÑ<EFBFBD> переменной
-- ИÑ<CB9C>Ñина, ложь, нулл
{ "true", "boolean", 0, 0 },
{ "false", "boolean", 0, 0 },
{ "nil", "boolean", 0, 0 },
@ -18396,16 +18417,18 @@ syntax.patterns = {
{ "[%s%=%{%(][^%s%(%)%{%}%[%]]+%(", "functions", 1, 1 },
{ "^[^%s%(%)%{%}%[%]]+%(", "functions", 0, 1 },
--ÐогичеÑ<C2B5>кие вÑражениÑ<C2B8>
-- ÐогичеÑ<EFBFBD>кие вÑражениÑ<C2B8>
{ " and ", "logic", 0, 1 },
{ " or ", "logic", 0, 1 },
{ " not ", "logic", 0, 1 },
-- КонкаÑенациÑ<C2B8> Ñ<>Ñрок
{ "[^%d]%.+[^%d]", "logic", 1, 1 },
--СравнениÑ<C2B8> и мат. операции
-- СравнениÑ<EFBFBD> и мат. операции
{ "[%>%<%=%~%+%-%*%/%^%#%%]", "compares", 0, 0 },
--ЧиÑ<C2B8>ла
-- ЧиÑ<EFBFBD>ла
{ "0x%w+", "numbers", 0, 0 },
{ "[^%a%d][%.%d]+$", "numbers", 1, 0 },
{ "[^%a%d][%.%d]+[^%a%d]", "numbers", 1, 1 },
@ -18413,7 +18436,7 @@ syntax.patterns = {
----------------------------------------------------------------------------------------------------------------------------------------
--Ð<EFBFBD>ариÑ<EFBFBD>оваÑÑŒ и подÑ<C2B4>веÑиÑÑŒ Ñ<>Ñроку
-- ОÑриÑ<C2B8>овка Ñ<>Ñроки Ñ<> подÑ<C2B4>веченнÑм Ñ<>инÑакÑ<C2BA>иÑ<C2B8>ом
function syntax.highlightString(x, y, str, indentationWidth)
if y >= buffer.drawLimit.y and y <= buffer.drawLimit.y2 then
local stringLength, symbols, colors, searchFrom, starting, ending, bufferIndex = unicode.len(str), {}, {}
@ -25296,105 +25319,7 @@ alias ..="cd .."
alias df="df -h"
alias grep="grep --color"
Detc/F etc/edit.cfgkeybinds={
["findnext"] = {
[1] = {
[1] = "control",
[2] = "g"
},
[2] = {
[1] = "control",
[2] = "n"
},
[3] = {
[1] = "f3"
}
},
["deleteLine"] = {
[1] = {
[1] = "control",
[2] = "delete"
},
[2] = {
[1] = "shift",
[2] = "delete"
}
},
["home"] = {
[1] = {
[1] = "home"
}
},
["up"] = {
[1] = {
[1] = "up"
}
},
["pageDown"] = {
[1] = {
[1] = "pageDown"
}
},
["close"] = {
[1] = {
[1] = "control",
[2] = "w"
}
},
["right"] = {
[1] = {
[1] = "right"
}
},
["backspace"] = {
[1] = {
[1] = "back"
}
},
["newline"] = {
[1] = {
[1] = "enter"
}
},
["find"] = {
[1] = {
[1] = "control",
[2] = "f"
}
},
["pageUp"] = {
[1] = {
[1] = "pageUp"
}
},
["delete"] = {
[1] = {
[1] = "delete"
}
},
["left"] = {
[1] = {
[1] = "left"
}
},
["save"] = {
[1] = {
[1] = "control",
[2] = "s"
}
},
["eol"] = {
[1] = {
[1] = "end"
}
},
["down"] = {
[1] = {
[1] = "down"
}
}
}
Fetc/filesystem.cfg autorun=trueFetc/motdp#!/bin/lua
Detc/Fetc/filesystem.cfg autorun=trueFetc/motdp#!/bin/lua
local component = require("component")
local computer = require("computer")
@ -25986,12 +25911,12 @@ D,MineOS/Applications/AppMarket.app/Resources/D2MineOS/Applications/AppMarket.
youHaveNewestApps = "У ваÑ<C2B0> Ñ<>амое новое ПО",
downloadingInfoAboutApplication = "Загрузка информации о приложении",
updating = "Обновление",
}D%MineOS/Applications/MineCode IDE.app/F5MineOS/Applications/MineCode IDE.app/MineCode IDE.luaä¸
}D%MineOS/Applications/MineCode IDE.app/F5MineOS/Applications/MineCode IDE.app/MineCode IDE.luaå
---------------------------------------------------- Libraries ----------------------------------------------------
-- "/MineOS/Applications/MineCode IDE.app/MineCode IDE.lua" open OS.lua
package.loaded.syntax = nil
-- package.loaded.syntax = nil
-- package.loaded.ECSAPI = nil
-- package.loaded.GUI = nil
-- package.loaded.windows = nil
@ -27059,8 +26984,10 @@ local function createWindow()
menu:addItem(localization.open, false, "^O").onTouch = function()
open()
end
menu:addItem(localization.getFromWeb, false, "^U").onTouch = function()
downloadFromWeb()
if component.isAvailable("internet") then
menu:addItem(localization.getFromWeb, false, "^U").onTouch = function()
downloadFromWeb()
end
end
menu:addSeparator()
menu:addItem(localization.save, not mainWindow.leftTreeView.currentFile, "^S").onTouch = function()
@ -27368,7 +27295,7 @@ local function createWindow()
elseif eventData[4] == 24 then
open()
-- U
elseif eventData[4] == 22 then
elseif eventData[4] == 22 and component.isAvailable("internet") then
downloadFromWeb()
-- S
elseif eventData[4] == 31 then
@ -27493,7 +27420,7 @@ buffer.draw()
mainWindow:handleEvents(config.cursorBlinkDelay)
D/MineOS/Applications/MineCode IDE.app/Resources/D5MineOS/Applications/MineCode IDE.app/Resources/About/F@MineOS/Applications/MineCode IDE.app/Resources/About/Russian.txt½MineCode IDE - Ñ<>Ñо мощный инÑ<C2BD>ÑÑƒÑ€Ð¼ÐµÐ½Ñ Ð´Ð»Ñ<C2BB> разработки приложений Ñ<> богатым функционалом: от подÑ<C2B4>веÑки Ñ<>инÑакÑ<C2BA>иÑ<C2B8>а Lua, вÑделениÑ<C2B8> ÑекÑ<C2BA>Ñа и работы Ñ<> буфером обмена до поддержки пользоваÑельÑ<C592>ких цветовых Ñ<>хем. Удобный файловый менеджер также прилагаеÑÑ<E2809A>Ñ<EFBFBD>.F9MineOS/Applications/MineCode IDE.app/Resources/Config.cfgP{["cursorSymbol"]="┃",["screenScale"]=1,["cursorColor"]=43263,["scrollSpeed"]=8,["doubleClickDelay"]=0.4,["enableAutoBrackets"]=true,["highlightLuaSyntax"]=true,["syntaxColorScheme"]={["text"]=16777215,["functions"]=16764006,["lineNumbersText"]=13421772,["numbers"]=6740991,["scrollBarForeground"]=3389183,["selection"]=5592405,["strings"]=10092416,["scrollBarBackground"]=4473924,["boolean"]=16767808,["logic"]=16764006,["indentation"]=3947580,["comments"]=8947848,["compares"]=16777112,["loops"]=16777112,["background"]=1973790,["lineNumbersBackground"]=2960685},["cursorBlinkDelay"]=0.5}F7MineOS/Applications/MineCode IDE.app/Resources/Icon.pic OCIFASbFþB)YScFUB)YSdFøB)YSeFøB)YYFUB)YSwFøB)YShFøB)YSâ€FÖB)YFÿB)YSiFøB)YSmFUB)YSlFøB)YS-FUB)YSnFøB)YSoFUB)YS FB)YYYSaFþB)YD<MineOS/Applications/MineCode IDE.app/Resources/Localization/FHMineOS/Applications/MineCode IDE.app/Resources/Localization/English.langf{
D/MineOS/Applications/MineCode IDE.app/Resources/D5MineOS/Applications/MineCode IDE.app/Resources/About/F@MineOS/Applications/MineCode IDE.app/Resources/About/Russian.txt½MineCode IDE - Ñ<>Ñо мощный инÑ<C2BD>ÑÑƒÑ€Ð¼ÐµÐ½Ñ Ð´Ð»Ñ<C2BB> разработки приложений Ñ<> богатым функционалом: от подÑ<C2B4>веÑки Ñ<>инÑакÑ<C2BA>иÑ<C2B8>а Lua, вÑделениÑ<C2B8> ÑекÑ<C2BA>Ñа и работы Ñ<> буфером обмена до поддержки пользоваÑельÑ<C592>ких цветовых Ñ<>хем. Удобный файловый менеджер также прилагаеÑÑ<E2809A>Ñ<EFBFBD>.F7MineOS/Applications/MineCode IDE.app/Resources/Icon.pic OCIFASbFþB)YScFUB)YSdFøB)YSeFøB)YYFUB)YSwFøB)YShFøB)YSâ€FÖB)YFÿB)YSiFøB)YSmFUB)YSlFøB)YS-FUB)YSnFøB)YSoFUB)YS FB)YYYSaFþB)YD<MineOS/Applications/MineCode IDE.app/Resources/Localization/FHMineOS/Applications/MineCode IDE.app/Resources/Localization/English.langf{
enableAutoBrackets = "Enable autobrackets",
disableAutoBrackets = "Disable autobrackets",
url = "http://example.com/something.lua",
@ -30592,7 +30519,7 @@ end
DMineOS/Desktop/FMineOS/Desktop/VK.lnk%return "/MineOS/Applications/VK.app/"DMineOS/Pictures/DMineOS/System/DMineOS/System/OS/F!MineOS/System/OS/Applications.txt¸{
DMineOS/Desktop/FMineOS/Desktop/VK.lnk$return "/MineOS/Applications/VK.app"DMineOS/Pictures/DMineOS/System/DMineOS/System/OS/F!MineOS/System/OS/Applications.txt¼{
GitHubUserURL="https://raw.githubusercontent.com/",
GitHubApplicationListURL="https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/Applications.txt",
----------------------------------------------------- ÐÑ<E28099>е длÑ<C2BB> ОС --------------------------------------------------------------------------
@ -30602,7 +30529,7 @@ DMineOS/Desktop/FMineOS/Desktop/VK.lnk%return "/MineOS/Applications/VK.app/
about="IgorTimofeev/OpenComputers/master/MineOS/About/",
type="Script",
forceDownload=true,
version=3.47,
version=3.48,
},
{
name="MineOS/Pictures/Raspberry.pic",
@ -30854,7 +30781,7 @@ DMineOS/Desktop/FMineOS/Desktop/VK.lnk%return "/MineOS/Applications/VK.app/
url="IgorTimofeev/OpenComputers/master/lib/advancedLua.lua",
type="Library",
preLoadFile=true,
version=1.06,
version=1.07,
},
{
name="MineOS/System/OS/EFI.lua",
@ -30954,7 +30881,7 @@ DMineOS/Desktop/FMineOS/Desktop/VK.lnk%return "/MineOS/Applications/VK.app/
name="lib/syntax.lua",
url="IgorTimofeev/OpenComputers/master/lib/syntax.lua",
type="Library",
version=1.11,
version=1.12,
},
{
name="lib/palette.lua",
@ -30972,7 +30899,7 @@ DMineOS/Desktop/FMineOS/Desktop/VK.lnk%return "/MineOS/Applications/VK.app/
name="lib/compressor.lua",
url="IgorTimofeev/OpenComputers/master/lib/compressor.lua",
type="Library",
version=1.05,
version=1.06,
},
{
name="lib/xmlParser.lua",
@ -31111,7 +31038,7 @@ DMineOS/Desktop/FMineOS/Desktop/VK.lnk%return "/MineOS/Applications/VK.app/
icon="IgorTimofeev/OpenComputers/master/Applications/MineCodeIDE/Icon.pic",
createShortcut="dock",
forceDownload=true,
version=1.52,
version=1.54,
resources={
{
name="Localization/Russian.lang",
@ -31227,9 +31154,9 @@ DMineOS/Desktop/FMineOS/Desktop/VK.lnk%return "/MineOS/Applications/VK.app/
about="IgorTimofeev/OpenComputers/master/Applications/VK/About/",
type="Application",
icon="IgorTimofeev/OpenComputers/master/Applications/VK/Icon.pic",
createShortcut="dock",
createShortcut="desktop",
forceDownload=true,
version=1.24,
version=1.25,
resources={
{
name="VKLogo.pic",
@ -31464,7 +31391,7 @@ DMineOS/Desktop/FMineOS/Desktop/VK.lnk%return "/MineOS/Applications/VK.app/
type="Application",
icon="IgorTimofeev/OpenComputers/master/Applications/Stargate/Icon.pic",
createShortcut="desktop",
version=1.03,
version=1.04,
resources={
{
name="Gate.pic",
@ -31753,7 +31680,7 @@ DMineOS/Desktop/FMineOS/Desktop/VK.lnk%return "/MineOS/Applications/VK.app/
about="IgorTimofeev/OpenComputers/master/Applications/TurretControl/About/",
icon="IgorTimofeev/OpenComputers/master/Applications/TurretControl/Icon.pic",
createShortcut="desktop",
version=1.0,
version=1.01,
resources={
{
name="Turret.pic",
@ -32432,24 +32359,23 @@ DMineOS/System/OS/Languages/F'MineOS/System/OS/Languages/English.lang9{
Ð’ Ñ<>лучае неÑ<C2B5>оглаÑ<C2B0>иÑ<C2B8> Ñ<> любым из вÑшеперечиÑ<C2B8>леннÑÑ… пунктов,
вы обÑ<C2B1>Ð·Ð°Ð½Ñ Ð½Ð°Ð¶Ð°Ñ‚ÑŒ Ñ<>очеÑание клавиш Ctrl+Alt+C, чтобы завершить
программу уÑ<C692>Ñановки.
FMineOS/System/OS/OSSettings.cfgÛ{
FMineOS/System/OS/OSSettings.cfg«{
["dockShortcuts"] = {
[1] = {
["path"] = "/MineOS/Applications/AppMarket.app"
},
[2] = {
["path"] = "/MineOS/Applications/MineCode IDE.app"
},
[3] = {
["path"] = "/MineOS/Applications/Photoshop.app"
}
},
["language"] = "Russian",
["protectionMethod"] = "withoutProtection",
["showHelpOnApplicationStart"] = false,
["screensaver"] = "Matrix",
["screensaverDelay"] = 20,
["showWindows10Upgrade"] = false,
["language"] = "Russian",
["dockShortcuts"] = {
[2] = {
["path"] = "/MineOS/Applications/MineCode IDE.app"
},
[1] = {
["path"] = "/MineOS/Applications/AppMarket.app"
},
[3] = {
["path"] = "/MineOS/Applications/Photoshop.app"
}
}
["screensaver"] = "Matrix"
}DMineOS/System/OS/Screensavers/F'MineOS/System/OS/Screensavers/Clock.lua¬local gpu = require("component").gpu
local event = require("event")
local w, h, t, q = gpu.getResolution()