Skip to content

Commit b5108b3

Browse files
committed
Release v1.01
+ Chinese font download path error fixed. + New option to switch between custom fonts + Fix missing config.txt for pkgj (no folder found) and removed line for PSM Games + New Languages: - Yoti/Aleksandr112 for translation in Russian - Chronoss09 for translation in French - Schn1ek3 for translation in German - Kouchan for translation in Japanese + Update Spanish by gvaldebenit + Update English_us by Gadgetoid
1 parent de51e17 commit b5108b3

File tree

15 files changed

+268
-64
lines changed

15 files changed

+268
-64
lines changed

AUTOPLUG2/git/shared.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ APP_PROJECT = "AutoPlugin2"
44
APP_FOLDER = "AUTOPLUG2"
55

66
APP_VERSION_MAJOR = 0x01 -- major.minor
7-
APP_VERSION_MINOR = 0x00
7+
APP_VERSION_MINOR = 0x01
88
APP_VERSION = ((APP_VERSION_MAJOR << 0x18) | (APP_VERSION_MINOR << 0x10)) -- Union Binary
6.11 KB
Binary file not shown.

AUTOPLUG2/sce_sys/livearea/contents/template.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<frame id="frame2">
1313
<liveitem>
1414
<text valign="bottom" align="left" text-align="left" text-valign="bottom" line-space="3" ellipsis="on">
15-
<str color="#ffffff" size="34" bold="on" shadow="on">Autoplugin II</str>
15+
<str color="#ffffff" size="34" bold="on" shadow="on">AutoPlugin II</str>
1616
</text>
1717
</liveitem>
1818
</frame>
1919

2020
<frame id="frame3">
2121
<liveitem>
2222
<text align="left" text-align="left" word-wrap="off" ellipsis="on">
23-
<str size="26" color="#ffffff" shadow="on">v1.00</str>
23+
<str size="26" color="#ffffff" shadow="on">v1.01</str>
2424
</text>
2525
</liveitem>
2626
</frame>

AUTOPLUG2/sce_sys/param.sfo

0 Bytes
Binary file not shown.

AUTOPLUG2/script.lua

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Collaborators: BaltazaR4 & Wzjk.
1010
]]
1111

12+
dofile("git/shared.lua")
1213
PLUGINS_PORT = channel.new("PLUGINS_PORT")
1314
cont_global = atomic.new(0)
1415
PLUGINS_PORT:push(cont_global)
@@ -43,33 +44,33 @@ __LANG = ini.read(__PATH_INI,"LANGUAGE","lang","")
4344
if __LANG == "" then __LANG = os.language() end
4445
dofile("scripts/language.lua")
4546

46-
if os.access() == 0 then
47-
if back then back:blit(0,0) end
48-
screen.flip()
49-
os.message(LANGUAGE["STRING_UNSAFE_MODE"])
50-
os.exit()
51-
end
52-
53-
dofile("scripts/commons.lua")
54-
dofile("scripts/scroll.lua")
55-
5647
-- Loading font
5748
files.mkdir("ux0:data/AUTOPLUGIN2/font/")
49+
fnt = nil
50+
__FONT = ini.read(__PATH_INI,"FONT","font","")
51+
if __FONT != "" then
52+
fnt = font.load("ux0:data/AUTOPLUGIN2/font/"..__FONT)
53+
end
54+
5855
if __LANG == "CHINESE_T" or __LANG == "CHINESE_S" or __LANG == "TURKISH" then
5956
if not files.exists("ux0:data/AUTOPLUGIN2/font/font.pgf") then
6057
message_wait(CHINESE_FONT_DOWNLOAD)
6158
http.getfile(string.format("https://raw.githubusercontent.com/%s/%s/master/font/font.pgf", APP_REPO, APP_PROJECT), "ux0:data/AUTOPLUGIN2/font/font.pgf")
6259
end
60+
if not fnt then fnt, __FONT = font.load("ux0:data/AUTOPLUGIN2/font/font.pgf"), "font.pgf" end
6361
end
62+
if fnt then font.setdefault(fnt) end
6463

