Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local windows = require("windows")
- local fs = require("filesystem")
- local cmp = require("component")
- local sh = require("shell")
- local function wget(link, saveTo)
- sh.execute("wget -q "..link.." "..saveTo)
- end
- if not cmp.isAvailable("internet") then
- windows.universalWindow("auto", "auto", 20, 0xFFFFFF, true, {"EmptyLine"}, {"CenterText", 0x000000, "Для загрузки файлов необходима интернет-карта!"}, {"EmptyLine"}, {"Button", {0xFF0000, 0x000000, "Выход"}})
- os.exit()
- end
- windows.universalWindow("auto", "auto", 20, 0xFFFFFF, true, {"EmptyLine"}, {"CenterText", 0x000000, "Установка программы AppAssembler"}, {"EmptyLine"}, {"Switch", 0x00FF00, 0x636363, 0x000000, "Установить браузер Амиго", true}, {"EmptyLine"}, {"Button", {0x00FF00, 0x000000, "Установить"}})
- fs.makeDirectory("Assembler.app")
- fs.makeDirectory("Assembler.app/Resources")
- local lnk = io.open("/System/OS/Desktop/Assembler.lnk", "w")
- lnk:write("return \"Assembler.app\"")
- lnk:close()
- wget("https://preview.c9.io/programist135/mineosprogramfiles/Assembler/Assembler.lua", "/Assembler.app/Assembler.lua")
- wget("https://preview.c9.io/programist135/mineosprogramfiles/Assembler/Icon", "/Assembler.app/Resources/Icon.png")
- windows.universalWindow("auto", "auto", 20, 0xFFFFFF, true, {"EmptyLine"}, {"CenterText", 0x000000, "Установка успешно завершена!"}, {"EmptyLine"}, {"Button", {0x00FF00, 0x000000, "ОК"}})
Advertisement
Add Comment
Please, Sign In to add comment