summaryrefslogtreecommitdiff
path: root/tools/editor/SCsub
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-02-15 21:16:33 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-02-15 21:16:33 -0300
commit8c1731b67995add31361ae526b0e6af76346181e (patch)
treef96080fdbb6e0f0f3fcc12bf10fc92928f0310cb /tools/editor/SCsub
parent9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852 (diff)
-project settings are saved when changed
-load() was in the GDScript docs but missing in the scripting-different music for platformer 2D and 3D -fix how documentation is generated, built in doc browser should be always up to date -copypaste, scrolling, etc in builtin doc -built-in scripts get saved now (though debugger may not always work on them) -Theme can be set to controls as a property
Diffstat (limited to 'tools/editor/SCsub')
-rw-r--r--tools/editor/SCsub33
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/editor/SCsub b/tools/editor/SCsub
index 0f7d3f7656..1fba49c34c 100644
--- a/tools/editor/SCsub
+++ b/tools/editor/SCsub
@@ -1,5 +1,35 @@
Import('env')
+
+def make_doc_header(target,source,env):
+
+ src = source[0].srcnode().abspath
+ dst = target[0].srcnode().abspath
+ f = open(src,"rb")
+ g = open(dst,"wb")
+ buf = f.read()
+ decomp_size = len(buf)
+ import zlib
+ buf = zlib.compress(buf)
+
+
+ g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
+ g.write("#ifndef _DOC_DATA_RAW_H\n")
+ g.write("#define _DOC_DATA_RAW_H\n")
+ g.write("static const int _doc_data_compressed_size="+str(len(buf))+";\n")
+ g.write("static const int _doc_data_uncompressed_size="+str(decomp_size)+";\n")
+ g.write("static const unsigned char _doc_data_compressed[]={\n")
+ for i in range(len(buf)):
+ g.write(str(ord(buf[i]))+",\n")
+ g.write("};\n")
+ g.write("#endif")
+
+
+
+
+
+
+
if (env["tools"]=="yes"):
reg_exporters_inc='#include "register_exporters.h"\n'
@@ -12,7 +42,10 @@ if (env["tools"]=="yes"):
f = open("register_exporters.cpp","wb")
f.write(reg_exporters_inc)
f.write(reg_exporters)
+ env.Depends("#tools/editor/doc_data_compressed.h","#doc/base/classes.xml")
+ env.Command("#tools/editor/doc_data_compressed.h","#doc/base/classes.xml",make_doc_header)
+ #make_doc_header(env.File("#tools/editor/doc_data_raw.h").srcnode().abspath,env.File("#doc/base/classes.xml").srcnode().abspath,env)
env.add_source_files(env.tool_sources,"*.cpp")
Export('env')