65-
fnt = font.load("ux0:data/AUTOPLUGIN2/font/font.pgf") or font.load("ux0:data/AUTOPLUGIN2/font/font.pvf") or font.load("ux0:data/AUTOPLUGIN2/font/font.ttf")
66-
if fnt then font.setdefault(fnt) end
67-
68-
--Updater
69-
if not game.exists("AUTOPLUG2") then
70-
dofile("git/updater.lua")
64+
if os.access() == 0 then
65+
if back then back:blit(0,0) end
66+
screen.flip()
67+
os.message(LANGUAGE["STRING_UNSAFE_MODE"])
68+
os.exit()
7169
end
7270

71+
dofile("scripts/commons.lua")
72+
dofile("scripts/scroll.lua")
73+
7374
__UPDATE = tonumber(ini.read(__PATH_INI,"UPDATE","update","1"))
7475
_update = LANGUAGE["NO"]
7576
if __UPDATE == 1 then

AUTOPLUG2/scripts/commons.lua

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,35 @@ function onAppInstall(step, size_argv, written, file, totalsize, totalwritten)
5353
screen.flip()
5454
end
5555

56+
function onExtractFiles(size,written,file,totalsize,totalwritten)
57+
58+
if back then back:blit(0,0) end
59+
draw.fillrect(0,0,960,40, color.blue:a(100))
60+
61+
if written != 0 then
62+
l = (written*940)/size
63+
screen.print(3+l,495,math.floor((written*100)/size).."%",0.8,0xFFFFFFFF,0x0,__ACENTER)
64+
draw.fillrect(10,524,l,6,color.new(0,255,0))
65+
draw.circle(10+l,526,6,color.new(0,255,0),30)
66+
end
67+
68+
if totalwritten != 0 then
69+
screen.print(940,10,LANGUAGE["UPDATER_PERCENT"]..math.floor((totalwritten*100)/totalsize).." %",1.0,color.white, color.blue:a(135),__ARIGHT)
70+
end
71+
screen.print(10,10,tostring(file),1.0,color.white, color.blue:a(135))
72+
73+
message_wait(LANGUAGE["STRING_PLEASE_WAIT"],true)
74+
75+
screen.flip()
76+
77+
buttons.read()
78+
return 1
79+
end
80+
5681
function write_config()
5782
ini.write(__PATH_INI,"UPDATE","update",__UPDATE)
5883
ini.write(__PATH_INI,"LANGUAGE","lang",__LANG)
84+
ini.write(__PATH_INI,"FONT","font",__FONT)
5985
end
6086

6187
function draw.offsetgradrect(x,y,sx,sy,c1,c2,c3,c4,offset)
@@ -64,7 +90,7 @@ function draw.offsetgradrect(x,y,sx,sy,c1,c2,c3,c4,offset)
6490
draw.gradrect(x,y + sizey - offset,sx,sizey + offset,c3,c4,c1,c2)
6591
end
6692

67-
function message_wait(message)
93+
function message_wait(message,noflip)
6894
local mge = (message or LANGUAGE["STRING_PLEASE_WAIT"])
6995
local titlew = string.format(mge)
7096
local w,h = screen.textwidth(titlew,1) + 30,70
@@ -73,7 +99,11 @@ function message_wait(message)
7399
draw.fillrect(x,y,w,h, color.shine)
74100
draw.rect(x,y,w,h,color.white)
75101
screen.print(480,y+15, titlew,1,color.white,color.black,__ACENTER)
76-
screen.flip()
102+
103+
if not noflip then
104+
screen.flip()
105+
end
106+
77107
end
78108

79109
--Variables Universales

AUTOPLUG2/scripts/extras/menu_extras.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,14 @@ function menu_extras()
140140
tai.load()
141141
if tai[__UR0].exist then loc = 2 end
142142
local menu = {
143-
{ text = LANGUAGE["MENU_EXTRAS_PKGJ_TITLE"], desc = LANGUAGE["MENU_EXTRAS_CUSTOM_PKG_CONFIG_DESC"], funct = config_callback },
144143
{ text = LANGUAGE["MENU_EXTRAS_INSTALL_ITLSENSO"], desc = LANGUAGE["MENU_EXTRAS_INSTALL_ITLSENSO_DESC"], funct = itls_callback },
145144
{ text = LANGUAGE["MENU_EXTRAS_INSTALL_BATTFIX"], desc = LANGUAGE["MENU_EXTRAS_INSTALL_DESC_BATTFIX"], funct = batteryfixer_callback },
146145
}
147146

