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

Add basic app launcher #22

Merged
merged 3 commits into from
May 8, 2024
Merged

Add basic app launcher #22

merged 3 commits into from
May 8, 2024

Conversation

MatthewWilkes
Copy link
Member

No description provided.

@Molive-0
Copy link

Molive-0 commented May 6, 2024

It seems that the launcher is not in the branch?

ModuleNotFoundError: No module named 'system.launcher'

@MatthewWilkes
Copy link
Member Author

Oops, thanks @Molive-0. Added now.

@Molive-0
Copy link

Molive-0 commented May 7, 2024

@MatthewWilkes Does this work in the simulator? I'm trying to get our app to boot in the launcher but it seems that the "/apps" directory it checks is actually "/apps", as in next to "/usr", "/bin" and "/home" on my root directory.

print(self._apps)
if app is None:
print(f"Creating app {app_id}...")
module = __import__(module_name, None, None, (fn,))
Copy link

Choose a reason for hiding this comment

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

Currently this will try to import the app name as-is. However, since the apps are all in the /apps/ folder and that is not in the sys.path this will fail. This should be replaced with __import__('apps.' + module_name, [...] or similar. Alternatively you can append /apps/ to the sys.path.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Thanks, I was just coming in to look at this. I assumed it had been a simulator path issue.

Copy link

Choose a reason for hiding this comment

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

No problem! Glad I could help 😁

@MatthewWilkes
Copy link
Member Author

@nyaalex @Molive-0 I've pushed a quick commit with an example app that loads correctly in the simulator. This is still in active dev, so can't promise it won't change more, but this should be enough for people to try stuff more easily.

@MatthewWilkes
Copy link
Member Author

Going to merge this for now. Think it's a step forward, and want to get the simulator out.

@MatthewWilkes MatthewWilkes merged commit ec6ba12 into main May 8, 2024
1 check passed
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.

3 participants