diff --git a/Installer/Installer.lua b/Installer/Installer.lua index 1317ec98..8d059998 100644 --- a/Installer/Installer.lua +++ b/Installer/Installer.lua @@ -141,7 +141,7 @@ end --------------------------СТАДИЯ ЗАГРУЗКИ НУЖНЫХ ПАКЕТОВ----------------------- -if not fs.exists("System/OS/Installer/OK.png") then +if not fs.exists("System/OS/Installer/OK.pic") then local barWidth = math.floor(windowWidth / 2) local xBar = math.floor(xSize/2-barWidth/2) @@ -163,10 +163,10 @@ if not fs.exists("System/OS/Installer/OK.png") then local preLoadApi = { { paste = "IgorTimofeev/OpenComputers/master/lib/image.lua", path = "lib/image.lua" }, - --{ paste = "IgorTimofeev/OpenComputers/master/Installer/Languages.png", path = "System/OS/Installer/Languages.png" }, - { paste = "IgorTimofeev/OpenComputers/master/Installer/OK.png", path = "System/OS/Installer/OK.png" }, - { paste = "IgorTimofeev/OpenComputers/master/Installer/Downloading.png", path = "System/OS/Installer/Downloading.png" }, - { paste = "IgorTimofeev/OpenComputers/master/Installer/OS_Logo.png", path = "System/OS/Installer/OS_Logo.png" }, + --{ paste = "IgorTimofeev/OpenComputers/master/Installer/Languages.pic", path = "System/OS/Installer/Languages.pic" }, + { paste = "IgorTimofeev/OpenComputers/master/Installer/OK.pic", path = "System/OS/Installer/OK.pic" }, + { paste = "IgorTimofeev/OpenComputers/master/Installer/Downloading.pic", path = "System/OS/Installer/Downloading.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" }, } @@ -189,10 +189,10 @@ applications = seri.unserialize(getFromPastebin("3j2x4dDn", "System/OS/Applicati local image = require("image") -local imageOS = image.load("System/OS/Installer/OS_Logo.png") ---local imageLanguages = image.load("System/OS/Installer/Languages.png") -local imageDownloading = image.load("System/OS/Installer/Downloading.png") -local imageOK = image.load("System/OS/Installer/OK.png") +local imageOS = image.load("System/OS/Installer/OS_Logo.pic") +--local imageLanguages = image.load("System/OS/Installer/Languages.pic") +local imageDownloading = image.load("System/OS/Installer/Downloading.pic") +local imageOK = image.load("System/OS/Installer/OK.pic") ------------------------------СТАВИТЬ ЛИ ОСЬ------------------------------------ @@ -305,7 +305,7 @@ do if applications[app]["type"] == "Application" then fs.makeDirectory(path..".app/Resources") getFromGitHubSafely(GitHubUserUrl .. applications[app]["url"], path..".app/"..fs.name(applications[app]["name"]..".lua")) - getFromGitHubSafely(GitHubUserUrl .. applications[app]["icon"], path..".app/Resources/Icon.png") + getFromGitHubSafely(GitHubUserUrl .. applications[app]["icon"], path..".app/Resources/Icon.pic") if applications[app]["resources"] then for i = 1, #applications[app]["resources"] do getFromGitHubSafely(GitHubUserUrl .. applications[app]["resources"][i]["url"], path..".app/Resources/"..applications[app]["resources"][i]["name"]) diff --git a/lib/ECSAPI.lua b/lib/ECSAPI.lua index 10b3e3a3..31793db8 100644 --- a/lib/ECSAPI.lua +++ b/lib/ECSAPI.lua @@ -246,7 +246,7 @@ function ECSAPI.getOSApplication(elementFromMassiv) if elementFromMassiv.type == "Application" then fs.makeDirectory(path .. ".app/Resources") ECSAPI.getFromGitHub(elementFromMassiv.url, path .. ".app/" .. fs.name(elementFromMassiv.name .. ".lua")) - ECSAPI.getFromGitHub(elementFromMassiv.icon, path .. ".app/Resources/Icon.png") + ECSAPI.getFromGitHub(elementFromMassiv.icon, path .. ".app/Resources/Icon.pic") if elementFromMassiv.resources then for i = 1, #elementFromMassiv.resources do ECSAPI.getFromGitHub(elementFromMassiv.resources[i].url, path .. ".app/Resources/" .. elementFromMassiv.resources[i].name) @@ -1130,7 +1130,7 @@ function ECSAPI.newApplication(path, startName) if ECSAPI.checkName(inputs[1] .. ".app", path) then local name = path .. inputs[1] .. ".app/Resources/" fs.makeDirectory(name) - fs.copy("System/OS/Icons/SampleIcon.png", name .. "Icon.png") + fs.copy("System/OS/Icons/SampleIcon.pic", name .. "Icon.pic") local file = io.open(path .. inputs[1] .. ".app/" .. inputs[1] .. ".lua", "w") file:write("local ecs = require(\"ECSAPI\")", "\n") file:write("ecs.universalWindow(\"auto\", \"auto\", 30, 0xeeeeee, true, {\"EmptyLine\"}, {\"CenterText\", 0x262626, \"Hello world!\"}, {\"EmptyLine\"}, {\"Button\", {0x880000, 0xffffff, \"Hello!\"}})", "\n") @@ -1379,16 +1379,16 @@ local function OSIconsInit() ECSAPI.pathToIcons = "System/OS/Icons/" --Иконки - ECSAPI.OSIcons.folder = image.load(ECSAPI.pathToIcons .. "Folder.png") - ECSAPI.OSIcons.script = image.load(ECSAPI.pathToIcons .. "Script.png") - ECSAPI.OSIcons.text = image.load(ECSAPI.pathToIcons .. "Text.png") - ECSAPI.OSIcons.config = image.load(ECSAPI.pathToIcons .. "Config.png") - ECSAPI.OSIcons.lua = image.load(ECSAPI.pathToIcons .. "Lua.png") - ECSAPI.OSIcons.image = image.load(ECSAPI.pathToIcons .. "Image.png") - ECSAPI.OSIcons.imageJPG = image.load(ECSAPI.pathToIcons .. "ImageJPG.png") - ECSAPI.OSIcons.pastebin = image.load(ECSAPI.pathToIcons .. "Pastebin.png") - ECSAPI.OSIcons.fileNotExists = image.load(ECSAPI.pathToIcons .. "FileNotExists.png") - ECSAPI.OSIcons.archive = image.load(ECSAPI.pathToIcons .. "archive.png") + ECSAPI.OSIcons.folder = image.load(ECSAPI.pathToIcons .. "Folder.pic") + ECSAPI.OSIcons.script = image.load(ECSAPI.pathToIcons .. "Script.pic") + ECSAPI.OSIcons.text = image.load(ECSAPI.pathToIcons .. "Text.pic") + ECSAPI.OSIcons.config = image.load(ECSAPI.pathToIcons .. "Config.pic") + ECSAPI.OSIcons.lua = image.load(ECSAPI.pathToIcons .. "Lua.pic") + ECSAPI.OSIcons.image = image.load(ECSAPI.pathToIcons .. "Image.pic") + ECSAPI.OSIcons.imageJPG = image.load(ECSAPI.pathToIcons .. "ImageJPG.pic") + ECSAPI.OSIcons.pastebin = image.load(ECSAPI.pathToIcons .. "Pastebin.pic") + ECSAPI.OSIcons.fileNotExists = image.load(ECSAPI.pathToIcons .. "FileNotExists.pic") + ECSAPI.OSIcons.archive = image.load(ECSAPI.pathToIcons .. "archive.pic") end end @@ -1403,7 +1403,7 @@ function ECSAPI.drawOSIcon(x, y, path, showFileFormat, nameColor) --Если данный файл является папкой, то if fs.isDirectory(path) then if fileFormat == ".app" then - icon = path .. "/Resources/Icon.png" + icon = path .. "/Resources/Icon.pic" --Если данной иконки еще нет в оперативке, то загрузить ее if not ECSAPI.OSIcons[icon] then ECSAPI.OSIcons[icon] = image.load(icon) @@ -1424,9 +1424,9 @@ function ECSAPI.drawOSIcon(x, y, path, showFileFormat, nameColor) icon = "text" elseif fileFormat == ".lua" then icon = "lua" - elseif fileFormat == ".png" then + elseif fileFormat == ".pic" then icon = "image" - elseif fileFormat == ".jpg" then + elseif fileFormat == ".rawpic" then icon = "imageJPG" elseif fileFormat == ".paste" then icon = "pastebin" @@ -1482,7 +1482,7 @@ function ECSAPI.launchIcon(path, arguments) ECSAPI.displayCompileMessage(1, reason, true) end --Если это фоточка - elseif fileFormat == ".png" then + elseif fileFormat == ".pic" then shell.execute("Photoshop.app/Photoshop.lua open "..path) --Если это фоточка elseif fileFormat == ".jpg" then