mirror of
https://github.com/niess/python-appimage.git
synced 2025-07-21 21:01:15 +02:00
Forward arch when building
This commit is contained in:
@@ -12,7 +12,7 @@ from ..utils.log import debug, log
|
|||||||
__all__ = ['build_appimage']
|
__all__ = ['build_appimage']
|
||||||
|
|
||||||
|
|
||||||
def build_appimage(appdir=None, destination=None):
|
def build_appimage(appdir=None, *, arch=None, destination=None):
|
||||||
'''Build an AppImage from an AppDir
|
'''Build an AppImage from an AppDir
|
||||||
'''
|
'''
|
||||||
if appdir is None:
|
if appdir is None:
|
||||||
@@ -21,7 +21,8 @@ def build_appimage(appdir=None, destination=None):
|
|||||||
log('BUILD', os.path.basename(appdir))
|
log('BUILD', os.path.basename(appdir))
|
||||||
appimagetool = ensure_appimagetool()
|
appimagetool = ensure_appimagetool()
|
||||||
|
|
||||||
arch = platform.machine()
|
if arch is None:
|
||||||
|
arch = platform.machine()
|
||||||
cmd = ['ARCH=' + arch, appimagetool, '--no-appstream', appdir]
|
cmd = ['ARCH=' + arch, appimagetool, '--no-appstream', appdir]
|
||||||
if destination is not None:
|
if destination is not None:
|
||||||
cmd.append(destination)
|
cmd.append(destination)
|
||||||
|
@@ -55,6 +55,7 @@ def execute(tag, abi, clean, tarball):
|
|||||||
destination = f'{fullname}.AppImage'
|
destination = f'{fullname}.AppImage'
|
||||||
build_appimage(
|
build_appimage(
|
||||||
appdir = str(appdir),
|
appdir = str(appdir),
|
||||||
|
arch = str(image.arch),
|
||||||
destination = destination
|
destination = destination
|
||||||
)
|
)
|
||||||
shutil.copy(
|
shutil.copy(
|
||||||
|
@@ -20,7 +20,7 @@ PREFIX = os.path.abspath(os.path.dirname(__file__) + '/..')
|
|||||||
APPIMAGETOOL_DIR = os.path.join(CACHE_DIR, 'bin')
|
APPIMAGETOOL_DIR = os.path.join(CACHE_DIR, 'bin')
|
||||||
'''Location of the appimagetool binary'''
|
'''Location of the appimagetool binary'''
|
||||||
|
|
||||||
APPIMAGETOOL_VERSION = '12'
|
APPIMAGETOOL_VERSION = '1.9.0'
|
||||||
'''Version of the appimagetool binary'''
|
'''Version of the appimagetool binary'''
|
||||||
|
|
||||||
EXCLUDELIST = os.path.join(CACHE_DIR, 'share/excludelist')
|
EXCLUDELIST = os.path.join(CACHE_DIR, 'share/excludelist')
|
||||||
|
Reference in New Issue
Block a user