diff --git a/Applications.txt b/Applications.txt index 68c88bff..ce09eae4 100644 --- a/Applications.txt +++ b/Applications.txt @@ -1,6 +1,6 @@ { - GitHubUserURL = "https://raw.githubusercontent.com/", - GitHubApplicationListURL = "https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/Applications.txt", + GitHubUserURL="https://raw.githubusercontent.com/", + GitHubApplicationListURL="https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/Applications.txt", ----------------------------------------------------- Все для ОС -------------------------------------------------------------------------- { name="OS.lua", @@ -110,6 +110,34 @@ }, ----------------------------------------------------- Системные иконки -------------------------------------------------------------------------- + { + name="MineOS/System/OS/Icons/Languages.pic", + url="IgorTimofeev/OpenComputers/master/MineOS/Icons/Languages.pic", + type="Icon", + preLoadFile=true, + version=1.0, + }, + { + name="MineOS/System/OS/Icons/OK.pic", + url="IgorTimofeev/OpenComputers/master/MineOS/Icons/OK.pic", + type="Icon", + preLoadFile=true, + version=1.0, + }, + { + name="MineOS/System/OS/Icons/Downloading.pic", + url="IgorTimofeev/OpenComputers/master/MineOS/Icons/Downloading.pic", + type="Icon", + preLoadFile=true, + version=1.0, + }, + { + name="MineOS/System/OS/Icons/OS_Logo.pic", + url="IgorTimofeev/OpenComputers/master/MineOS/Icons/OS_Logo.pic", + type="Icon", + preLoadFile=true, + version=1.0, + }, { name="MineOS/System/OS/Icons/3DModel.pic", url="IgorTimofeev/OpenComputers/master/MineOS/Icons/3DModel.pic", @@ -239,11 +267,39 @@ ----------------------------------------------------- Библиотеки -------------------------------------------------------------------------- + { + name="lib/ECSAPI.lua", + url="IgorTimofeev/OpenComputers/master/lib/ECSAPI.lua", + type="Library", + preLoadFile=true, + version=1.00, + }, + { + name="lib/colorlib.lua", + url="IgorTimofeev/OpenComputers/master/lib/colorlib.lua", + type="Library", + preLoadFile=true, + version=1.01, + }, + { + name="lib/image.lua", + url="IgorTimofeev/OpenComputers/master/lib/image.lua", + type="Library", + preLoadFile=true, + version=1.22, + }, + { + name="lib/files.lua", + url="IgorTimofeev/OpenComputers/master/lib/files.lua", + type="Library", + preLoadFile=true, + version=1.0, + }, { name="lib/MineOSCore.lua", url="IgorTimofeev/OpenComputers/master/lib/MineOSCore.lua", type="Library", - version=1.11, + version=1.12, }, { name="lib/GUI.lua", @@ -257,24 +313,6 @@ type="Library", version=1.0, }, - { - name="lib/ECSAPI.lua", - url="IgorTimofeev/OpenComputers/master/lib/ECSAPI.lua", - type="Library", - version=1.00, - }, - { - name="lib/image.lua", - url="IgorTimofeev/OpenComputers/master/lib/image.lua", - type="Library", - version=1.22, - }, - { - name="lib/colorlib.lua", - url="IgorTimofeev/OpenComputers/master/lib/colorlib.lua", - type="Library", - version=1.01, - }, { name="lib/rayEngine.lua", url="IgorTimofeev/OpenComputers/master/lib/rayEngine.lua", @@ -311,12 +349,6 @@ type="Library", version=1.0, }, - { - name="lib/files.lua", - url="IgorTimofeev/OpenComputers/master/lib/files.lua", - type="Library", - version=1.0, - }, { name="lib/libPNGImage.lua", url="IgorTimofeev/OpenComputers/master/lib/libPNGImage.lua", diff --git a/Installer/Installer.lua b/Installer/Installer.lua index 6152eb6e..ff3dca36 100644 --- a/Installer/Installer.lua +++ b/Installer/Installer.lua @@ -98,36 +98,24 @@ local GitHubUserUrl = "https://raw.githubusercontent.com/" --------------------------------- Стадия стартовой загрузки всего необходимого --------------------------------- - -local preLoadApi = { - { paste = "IgorTimofeev/OpenComputers/master/lib/ECSAPI.lua", path = "lib/ECSAPI.lua" }, - { paste = "IgorTimofeev/OpenComputers/master/lib/colorlib.lua", path = "lib/colorlib.lua" }, - { 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/MineOS/Icons/Languages.pic", path = "MineOS/System/OS/Icons/Languages.pic" }, - { paste = "IgorTimofeev/OpenComputers/master/MineOS/Icons/OK.pic", path = "MineOS/System/OS/Icons/OK.pic" }, - { paste = "IgorTimofeev/OpenComputers/master/MineOS/Icons/Downloading.pic", path = "MineOS/System/OS/Icons/Downloading.pic" }, - { paste = "IgorTimofeev/OpenComputers/master/MineOS/Icons/OS_Logo.pic", path = "MineOS/System/OS/Icons/OS_Logo.pic" }, -} - print("Downloading file list") applications = seri.unserialize(getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/Applications.txt", "MineOS/System/OS/Applications.txt")) print(" ") -for i = 1, #preLoadApi do - print("Downloading \"" .. fs.name(preLoadApi[i].path) .. "\"") - getFromGitHubSafely(GitHubUserUrl .. preLoadApi[i].paste, preLoadApi[i].path) +for i = 1, #applications do + if applications[i].preLoadFile then + print("Downloading \"" .. fs.name(applications[i].path) .. "\"") + getFromGitHubSafely(GitHubUserUrl .. applications[i].paste, applications[i].path) + end end -print(" ") -print("Initialization stage is complete, loading installer") print(" ") package.loaded.ecs = nil package.loaded.ECSAPI = nil _G.ecs = require("ECSAPI") _G.image = require("image") -_G.config = require("config") +_G.files = require("files") local imageOS = image.load("MineOS/System/OS/Icons/OS_Logo.pic") local imageLanguages = image.load("MineOS/System/OS/Icons/Languages.pic") @@ -223,8 +211,7 @@ do getFromGitHubSafely(GitHubUserUrl .. "IgorTimofeev/OpenComputers/master/MineOS/License/" .. _G.OSSettings.language .. ".txt", "MineOS/System/OS/License.txt") --Ставим язык - lang = config.readAll(pathToLang) - + lang = files.loadTableFromFile(pathToLang) end diff --git a/lib/MineOSCore.lua b/lib/MineOSCore.lua index d0ac6b3b..ce16252d 100644 --- a/lib/MineOSCore.lua +++ b/lib/MineOSCore.lua @@ -265,9 +265,9 @@ function MineOSCore.iconRightClick(icon, oldPixelsOfIcon, eventData, fileFormat, {MineOSCore.localization.contextMenuCopy}, "-", {MineOSCore.localization.contextMenuRename}, - {MineOSCore.localization.contextMenuCreateShortcut}, - "-", - {MineOSCore.localization.contextMenuUploadToPastebin, true}, + {MineOSCore.localization.contextMenuCreateShortcut, fileFormat == ".lnk"}, + -- "-", + -- {MineOSCore.localization.contextMenuUploadToPastebin, true}, "-", {MineOSCore.localization.contextMenuAddToDock, not somethingCanBeAddedToDock}, {MineOSCore.localization.contextMenuDelete} @@ -277,7 +277,7 @@ function MineOSCore.iconRightClick(icon, oldPixelsOfIcon, eventData, fileFormat, {MineOSCore.localization.contextMenuCut}, {MineOSCore.localization.contextMenuCopy}, {MineOSCore.localization.contextMenuRename}, - {MineOSCore.localization.contextMenuCreateShortcut}, + {MineOSCore.localization.contextMenuCreateShortcut, fileFormat == ".lnk"}, "-", {MineOSCore.localization.contextMenuArchive}, "-", @@ -287,16 +287,16 @@ function MineOSCore.iconRightClick(icon, oldPixelsOfIcon, eventData, fileFormat, else if fileFormat == ".pic" then action = context.menu(eventData[3], eventData[4], - {MineOSCore.localization.contextMenuEdit}, + -- {MineOSCore.localization.contextMenuEdit}, {MineOSCore.localization.contextMenuEditInPhotoshop}, {MineOSCore.localization.contextMenuSetAsWallpaper}, "-", {MineOSCore.localization.contextMenuCut}, {MineOSCore.localization.contextMenuCopy}, {MineOSCore.localization.contextMenuRename}, - {MineOSCore.localization.contextMenuCreateShortcut}, - "-", - {MineOSCore.localization.contextMenuUploadToPastebin, true}, + {MineOSCore.localization.contextMenuCreateShortcut, fileFormat == ".lnk"}, + -- "-", + -- {MineOSCore.localization.contextMenuUploadToPastebin, true}, "-", {MineOSCore.localization.contextMenuAddToDock, not somethingCanBeAddedToDock}, {MineOSCore.localization.contextMenuDelete, false} @@ -309,9 +309,9 @@ function MineOSCore.iconRightClick(icon, oldPixelsOfIcon, eventData, fileFormat, {MineOSCore.localization.contextMenuCut}, {MineOSCore.localization.contextMenuCopy}, {MineOSCore.localization.contextMenuRename}, - {MineOSCore.localization.contextMenuCreateShortcut}, - "-", - {MineOSCore.localization.contextMenuUploadToPastebin, true}, + {MineOSCore.localization.contextMenuCreateShortcut, fileFormat == ".lnk"}, + -- "-", + -- {MineOSCore.localization.contextMenuUploadToPastebin, true}, "-", {MineOSCore.localization.contextMenuAddToDock, not somethingCanBeAddedToDock}, {MineOSCore.localization.contextMenuDelete} @@ -355,7 +355,7 @@ function MineOSCore.iconRightClick(icon, oldPixelsOfIcon, eventData, fileFormat, -- getFileList(workPathHistory[currentWorkPathHistoryElement]) -- drawAll() elseif action == MineOSCore.localization.contextMenuCreateShortcut then - ecs.createShortCut(fs.path(icon.path) .. "/" .. ecs.hideFileFormat(fs.name(icon.path)) .. "-" .. MineOSCore.localization.shortcut .. ".lnk", icon.path) + ecs.createShortCut(fs.path(icon.path) .. "/" .. ecs.hideFileFormat(fs.name(icon.path)) .. ".lnk", icon.path) executeMethod(drawAllMethod) -- getFileList(workPathHistory[currentWorkPathHistoryElement]) -- drawAll()