def makeFilesExecutable():
scriptPath = xbmc.translatePath(xbmcaddon.Addon(id = 'emulator.tools.retroarch').getAddonInfo('path'))
scriptPath = os.path.join(scriptPath, 'bin')
file1 = os.path.join(scriptPath, 'retroarch.sh')
file2 = os.path.join(scriptPath, 'retroarch.start')
file3 = os.path.join(scriptPath, 'retroarch')
try:
os.chmod(file1, stat.S_IRWXU|stat.S_IRWXG|stat.S_IROTH|stat.S_IXOTH)
os.chmod(file2, stat.S_IRWXU|stat.S_IRWXG|stat.S_IROTH|stat.S_IXOTH)
os.chmod(file3, stat.S_IRWXU|stat.S_IRWXG|stat.S_IROTH|stat.S_IXOTH)
d = xbmcgui.Dialog()
d.ok('RetroArch', 'File permissions applied', 'scripts should now be executable')
except:
d = xbmcgui.Dialog()
d.ok('RetroArch', 'Failed to apply permissions', 'Please try again later or do it manualy via ssh')
makeExecutable.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录