147+
if game.exists("PKGJ00000") then
148+
table.insert(menu, 1, { text = LANGUAGE["MENU_EXTRAS_PKGJ_TITLE"], desc = LANGUAGE["MENU_EXTRAS_CUSTOM_PKG_CONFIG_DESC"], funct = config_callback } )
149+
end
150+
148151
local idx = tai.find(loc, "KERNEL", "custom_boot_splash.skprx")
149152
if idx then
150153
table.insert(menu, { text = LANGUAGE["MENU_EXTRAS_CONVERT_BOOTSPLASH"], desc = LANGUAGE["MENU_EXTRAS_CUSTOMBOOTSPLASH_DESC"], funct = convertimgsplash_callback } )

AUTOPLUG2/scripts/extras/pkgj.lua

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,17 @@ function update_configtxt(path, tb_config, options)
1717
--Update Line install_psp_psx_location
1818
if line_find_install_location > 0 then tb_config[line_find_install_location] = "install_psp_psx_location "..options[2].status end
1919

20-
--Remove lines for install_psp_as_pbp & psm_disclaimer_yes_i_read_the_readme ??
21-
if line_find_install_as_pbp > line_find_add_psm then
22-
if options[1].status == false then table.remove(tb_config,line_find_install_as_pbp) end
23-
if options[3].status == false then table.remove(tb_config,line_find_add_psm) end
24-
elseif line_find_install_as_pbp < line_find_add_psm then
25-
if options[3].status == false then table.remove(tb_config,line_find_add_psm) end
26-
if options[1].status == false then table.remove(tb_config,line_find_install_as_pbp) end
20+
--Remove lines for psm_disclaimer_yes_i_read_the_readme
21+
if line_find_add_psm > 0 then
22+
table.remove(tb_config,line_find_add_psm)
2723
end
2824

25+
--Remove lines for install_psp_as_pbp
26+
if options[1].status == false then table.remove(tb_config,line_find_install_as_pbp) end
27+
2928
--Insert new lines
3029
if line_find_install_location == 0 then table.insert(tb_config, "install_psp_psx_location "..options[2].status) end
3130
if line_find_install_as_pbp == 0 and options[1].status == true then table.insert(tb_config, "install_psp_as_pbp 1") end
32-
if line_find_add_psm == 0 and options[3].status == true then table.insert(tb_config, "psm_disclaimer_yes_i_read_the_readme NoPsmDrm") end
3331

3432
--Update config.txt
3533
local fp = io.open(path, "w+")
@@ -42,15 +40,8 @@ end
4240

4341
function read_config(file, tb_config)
4442

45-
if not files.exists(file) then
46-
if files.exists("ux0:pkgi/config.txt") then
47-
file = "ux0:pkgi/config.txt"
48-
else
49-
files.new("ux0:pkgj/config.txt")
50-
file = "ux0:pkgj/config.txt"
51-
--return nil
52-
end
53-
end
43+
files.mkdir(files.nofile(file))
44+
if not files.exists(file) then files.new(file) end
5445

5546
local cont = 0
5647
for line in io.lines(file) do
@@ -90,18 +81,20 @@ local psp_psx_location_callback = function (obj)
9081

9182
end
9283

93-
local add_psm_callback = function (obj)
94-
obj.status = not obj.status
95-
end
96-
9784
function config_pkgj()
9885

9986
--Clean
10087
line_find_install_as_pbp, line_find_install_location, line_find_add_psm = 0,0,0
10188
mount_install = "ux0:"
10289
local tb_config = {}
10390

