Skip to content

Adding support for multiple desktop files for vscode - #5

Open
tyvsmith wants to merge 3 commits into
valicm:mainfrom
tyvsmith:main
Open

Adding support for multiple desktop files for vscode#5
tyvsmith wants to merge 3 commits into
valicm:mainfrom
tyvsmith:main

Conversation

@tyvsmith

@tyvsmith tyvsmith commented Apr 3, 2025

Copy link
Copy Markdown

Some applications, like VSCode & VSCode Insiders generate several .desktop files. For example, one to handle URL scheme.

This has been modified to copy all app*.desktop files into the build directory.

Here's a demonstration of this working. https://github.com/tyvsmith/VSCodeInsiders-AppImage

@tyvsmith

Copy link
Copy Markdown
Author

Any interest in merging this, so the marketplace version supports this usecase? I'd rather not maintain a fork long term.

tyvsmith and others added 2 commits June 22, 2025 16:53
* Retry downloads to survive transient upstream failures

Every download runs under set -e with no retry, so one bad response
from an upstream aborts the whole build. This bit the VSCode Insiders
build on 2026-08-08: the version endpoint answered 302 with
"Location: undefined", which resolved to a 404 and killed the run.
The next scheduled run passed with no change.

Wrap the three wget calls in a retry helper that re-runs the whole
command. wget's own --retry-on-http-error is not sufficient here:
after a redirect it only re-requests the final target, so it would
have re-hit the dead /sha/undefined five times and still failed.
Re-running from the original URL re-rolls the redirect, which is what
actually recovers this failure.

--tries bounds wget's internal retries so a hard-down host cannot
stretch the five attempts into a very long build. A genuinely dead
URL still fails the build after the attempts are exhausted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Propagate wget's exit status and skip the final sleep

Addresses review feedback on the retry helper.

The loop slept after the last attempt and logged "retrying" when it
would not retry, adding 15s of dead time to every permanent failure.
It also returned a bare 1, discarding wget's exit status and making
failures harder to triage.

Capturing the status needs the explicit else branch: an if whose
condition fails with no else evaluates to 0, so reading $? after the
fi returned success and let the build continue past a failed
download. Verified a dead URL now propagates wget exit 4 and set -e
aborts before the following command runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 8, 2026 18:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the AppImage build script to better support applications (e.g., VS Code / Insiders) that ship multiple .desktop files, and to make downloads more resilient to transient upstream failures.

Changes:

  • Added a retry_wget helper and switched downloads to use it for improved resilience.
  • Updated desktop-file handling to copy all app*.desktop files into AppDir, rewriting names based on $APP_SHORT_NAME.
  • Set APPIMAGETOOL_APP_NAME (and ARCH) explicitly to reduce issues when multiple desktop files exist.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread build.sh
Comment on lines +220 to 221
retry_wget https://github.com/AppImage/Appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x *.AppImage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants