Skip to content

Use a stub app as the flatpak bootstrap.#3

Merged
freakboy3742 merged 2 commits into
devfrom
stub-app
Jul 30, 2022
Merged

Use a stub app as the flatpak bootstrap.#3
freakboy3742 merged 2 commits into
devfrom
stub-app

Conversation

@freakboy3742

Copy link
Copy Markdown
Member

Since building a Flatpak involves building everything from source anyway, this provides a convenient entry point to use a genuine stub app, rather than a shell script wrapping the Python interpreter.

This matches what is done with macOS and Windows apps. It provides complete control over the interpreter, and isolation from the environment in which the app runs.

Fixes beeware/briefcase#628
Refs beeware/briefcase#662
Addresses the flatpak edge case mentioned in beeware/briefcase#803.

This PR also enables dynamic linking, and strips unused parts of the bundle. This has the effect of reducing the size of a packaged HelloWorld Toga app from 42MB to 28MB.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Comment on lines +5 to +7
all: helloworld

helloworld: main.c

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This file should use template variables. When I use it in a project that isn't called "helloworld", I get this error:

...
Removing files/bin/pydoc3
Removing files/bin/idle3.8
Removing files/bin/idle3
Removing files/bin/2to3-3.8
Removing files/bin/2to3
Committing stage cleanup to cache
Finishing app
Error: Command 'testbed' not found
Building...

Error while building app testbed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

whelp... that's embarrassing.

@freakboy3742 freakboy3742 merged commit 677b8ce into dev Jul 30, 2022
@mhsmith

mhsmith commented Aug 8, 2022

Copy link
Copy Markdown
Member

This still hasn't been merged into the version-specific branches.

@freakboy3742 freakboy3742 deleted the stub-app branch August 9, 2022 01:34
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.

Add a stub app for Linux

2 participants