This repository has been archived by the owner on Mar 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4aefd3d
commit 3220cb8
Showing
31 changed files
with
753 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
--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 |
Oops, something went wrong.