104-
local check_config = read_config("ux0:pkgj/config.txt", tb_config)
91+
local path_configtxt = "ux0:pkgj/config.txt"
92+
if files.exists("ur0:pkgj/config.txt") then path_configtxt = "ur0:pkgj/config.txt"
93+
elseif files.exists("ux0:pkgj/config.txt") then path_configtxt = "ux0:pkgj/config.txt"
94+
elseif files.exists("ur0:pkgi/config.txt") then path_configtxt = "ur0:pkgi/config.txt"
95+
elseif files.exists("ux0:pkgi/config.txt") then path_configtxt = "ux0:pkgi/config.txt" end
96+
97+
local check_config = read_config(path_configtxt, tb_config)
10598
if not check_config then
10699
if vbuff then vbuff:blit(0,0) elseif back2 then back2:blit(0,0) end
107100
message_wait(LANGUAGE["NO_CONFIG_PKGJ"])
@@ -117,14 +110,12 @@ function config_pkgj()
117110
local menuext = {
118111
{ text = LANGUAGE["PKGJ_TITLE_INSTALL_PBP"], desc = LANGUAGE["PKGJ_DESC_INSTALL_PBP"], status = false, funct = psp_eboot_callback },
119112
{ text = LANGUAGE["PKGJ_TITLE_CHANGE_LOC"], desc = LANGUAGE["PKGJ_DESC_CHANGE_LOC"], status = "ux0:", funct = psp_psx_location_callback },
120-
{ text = LANGUAGE["PKGJ_TITLE_ADD_PSM"], desc = LANGUAGE["PKGJ_DESC_ADD_PSM"], status = false, funct = add_psm_callback },
121113
}
122114

123115
--UPdate Status
124116
if line_find_install_as_pbp > 0 then menuext[1].status = true end
125117
if pmount == 0 then menuext[2].pmount = 1 else menuext[2].pmount = pmount end
126118
menuext[2].status = PMounts[menuext[2].pmount]
127-
if line_find_add_psm > 0 then menuext[3].status = true end
128119

129120
local scroll,xscroll = newScroll(menuext,#menuext),5
130121
while true do
@@ -141,7 +132,6 @@ function config_pkgj()
141132

142133
if i == scroll.sel then draw.offsetgradrect(3,y-10,952,38,color.shine:a(75),color.shine:a(135),0x0,0x0,21) end
143134

144-
--if i == scroll.sel then draw.fillrect(3,y-4,952,26,color.green:a(105)) end
145135
screen.print(25,y, menuext[i].text)
146136

147137
if menuext[i].status == true then
@@ -155,6 +145,8 @@ function config_pkgj()
155145
y+=35
156146
end
157147

148+
screen.print(480, 360, path_configtxt,1.2,color.green,0x0,__ACENTER)
149+
158150
if screen.textwidth(menuext[scroll.sel].desc) > 925 then
159151
xscroll = screen.print(xscroll, 400, menuext[scroll.sel].desc,1,color.white,color.blue,__SLEFT,935)
160152
else
@@ -200,8 +192,6 @@ function config_pkgj()
200192

201193
if buttons.triangle then
202194

203-
--local vbuff = screen.toimage()
204-
--if vbuff then vbuff:blit(0,0) elseif back2 then back2:blit(0,0) end
205195
if back2 then back2:blit(0,0) end
206196
message_wait(LANGUAGE["PKGJ_UPDATING"])
207197
os.delay(1500)

AUTOPLUG2/scripts/psvita/autoplugin.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ function plugins_installation(sel)
4646
install = false
4747
end
4848
end
49+
elseif plugins[sel].path:find(string.lower("repatch"),1,true) then
50+
tai.del(loc, "KERNEL", "repatch.skprx")
51+
tai.del(loc, "KERNEL", "repatch_4.skprx")
52+
4953
elseif plugins[sel].path == "vitastick.skprx" and not game.exists("VITASTICK") then
5054
__file = "vitastick.vpk"
5155
game.install("resources/plugins/vitastick.vpk",false)
@@ -212,6 +216,7 @@ function plugins_installation(sel)
212216
if henkaku then img2splashbin(henkaku,false) end
213217

214218
elseif plugins[sel].path == "vitacheat.skprx" then --Vitacheat 3.65
219+
215220
files.extract("resources/plugins/vitacheat.zip","ux0:")
216221
files.copy("resources/plugins/vitacheat365/vitacheat.suprx","ux0:vitacheat/")
217222

0 commit comments

Comments
 (0)