Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bundler): Build AppImages inside the target folder #4521

Merged
merged 5 commits into from
Jul 3, 2022

Conversation

Beanow
Copy link
Member

@Beanow Beanow commented Jun 29, 2022

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

Previously to avoid an issue with AppImage builds we collected all our output files in ~/.cache. This solves the reason why we did that and moves back to putting our temporary files in the target folder again.

The main problem at that time was, #4305 introduced a change where build tools should be stored in ~/.cache/tauri.
However one particular file that we download, AppRun, was supposed to be bundled, instead of executed as a build tool.
The path where it needed to be was in {{app_name}}.AppDir/AppRun.

I've fixed it here by still downloading all dependencies to ~/.cache/tauri, but also making a copy of AppRun in the correct place. Allowing builds in target to work again.


As an aside, building in target is preferable because we don't use a conflict-free unique or fully qualified name when building AppImages, so race conditions might happen when building multiple projects.

Also, "cleaning target" is an easy way to remove your project specific caches and intermediate builds, to get a clean slate. Which wouldn't apply for AppImages as they're not always in target.

Beanow and others added 2 commits June 29, 2022 23:16
Previously to avoid an issue with AppImage builds we collected all our output files in ~/.cache. This solves the reason why we did that and moves back to putting our temporary files in the target folder again.
@lucasfernog
Copy link
Member

Works like a charm. Why is this a draft @Beanow ?

@Beanow
Copy link
Member Author

Beanow commented Jun 30, 2022

Still needs a change entry, and I was thinking if more refactors should be included. Like, asserting the file ends up in the right place now to avoid regressions.

As is it should work though.

chmod +x linuxdeploy-plugin-gtk.sh
chmod +x linuxdeploy-${ARCH}.AppImage
chmod +x "{{tauri_tools_path}}/linuxdeploy-plugin-gtk.sh"
chmod +x "{{tauri_tools_path}}/linuxdeploy-${ARCH}.AppImage"

dd if=/dev/zero bs=1 count=3 seek=8 conv=notrunc of=linuxdeploy-${ARCH}.AppImage
Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, see this one I missed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Patched this and set it as ready for review

@Beanow Beanow marked this pull request as ready for review July 3, 2022 13:25
@Beanow Beanow requested a review from a team as a code owner July 3, 2022 13:25
@Beanow Beanow requested a review from lucasfernog July 3, 2022 13:27
@lucasfernog lucasfernog merged commit 8dd03e6 into tauri-apps:dev Jul 3, 2022
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