diff --git a/eboot.bin b/eboot.bin index 9a923914..3429d6c4 100644 Binary files a/eboot.bin and b/eboot.bin differ diff --git a/git/shared.lua b/git/shared.lua index c212332b..2f50d829 100644 --- a/git/shared.lua +++ b/git/shared.lua @@ -3,6 +3,6 @@ APP_REPO = "theheroGAC" APP_PROJECT = "Autoplugin" -APP_VERSION_MAJOR = 0x01 -- major.minor -APP_VERSION_MINOR = 0x10 +APP_VERSION_MAJOR = 0x02 -- major.minor +APP_VERSION_MINOR = 0x00 APP_VERSION = ((APP_VERSION_MAJOR << 0x18) | (APP_VERSION_MINOR << 0x10)) -- Union Binary diff --git a/git/updater.lua b/git/updater.lua index 94c8d14b..4f54d00c 100644 --- a/git/updater.lua +++ b/git/updater.lua @@ -14,10 +14,18 @@ function screen.flip() local version = UPDATE_PORT:pop() local major = (version >> 0x18) & 0xFF; local minor = (version >> 0x10) & 0xFF; + update = image.load("git/updater/update.png") + + if update then update:blit(0,0) + elseif back then back:blit(0,0) end + screen.flip() if os.message(string.format("%s v %s", APP_PROJECT, string.format("%X.%02X",major, minor).." is now available.\n".." Do you want to update the application?"), 1) == 1 then buttons.homepopup(0) - if back then back:blit(0,0) end + + if update then update:blit(0,0) + elseif back then back:blit(0,0) end + local url = string.format("https://github.com/%s/%s/releases/download/%s/%s", APP_REPO, APP_PROJECT, string.format("%X.%02X",major, minor), APP_PROJECT..".vpk") local path = "ux0:data/"..APP_PROJECT..".vpk" local onAppInstallOld = onAppInstall @@ -26,7 +34,10 @@ function screen.flip() end local onNetGetFileOld = onNetGetFile function onNetGetFile(size,written,speed) - if back then back:blit(0,0) end + + if update then update:blit(0,0) + elseif back then back:blit(0,0) end + screen.print(10,10,"Downloading Update...") screen.print(10,30,"Size: "..tostring(size).." Written: "..tostring(written).." Speed: "..tostring(speed).."Kb/s") screen.print(10,50,"Percent: "..math.floor((written*100)/size).."%") @@ -41,6 +52,7 @@ function screen.flip() files.mkdir("ux0:/data/1luapkg") files.copy("eboot.bin","ux0:/data/1luapkg") files.copy("git/updater/script.lua","ux0:/data/1luapkg/") + files.copy("git/updater/update.png","ux0:/data/1luapkg/") files.copy("git/updater/param.sfo","ux0:/data/1luapkg/sce_sys/") game.installdir("ux0:/data/1luapkg") files.delete("ux0:/data/1luapkg") diff --git a/git/updater/script.lua b/git/updater/script.lua index 2283338c..64a52528 100644 --- a/git/updater/script.lua +++ b/git/updater/script.lua @@ -6,8 +6,8 @@ ]] buttons.homepopup(0) - color.loadpalette() +update = image.load("update.png") args = os.arg() if args:len() == 0 then @@ -24,22 +24,25 @@ end function onAppInstall(step, size_argv, written, file, totalsize, totalwritten) if step == 1 then -- Only msg of state - draw.fillrect(0,0,960,30, color.green:a(100)) - screen.print(10,10,"Search in vpk, Unsafe or Dangerous files!") + if update then update:blit(0,0) end + draw.fillrect(0,0,960,30, color.green:a(100)) + screen.print(10,10,"Search in vpk, Unsafe or Dangerous files!") screen.flip() elseif step == 2 then -- Warning Vpk confirmation! return 10 -- Ok elseif step == 3 then -- Unpack - draw.fillrect(0,0,960,30, color.green:a(100)) - screen.print(10,10,"Unpack vpk...") - screen.print(925,10,"Percent Total: "..math.floor((totalwritten*100)/totalsize).." %",1.0,color.white, color.black, __ARIGHT) - screen.print(10,35,"File: "..tostring(file)) - screen.print(10,55,"Percent: "..math.floor((written*100)/size_argv).." %") - draw.fillrect(0,544-30,(totalwritten*960)/totalsize,30, color.new(0,255,0)) + if update then update:blit(0,0) end + draw.fillrect(0,0,960,30, color.green:a(100)) + screen.print(10,10,"Unpack vpk...") + screen.print(925,10,"Percent Total: "..math.floor((totalwritten*100)/totalsize).." %",1.0,color.white, color.black, __ARIGHT) + screen.print(10,35,"File: "..tostring(file)) + screen.print(10,55,"Percent: "..math.floor((written*100)/size_argv).." %") + draw.fillrect(0,544-30,(totalwritten*960)/totalsize,30, color.new(0,255,0)) screen.flip() elseif step == 4 then -- Promote or install - draw.fillrect(0,0,960,30, color.green:a(100)) - screen.print(10,10,"Installing...") + if update then update:blit(0,0) end + draw.fillrect(0,0,960,30, color.green:a(100)) + screen.print(10,10,"Installing...") screen.flip() end end diff --git a/git/updater/update.png b/git/updater/update.png new file mode 100644 index 00000000..a10b24f8 Binary files /dev/null and b/git/updater/update.png differ diff --git a/resources/autoplugin.lua b/resources/autoplugin.lua index dd182d28..1ef82882 100644 --- a/resources/autoplugin.lua +++ b/resources/autoplugin.lua @@ -1,92 +1,229 @@ ------Autoinstall plugin --------------------Resource----------- -dofile("git/shared.lua") -if __UPDATE == 1 then - local wstrength = wlan.strength() - if wstrength then - if wstrength > 55 then dofile("git/updater.lua") end +-------------------Resources----------- +--Init load configs +__UX0, __UR0 = 1,2 +tai.load() + +if not files.exists("ux0:tai/config.txt") and not files.exists("ur0:tai/config.txt") then + if tostring(os.swversion()) == "3.60" then files.copy("resources/config_360/config.txt", "ur0:tai/") + elseif tostring(os.swversion()) == "3.65" then files.copy("resources/config_365/config.txt", "ur0:tai/") end + tai.load() +end + +--Backups +tai.sync(__UX0, "ux0:tai/config_backup.txt") +tai.sync(__UR0, "ur0:tai/config_backup.txt") + +if back then back:blit(0,0) end + message_wait("Creating Config_backups.txt") +os.delay(1500) + +local change, multi, path_plugins = false,false, "resources/plugins/" +local locations = { "ux0:", "ur0:", } + +local loc, toinstall = 1,0 +if tai[__UR0].exist then loc = 2 end + +plugins = { + + { name = "Gamesd by xyzz (Only in ur0:tai/config.txt)", path = "gamesd.skprx", section = "KERNEL" }, + { name = "NoNpDrm by TheFl0w", path = "nonpdrm.skprx", section = "KERNEL" }, + + { name = "NoPsmDrm by frangarcj", path = "nopsmdrm.skprx", section = "KERNEL" }, + { name = "Vitabright by devnoname120(only for 3.60)", path = "vitabright.skprx", section = "KERNEL", configuration = "vitabright_lut.txt" }, + { name = "NoAVLS by SilicaAndPina", path = "noavls.skprx", section = "KERNEL" }, + { name = "Repatch by dots", path = "repatch.skprx", section = "KERNEL" }, + { name = "ds3vita by xerpi", path = "ds3vita.skprx", section = "KERNEL" }, + { name = "ds4vita by xerpi", path = "ds4vita.skprx", section = "KERNEL" }, + { name = "Kuio by Rinnegatamante", path = "kuio.skprx", section = "KERNEL" }, + { name = "Adrenaline by TheFl0w(fix double touch)", path = "ux0:app/PSPEMUCFW/sce_module/adrenaline_kernel.skprx", section = "KERNEL" }, + + { name = "DownloadEnabler by TheFl0w", path = "download_enabler.suprx", section = "main" }, + { name = "Shellbat by nowrep", path = "shellbat.suprx", section = "main" }, + { name = "pngshot by xyzz", path = "pngshot.suprx", section = "main" }, + { name = "Vflux by Applelo", path = "vFlux.suprx", section = "main" }, + + { name = "PSV-VSH MENU by joel16", path = "vsh.suprx", section = "ALL" },-- Need kuio.skprx + +} + +function install_plugins(nplugin, partition) + + local path_config = locations[partition].."tai/config.txt" + local path_tai = locations[partition].."tai/" + + --Copy Extra-plugins or configurations + if nplugin == 4 then + files.copy(path_plugins..plugins[nplugin].configuration, path_tai) + elseif nplugin == 15 then + files.copy(path_plugins..plugins[9].path, path_tai) + end + + --Install plugin to TAI folder + if nplugin == 12 then + files.copy(path_plugins..plugins[nplugin].path, "ux0:tai/") --Shellbat.suprx work in ux0 + else + files.copy(path_plugins..plugins[nplugin].path, path_tai) + end + + --Insert plugin to Config + if nplugin == 1 then + tai.put(partition, plugins[nplugin].section, path_tai..plugins[nplugin].path, 1) --Gamesd.skprx first + elseif nplugin == 10 then --Adrenaline ux0:app + tai.put(partition, plugins[nplugin].section, plugins[nplugin].path ) + elseif nplugin == 12 then + tai.put(partition, plugins[nplugin].section, "ux0:tai/"..plugins[nplugin].path ) + elseif nplugin == 15 then --VSH menu need kuio.skprx + tai.put(partition, plugins[nplugin].section, path_tai..plugins[nplugin].path) + tai.put(partition, plugins[9].section, path_tai..plugins[9].path) + else + tai.put(partition, plugins[nplugin].section, path_tai..plugins[nplugin].path) + end + + tai.sync(partition) + change = true + buttons.homepopup(0) + if not multi then os.message(plugins[nplugin].name.."\n\nhave been installed") end + +end + +function Reload_ur0_config() + loc = __UR0 + + if not tai[__UR0].exist then + if tai[__UX0].exist then files.copy(tai[__UX0].path, "ur0:tai/") + else + if tostring(os.swversion()) == "3.60" then files.copy("resources/config_360/config.txt", "ur0:tai/") + elseif tostring(os.swversion()) == "3.65" then files.copy("resources/config_365/config.txt", "ur0:tai/") end + end + end + + --Update configs + tai.load() + + if tai[__UX0].exist then files.delete(tai[__UX0].path) end + +end + +function plugins_installation(sel) + if sel == 1 then --gamesd only in ur0:tai/config.txt and not ux0:tai/config.txt + Reload_ur0_config() + end + + if sel == 4 and tostring(os.swversion()) != "3.60" then os.message("Vitabright only for 3.60") + else + if files.exists(tai[loc].path) then + install_plugins(sel, loc) + else + os.message("Missing config") + end end end -color.loadpalette() -- Load Defaults colors -back = image.load("resources/back.png") +local limit = 14 +local scroll = newScroll(plugins,limit) +buttons.interval(10,10) while true do buttons.read() if back then back:blit(0,0) end - - screen.print(10,20,"Autoplugin Install the plugins with a click",1,color.red) - screen.print(10,50,"List of plugins ready to install:",1,color.white) - screen.print(25,80,"-> DownloadEnabler by TheFl0w\n-> NoNpDrm by TheFl0w\n-> NoPsmDrm by frangarcj\n-> gamesd by xyzz\n-> PSVita-StorageMgr by Celesteblue\n-> Shellbat by nowrep\n-> Vitabright by devnoname120(only for 3.60)\n-> pngshot by xyzz\n-> Kuio by Rinnegatamante\n-> PSV-VSH MENU by joel16\n-> Vflux by Applelo\n-> Repatch by dots-tb\n-> NoAVLS by SilicaAndPina\n-> ds3vita and ds4vita by xerpi",1,color.green) - - screen.print(25,380,"Press CROSS to install Plugins on ux0:tai",1,color.white,color.blue) - screen.print(25,400,"Press CIRCLE to install Plugins on ur0:tai",1,color.white,color.black) - screen.print(25,420,"Press UP to install Plugins on ur0:tai(for SD2VITA users with gamesd plugin)",1,color.white,color.black) - screen.print(25,440,"Press SELECT to install Plugins on ur0:tai(for SD2VITA/PSVSD users with PSVita-StorageMgr)",1,color.white,color.black) - screen.print(25,460,"Press TRIANGLE to install Plugins on PSTV ONLY(ux0:tai).",1,color.white,color.green) - screen.print(25,480,"Press SQUARE to enter the extra tool.",1,color.white,color.blue) - screen.print(15,500,"Press START to exit.",1,color.white,color.red) - - screen.flip() -- Show Buff - if buttons.cross then - if files.exists("ux0:tai") then files.rename("ux0:tai", "_backup") end - files.extract("resources/autoplugin.zip","ux0:/tai") - files.extract("resources/config.zip","ux0:/tai") - os.message("Your PSVita will restart...\nThe plugins have been installed\n\nThe old folder tai has been saved on ux0: as tai_backup",0) - os.delay(2500) - buttons.homepopup(1) - power.restart() -end + screen.print(480,20,"Autoplugin Install the plugins with a click",1,color.red, 0x0, __ACENTER) + screen.print(10,50,"List of plugins ready to install:",1,color.white) - if buttons.circle then - if files.exists("ur0:tai/config.txt") then files.rename("ur0:tai/config.txt", "config_backup.txt") end - files.copy("ur0:tai","ur0:tai/backup/") - files.extract("resources/autoplugin.zip","ur0:/tai") - files.extract("resources/config2.zip","ur0:/tai") - os.message("Your PSVita will restart...\nThe plugins have been installed\n\nThe old file has been saved on ur0:tai/config_backup.txt",0) - os.delay(2500) - buttons.homepopup(1) - power.restart() -end + screen.print(10,440,"Press X to Install the plugin(s)",1,color.white,color.black) + screen.print(10,460,"Press Square to select the plugin (s) to install",1,color.white,color.black) + screen.print(10,480,"Press Triangle to Install ALL the plugins",1,color.white,color.black) + screen.print(10,500,"Press Select to clean selected plugins",1,color.white,color.black) + screen.print(10,522,"Press START to exit",1,color.white,color.red) -if buttons.up then - if files.exists("ur0:tai/config.txt") then files.rename("ur0:tai/config.txt", "config_backup.txt") end - files.extract("resources/autoplugin4.zip","ur0:/tai") - files.extract("resources/config4.zip","ur0:/tai") - os.message("Your PSVita will restart...\nThe plugins have been installed\n\nThe file config has been saved on ur0:tai/config_backup.txt",0) - os.delay(2500) - buttons.homepopup(1) - power.restart() -end + --Partitions + local xRoot = 750 + local w = (955-xRoot)/#locations + for i=1, #locations do + if loc == i then + draw.fillrect(xRoot,36,w,36, color.green:a(90)) + end + screen.print(xRoot+(w/2), 45, locations[i], 1, color.white, color.blue, __ACENTER) + xRoot += w + end + --List of Plugins + local y = 80 + for i=scroll.ini,scroll.lim do - if buttons.select then - if files.exists("ur0:tai/config.txt") then files.rename("ur0:tai/config.txt", "config_backup.txt") end - files.extract("resources/autoplugin3.zip","ur0:/tai") - files.extract("resources/config3.zip","ur0:/tai") - os.message("Your PSVita will restart...\nThe plugins have been installed\n\nThe file config has been saved on ur0:tai/config_backup.txt",0) - os.delay(2500) - buttons.homepopup(1) - power.restart() -end + if i == scroll.sel then draw.fillrect(0,y-2,945,23,color.green:a(90)) end + screen.print(30,y, plugins[i].name,1.0,color.white,color.blue,__ALEFT) + if plugins[i].inst then + screen.print(5,y,"->",1,color.white,color.green) + end - if buttons.triangle then - if files.exists("ux0:tai") then files.rename("ux0:tai", "_backup") end - files.extract("resources/autoplugin2.zip","ux0:/tai") - files.extract("resources/config.zip","ux0:/tai") - os.message("Your VITATV will restart...\nThe plugins have been installed\n\nThe old folder tai has been saved on ux0: as tai_backup",0) - os.delay(2500) - buttons.homepopup(1) - power.restart() -end + y+=26 + end + + ---- Draw Scroll Bar + local ybar,hbar = 80, (limit*26)-2 + draw.fillrect(950,ybar-2,8,hbar,color.shine) + if scroll.maxim >= limit then -- Draw Scroll Bar + local pos_height = math.max(hbar/scroll.maxim, limit) + --Bar Scroll + draw.fillrect(950, ybar-2 + ((hbar-pos_height)/(scroll.maxim-1))*(scroll.sel-1), 8, pos_height, color.new(0,255,0)) + end + + screen.print(955,500,"Plugins: "..toinstall,1,color.white,color.blue, __ARIGHT) + + screen.flip() + -------------------------- Controls -------------------------- + if buttons.up or buttons.analogly < -60 then scroll:up() end + if buttons.down or buttons.analogly > 60 then scroll:down() end + --if buttons.triangle then update_adrenaline(change) end + + --Install selected plugins + if buttons.cross then + if toinstall <= 1 then + plugins_installation(scroll.sel) + else + for i=1, scroll.maxim do + if plugins[i].inst then plugins_installation(i) end + end + os.delay(50) + end + end + + --Mark/Unmark if buttons.square then -dofile("resources/extra.lua") -end + plugins[scroll.sel].inst = not plugins[scroll.sel].inst + if plugins[scroll.sel].inst then toinstall+=1 else toinstall-=1 end + end - if buttons.released.start then break end -- Exit -end \ No newline at end of file + --Clean selected + if buttons.select then + for i=1,scroll.maxim do + plugins[i].inst = false + if toinstall >= 1 then toinstall-=1 end + end + end + + --Install ALL plugins + if buttons.triangle then + multi=true + for i=1,scroll.maxim do + plugins_installation(i) + end + end + + --Exit + if buttons.released.start then + if change then + os.message("Your PSVita will restart.\n\nThe config.txt backup has been saved to\n\n"..locations[loc].."tai/tai_backup/config.txt",0) + os.delay(250) + power.restart() + end + break + end + +end diff --git a/resources/commons.lua b/resources/commons.lua new file mode 100644 index 00000000..e6899c2b --- /dev/null +++ b/resources/commons.lua @@ -0,0 +1,141 @@ +--[[ + CallBacks LUA + + Autoinstall plugin + Licensed by Creative Commons Attribution-ShareAlike 4.0 + http://creativecommons.org/licenses/by-sa/4.0/ + + Designed By Gdljjrod & DevDavisNunez. + Collaborators: BaltazaR4 & Wzjk. +]] + +function message_wait(message) + local mge = (message or "Please wait...") + local titlew = string.format(mge) + local w,h = screen.textwidth(titlew,1) + 30,70 + local x,y = 480 - (w/2), 272 - (h/2) + + draw.fillrect(x,y,w,h, color.shine) + draw.rect(x,y,w,h,color.white) + screen.print(480,y+13, titlew,1,color.white,color.black,__ACENTER) + screen.flip() +end + +-- CallBack Extraction +function onExtractFiles(size,written,file,totalsize,totalwritten) + + if back then back:blit(0,0) end + draw.fillrect(0,0,__DISPLAYW,30, color.shine) + + screen.print(10,10,"Extraction...") + + screen.print(925,10,"Percent Total: "..math.floor((totalwritten*100)/totalsize).." %",1.0,color.white, color.black, __ARIGHT) + screen.print(10,70,"File: "..tostring(file),1.0,color.white, color.black) + screen.print(10,90,"Percent: "..math.floor((written*100)/size).." %",1.0,color.white, color.black) + + screen.flip() + + buttons.read() + return 1 +end + +-- CallBack CopyFiles +function onCopyFiles(size,written,file) + + if back then back:blit(0,0) end + draw.fillrect(0,0,__DISPLAYW,30, color.shine) + + screen.print(10,10,"Copying: ") + screen.print(945,10,math.floor((written*100)/size).." %",1.0,color.white, color.black, __ARIGHT) + screen.print(10,70,"File: "..tostring(file),1.0,color.white, color.black) + + screen.flip() +end + +-- CallBack DeleteFiles +function onDeleteFiles(file) + + if back then back:blit(0,0) end + draw.fillrect(0,0,__DISPLAYW,30, color.shine) + + screen.print(10,10,"Deleting: ",1.0,color.white, color.black) + screen.print(10,70,"File: "..tostring(file),1.0,color.white, color.black) + + screen.flip() + +end + +--[[ + ## Library Scroll ## + Designed By DevDavis (Davis Nuñez) 2011 - 2016. + Based on library of Robert Galarga. + Create a obj scroll, this is very usefull for list show + ]] +function newScroll(a,b,c) + local obj = {ini=1,sel=1,lim=1,maxim=1,minim = 1} + + function obj:set(tab,mxn,modemintomin) -- Set a obj scroll + obj.ini,obj.sel,obj.lim,obj.maxim,obj.minim = 1,1,1,1,1 + if(type(tab)=="number")then + if tab > mxn then obj.lim=mxn else obj.lim=tab end + obj.maxim = tab + else + if #tab > mxn then obj.lim=mxn else obj.lim=#tab end + obj.maxim = #tab + end + if modemintomin then obj.minim = obj.lim end + end + + function obj:max(mx) + obj.maxim = #mx + end + + function obj:up() + if obj.sel>obj.ini then obj.sel=obj.sel-1 return true + elseif obj.ini-1>=obj.minim then + obj.ini,obj.sel,obj.lim=obj.ini-1,obj.sel-1,obj.lim-1 + return true + end + end + + function obj:down() + if obj.selobj.ini then + obj.sel-=1 + + if obj.sel==1 then + if obj.lim-obj.ini>=limit then obj.lim-=1 end + else obj.ini-=1 + if obj.lim-obj.ini>=limit+1 then obj.lim-=1 end + end + return true + end + end + + function obj:down_menu() + if obj.sel Update Adrenaline 6.3 by TheFl0w\n-> Explorer by Team OneLua",1,color.green) - screen.print(25,400,"Press CROSS to update Adrenaline",1,color.white,color.blue) - screen.print(25,420,"Press TRIANGLE to Explorer",1,color.white,color.blue) - screen.print(25,440,"Press SQUARE to return to the main menu",1,color.white,color.blue) - screen.print(15,500,"Press START to exit.",1,color.white,color.red) - - screen.flip() -- Show Buff - - if buttons.cross then - files.extract("resources/adrenaline.zip","ux0:app/PSPEMUCFW/sce_module") - os.message("Your PSVita will restart...\n\n Adrenaline has been update",0) - os.delay(2500) - buttons.homepopup(1) - power.restart() -end - - if buttons.triangle then -dofile("resources/explorer.lua") +function update_adrenaline(flag) + + while true do + buttons.read() + if back then back:blit(0,0) end + + screen.print(10,20,"Update Adrenaline with one click",1,color.red) + screen.print(25,80,"-> Update Adrenaline 6.3 by TheFl0w",1,color.green) + screen.print(25,420,"Press CROSS to update Adrenaline",1,color.white,color.blue) + screen.print(25,440,"Press SQUARE to return to the main menu",1,color.white,color.blue) + screen.print(15,500,"Press START to exit.",1,color.white,color.red) + + screen.flip() + + if buttons.released.square then return end + + if buttons.cross then + files.extract("resources/plugins/adrenaline.zip","ux0:app/PSPEMUCFW/sce_module") + os.message("Your PSVita will restart...\n\n Adrenaline has been update",0) + os.delay(2500) + --power.restart() end -if buttons.square then -dofile("resources/autoplugin.lua") -end + if buttons.released.start then + if flag then + os.message("Your PSVita will restart") + os.delay(2500) + --power.restart() + end + os.exit() + end -- Exit + + end - if buttons.released.start then break end -- Exit end \ No newline at end of file diff --git a/resources/plugins/_gamesd.skprx b/resources/plugins/_gamesd.skprx new file mode 100644 index 00000000..47744968 Binary files /dev/null and b/resources/plugins/_gamesd.skprx differ diff --git a/resources/plugins/adrenaline.zip b/resources/plugins/adrenaline.zip new file mode 100644 index 00000000..dc5ae1fb Binary files /dev/null and b/resources/plugins/adrenaline.zip differ diff --git a/resources/plugins/download_enabler.suprx b/resources/plugins/download_enabler.suprx new file mode 100644 index 00000000..bba495df Binary files /dev/null and b/resources/plugins/download_enabler.suprx differ diff --git a/resources/plugins/ds3vita.skprx b/resources/plugins/ds3vita.skprx new file mode 100644 index 00000000..10de3f76 Binary files /dev/null and b/resources/plugins/ds3vita.skprx differ diff --git a/resources/plugins/ds4vita.skprx b/resources/plugins/ds4vita.skprx new file mode 100644 index 00000000..0dde287d Binary files /dev/null and b/resources/plugins/ds4vita.skprx differ diff --git a/resources/plugins/gamesd.skprx b/resources/plugins/gamesd.skprx new file mode 100644 index 00000000..4cf2ea6a Binary files /dev/null and b/resources/plugins/gamesd.skprx differ diff --git a/resources/plugins/kuio.skprx b/resources/plugins/kuio.skprx new file mode 100644 index 00000000..0f2e01b9 Binary files /dev/null and b/resources/plugins/kuio.skprx differ diff --git a/resources/plugins/noavls.skprx b/resources/plugins/noavls.skprx new file mode 100644 index 00000000..7f24cab7 Binary files /dev/null and b/resources/plugins/noavls.skprx differ diff --git a/resources/plugins/nonpdrm.skprx b/resources/plugins/nonpdrm.skprx new file mode 100644 index 00000000..92259c0e Binary files /dev/null and b/resources/plugins/nonpdrm.skprx differ diff --git a/resources/plugins/nopsmdrm.skprx b/resources/plugins/nopsmdrm.skprx new file mode 100644 index 00000000..0b285917 Binary files /dev/null and b/resources/plugins/nopsmdrm.skprx differ diff --git a/resources/plugins/pngshot.suprx b/resources/plugins/pngshot.suprx new file mode 100644 index 00000000..b2f11c0c Binary files /dev/null and b/resources/plugins/pngshot.suprx differ diff --git a/resources/plugins/repatch.skprx b/resources/plugins/repatch.skprx new file mode 100644 index 00000000..fd1739c5 Binary files /dev/null and b/resources/plugins/repatch.skprx differ diff --git a/resources/plugins/shellbat.suprx b/resources/plugins/shellbat.suprx new file mode 100644 index 00000000..2eb127fc Binary files /dev/null and b/resources/plugins/shellbat.suprx differ diff --git a/resources/plugins/vFlux.suprx b/resources/plugins/vFlux.suprx new file mode 100644 index 00000000..f0b73013 Binary files /dev/null and b/resources/plugins/vFlux.suprx differ diff --git a/resources/plugins/vitabright.skprx b/resources/plugins/vitabright.skprx new file mode 100644 index 00000000..5adcb5b7 Binary files /dev/null and b/resources/plugins/vitabright.skprx differ diff --git a/resources/plugins/vitabright_lut.txt b/resources/plugins/vitabright_lut.txt new file mode 100644 index 00000000..8fce6fc8 --- /dev/null +++ b/resources/plugins/vitabright_lut.txt @@ -0,0 +1,17 @@ +9F 9F BE CF D7 C9 C2 CB BB E1 E3 DE D6 D0 D3 FA ED E6 2F 00 2F +9C 9C BA D0 D8 CB C3 CB BB E2 E4 DF D6 CE D3 FA ED E6 2F 00 2F +99 99 B6 D1 D9 CC C3 CB BC E2 E4 DF D6 CC D3 FA ED E6 2F 00 2F +95 95 B1 D2 D9 CC C4 CD BE E2 E3 DF D7 CC D3 FA ED E6 2F 00 2F +93 93 AF D3 DA CD C5 CD BE E2 E3 DF D6 CA D3 FA ED E6 2F 00 2F +91 91 AC D3 DA CE C5 CD BE E3 E3 E0 D7 CA D3 FA ED E6 2F 00 2F +8F 8F AA D4 DB CE C6 CD BF E3 E3 E1 D7 CA D3 FA ED E6 2F 00 2F +8D 8D A7 D5 DB CF C6 CE C0 E4 E4 E1 D7 C8 D3 FA ED E6 2F 00 2F +8B 8B A5 D5 DB CF C7 CE C0 E3 E3 E1 D8 C7 D3 FA ED E6 2F 00 2F +89 89 A2 D5 DB CF C8 CF C2 E3 E3 E1 D9 C7 D3 FA ED E6 2F 00 2F +87 86 9F D6 DD D1 C7 CE C1 E4 E3 E2 D9 C6 D3 FA ED E6 2F 00 2F +84 83 9B D7 DE D2 C8 CE C2 E4 E3 E2 D9 C3 D3 FA ED E6 2F 00 2F +82 81 99 D6 DD D1 CA CF C3 E4 E3 E3 DA C2 D3 FA ED E6 2F 00 2F +7F 7E 95 D7 DE D2 CB CF C5 E5 E3 E3 DA BF D3 FA ED E6 2F 00 2F +7D 7C 92 D7 DD D2 CB D0 C6 E5 E1 E3 DA BD D3 FA ED E6 2F 00 2F +79 78 8D D9 DF D5 CB CF C5 E5 E0 E4 DC B8 D4 FA ED E6 2F 00 2F +6A 68 7A DC E1 D8 D1 CF CD E6 D9 E3 CD 8C CB F0 9C F9 2F 00 2F diff --git a/resources/plugins/vsh.suprx b/resources/plugins/vsh.suprx new file mode 100644 index 00000000..bcc7a6f1 Binary files /dev/null and b/resources/plugins/vsh.suprx differ diff --git a/resources/tai.lua b/resources/tai.lua new file mode 100644 index 00000000..31d9aed6 --- /dev/null +++ b/resources/tai.lua @@ -0,0 +1,282 @@ +--[[ + Tai Config Library. + Search, Insert, Delete your plugins fast!. + + Licensed by Creative Commons Attribution-ShareAlike 4.0 + http://creativecommons.org/licenses/by-sa/4.0/ + + Designed By DevDavisNunez (https://twitter.com/DevDavisNunez), + Date: 12/07/2017 at 06:40 pm +]] + +function files.write(path, data, mode) -- Write a file. + local fp = io.open(path, mode or "w+") + if fp == nil then return end + fp:write(data) + fp:flush() + fp:close() +end + +function files.read(path, mode) -- Read a file. + local fp = io.open(path, mode or "r") + if not fp then return nil end + local data = fp:read("*a") + fp:close() + return data +end + +tai = { + {},--ux0 index 1 + {},--ur0 index 2 +} + +tai_ux0_path = "ux0:tai/config.txt" +tai_ur0_path = "ur0:tai/config.txt" + +--[[ + NIL tai.load() + When executing this function, the txt is loaded completely to ram, + thus allowing the native parse, quickly and easily and work in a virtual way its contents. +]] + +--Internal +function load_config(path, index) + print("Loading taiCfg from %s\n",path) + + tai[index].raw = {} + for line in io.lines(path) do + table.insert(tai[index].raw, line) + end + --tai[index].path = path + + tai.parse(index) + + --tai.debug(index) + --tai.repair(index) + --tai.debug(index) + +end + +function tai.load() + + tai[1].exist,tai[2].exist = false,false + tai[1].path,tai[2].path = tai_ux0_path,tai_ur0_path + + if files.exists(tai_ux0_path) then + load_config(tai_ux0_path,1) + tai[1].exist = true + end + + + if files.exists(tai_ur0_path) then + load_config(tai_ur0_path,2) + tai[2].exist = true + end + +end + +--[[ + NIL tai.parse(index) + When executing this function, the txt is parsed to native arrays and can work by index direct. +]] +function tai.parse(index) + + if tai[index].raw then + + tai[index].gameid = {} + + local id_sect = nil + for i=1, #tai[index].raw do + + local line = tai[index].raw[i] + + if line:find("*",1) then -- Secction Found. + id_sect = line:sub(2) + --print("Section found %s\n", id_sect) + if not tai[index].gameid[id_sect] then tai[index].gameid[id_sect] = {line = {}, prx = {}} end + table.insert(tai[index].gameid[id_sect].line, i) + continue + end + + if id_sect and not line:find("#",1) then -- Is a path and not a comment. + --print("[%s]: %s\n", id_sect, line:lower()) + table.insert(tai[index].gameid[id_sect].prx, {path=line:lower(), line=i}) + end + + end + end + +end + +--[[ + NIL tai.repair() + When executing this function, a massive scan is done in the txt, of scattered GAMEID´s, + concentrating these into a single one, and preserving the first id found in the txt, or if section is void, delete. + Useful to repair previous errors in the use of the same. +]] +function tai.repair(index) + + if tai[index].raw and tai[index].gameid then + for k,v in pairs(tai[index].gameid) do + + local len = #v.line + if len > 1 then + + tai.delete_sect(index, v) -- Remove all sections of id... + + -- Reinsert in first pos! :D + table.insert(tai[index].raw,v.line[1], "*"..k) + for a=1, #v.prx do + table.insert(tai[index].raw,v.line[1]+a, v.prx[a].path) + end + tai.parse(index) + + return tai.repair(index) -- recursive! :D + + elseif #v.prx < 1 then -- No have any plug?, remove!!!! + + tai.delete_sect(index, v) -- Remove al sections of id... + tai.parse(index) + + return tai.repair(index) -- recursive! :D + + end + + end--for + end + +end + +function tai.delete_sect(index, v) -- Internal use... + + local len = #v.line + + for a=len, 1, -1 do + for b=#v.prx, 1, -1 do + if v.prx[b].line > v.line[a] and not v.prx[b].rv then + --print("Line: %d - Removed: %s\n", v.prx[b].line, + table.remove(tai[index].raw, v.prx[b].line)--) + v.prx[b].rv = true + end + end + + --print("Line: %d - Removed: %s\n",v.line[a], + table.remove(tai[index].raw, v.line[a])--) + + end + +end + +--[[ + NUMBER tai.find(id, path, index) + Search a filename in the list of plugin of the id. + return nil in case of error, index in success. +]] +function tai.find(index, id, path) + + if not tai[index].gameid[id] then return nil end + + local fname = files.nopath(path) + fname = fname:lower() + + for i=1, #tai[index].gameid[id].prx do + local x1,x2 = string.find(tai[index].gameid[id].prx[i].path:lower(), fname, 1, true) + if x1 then + return i + end + end + + return nil +end + +--[[ + NUMBER tai.put(index, id, path) + Add a filename in the list of plugin of the id, if the id no exists, then create a id or if exists id and path then nothing do! + return false in case of error, true in success. +]] +function tai.put(index, id, path, pos) + + local idx = tai.find(index, id, path) + + if idx then -- Nothing to do... :O ? + --tai[index].gameid[id].prx[idx].path = + elseif tai[index].gameid[id] then -- Exists the id then have any prx! + idx = #tai[index].gameid[id].prx + if pos then + table.insert(tai[index].raw, tai[index].gameid[id].line[1]+pos, path) + else + table.insert(tai[index].raw, tai[index].gameid[id].prx[idx].line+1, path) + end + tai.parse(index) -- Refresh all ids lines etc.. + --tai.debug() + return true + + else -- New ID new path! + table.insert(tai[index].raw, "*"..id) + table.insert(tai[index].raw, path) + tai.parse(index) -- Refresh all ids lines etc.. + --tai.debug() + return true + + end + + return false + +end + +--[[ + NUMBER tai.del(id, path) + Remove a filename in the list of plugin of the id, if the id no have more prx, its erase! + return false in case of error, true in success. +]] +function tai.del(index, id, path) + + local idx = tai.find(index, id, path) + + if idx then + table.remove(tai[index].raw, tai[index].gameid[id].prx[idx].line) + if #tai[index].gameid[id].prx == 1 then -- remove section if not have nothing more prx! + table.remove(tai[index].raw, tai[index].gameid[id].line[1]) + end + tai.parse(index) -- Refresh all ids lines etc.. + --tai.debug() + return true + end + + return false +end + +--[[ + NIL tai.sync([path]) + Can send a path to sync or use the default. + Synchronize all the changes made so far with the library. +]] +function tai.sync(index, path) + if tai[index].raw then + files.write(path or tai[index].path, table.concat(tai[index].raw, '\n')) + end +end + +function tai.debug(index) + return nil + --[[print("### CONFIG.TXT ##\n") + if tai[index].raw then + for i=1,#tai[index].raw do + print("#%03d: %s\n",i,tai[index].raw[i]) + end + end + print("##################\n")]] +end + +--[[ ## Simple test ## + +tai.load(files.fullpath("config.txt",0)) +print("Find: %s\n",tostring(tai.find("KERNEL", "ux0:cheDs4vita.skprx"))) +print("Put: %s\n",tostring(tai.put("main", "ur0:tai/pngshot.suprx"))) +print("Put: %s\n",tostring(tai.put("ONELUA4R0", "ur0:tai/functions.suprx"))) +print("Del: %s\n",tostring(tai.del("CNPEZ0002", "ux0:algunamadre.suprx"))) +print("Del: %s\n",tostring(tai.del("NPUG80318", "ux0:adrenaline/adrenaline.suprx"))) +tai.sync() +buttons.waitforkey() +err() +]] \ No newline at end of file diff --git a/sce_sys/livearea/contents/template.xml b/sce_sys/livearea/contents/template.xml index efdd3c36..d75392fa 100644 --- a/sce_sys/livearea/contents/template.xml +++ b/sce_sys/livearea/contents/template.xml @@ -29,7 +29,7 @@ - v1.10 + v2.00 diff --git a/sce_sys/param.sfo b/sce_sys/param.sfo index d50dd319..62b1e506 100644 Binary files a/sce_sys/param.sfo and b/sce_sys/param.sfo differ diff --git a/script.lua b/script.lua index 7ec22ed4..a0da09a5 100644 --- a/script.lua +++ b/script.lua @@ -1,12 +1,23 @@ --[[ - AutoPlugin by theheroGAC - Application, themes and files manager. + Autoinstall plugin Licensed by Creative Commons Attribution-ShareAlike 4.0 http://creativecommons.org/licenses/by-sa/4.0/ - Onelua Designed By Gdljjrod & DevDavisNunez. - + Designed By Gdljjrod & DevDavisNunez. + Collaborators: BaltazaR4 & Wzjk. ]] -dofile("resources/autoplugin.lua") \ No newline at end of file +color.loadpalette() + +local wstrength = wlan.strength() +if wstrength then + if wstrength > 55 then dofile("git/updater.lua") end +end + +back = image.load("resources/back.png") + +dofile("resources/tai.lua") +dofile("resources/commons.lua") +dofile("resources/extra.lua") +dofile("resources/autoplugin.lua")--Main Cycle