Code: Select all
Index: make_deb.sh
===================================================================
--- make_deb.sh (revision 4689)
+++ make_deb.sh (working copy)
@@ -79,9 +79,36 @@
if [ "\$1" = "configure" ] && [ -x "\`which update-menus 2>/dev/null\`" ]; then
update-menus
fi
+## Update mime database
+if [ "\$1" = "configure" ] && [ -x "\`which update-mime-database 2>/dev/null\`" ]; then
+ update-mime-database ${PREFIX}/share/mime
+fi
+## Update mime icon
+if [ "\$1" = "configure" ] && [ -x "\`which update-icon-caches 2>/dev/null\`" ]; then
+ update-icon-caches ${PREFIX}/share/icons/hicolor
+fi
echo "Done"
EOF
+ cat > fakeroot/DEBIAN/postrm <<EOF
+#!/bin/sh
+echo "Running postrm step..."
+
+## Menu updating
+if [ "\$1" = "configure" ] && [ -x "\`which update-menus 2>/dev/null\`" ]; then
+ update-menus
+fi
+## Update mime database
+if [ "\$1" = "configure" ] && [ -x "\`which update-mime-database 2>/dev/null\`" ]; then
+ update-mime-database ${PREFIX}/share/mime
+fi
+## Update mime icon
+if [ "\$1" = "configure" ] && [ -x "\`which update-icon-caches 2>/dev/null\`" ]; then
+ update-icon-caches ${PREFIX}/share/icons/hicolor
+fi
+echo "Done"
+EOF
chmod 0755 fakeroot/DEBIAN/postinst
+ chmod 0755 fakeroot/DEBIAN/postrm
}
## Making destop file
@@ -185,6 +212,14 @@
cp -pr AUTHORS fakeroot/${PREFIX}/share/codelite/
cp -pr COPYING fakeroot/${PREFIX}/share/codelite/
+## Support mime type
+mkdir -p fakeroot/${PREFIX}/share/mime/packages/
+mkdir -p fakeroot/${PREFIX}/share/icons/hicolor/32x32/mimetypes
+
+cp -pr codelite.xml fakeroot/${PREFIX}/share/mime/packages/
+cp -pr Runtime/images/cubes.png fakeroot/${PREFIX}/share/icons/hicolor/32x32/mimetypes/application-x-codelite-project.png
+cp -pr Runtime/images/cubes.png fakeroot/${PREFIX}/share/icons/hicolor/32x32/mimetypes/application-x-codelite-workspace.png
+
chmod 0644 fakeroot/${PREFIX}/lib/codelite/debuggers/*.so
chmod 0644 fakeroot/${PREFIX}/lib/codelite/*.so
chmod 0666 fakeroot/${PREFIX}/share/codelite/codelite-icons.zip
And, .workspace will use cudes.png as the mime icon, so as .project because I can't find another icon suit .project, you can consider add a project icon.
finally, a mime file and a screenshot below.
--------------------------------------------------------------------
I really want to develop a vim plugin for codelite, is there any document about plugins?