Skip to content

Commit

Permalink
appimage: use full path of appimagetool (#2771)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelotduarte authored Jan 9, 2025
1 parent 0db6d1a commit f0d4ece
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
strategy:
matrix:
os: [windows-latest]
python-version: ["3.12"]
python-version: ["3.11"]
extra-requirement:
- lief==0.15.1
- lief==0.14.1
Expand Down
22 changes: 7 additions & 15 deletions cx_Freeze/command/bdist_appimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@

ARCH = platform.machine()
APPIMAGEKIT_URL = "https://github.com/AppImage/AppImageKit/releases"
APPIMAGEKIT_URL = "https://github.com/AppImage/appimagetool/releases"
APPIMAGEKIT_PATH = f"download/continuous/appimagetool-{ARCH}.AppImage"
APPIMAGEKIT_TOOL = "~/.local/bin/appimagetool"
APPIMAGEKIT_TOOL = f"~/.local/bin/appimagetool-{ARCH}.AppImage"


class bdist_appimage(Command):
Expand Down Expand Up @@ -160,20 +161,11 @@ def _get_appimagekit(self) -> None:
f"download and install AppImageKit from {APPIMAGEKIT_URL}",
INFO,
)
name = os.path.basename(APPIMAGEKIT_PATH)
filename = os.path.join(appimagekit_dir, name)
if not os.path.exists(filename):
urlretrieve( # noqa: S310
os.path.join(APPIMAGEKIT_URL, APPIMAGEKIT_PATH),
filename,
)
os.chmod(filename, stat.S_IRWXU)
if not os.path.exists(appimagekit):
self.execute(
os.symlink,
(filename, appimagekit),
msg=f"linking {appimagekit} -> {filename}",
)
urlretrieve( # noqa: S310
os.path.join(APPIMAGEKIT_URL, APPIMAGEKIT_PATH),
appimagekit,
)
os.chmod(appimagekit, stat.S_IRWXU)
self.appimagekit = appimagekit

def run(self) -> None:
Expand Down

0 comments on commit f0d4ece

Please sign in to comment.