Skip to content

Commit

Permalink
Merge pull request #80 from jordisayol/master
Browse files Browse the repository at this point in the history
Add icons and mimetypes for *.d, *.dd and *.di source code files on deb packages.
  • Loading branch information
WalterBright committed Jul 2, 2014
2 parents 63c626c + 4e89e43 commit f818c75
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions linux/dmd_deb.sh
Expand Up @@ -215,6 +215,43 @@ else
cp -f ../$UNZIPDIR/man/man5/dmd.conf.5.gz usr/share/man/man5


# install icons
for I in 16 22 24 32 48 256
do
mkdir -p usr/share/icons/hicolor/${I}x${I}/mimetypes
cp -f $(dirname $0)/icons/${I}/dmd-source.png usr/share/icons/hicolor/${I}x${I}/mimetypes
done


# create dmd.xml file
mkdir -p usr/share/mime/packages
echo -e '<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns=\x27http://www.freedesktop.org/standards/shared-mime-info\x27>
<mime-type type="application/x-dsrc">
<comment>D source code</comment>
<sub-class-of type="text/x-csrc"/>
<glob pattern="*.d"/>
<icon name="dmd-source"/>
</mime-type>
<mime-type type="application/x-ddsrc">
<comment>Ddoc source code</comment>
<sub-class-of type="application/x-dsrc"/>
<glob pattern="*.dd"/>
<icon name="dmd-source"/>
</mime-type>
<mime-type type="application/x-disrc">
<comment>D interface source code</comment>
<sub-class-of type="application/x-dsrc"/>
<glob pattern="*.di"/>
<icon name="dmd-source"/>
</mime-type>
</mime-info>' | sed 's/^\t//' > usr/share/mime/packages/dmd.xml


# generate copyright file
mkdir -p usr/share/doc/dmd
for I in ../$UNZIPDIR/license.txt ../$UNZIPDIR/src/druntime/LICENSE
Expand Down
Binary file added linux/icons/16/dmd-source.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added linux/icons/22/dmd-source.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added linux/icons/24/dmd-source.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added linux/icons/256/dmd-source.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added linux/icons/32/dmd-source.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added linux/icons/48/dmd-source.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f818c75

Please sign in to comment.