summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/dist/linux/org.godotengine.Godot.xml15
-rwxr-xr-xmisc/scripts/make_tarball.sh66
2 files changed, 75 insertions, 6 deletions
diff --git a/misc/dist/linux/org.godotengine.Godot.xml b/misc/dist/linux/org.godotengine.Godot.xml
index e51179cd61..d4452018c4 100644
--- a/misc/dist/linux/org.godotengine.Godot.xml
+++ b/misc/dist/linux/org.godotengine.Godot.xml
@@ -2,20 +2,21 @@
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-godot-project">
<comment>Godot Engine project</comment>
- <icon name="x-godot-project" />
- <glob pattern="*.godot"/>
+ <sub-class-of type="text/plain"/>
+ <icon name="x-godot-project"/>
+ <glob pattern="project.godot"/>
</mime-type>
<mime-type type="application/x-godot-resource">
<comment>Godot Engine resource</comment>
- <icon name="x-godot-resource" />
+ <icon name="x-godot-resource"/>
<glob pattern="*.res"/>
<glob pattern="*.tres"/>
</mime-type>
<mime-type type="application/x-godot-scene">
<comment>Godot Engine scene</comment>
- <icon name="x-godot-scene" />
+ <icon name="x-godot-scene"/>
<glob pattern="*.scn"/>
<glob pattern="*.tscn"/>
<glob pattern="*.escn"/>
@@ -23,13 +24,15 @@
<mime-type type="application/x-godot-shader">
<comment>Godot Engine shader</comment>
- <icon name="x-godot-shader" />
+ <sub-class-of type="text/plain"/>
+ <icon name="x-godot-shader"/>
<glob pattern="*.gdshader"/>
</mime-type>
<mime-type type="application/x-gdscript">
<comment>GDScript script</comment>
- <icon name="x-gdscript" />
+ <sub-class-of type="text/plain"/>
+ <icon name="x-gdscript"/>
<glob pattern="*.gd"/>
</mime-type>
</mime-info>
diff --git a/misc/scripts/make_tarball.sh b/misc/scripts/make_tarball.sh
new file mode 100755
index 0000000000..9e02b80af1
--- /dev/null
+++ b/misc/scripts/make_tarball.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+if [ ! -e "version.py" ]; then
+ echo "This script should be ran from the root folder of the Godot repository."
+ exit 1
+fi
+
+while getopts "h?sv:g:" opt; do
+ case "$opt" in
+ h|\?)
+ echo "Usage: $0 [OPTIONS...]"
+ echo
+ echo " -s script friendly file name (godot.tar.gz)"
+ echo " -v godot version for file name (e.g. 4.0-stable)"
+ echo " -g git treeish to archive (e.g. master)"
+ echo
+ exit 1
+ ;;
+ s)
+ script_friendly_name=1
+ ;;
+ v)
+ godot_version=$OPTARG
+ ;;
+ g)
+ git_treeish=$OPTARG
+ ;;
+ esac
+done
+
+if [ ! -z "$git_treeish" ]; then
+ HEAD=$(git rev-parse $git_treeish)
+else
+ HEAD=$(git rev-parse HEAD)
+fi
+
+if [ ! -z "$script_friendly_name" ]; then
+ NAME=godot
+else
+ if [ ! -z "$godot_version" ]; then
+ NAME=godot-$godot_version
+ else
+ NAME=godot-$HEAD
+ fi
+fi
+
+CURDIR=$(pwd)
+TMPDIR=$(mktemp -d -t godot-XXXXXX)
+
+echo "Generating tarball for revision $HEAD with folder name '$NAME'."
+echo
+echo "The tarball will be written to the parent folder:"
+echo " $(dirname $CURDIR)/$NAME.tar.gz"
+
+git archive $HEAD --prefix=$NAME/ -o $TMPDIR/$NAME.tar
+
+# Adding custom .git/HEAD to tarball so that we can generate VERSION_HASH.
+cd $TMPDIR
+mkdir -p $NAME/.git
+echo $HEAD > $NAME/.git/HEAD
+tar -uf $NAME.tar $NAME
+
+cd $CURDIR
+gzip -c $TMPDIR/$NAME.tar > ../$NAME.tar.gz
+
+rm -rf $TMPDIR