This commit is contained in:
Igor Timofeev 2015-10-30 07:31:39 +03:00
parent ba9e2b1c7e
commit a19f938132

View File

@ -28,14 +28,14 @@ if fs.get("bin/edit.lua") == nil or fs.get("bin/edit.lua").isReadOnly() then tab
--Если нашло какое-то несоответствие сис. требованиям, то написать, что именно не так --Если нашло какое-то несоответствие сис. требованиям, то написать, что именно не так
if #govno > 0 then if #govno > 0 then
print(" ") print(" ")
print("Analyzing computer for matching system requirements.") print("Analyzing computer for matching system requirements.")
print(" ") print(" ")
for i = 1, #govno do for i = 1, #govno do
print(govno[i]) print(govno[i])
end end
print(" ") print(" ")
return return
end end
------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------
@ -54,72 +54,76 @@ local timing = 0.2
--ЗАГРУЗОЧКА С ГИТХАБА --ЗАГРУЗОЧКА С ГИТХАБА
local function getFromGitHub(url, path) local function getFromGitHub(url, path)
local sContent = "" local sContent = ""
local result, response = pcall(internet.request, url) local result, response = pcall(internet.request, url)
if not result then if not result then
return nil return nil
end end
if fs.exists(path) then fs.remove(path) end if fs.exists(path) then fs.remove(path) end
fs.makeDirectory(fs.path(path)) fs.makeDirectory(fs.path(path))
local file = io.open(path, "w") local file = io.open(path, "w")
for chunk in response do for chunk in response do
file:write(chunk) file:write(chunk)
sContent = sContent .. chunk sContent = sContent .. chunk
end end
file:close() file:close()
return sContent return sContent
end end
--БЕЗОПАСНАЯ ЗАГРУЗОЧКА --БЕЗОПАСНАЯ ЗАГРУЗОЧКА
local function getFromGitHubSafely(url, path) local function getFromGitHubSafely(url, path)
local success, sRepos = pcall(getFromGitHub, url, path) local success, sRepos = pcall(getFromGitHub, url, path)
if not success then if not success then
io.stderr:write("Could not connect to the Internet. Please ensure you have an Internet connection.") io.stderr:write("Can't download \"" .. url .. "\"!\n")
return -1 return -1
end end
return sRepos return sRepos
end end
--ЗАГРУЗОЧКА С ПАСТЕБИНА --ЗАГРУЗОЧКА С ПАСТЕБИНА
local function getFromPastebin(paste, filename) local function getFromPastebin(paste, filename)
local cyka = "" local cyka = ""
local f, reason = io.open(filename, "w") local f, reason = io.open(filename, "w")
if not f then if not f then
io.stderr:write("Failed opening file for writing: " .. reason) io.stderr:write("Failed opening file for writing: " .. reason)
return return
end end
--io.write("Downloading from pastebin.com... ") --io.write("Downloading from pastebin.com... ")
local url = "http://pastebin.com/raw.php?i=" .. paste local url = "http://pastebin.com/raw.php?i=" .. paste
local result, response = pcall(internet.request, url) local result, response = pcall(internet.request, url)
if result then if result then
--io.write("success.\n") --io.write("success.\n")
for chunk in response do for chunk in response do
--if not options.k then --if not options.k then
--string.gsub(chunk, "\r\n", "\n") --string.gsub(chunk, "\r\n", "\n")
--end --end
f:write(chunk) f:write(chunk)
cyka = cyka .. chunk cyka = cyka .. chunk
end end
f:close() f:close()
--io.write("Saved data to " .. filename .. "\n") --io.write("Saved data to " .. filename .. "\n")
else else
f:close() f:close()
fs.remove(filename) fs.remove(filename)
io.stderr:write("HTTP request failed: " .. response .. "\n") io.stderr:write("HTTP request failed: " .. response .. "\n")
end end
return cyka return cyka
end end
local GitHubUserUrl = "https://raw.githubusercontent.com/" local GitHubUserUrl = "https://raw.githubusercontent.com/"
getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/lib/ECSAPI.lua", "lib/ECSAPI.lua") local cyka
print(" ")
cyka = "colorlib.lua"; print("Downloading must-have libraries (" .. cyka .. ")"); getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/lib/" .. cyka, "lib/" .. cyka)
cyka = "image.lua"; print("Downloading must-have libraries (" .. cyka .. ")"); getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/lib/" .. cyka, "lib/" .. cyka)
cyka = "ECSAPI.lua"; print("Downloading must-have libraries (" .. cyka .. ")"); getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/lib/" .. cyka, "lib/" .. cyka)
print(" ")
--Вот тут такой пиздец был!
_G.ecs = require("ECSAPI") _G.ecs = require("ECSAPI")
ecs.setScale(installerScale) ecs.setScale(installerScale)
@ -134,127 +138,125 @@ local xWindowEnd, yWindowEnd = xWindow + windowWidth - 1, yWindow + windowHeight
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
local function clear() local function clear()
ecs.blankWindow(xWindow, yWindow, windowWidth, windowHeight) ecs.blankWindow(xWindow, yWindow, windowWidth, windowHeight)
end end
--ОБЪЕКТЫ --ОБЪЕКТЫ
local obj = {} local obj = {}
local function newObj(class, name, ...) local function newObj(class, name, ...)
obj[class] = obj[class] or {} obj[class] = obj[class] or {}
obj[class][name] = {...} obj[class][name] = {...}
end end
local function drawButton(name, isPressed) local function drawButton(name, isPressed)
local buttonColor = 0x888888 local buttonColor = 0x888888
if isPressed then buttonColor = ecs.colors.blue end if isPressed then buttonColor = ecs.colors.blue end
local d = {ecs.drawAdaptiveButton("auto", yWindowEnd - 3, 2, 1, name, buttonColor, 0xffffff)} local d = {ecs.drawAdaptiveButton("auto", yWindowEnd - 3, 2, 1, name, buttonColor, 0xffffff)}
newObj("buttons", name, d[1], d[2], d[3], d[4]) newObj("buttons", name, d[1], d[2], d[3], d[4])
end end
local function waitForClickOnButton(buttonName) local function waitForClickOnButton(buttonName)
while true do while true do
local e = { event.pull() } local e = { event.pull() }
if e[1] == "touch" then if e[1] == "touch" then
if ecs.clickedAtArea(e[3], e[4], obj["buttons"][buttonName][1], obj["buttons"][buttonName][2], obj["buttons"][buttonName][3], obj["buttons"][buttonName][4]) then if ecs.clickedAtArea(e[3], e[4], obj["buttons"][buttonName][1], obj["buttons"][buttonName][2], obj["buttons"][buttonName][3], obj["buttons"][buttonName][4]) then
drawButton(buttonName, true) drawButton(buttonName, true)
os.sleep(timing) os.sleep(timing)
break break
end end
end end
end end
end end
--------------------------СТАДИЯ ЗАГРУЗКИ НУЖНЫХ ПАКЕТОВ----------------------- --------------------------СТАДИЯ ЗАГРУЗКИ НУЖНЫХ ПАКЕТОВ-----------------------
ecs.clearScreen(padColor) ecs.clearScreen(padColor)
if not fs.exists("System/OS/Installer/OK.pic") or not fs.exists("System/OS/Installer/Downloading.pic") or not fs.exists("System/OS/Installer/OS_Logo.pic") or not fs.exists("System/OS/Installer/Languages.pic") then if not fs.exists("MineOS/System/OS/Installer/OK.pic") or not fs.exists("MineOS/System/OS/Installer/Downloading.pic") or not fs.exists("MineOS/System/OS/Installer/OS_Logo.pic") or not fs.exists("MineOS/System/OS/Installer/Languages.pic") then
local barWidth = math.floor(windowWidth / 2) local barWidth = math.floor(windowWidth / 2)
local xBar = math.floor(xSize/2-barWidth/2) local xBar = math.floor(xSize/2-barWidth/2)
local yBar = math.floor(ySize/2) + 1 local yBar = math.floor(ySize/2) + 1
--создание первичного экрана чистенького --создание первичного экрана чистенького
clear() clear()
gpu.setBackground(ecs.windowColors.background) gpu.setBackground(ecs.windowColors.background)
gpu.setForeground(ecs.colors.gray) gpu.setForeground(ecs.colors.gray)
ecs.centerText("x", yBar - 2, "Loading installer data") ecs.centerText("x", yBar - 2, "Loading installer data")
ecs.progressBar(xBar, yBar, barWidth, 1, 0xcccccc, ecs.colors.blue, 0) ecs.progressBar(xBar, yBar, barWidth, 1, 0xcccccc, ecs.colors.blue, 0)
os.sleep(timing) os.sleep(timing)
--local response = getSafe(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/Applications.txt", "System/OS/Applications.txt") --local response = getSafe(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/Applications.txt", "MineOS/System/OS/Applications.txt")
local preLoadApi = { local preLoadApi = {
{ paste = "IgorTimofeev/OpenComputers/master/lib/image.lua", path = "lib/image.lua" }, { paste = "IgorTimofeev/OpenComputers/master/lib/config.lua", path = "lib/config.lua" },
{ paste = "IgorTimofeev/OpenComputers/master/lib/config.lua", path = "lib/config.lua" }, { paste = "IgorTimofeev/OpenComputers/master/Installer/Languages.pic", path = "MineOS/System/OS/Icons/Languages.pic" },
{ paste = "IgorTimofeev/OpenComputers/master/Installer/Languages.pic", path = "System/OS/Installer/Languages.pic" }, { paste = "IgorTimofeev/OpenComputers/master/Installer/OK.pic", path = "MineOS/System/OS/Icons/OK.pic" },
{ paste = "IgorTimofeev/OpenComputers/master/Installer/OK.pic", path = "System/OS/Installer/OK.pic" }, { paste = "IgorTimofeev/OpenComputers/master/Installer/Downloading.pic", path = "MineOS/System/OS/Icons/Downloading.pic" },
{ paste = "IgorTimofeev/OpenComputers/master/Installer/Downloading.pic", path = "System/OS/Installer/Downloading.pic" }, { paste = "IgorTimofeev/OpenComputers/master/Installer/OS_Logo.pic", path = "MineOS/System/OS/Icons/OS_Logo.pic" },
{ paste = "IgorTimofeev/OpenComputers/master/Installer/OS_Logo.pic", path = "System/OS/Installer/OS_Logo.pic" }, }
--{ paste = "IgorTimofeev/OpenComputers/master/MineOS/License.txt", path = "System/OS/License.txt" },
}
local countOfAll = #preLoadApi local countOfAll = #preLoadApi
for i = 1, countOfAll do for i = 1, countOfAll do
local percent = i / countOfAll * 100 local percent = i / countOfAll * 100
ecs.progressBar(xBar, yBar, barWidth, 1, 0xcccccc, ecs.colors.blue, percent) ecs.progressBar(xBar, yBar, barWidth, 1, 0xcccccc, ecs.colors.blue, percent)
if fs.exists(preLoadApi[i]["path"]) then fs.remove(preLoadApi[i]["path"]) end if fs.exists(preLoadApi[i]["path"]) then fs.remove(preLoadApi[i]["path"]) end
fs.makeDirectory(fs.path(preLoadApi[i]["path"])) fs.makeDirectory(fs.path(preLoadApi[i]["path"]))
getFromGitHubSafely(GitHubUserUrl .. preLoadApi[i]["paste"], preLoadApi[i]["path"]) getFromGitHubSafely(GitHubUserUrl .. preLoadApi[i]["paste"], preLoadApi[i]["path"])
end end
end end
applications = seri.unserialize(getFromPastebin("3j2x4dDn", "System/OS/Applications.txt")) applications = seri.unserialize(getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/Applications.txt", "MineOS/System/OS/Applications.txt"))
_G.image = require("image") _G.image = require("image")
local config = require("config") local config = require("config")
local imageOS = image.load("System/OS/Installer/OS_Logo.pic") local imageOS = image.load("MineOS/System/OS/Icons/OS_Logo.pic")
local imageLanguages = image.load("System/OS/Installer/Languages.pic") local imageLanguages = image.load("MineOS/System/OS/Icons/Languages.pic")
local imageDownloading = image.load("System/OS/Installer/Downloading.pic") local imageDownloading = image.load("MineOS/System/OS/Icons/Downloading.pic")
local imageOK = image.load("System/OS/Installer/OK.pic") local imageOK = image.load("MineOS/System/OS/Icons/OK.pic")
------------------------------ВЫБОР ЯЗЫКА------------------------------------ ------------------------------ВЫБОР ЯЗЫКА------------------------------------
do do
clear() clear()
image.draw(math.ceil(xSize / 2 - 30), yWindow + 2, imageLanguages) image.draw(math.ceil(xSize / 2 - 30), yWindow + 2, imageLanguages)
--кнопа --кнопа
drawButton("Select language",false) drawButton("Select language",false)
waitForClickOnButton("Select language") waitForClickOnButton("Select language")
local language = ecs.universalWindow("auto", "auto", 30, ecs.windowColors.background, true, {"EmptyLine"}, {"CenterText", 0x262626, "Select language"}, {"Select", 0x262626, 0x880000, "Russian", "English"}, {"Button", {0xffffff, 0x262626, "OK"}}) local language = ecs.universalWindow("auto", "auto", 30, ecs.windowColors.background, true, {"EmptyLine"}, {"CenterText", 0x262626, "Select language"}, {"Select", 0x262626, 0x880000, "Russian", "English"}, {"Button", {0xffffff, 0x262626, "OK"}})
language = language[1] language = language[1]
--УСТАНАВЛИВАЕМ НУЖНЫЙ ЯЗЫК --УСТАНАВЛИВАЕМ НУЖНЫЙ ЯЗЫК
local path = "System/OS/Language.lua" local path = "MineOS/System/OS/Language.lua"
fs.remove(path) fs.remove(path)
fs.makeDirectory(fs.path(path)) fs.makeDirectory(fs.path(path))
local file = io.open(path, "w") local file = io.open(path, "w")
file:write("return \"" .. language .. "\"") file:write("return \"" .. language .. "\"")
file:close() file:close()
_G._OSLANGUAGE = language _G._OSLANGUAGE = language
--Качаем язык --Качаем язык
ecs.info("auto", "auto", " ", " Installing language packages...") ecs.info("auto", "auto", " ", " Installing language packages...")
local pathToLang = "System/OS/Installer/Language.lang" local pathToLang = "MineOS/System/OS/Installer/Language.lang"
getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/Installer/" .. _G._OSLANGUAGE .. ".lang", pathToLang) getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/Installer/" .. _G._OSLANGUAGE .. ".lang", pathToLang)
getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/MineOS/License/" .. _G._OSLANGUAGE .. ".txt", "System/OS/License.txt") getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/MineOS/License/" .. _G._OSLANGUAGE .. ".txt", "MineOS/System/OS/License.txt")
--Ставим язык --Ставим язык
lang = config.readAll(pathToLang) lang = config.readAll(pathToLang)
end end
@ -263,121 +265,121 @@ end
------------------------------СТАВИТЬ ЛИ ОСЬ------------------------------------ ------------------------------СТАВИТЬ ЛИ ОСЬ------------------------------------
do do
clear() clear()
image.draw(math.ceil(xSize / 2 - 15), yWindow + 2, imageOS) image.draw(math.ceil(xSize / 2 - 15), yWindow + 2, imageOS)
--Текстик по центру --Текстик по центру
gpu.setBackground(ecs.windowColors.background) gpu.setBackground(ecs.windowColors.background)
gpu.setForeground(ecs.colors.gray) gpu.setForeground(ecs.colors.gray)
ecs.centerText("x", yWindowEnd - 5 , lang.beginOsInstall) ecs.centerText("x", yWindowEnd - 5 , lang.beginOsInstall)
--кнопа --кнопа
drawButton("->",false) drawButton("->",false)
waitForClickOnButton("->") waitForClickOnButton("->")
end end
------------------------------ЛИЦ СОГЛАЩЕНЬКА------------------------------------------ ------------------------------ЛИЦ СОГЛАЩЕНЬКА------------------------------------------
do do
clear() clear()
--Откуда рисовать условия согл --Откуда рисовать условия согл
local from = 1 local from = 1
local xText, yText, TextWidth, TextHeight = xWindow + 4, yWindow + 2, windowWidth - 8, windowHeight - 7 local xText, yText, TextWidth, TextHeight = xWindow + 4, yWindow + 2, windowWidth - 8, windowHeight - 7
--Читаем файл с лиц соглл --Читаем файл с лиц соглл
local lines = {} local lines = {}
local file = io.open("System/OS/License.txt", "r") local file = io.open("MineOS/System/OS/License.txt", "r")
for line in file:lines() do for line in file:lines() do
table.insert(lines, line) table.insert(lines, line)
end end
file:close() file:close()
--Штуку рисуем --Штуку рисуем
ecs.textField(xText, yText, TextWidth, TextHeight, lines, from, 0xffffff, 0x262626, 0x888888, ecs.colors.blue) ecs.textField(xText, yText, TextWidth, TextHeight, lines, from, 0xffffff, 0x262626, 0x888888, ecs.colors.blue)
--Инфо рисуем --Инфо рисуем
--ecs.centerText("x", yWindowEnd - 5 ,"Принимаете ли вы условия лицензионного соглашения?") --ecs.centerText("x", yWindowEnd - 5 ,"Принимаете ли вы условия лицензионного соглашения?")
--кнопа --кнопа
drawButton(lang.acceptLicense, false) drawButton(lang.acceptLicense, false)
while true do while true do
local e = { event.pull() } local e = { event.pull() }
if e[1] == "touch" then if e[1] == "touch" then
if ecs.clickedAtArea(e[3], e[4], obj["buttons"][lang.acceptLicense][1], obj["buttons"][lang.acceptLicense][2], obj["buttons"][lang.acceptLicense][3], obj["buttons"][lang.acceptLicense][4]) then if ecs.clickedAtArea(e[3], e[4], obj["buttons"][lang.acceptLicense][1], obj["buttons"][lang.acceptLicense][2], obj["buttons"][lang.acceptLicense][3], obj["buttons"][lang.acceptLicense][4]) then
drawButton(lang.acceptLicense, true) drawButton(lang.acceptLicense, true)
os.sleep(timing) os.sleep(timing)
break break
end end
elseif e[1] == "scroll" then elseif e[1] == "scroll" then
if e[5] == -1 then if e[5] == -1 then
if from < #lines then from = from + 1; ecs.textField(xText, yText, TextWidth, TextHeight, lines, from, 0xffffff, 0x262626, 0x888888, ecs.colors.blue) end if from < #lines then from = from + 1; ecs.textField(xText, yText, TextWidth, TextHeight, lines, from, 0xffffff, 0x262626, 0x888888, ecs.colors.blue) end
else else
if from > 1 then from = from - 1; ecs.textField(xText, yText, TextWidth, TextHeight, lines, from, 0xffffff, 0x262626, 0x888888, ecs.colors.blue) end if from > 1 then from = from - 1; ecs.textField(xText, yText, TextWidth, TextHeight, lines, from, 0xffffff, 0x262626, 0x888888, ecs.colors.blue) end
end end
end end
end end
end end
--------------------------СТАДИЯ ЗАГРУЗКИ----------------------------------- --------------------------СТАДИЯ ЗАГРУЗКИ-----------------------------------
do do
local barWidth = math.floor(windowWidth * 2 / 3) local barWidth = math.floor(windowWidth * 2 / 3)
local xBar = math.floor(xSize/2-barWidth/2) local xBar = math.floor(xSize/2-barWidth/2)
local yBar = yWindowEnd - 3 local yBar = yWindowEnd - 3
local function drawInfo(x, y, info) local function drawInfo(x, y, info)
ecs.square(x, y, barWidth, 1, ecs.windowColors.background) ecs.square(x, y, barWidth, 1, ecs.windowColors.background)
ecs.colorText(x, y, ecs.colors.gray, info) ecs.colorText(x, y, ecs.colors.gray, info)
end end
ecs.blankWindow(xWindow,yWindow,windowWidth,windowHeight) ecs.blankWindow(xWindow,yWindow,windowWidth,windowHeight)
image.draw(math.floor(xSize/2 - 33), yWindow + 2, imageDownloading) image.draw(math.floor(xSize/2 - 33), yWindow + 2, imageDownloading)
ecs.colorTextWithBack(xBar, yBar - 1, ecs.colors.gray, ecs.windowColors.background, lang.osInstallation) ecs.colorTextWithBack(xBar, yBar - 1, ecs.colors.gray, ecs.windowColors.background, lang.osInstallation)
ecs.progressBar(xBar, yBar, barWidth, 1, 0xcccccc, ecs.colors.blue, 0) ecs.progressBar(xBar, yBar, barWidth, 1, 0xcccccc, ecs.colors.blue, 0)
os.sleep(timing) os.sleep(timing)
for app = 1, #applications do for app = 1, #applications do
--ВСЕ ДЛЯ ГРАФОНА --ВСЕ ДЛЯ ГРАФОНА
drawInfo(xBar, yBar + 1, lang.downloading .. " " .. applications[app]["name"]) drawInfo(xBar, yBar + 1, lang.downloading .. " " .. applications[app]["name"])
local percent = app / #applications * 100 local percent = app / #applications * 100
ecs.progressBar(xBar, yBar, barWidth, 1, 0xcccccc, ecs.colors.blue, percent) ecs.progressBar(xBar, yBar, barWidth, 1, 0xcccccc, ecs.colors.blue, percent)
--ВСЕ ДЛЯ ЗАГРУЗКИ --ВСЕ ДЛЯ ЗАГРУЗКИ
local path = applications[app]["name"] local path = applications[app]["name"]
if fs.exists(path) then fs.remove(path) end if fs.exists(path) then fs.remove(path) end
--Если тип = приложение --Если тип = приложение
if applications[app]["type"] == "Application" then if applications[app]["type"] == "Application" then
fs.makeDirectory(path..".app/Resources") fs.makeDirectory(path..".app/Resources")
getFromGitHubSafely(GitHubUserUrl .. applications[app]["url"], path..".app/"..fs.name(applications[app]["name"]..".lua")) getFromGitHubSafely(GitHubUserUrl .. applications[app]["url"], path..".app/"..fs.name(applications[app]["name"]..".lua"))
getFromGitHubSafely(GitHubUserUrl .. applications[app]["icon"], path..".app/Resources/Icon.pic") getFromGitHubSafely(GitHubUserUrl .. applications[app]["icon"], path..".app/Resources/Icon.pic")
if applications[app]["resources"] then if applications[app]["resources"] then
for i = 1, #applications[app]["resources"] do for i = 1, #applications[app]["resources"] do
getFromGitHubSafely(GitHubUserUrl .. applications[app]["resources"][i]["url"], path..".app/Resources/"..applications[app]["resources"][i]["name"]) getFromGitHubSafely(GitHubUserUrl .. applications[app]["resources"][i]["url"], path..".app/Resources/"..applications[app]["resources"][i]["name"])
end end
end end
--Если тип = другой, чужой, а мб и свой пастебин --Если тип = другой, чужой, а мб и свой пастебин
elseif applications[app]["type"] == "Pastebin" then elseif applications[app]["type"] == "Pastebin" then
fs.remove(applications[app]["name"]) fs.remove(applications[app]["name"])
fs.makeDirectory(fs.path(applications[app]["name"])) fs.makeDirectory(fs.path(applications[app]["name"]))
getFromPastebin(applications[app]["url"], applications[app]["name"]) getFromPastebin(applications[app]["url"], applications[app]["name"])
--А если че-то другое --А если че-то другое
else else
getFromGitHubSafely(GitHubUserUrl .. applications[app]["url"], path) getFromGitHubSafely(GitHubUserUrl .. applications[app]["url"], path)
end end
end end
os.sleep(timing) os.sleep(timing)
end end
--------------------------СТАДИЯ ПЕРЕЗАГРУЗКИ КОМПА----------------------------------- --------------------------СТАДИЯ ПЕРЕЗАГРУЗКИ КОМПА-----------------------------------
@ -394,9 +396,9 @@ ecs.centerText("x",yWindowEnd - 5, lang.needToRestart)
--Кнопа --Кнопа
drawButton(lang.restart, false) drawButton(lang.restart, false)
fs.remove("System/OS/Users.cfg") fs.remove("MineOS/System/OS/Users.cfg")
fs.remove("System/OS/Password.cfg") fs.remove("MineOS/System/OS/Password.cfg")
fs.remove("System/OS/WithoutProtection.cfg") fs.remove("MineOS/System/OS/WithoutProtection.cfg")
waitForClickOnButton(lang.restart) waitForClickOnButton(lang.restart)