mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-12 17:58:50 +01:00
add ExecPackage
This commit is contained in:
parent
5e3e2334e4
commit
7af3046646
@ -363,6 +363,15 @@ class MainScreen(object):
|
||||
else:
|
||||
return name
|
||||
|
||||
def IsExecPackage(self,dirname):
|
||||
files = os.listdir(dirname)
|
||||
bname = os.path.basename(dirname)
|
||||
bname = self.ExtraName(bname)
|
||||
for i in sorted(files):
|
||||
if i == bname+".sh":
|
||||
return True
|
||||
return False
|
||||
|
||||
def IsEmulatorPackage(self,dirname):
|
||||
files = os.listdir(dirname)
|
||||
for i in sorted(files):
|
||||
@ -396,6 +405,8 @@ class MainScreen(object):
|
||||
iconitem = IconItem()
|
||||
iconitem._CmdPath = ""
|
||||
iconitem.AddLabel(i2,self._IconFont)
|
||||
if FileExists( _dir+"/"+i+"/"+i2+".png"): ### 20_Prog/Prog.png , cut 20_
|
||||
iconitem._ImageName = _dir+"/"+i+"/"+i2+".png"
|
||||
if FileExists( SkinMap(_dir+"/"+i2+".png") ):
|
||||
iconitem._ImageName = SkinMap(_dir+"/"+i2+".png")
|
||||
else:
|
||||
@ -455,7 +466,12 @@ class MainScreen(object):
|
||||
iconitem._CmdPath = em
|
||||
iconitem._MyType = ICON_TYPES["Emulator"]
|
||||
cur_page._Icons.append(iconitem)
|
||||
|
||||
|
||||
elif self.IsExecPackage(_dir+"/"+i):
|
||||
iconitem._MyType = ICON_TYPES["EXE"]
|
||||
iconitem._CmdPath = _dir+"/"+i+"/"+i2+".sh"
|
||||
MakeExecutable(iconitem._CmdPath)
|
||||
cur_page._Icons.append(iconitem)
|
||||
else:
|
||||
iconitem._MyType = ICON_TYPES["DIR"]
|
||||
iconitem._LinkPage = Page()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user