mirror of https://github.com/Poikilos/b3view
add x mimetype
parent
95f6be4927
commit
5e57aa252c
|
@ -6,6 +6,7 @@
|
|||
* created install.sh and install.bat, and added Install and Usage
|
||||
to README.md
|
||||
* icon, install scripts, and mime type (`model/b3d`)--see README.md
|
||||
* mime type (`model/x`)
|
||||
### Changed
|
||||
* The program can now start without "test.b3d" in the current working
|
||||
directory (fixed Segmentation Fault).
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# b3view
|
||||
View B3D files (and possibly other files supported by Irrlicht).
|
||||
View B3D or X files (and possibly other files supported by Irrlicht)
|
||||
with double-click if this program is associated with the file types.
|
||||
|
||||
This is a modernized fork by poikilos (see CHANGELOG.md).
|
||||
|
||||
|
|
|
@ -15,8 +15,9 @@ shortcut_src_path="applications/$shortcut_name"
|
|||
icons_root=$PREFIX/share/pixmaps
|
||||
applications_path=$PREFIX/share/applications
|
||||
|
||||
mimes_path="share/mime/packages"
|
||||
mime_name=model-b3d.xml
|
||||
mime_path="share/mime/packages/$mime_name"
|
||||
mime_path="$mimes_path/$mime_name"
|
||||
USER_MIMETYPES_DB_PATH=$HOME/.local/share/mime
|
||||
#USER_MIMETYPES_PATH="$USER_MIMETYPES_DB_PATH/packages"
|
||||
SYSTEM_MIMETYPES_DB_PATH=/usr/share/mime
|
||||
|
@ -111,6 +112,16 @@ fi
|
|||
if [ -f "$mime_path" ]; then
|
||||
# echo "Copying as '$MIMETYPES_DB_PATH/packages/$mime_name'..."
|
||||
cp -f "$mime_path" "$MIMETYPES_DB_PATH/packages/"
|
||||
if [ -f "$MIMETYPES_DB_PATH/packages/$mime_name" ]; then
|
||||
echo "Successfully copied '$MIMETYPES_DB_PATH/packages/$mime_name'"
|
||||
fi
|
||||
mime_name=model-x.xml
|
||||
mime_path="$mimes_path/$mime_name"
|
||||
cp -f "$mime_path" "$MIMETYPES_DB_PATH/packages/"
|
||||
if [ -f "$MIMETYPES_DB_PATH/packages/$mime_name" ]; then
|
||||
echo "Successfully copied '$MIMETYPES_DB_PATH/packages/$mime_name'"
|
||||
fi
|
||||
|
||||
echo "Updating mime type database '$MIMETYPES_DB_PATH'..."
|
||||
update-mime-database "$MIMETYPES_DB_PATH" # must contain packages
|
||||
else
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="model/x">
|
||||
<comment>X file format</comment>
|
||||
<icon name="model-x"/>
|
||||
<glob-deleteall/>
|
||||
<glob pattern="*.x"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
Loading…
Reference in New Issue