mirror of
https://github.com/niess/python-appimage.git
synced 2025-08-29 22:00:26 +02:00
Migrate to AppImage/appimagetool (fuse3)
This commit is contained in:
@@ -36,22 +36,12 @@ def ensure_appimagetool():
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
appimage = 'appimagetool-{0:}.AppImage'.format(_ARCH)
|
appimage = 'appimagetool-{0:}.AppImage'.format(_ARCH)
|
||||||
baseurl = 'https://github.com/AppImage/AppImageKit/releases/' \
|
baseurl = 'https://github.com/AppImage/appimagetool/releases/download/continuous'
|
||||||
'download/12'
|
|
||||||
log('INSTALL', 'appimagetool from %s', baseurl)
|
log('INSTALL', 'appimagetool from %s', baseurl)
|
||||||
|
|
||||||
appdir_name = '.appimagetool.appdir'.format(_ARCH)
|
make_tree(os.path.dirname(APPIMAGETOOL))
|
||||||
appdir = os.path.join(os.path.dirname(APPIMAGETOOL), appdir_name)
|
urlretrieve(os.path.join(baseurl, appimage), APPIMAGETOOL)
|
||||||
if not os.path.exists(appdir):
|
os.chmod(APPIMAGETOOL, stat.S_IRWXU)
|
||||||
make_tree(os.path.dirname(appdir))
|
|
||||||
with TemporaryDirectory() as tmpdir:
|
|
||||||
urlretrieve(os.path.join(baseurl, appimage), appimage)
|
|
||||||
os.chmod(appimage, stat.S_IRWXU)
|
|
||||||
system(('./' + appimage, '--appimage-extract'))
|
|
||||||
copy_tree('squashfs-root', appdir)
|
|
||||||
|
|
||||||
if not os.path.exists(APPIMAGETOOL):
|
|
||||||
os.symlink(appdir_name + '/AppRun', APPIMAGETOOL)
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user