Skip to content

Commit

Permalink
Merge pull request #42 from beeware/flatpak-exec
Browse files Browse the repository at this point in the history
Use an explicit path for sys.executable.
  • Loading branch information
rmartin16 committed Apr 29, 2024
2 parents 4b5ef24 + 3850a71 commit 52d4940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions {{ cookiecutter.format }}/src/bootstrap/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ int main(int argc, char *argv[]) {
}
PyMem_RawFree(wtmp_str);

// Set the executable name to match argv[0]
status = PyConfig_SetBytesString(&config, &config.executable, argv[0]);
// Set the executable to match the known path of the app binary in the flatpak.
status = PyConfig_SetBytesString(&config, &config.executable, "/app/bin/{{ cookiecutter.app_name }}");
if (PyStatus_Exception(status)) {
// crash_dialog("Unable to set executable name: %s", status.err_msg);
PyConfig_Clear(&config);
Expand Down

0 comments on commit 52d4940

Please sign in to comment.