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
f54c110
commit b8b097f
Showing
16 changed files
with
194 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Constants | ||
|
||
APP_REPO = "theheroGAC" | ||
APP_PROJECT = "Autoplugin" | ||
|
||
APP_VERSION_MAJOR = 0x01 -- major.minor | ||
APP_VERSION_MINOR = 0x00 | ||
|
||
APP_VERSION = ((APP_VERSION_MAJOR << 0x18) | (APP_VERSION_MINOR << 0x10)) -- Union Binary |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
dofile("git/shared.lua") | ||
|
||
UPDATE_PORT = channel.new("UPDATE_PORT") | ||
|
||
local version = http.get(string.format("https://raw.githubusercontent.com/%s/%s/master/version", APP_REPO, APP_PROJECT)) | ||
if version and tonumber(version) then | ||
version = tonumber(version) | ||
local major = (version >> 0x18) & 0xFF; | ||
local minor = (version >> 0x10) & 0xFF; | ||
if version > APP_VERSION then | ||
UPDATE_PORT:push(version) | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
dofile("git/shared.lua") | ||
|
||
if files.exists("ux0:/app/ONEUPDATE") then | ||
game.delete("ONEUPDATE") -- Exists delete update app | ||
end | ||
|
||
UPDATE_PORT = channel.new("UPDATE_PORT") | ||
|
||
local scr_flip = screen.flip | ||
function screen.flip() | ||
scr_flip() | ||
if UPDATE_PORT:available() > 0 then | ||
|
||
local version = UPDATE_PORT:pop() | ||
local major = (version >> 0x18) & 0xFF; | ||
local minor = (version >> 0x10) & 0xFF; | ||
|
||
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 | ||
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 | ||
function onAppInstall(step, size_argv, written, file, totalsize, totalwritten) | ||
return 10 -- Ok code | ||
end | ||
local onNetGetFileOld = onNetGetFile | ||
function onNetGetFile(size,written,speed) | ||
if 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).."%") | ||
draw.fillrect(0,520,((written*960)/size),24,color.new(0,255,0)) | ||
screen.flip() | ||
buttons.read() | ||
if buttons.circle then return 0 end --Cancel or Abort | ||
return 1; | ||
end | ||
local res = http.download(url, path) | ||
if res then -- Success! | ||
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/param.sfo","ux0:/data/1luapkg/sce_sys/") | ||
game.installdir("ux0:/data/1luapkg") | ||
files.delete("ux0:/data/1luapkg") | ||
game.launch(string.format("ONEUPDATE&%s&%s",os.titleid(),path)) -- Goto installer extern! | ||
end | ||
onAppInstall = onAppInstallOld | ||
onNetGetFile = onNetGetFileOld | ||
buttons.homepopup(1) | ||
end | ||
end | ||
end | ||
|
||
THID = thread.new("git/thread_net.lua") |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--[[ | ||
Updater Of App. | ||
Designed by DevDavisNunez to ONElua projects.. :D | ||
TODO: | ||
Maybe, extract in APP, and only installdir in this.. | ||
]] | ||
|
||
buttons.homepopup(0) | ||
|
||
color.loadpalette() | ||
|
||
args = os.arg() | ||
if args:len() == 0 then | ||
os.message("Error args lost!") | ||
os.exit() | ||
end | ||
|
||
args /= "&" | ||
if #args != 3 then | ||
os.message("Error args lost!") | ||
os.exit() | ||
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!") | ||
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)) | ||
screen.flip() | ||
elseif step == 4 then -- Promote or install | ||
draw.fillrect(0,0,960,30, color.green:a(100)) | ||
screen.print(10,10,"Installing...") | ||
screen.flip() | ||
end | ||
end | ||
|
||
game.install(args[3]) | ||
files.delete(args[3]) | ||
|
||
buttons.homepopup(1) | ||
|
||
game.launch(args[2]) |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
------Autoinstall pluign | ||
files.extract("resources/autoplugin.zip","ur0:/tai") | ||
files.extract("resources/config.zip","ur0:/tai") | ||
|
||
os.message("Your PSVita will restart...\nThe plugins have been installed",0) | ||
os.delay(2500) | ||
buttons.homepopup(1) | ||
power.restart() |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<livearea style="psmobile" format-ver="01.00" content-rev="1"> | ||
<livearea-background> | ||
<image>bg.png</image> | ||
</livearea-background> | ||
|
||
<gate> | ||
<startup-image>startup.png</startup-image> | ||
</gate> | ||
|
||
|
||
<frame id="frame2"> | ||
<liveitem> | ||
<text valign="bottom" align="left" text-align="left" text-valign="bottom" line-space="3" ellipsis="on"> | ||
<str color="#ffffff" size="40" bold="on" shadow="on">Autoplugin</str> | ||
</text> | ||
</liveitem> | ||
</frame> | ||
|
||
<frame id="frame3"> | ||
<liveitem> | ||
<text valign="top" align="left" text-align="left" text-valign="top" line-space="2" ellipsis="on"> | ||
<str size="22" shadow="on">by theheroGAC</str> | ||
</text> | ||
</liveitem> | ||
</frame> | ||
|
||
<frame id="frame4"> | ||
<liveitem> | ||
<text align="left" text-align="left" word-wrap="off" ellipsis="on"> | ||
<str size="18" color="#ffffff" shadow="on">v1.00</str> | ||
</text> | ||
</liveitem> | ||
</frame> | ||
</livearea> |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--[[ | ||
ONEMenu | ||
Application, themes and files manager. | ||
Licensed by Creative Commons Attribution-ShareAlike 4.0 | ||
http://creativecommons.org/licenses/by-sa/4.0/ | ||
Designed By Gdljjrod & DevDavisNunez. | ||
Collaborators: BaltazaR4 & Wzjk. | ||
]] | ||
|
||
color.loadpalette() | ||
|
||
local wstrength = wlan.strength() | ||
if wstrength then | ||
if wstrength > 55 then dofile("git/updater.lua") end | ||
end | ||
|
||
dofile("resources/autoplugin.lua") |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
16777216 |