├── README.md ├── back.png ├── buttons.png ├── buttons2.png ├── eboot.bin ├── resources ├── ARK_01234.ZIP ├── NPUZ00146 │ ├── files_1.zip │ └── files_2.zip └── PBOOT.PBP ├── sce_sys ├── changeinfo │ └── changeinfo.xml ├── icon0.png ├── livearea │ └── contents │ │ ├── bg0.png │ │ ├── frame_icon.png │ │ └── template.xml └── param.sfo ├── script.lua ├── system ├── ark.lua ├── callbacks.lua └── functions.lua ├── thread_net.lua ├── updater.lua ├── updater ├── param.sfo └── script.lua └── version /README.md: -------------------------------------------------------------------------------- 1 | # ArkFast 2 | Install ARK-2 in 3.60 Henkaku 3 | 4 | - Hability to clone any PSP game 5 | - It tells you if the bubble to clone has a pboot.pbp installed. 6 | - Allows to remove the pboot.pbp from the clone (if you need a clean bubble). 7 | -------------------------------------------------------------------------------- /back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/back.png -------------------------------------------------------------------------------- /buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/buttons.png -------------------------------------------------------------------------------- /buttons2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/buttons2.png -------------------------------------------------------------------------------- /eboot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/eboot.bin -------------------------------------------------------------------------------- /resources/ARK_01234.ZIP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/resources/ARK_01234.ZIP -------------------------------------------------------------------------------- /resources/NPUZ00146/files_1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/resources/NPUZ00146/files_1.zip -------------------------------------------------------------------------------- /resources/NPUZ00146/files_2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/resources/NPUZ00146/files_2.zip -------------------------------------------------------------------------------- /resources/PBOOT.PBP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/resources/PBOOT.PBP -------------------------------------------------------------------------------- /sce_sys/changeinfo/changeinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | ]]> 7 | 8 | 9 | 11 | - Hability to clone any PSP game.
12 | - It tells you if the bubble to clone has a pboot.pbp installed.
13 | - Allows to remove the pboot.pbp from the clone (if you need a clean bubble).
14 | ]]> 15 |
16 | 17 | 19 | - Clean code.
20 | ]]> 21 |
22 |
23 | -------------------------------------------------------------------------------- /sce_sys/icon0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/sce_sys/icon0.png -------------------------------------------------------------------------------- /sce_sys/livearea/contents/bg0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/sce_sys/livearea/contents/bg0.png -------------------------------------------------------------------------------- /sce_sys/livearea/contents/frame_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/sce_sys/livearea/contents/frame_icon.png -------------------------------------------------------------------------------- /sce_sys/livearea/contents/template.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | bg0.png 5 | 6 | 7 | 8 | 9 | 10 | 11 | frame_icon.png 12 | 13 | 14 | 15 | es 16 | 17 | 18 | 19 | frame_icon.png 20 | 21 | 22 | 23 | es 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |   32 | ARK Fast for 3.60 33 |   34 | 35 | 36 | ARK Installer v2.3 37 | ®2017 Team ONElua - ONElua.x10.mx 38 | 39 | 40 | es 41 | 42 | 43 | 44 |   45 | ARK Fast for 3.60 46 |   47 | 48 | 49 | ARK Installer v2.3 50 | ®2017 Team ONElua - ONElua.x10.mx 51 | 52 | 53 | es 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /sce_sys/param.sfo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/sce_sys/param.sfo -------------------------------------------------------------------------------- /script.lua: -------------------------------------------------------------------------------- 1 | --------------------UNSAFE or SAFE----------------------------------------------------------------------------- 2 | if os.access() == 0 then 3 | if os.master() == 1 then os.restart() 4 | else 5 | os.message("UNSAFE MODE is required for this HB!",0) 6 | os.exit() 7 | end 8 | end 9 | if files.exists("ux0:pspemu/temp/") then files.delete("ux0:pspemu/temp/") end 10 | 11 | __NAMEVPK = "ArkFast" 12 | dofile("updater.lua") 13 | 14 | ----------------------Vars and resources------------------------------------------------------------------------------------ 15 | color.loadpalette() 16 | back = image.load("back.png") 17 | buttonskey = image.load("buttons.png",20,20) 18 | buttonskey2 = image.load("buttons2.png",30,20) 19 | status,sizeUxo,clon,pos,dels=false,0,0,1,0 20 | actived = files.exists("tm0:npdrm/act.dat") 21 | mgsid="" 22 | 23 | --constants 24 | PATHTONPUZ = "ux0:pspemu/PSP/GAME/NPUZ00146" 25 | PATHTOGAME = "ux0:pspemu/PSP/GAME/" 26 | PATHTOCLON = "ur0:appmeta/" 27 | 28 | dofile("system/ark.lua") 29 | dofile("system/functions.lua") 30 | dofile("system/callbacks.lua") 31 | 32 | ------------------------Menu Principal-------------------------------------------------------------------------------------- 33 | reload_list() 34 | check_freespace() 35 | files.mkdir(PATHTOGAME) 36 | buttons.interval(10,10) 37 | 38 | while true do 39 | buttons.read() 40 | if back then back:blit(0,0) end 41 | 42 | --------- Prints Text Basics --------------------------------------------------------------------------------- 43 | if actived then 44 | screen.print(480,10,"PSVita Actived",1,color.green,0x0,__ACENTER) 45 | else 46 | screen.print(480,10,"PSVita NOT Actived",1,color.red,0x0,__ACENTER) 47 | end 48 | screen.print(480,35,"ARK-2 Installer",1,color.white,color.blue,__ACENTER) 49 | 50 | screen.print(10,10,"Count: " .. list.len,1,color.red,0x0) 51 | screen.print(10,30,"Sel Clons: " .. dels,1,color.red,0x0) 52 | 53 | --Show size free 54 | screen.print(950,10,"ux0: "..files.sizeformat(sizeUxo).." Free",1,color.white,color.blue,__ARIGHT) 55 | 56 | status = false 57 | if list.len > 0 then 58 | 59 | --------------------Blit Icons-------------------------------------------------------------------------------------- 60 | if list.icons[pos] then 61 | list.icons[pos]:center() 62 | list.icons[pos]:resize(80,80) 63 | list.icons[pos]:blit(784,125) 64 | end 65 | 66 | --Pboot 67 | if list.picons[pos] then 68 | list.picons[pos]:center() 69 | list.picons[pos]:resize(80,80) 70 | list.picons[pos]:blit(886,125) 71 | end 72 | 73 | local y = 85 74 | for i=pos,math.min(list.len,pos+14) do 75 | 76 | if i == pos then screen.print(10,y,"->") end 77 | screen.print(40,y,list.data[i].id or "unk") 78 | 79 | if list.data[i].flag == 1 then ccolor=color.green else ccolor=color.red end 80 | screen.print(195,y,list.data[i].comp or "unk",1,ccolor,0x0,__ALEFT) 81 | 82 | screen.print(245,y,list.data[i].title or "unk",1,color.white,0x0,__ALEFT) 83 | 84 | if list.data[i].del then draw.fillrect(33,y,700,16,color.new(255,255,255,100)) end 85 | 86 | screen.print(700,y,list.data[i].sceid or "",1,color.white,0x0,__ARIGHT) 87 | screen.print(725,y,list.data[i].clon or "",1,color.green,0x0,__ARIGHT) 88 | 89 | y += 20 90 | end 91 | 92 | --------------------Left-------------------------------------------------------------------------------------------- 93 | if buttonskey then buttonskey:blitsprite(10,465,0) end -- X 94 | screen.print(45,468,"Install ARK",1,color.white,color.blue) 95 | 96 | if buttonskey then buttonskey:blitsprite(10,488,2) end -- [] 97 | screen.print(45,490,"Clone Game",1,color.white,color.blue) 98 | 99 | if buttonskey2 then buttonskey2:blitsprite(5,508,1) end --Start 100 | screen.print(45,510,"Install the MINI Sasuke vs Commander & ARK2",1,color.white,color.blue) 101 | 102 | --------------------Right------------------------------------------------------------------------------------------- 103 | if buttonskey then buttonskey:blitsprite(930,465,3) end --Cirle 104 | screen.print(920,468,"Delete CLON(s)",1,color.white,color.blue, __ARIGHT) 105 | 106 | if buttonskey then buttonskey:blitsprite(930,488,1) end --Triangle 107 | screen.print(920,490,"Mark/Unmark CLON(s) to be deleted",1,color.white,color.blue, __ARIGHT) 108 | 109 | if dels > 0 then 110 | if buttonskey then buttonskey2:blitsprite(923,508,0) end --Select 111 | screen.print(920,510,"Unmark all CLON(s)",1,color.white,color.blue, __ARIGHT) 112 | end 113 | 114 | else 115 | screen.print(10,480,"No games PSP :(") 116 | if buttonskey then 117 | buttonskey:blitsprite(10,508,0) 118 | end 119 | screen.print(10,510,"Install the MINI Sasuke vs Commander and install ARK",1,color.white,color.blue) 120 | 121 | if buttons.cross then 122 | if check_freespace() then install_ark_from0() 123 | else 124 | os.message("Not Enough Memory (minimum 40 MB)") 125 | end 126 | end 127 | end 128 | 129 | ---------Controls------------------------------------------------------------------------------------------------------- 130 | if (buttons.up or buttons.analogly < -60) and pos > 1 then pos -= 1 end 131 | if (buttons.down or buttons.analogly > 60) and pos < list.len then pos += 1 end 132 | 133 | if buttons.cross and list.data[pos].flag == 1 then 134 | if check_freespace() then 135 | if os.message("Install ARK in the game "..list.data[pos].id.." ?",1) == 1 then 136 | status = false 137 | buttons.homepopup(0) 138 | install_ark(list.data[pos].path) 139 | update_db(true) 140 | end 141 | else 142 | os.message("Not Enough Memory (minimum 40 MB)") 143 | end 144 | end 145 | 146 | if buttons.square and list.data[pos].flag == 1 then 147 | if check_freespace() then 148 | delp = false 149 | if os.message("Would you like to have this game cloned so you can install ARK \nor Adrenaline?",1) == 1 then 150 | 151 | if files.exists(PATHTOGAME..list.data[pos].id.."/PBOOT.PBP") then 152 | local sfo = game.info(PATHTOGAME..list.data[pos].id.."/PBOOT.PBP") 153 | if os.message("PBOOT.PBP: "..tostring(sfo.TITLE).." was found".."\n\nYou want to delete it ?\n\nClones will be clean ",1) == 1 then 154 | delp = true 155 | end 156 | end 157 | 158 | number_clons = math.minmax(tonumber(osk.init("Create Clones (1 to 9)","1",2,1)),1,9) 159 | install_clone(list.data[pos].path, list.data[pos].id, number_clons, delp) 160 | end--os.message 161 | else 162 | os.message("Not Enough Memory (minimum 40 MB)") 163 | end 164 | end 165 | 166 | if buttons.triangle and list.data[pos].clon == "©" then 167 | list.data[pos].del = not list.data[pos].del 168 | if list.data[pos].del then dels+=1 else dels-=1 end 169 | end 170 | 171 | if buttons.circle and list.data[pos].clon == "©" then 172 | if list.data[pos].del then 173 | if os.message("Delete(s) "..dels.." this CLON(s) ??",1) == 1 then 174 | buttons.homepopup(0) 175 | for i=1,list.len do 176 | if list.data[i].del then 177 | delete_bubble(list.data[i].id) 178 | end 179 | end 180 | os.message("Ready..."..dels.."\n\nCLON(s) Eliminated(s)") 181 | update_db(false) 182 | end 183 | elseif dels==0 then 184 | if os.message("Delete this CLON: "..list.data[pos].id.." ?",1) == 1 then 185 | buttons.homepopup(0) 186 | delete_bubble(list.data[pos].id) 187 | update_db(false) 188 | end 189 | end 190 | end 191 | 192 | if buttons.select then 193 | for i=1,list.len do 194 | if list.data[i].del then 195 | list.data[i].del = false 196 | dels=0 197 | end 198 | end 199 | end 200 | 201 | if buttons.start then 202 | if check_freespace() then 203 | if files.exists(PATHTONPUZ.."/EBOOT.PBP") then 204 | os.message("The MINI Sasuke vs Commander is already installed",0) 205 | else 206 | install_ark_from0() 207 | end 208 | else 209 | os.message("Not Enough Memory (minimum 40 MB)") 210 | end 211 | end 212 | ---------Controls--------------------------------------------------------------------------------------------------- 213 | 214 | screen.flip() 215 | end 216 | -------------------------------------------------------------------------------- /system/ark.lua: -------------------------------------------------------------------------------- 1 | ------Install ARK_01234 and PBOOT 2 | function install_ark(_path) 3 | local pathsave = "ux0:/pspemu/PSP/SAVEDATA/" 4 | if not files.exists(pathsave) then files.mkdir(pathsave) end 5 | files.extract(files.cdir().."/resources/ARK_01234.zip",pathsave) 6 | 7 | if not files.exists(_path) then files.mkdir(_path) end 8 | if files.exists(_path.."/PBOOT.PBP") then files.rename(_path.."/PBOOT.PBP", "PBOOTXYZ.PBP") end 9 | files.copy(files.cdir().."/resources/PBOOT.PBP",_path) 10 | end 11 | 12 | ------Install PSP MINI NPUZ00146 (include ARK_01234 & PBOOT) 13 | function install_ark_from0() 14 | buttons.homepopup(0) 15 | files.extract("resources/NPUZ00146/files_1.zip","ux0:/bgdl/t") 16 | files.extract("resources/NPUZ00146/files_2.zip","ux0:/pspemu/bgdl") 17 | install_ark(PATHTONPUZ) 18 | 19 | os.message("Your PSVita will restart...\n Remember to activate henkaku again",0) 20 | os.delay(2500) 21 | buttons.homepopup(1) 22 | power.restart() 23 | end 24 | 25 | function msg_memory(files_to_delete) 26 | files.delete(files_to_delete) 27 | os.message("Created "..count.." Clones\n\nTo eliminate Cloned bubbles please do it with ArkFast") 28 | update_db(false) 29 | end 30 | 31 | -------Clones 32 | function install_clone(pathid,id,clons,delete_pboot) 33 | 34 | if files.exists(pathid.."/__sce_ebootpbp") and files.exists(pathid.."/EBOOT.PBP") then 35 | 36 | buttons.homepopup(0) 37 | local sizedir = files.size(pathid.."/__sce_ebootpbp") + files.size(pathid.."/EBOOT.PBP") 38 | 39 | if sizeUxo > sizedir then 40 | files.mkdir("ux0:pspemu/"..id) 41 | files.copy(pathid.."/__sce_ebootpbp","ux0:pspemu/"..id) 42 | files.copy(pathid.."/EBOOT.PBP","ux0:pspemu/"..id) 43 | 44 | if delete_pboot == false then 45 | if files.exists(pathid.."/PBOOT.PBP") then files.copy(pathid.."/PBOOT.PBP","ux0:pspemu/"..id) end 46 | end 47 | else 48 | os.message("Not Enough Memory") 49 | buttons.homepopup(1) 50 | return 51 | end 52 | 53 | --Update size 54 | sizedir = files.size("ux0:pspemu/"..id) 55 | 56 | count,status = 0,true 57 | for z=1,clons do 58 | local i=0 59 | while files.exists(PATHTOGAME..string.format("%s%03d",string.sub("CNPEZ000",1,-3),i)) do 60 | i+=1 61 | end 62 | local lastid = string.format("%s%03d",string.sub("CNPEZ000",1,-3),i) 63 | 64 | files.rename("ux0:pspemu/"..id, lastid) 65 | id = lastid 66 | 67 | if check_freespace() then 68 | if sizeUxo > sizedir then 69 | mgsid = lastid 70 | files.copy("ux0:pspemu/"..lastid, PATHTOGAME) 71 | count+=1 72 | else 73 | os.message("Not Enough Memory (minimum 40 MB)") 74 | if count > 0 then 75 | msg_memory("ux0:pspemu/"..id) 76 | else 77 | files.delete("ux0:pspemu/"..id) 78 | buttons.homepopup(1) 79 | return 80 | end 81 | end 82 | else 83 | os.message("Not Enough Memory (minimum 40 MB)") 84 | if count > 0 then 85 | msg_memory("ux0:pspemu/"..id) 86 | else 87 | files.delete("ux0:pspemu/"..id) 88 | buttons.homepopup(1) 89 | return 90 | end 91 | end 92 | end--for 93 | 94 | msg_memory("ux0:pspemu/"..id) 95 | else 96 | os.message("This bubble has no PBP files") 97 | end 98 | 99 | end 100 | -------------------------------------------------------------------------------- /system/callbacks.lua: -------------------------------------------------------------------------------- 1 | -- CallBack CopyFiles 2 | function onCopyFiles(size,written,file) 3 | if status then 4 | if back then back:blit(0,0) end 5 | draw.fillrect(0,0,__DISPLAYW,30, color.new(255,255,255,100) ) 6 | 7 | if (count+1)<=number_clons then 8 | screen.print(10,10,"Cloning Bubble: "..count+1) 9 | screen.print(10,35,"File: "..tostring(mgsid)) 10 | screen.print(10,55,"Percent: "..math.floor((written*100)/size).." %") 11 | end 12 | 13 | screen.flip() 14 | end 15 | return 1 16 | end 17 | 18 | -- CallBack Extraction 19 | function onExtractFiles(size,written,file,totalsize,totalwritten) 20 | if back then back:blit(0,0) end 21 | draw.fillrect(0,0,__DISPLAYW,30, color.new(255,255,255,100) ) 22 | 23 | screen.print(10,10,"Extracting and Installing...") 24 | screen.print(10,30,"File: "..tostring(file)) 25 | screen.print(10,50,"Percent: "..math.floor((written*100)/size).." %") 26 | screen.print(10,70,"Percent Total: "..math.floor((totalwritten*100)/totalsize).." %") 27 | screen.print(10,90,"Size Total: "..tostring(totalsize).." ".."Written: "..tostring(totalwritten)) 28 | 29 | screen.flip() 30 | return 1 31 | end 32 | -------------------------------------------------------------------------------- /system/functions.lua: -------------------------------------------------------------------------------- 1 | --------------------Check your Games (ONLY PSP GAMES)----------------------------------------------------------------------- 2 | list = {data = {}, len = 0, icons = {}, picons = {} } 3 | 4 | function reload_list() 5 | list.data = game.list(__PSPEMU) 6 | table.sort(list.data ,function (a,b) return string.lower(a.id) 40 * 1024* 1024) then return true 79 | else return false end 80 | end 81 | end 82 | 83 | function delete_bubble(_gameid) 84 | files.delete(PATHTOCLON.._gameid) 85 | files.delete(PATHTOGAME.._gameid) 86 | end 87 | -------------------------------------------------------------------------------- /thread_net.lua: -------------------------------------------------------------------------------- 1 | -- Global constants 2 | APP_VERSION_MAJOR = 0x02 -- major.minor 3 | APP_VERSION_MINOR = 0x30 4 | 5 | APP_VERSION = ((APP_VERSION_MAJOR << 0x18) | (APP_VERSION_MINOR << 0x10)) -- Union Binary 6 | 7 | UPDATE_PORT = channel.new("UPDATE_PORT") 8 | 9 | local version = http.get("https://raw.githubusercontent.com/ONElua/ArkFast/master/version") 10 | if version and tonumber(version) then 11 | version = tonumber(version) 12 | local major = (version >> 0x18) & 0xFF; 13 | local minor = (version >> 0x10) & 0xFF; 14 | if version > APP_VERSION then 15 | UPDATE_PORT:push(version) 16 | end 17 | end -------------------------------------------------------------------------------- /updater.lua: -------------------------------------------------------------------------------- 1 | function onAppInstallCB(step, size_argv, written, file, totalsize, totalwritten) 2 | return 10 -- Ok code 3 | end 4 | 5 | function onNetGetFileCB(size,written,speed) 6 | if back then back:blit(0,0) end 7 | screen.print(10,10,"Downloading Update...") 8 | screen.print(10,30,"Size: "..tostring(size).." Written: "..tostring(written).." Speed: "..tostring(speed).."Kb/s") 9 | screen.print(10,50,"Porcent: "..math.floor((written*100)/size).."%") 10 | draw.fillrect(0,520,((written*960)/size),24,color.new(0,255,0)) 11 | screen.flip() 12 | buttons.read() 13 | if buttons.circle then return 0 end --Cancel or Abort 14 | return 1; 15 | end 16 | 17 | if files.exists("ux0:/app/ONEUPDATE") then 18 | game.delete("ONEUPDATE") -- Exists delete update app 19 | end 20 | 21 | UPDATE_PORT = channel.new("UPDATE_PORT") 22 | 23 | local scr_flip = screen.flip 24 | function screen.flip() 25 | scr_flip() 26 | if UPDATE_PORT:available() > 0 then 27 | local version = UPDATE_PORT:pop() 28 | local major = (version >> 0x18) & 0xFF; 29 | local minor = (version >> 0x10) & 0xFF; 30 | if os.message(__NAMEVPK.." "..string.format("%X.%02X",major, minor).." is now available.\n".."Do you want to update the application?", 1) == 1 then 31 | buttons.homepopup(0) 32 | 33 | local url = string.format("https://github.com/ONElua/ArkFast/releases/download/%s/%s", string.format("%X.%02X",major, minor),__NAMEVPK..".vpk") 34 | local path = "ux0:data/"..__NAMEVPK..".vpk" 35 | onAppInstall = onAppInstallCB 36 | onNetGetFile = onNetGetFileCB 37 | local res = http.getfile(url, path) 38 | if res then -- Success! 39 | files.mkdir("ux0:/data/1luapkg") 40 | files.copy("eboot.bin","ux0:/data/1luapkg") 41 | files.copy("updater/script.lua","ux0:/data/1luapkg/") 42 | files.copy("updater/param.sfo","ux0:/data/1luapkg/sce_sys/") 43 | game.installdir("ux0:/data/1luapkg") 44 | files.delete("ux0:/data/1luapkg") 45 | game.launch(string.format("ONEUPDATE&%s&%s",os.titleid(),path)) -- Goto installer extern! 46 | end 47 | 48 | buttons.homepopup(1) 49 | end 50 | end 51 | end 52 | 53 | THID = thread.new("thread_net.lua") -------------------------------------------------------------------------------- /updater/param.sfo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONElua/ArkFast/8d7b0594359a0334c21d12cb657895e6d724debe/updater/param.sfo -------------------------------------------------------------------------------- /updater/script.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Updater Of App. 3 | Designed by DevDavisNunez to ONElua projects.. :D 4 | TODO: 5 | Maybe, extract in APP, and only installdir in this.. 6 | ]] 7 | 8 | buttons.homepopup(0) 9 | 10 | color.loadpalette() 11 | 12 | args = os.arg() 13 | if args:len() == 0 then 14 | os.message("Error args lost!") 15 | os.exit() 16 | end 17 | 18 | args /= "&" 19 | if #args != 3 then 20 | os.message("Error args lost!") 21 | os.exit() 22 | end 23 | 24 | function onAppInstall(step, size_argv, written, file, totalsize, totalwritten) 25 | 26 | if step == 1 then -- Only msg of state 27 | draw.fillrect(0,0,960,30, color.green:a(100)) 28 | screen.print(10,10,"Search in vpk, Unsafe or Dangerous files!") 29 | screen.flip() 30 | elseif step == 2 then -- Alerta Vpk requiere confirmacion! 31 | return 10 -- Ok code 32 | elseif step == 3 then -- Unpack :P 33 | draw.fillrect(0,0,960,30, color.green:a(100)) 34 | screen.print(10,10,"Unpack vpk...") 35 | screen.print(925,10,"Percent Total: "..math.floor((totalwritten*100)/totalsize).." %",1.0,color.white, color.black, __ARIGHT) 36 | screen.print(10,35,"File: "..tostring(file)) 37 | screen.print(10,55,"Percent: "..math.floor((written*100)/size_argv).." %") 38 | draw.fillrect(0,544-30,(totalwritten*960)/totalsize,30, color.new(0,255,0)) 39 | screen.flip() 40 | elseif step == 4 then -- Promote o install :P 41 | draw.fillrect(0,0,960,30, color.green:a(100)) 42 | screen.print(10,10,"Installing...") 43 | screen.flip() 44 | end 45 | end 46 | 47 | game.install(args[3]) 48 | files.delete(args[3]) 49 | 50 | buttons.homepopup(1) 51 | 52 | game.launch(args[2]) -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | 36700160 2 | --------------------------------------------------------------------------------