-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
25 changed files
with
849 additions
and
1 deletion.
There are no files selected for viewing
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,9 @@ | ||
-- Constants | ||
|
||
APP_REPO = "DavisDev" | ||
APP_PROJECT = "FtpzillaVita" | ||
|
||
APP_VERSION_MAJOR = 0x00 -- major.minor | ||
APP_VERSION_MINOR = 0x90 | ||
|
||
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,54 @@ | ||
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 %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) | ||
|
||
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,"Porcent: "..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.getfile(url, path) | ||
if res then -- Success! | ||
files.mkdir("ux0:/data/1luapkg") | ||
files.copy("eboot.bin","ux0:/data/1luapkg") | ||
files.copy("updater/script.lua","ux0:/data/1luapkg/") | ||
files.copy("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") |
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,10 @@ | ||
local zock = nil; | ||
|
||
if not __RELEASE then | ||
zock = socket.connect(__DEBUGIP, __DEBUGPORT) | ||
end | ||
|
||
function print(...) | ||
if zock then zock:send(string.format(...)) 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,20 @@ | ||
--[[ | ||
Minimal Explorer Handle. | ||
Explorer handle library for Play Station Vita. | ||
Licensed by GNU General Public License v3.0 | ||
Designed By: | ||
- DevDavisNunez (https://twitter.com/DevDavisNunez). | ||
]] | ||
|
||
function newExplorer() | ||
local obj = { | ||
|
||
} | ||
function obj.list() | ||
end | ||
|
||
return obj; | ||
end |
Oops, something went wrong.