Closed
Description
It is easy to select ReproUnzip.app on Mac, or navigate to reprounzip-qt on Windows. On Linux it is more involved:
#!/bin/bash
# Install x-reprozip mimetype
cat >/tmp/reprozip-mime.xml <<'END'
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-reprozip">
<comment>ReproZip Package</comment>
<glob pattern="*.rpz"/>
</mime-type>
</mime-info>
END
xdg-mime install /tmp/reprozip-mime.xml
update-mime-database $HOME/.local/share/mime
# TODO: install icon
# Install desktop file
mkdir -p $HOME/.local/share/applications
cat >$HOME/.local/share/applications/reprounzip.desktop <<END
[Desktop Entry]
Name=ReproUnzip
Exec=$(which reprounzip-qt) %f
Type=Application
MimeType=application/x-reprozip
END
update-desktop-database $HOME/.local/share/applications
When running on Linux, the GUI app should check if it is registered, if not ask the user confirmation and register itself via something like the code above.