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

Update runtime and scratch desktop #55

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion edu.mit.Scratch.desktop
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[Desktop Entry]
Name=Scratch
Comment=Imagine, Program, Share
Exec=scratch-desktop
Exec=scratch-desktop %f
Terminal=false
Type=Application
Icon=edu.mit.Scratch
Categories=Development;
StartupWMClass=Scratch
MimeType=application/x.scratch.sb3
10 changes: 10 additions & 0 deletions edu.mit.Scratch.mime.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x.scratch.sb3">
<sub-class-of type="application/zip" />
<glob pattern="*.sb3" />
<comment>Scratch 3 Project</comment>
<acronym>SB3</acronym>
<generic-icon name="edu.mit.Scratch" />
</mime-type>
</mime-info>
11 changes: 7 additions & 4 deletions edu.mit.Scratch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,19 @@ modules:
- type: script
dest-filename: scratch-desktop.sh
commands:
- 'cd /app/scratch'
- 'zypak-wrapper ./scratch-desktop'
- cd /app/scratch
- zypak-wrapper ./scratch-desktop "$@"

- name: appdata
buildsystem: simple
build-commands:
- 'install -Dm 644 edu.mit.Scratch.appdata.xml /app/share/metainfo/edu.mit.Scratch.appdata.xml'
- 'install -Dm 644 edu.mit.Scratch.desktop /app/share/applications/edu.mit.Scratch.desktop'
- install -Dm 644 edu.mit.Scratch.appdata.xml /app/share/metainfo/edu.mit.Scratch.appdata.xml
- install -Dm 644 edu.mit.Scratch.desktop /app/share/applications/edu.mit.Scratch.desktop
- install -Dm 644 edu.mit.Scratch.mime.xml /app/share/mime/packages/edu.mit.Scratch.mime.xml
Copy link
Member

Choose a reason for hiding this comment

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

Interesting, today I learned how mime types are exported by Flatpak apps.

sources:
- type: file
path: edu.mit.Scratch.appdata.xml
- type: file
path: edu.mit.Scratch.desktop
- type: file
path: edu.mit.Scratch.mime.xml