From ec80f7bacd8c53cf53eade6656b35b573e39c248 Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Thu, 16 Jan 2020 22:37:16 +0930 Subject: [PATCH] Fix quickjs build on win64 Add back script system and fix build error on windows 64 bit system. --- dust3d.pro | 31 + languages/dust3d_zh_CN.ts | 4 + resources.qrc | 2 + resources/model-procedural-tree.ds3 | 881 + src/document.cpp | 210 + src/document.h | 25 + src/documentwindow.cpp | 55 +- src/documentwindow.h | 1 + src/scripteditwidget.cpp | 153 + src/scripteditwidget.h | 99 + src/scriptrunner.cpp | 884 + src/scriptrunner.h | 114 + src/scriptvariableswidget.cpp | 194 + src/scriptvariableswidget.h | 25 + src/scriptwidget.cpp | 68 + src/scriptwidget.h | 22 + src/variablesxml.cpp | 64 + src/variablesxml.h | 9 + .../quickjs-2019-07-09-dust3d/Makefile | 463 + .../quickjs/quickjs-2019-07-09-dust3d/TODO | 83 + .../quickjs/quickjs-2019-07-09-dust3d/VERSION | 1 + .../quickjs/quickjs-2019-07-09-dust3d/bjson.c | 88 + .../quickjs-2019-07-09-dust3d/cutils.c | 642 + .../quickjs-2019-07-09-dust3d/cutils.h | 383 + .../doc/jsbignum.html | 1054 + .../doc/jsbignum.pdf | Bin 0 -> 200966 bytes .../doc/jsbignum.texi | 844 + .../doc/quickjs.html | 1050 + .../quickjs-2019-07-09-dust3d/doc/quickjs.pdf | Bin 0 -> 154471 bytes .../doc/quickjs.texi | 817 + .../examples/c_module.js | 6 + .../quickjs-2019-07-09-dust3d/examples/fib.c | 72 + .../examples/fib_module.js | 10 + .../examples/hello.js | 1 + .../examples/hello_module.js | 6 + .../quickjs-2019-07-09-dust3d/examples/pi.js | 66 + .../quickjs-2019-07-09-dust3d/jscompress.c | 918 + .../quickjs/quickjs-2019-07-09-dust3d/libbf.c | 5805 ++ .../quickjs/quickjs-2019-07-09-dust3d/libbf.h | 350 + .../libregexp-opcode.h | 58 + .../quickjs-2019-07-09-dust3d/libregexp.c | 2567 + .../quickjs-2019-07-09-dust3d/libregexp.h | 91 + .../libunicode-table.h | 4269 ++ .../quickjs-2019-07-09-dust3d/libunicode.c | 1540 + .../quickjs-2019-07-09-dust3d/libunicode.h | 124 + .../quickjs/quickjs-2019-07-09-dust3d/list.h | 100 + .../quickjs/quickjs-2019-07-09-dust3d/qjs.c | 466 + .../quickjs/quickjs-2019-07-09-dust3d/qjsc.c | 636 + .../quickjs-2019-07-09-dust3d/qjscalc.js | 2454 + .../quickjs-2019-07-09-dust3d/quickjs-atom.h | 274 + .../quickjs-2019-07-09-dust3d/quickjs-libc.c | 1825 + .../quickjs-2019-07-09-dust3d/quickjs-libc.h | 44 + .../quickjs-opcode.h | 354 + .../quickjs-2019-07-09-dust3d/quickjs.c | 48183 ++++++++++++++++ .../quickjs-2019-07-09-dust3d/quickjs.h | 909 + .../quickjs-2019-07-09-dust3d/readme.txt | 1 + .../quickjs-2019-07-09-dust3d/release.sh | 85 + .../quickjs/quickjs-2019-07-09-dust3d/repl.js | 1504 + .../quickjs-2019-07-09-dust3d/run-test262.c | 1970 + .../quickjs-2019-07-09-dust3d/test262.conf | 173 + .../test262_errors.txt | 0 .../quickjs-2019-07-09-dust3d/test262bn.conf | 175 + .../test262bn_errors.txt | 0 .../quickjs-2019-07-09-dust3d/test262o.conf | 404 + .../test262o_errors.txt | 0 .../tests/microbench.js | 1004 + .../tests/test262.patch | 683 + .../tests/test_bignum.js | 269 + .../tests/test_bjson.js | 119 + .../tests/test_builtin.js | 598 + .../tests/test_closure.js | 221 + .../tests/test_loop.js | 368 + .../tests/test_op.js | 302 + .../tests/test_std.js | 147 + .../quickjs-2019-07-09-dust3d/unicode_gen.c | 3056 + .../unicode_gen_def.h | 275 + thirdparty/three.js/LICENSE | 21 + thirdparty/three.js/README.md | 1 + thirdparty/three.js/dust3d.three.js | 1455 + 79 files changed, 92224 insertions(+), 1 deletion(-) create mode 100755 resources/model-procedural-tree.ds3 create mode 100755 src/scripteditwidget.cpp create mode 100755 src/scripteditwidget.h create mode 100755 src/scriptrunner.cpp create mode 100755 src/scriptrunner.h create mode 100755 src/scriptvariableswidget.cpp create mode 100755 src/scriptvariableswidget.h create mode 100755 src/scriptwidget.cpp create mode 100755 src/scriptwidget.h create mode 100755 src/variablesxml.cpp create mode 100755 src/variablesxml.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/Makefile create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/TODO create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/VERSION create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/bjson.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/cutils.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/cutils.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/doc/jsbignum.html create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/doc/jsbignum.pdf create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/doc/jsbignum.texi create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/doc/quickjs.html create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/doc/quickjs.pdf create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/doc/quickjs.texi create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/examples/c_module.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/examples/fib.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/examples/fib_module.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/examples/hello.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/examples/hello_module.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/examples/pi.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/jscompress.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/libbf.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/libbf.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/libregexp-opcode.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/libregexp.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/libregexp.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/libunicode-table.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/libunicode.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/libunicode.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/list.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/qjs.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/qjsc.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/qjscalc.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/quickjs-atom.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/quickjs-libc.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/quickjs-libc.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/quickjs-opcode.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/quickjs.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/quickjs.h create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/readme.txt create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/release.sh create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/repl.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/run-test262.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/test262.conf create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/test262_errors.txt create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/test262bn.conf create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/test262bn_errors.txt create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/test262o.conf create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/test262o_errors.txt create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/tests/microbench.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/tests/test262.patch create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/tests/test_bignum.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/tests/test_bjson.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/tests/test_builtin.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/tests/test_closure.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/tests/test_loop.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/tests/test_op.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/tests/test_std.js create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/unicode_gen.c create mode 100755 thirdparty/quickjs/quickjs-2019-07-09-dust3d/unicode_gen_def.h create mode 100755 thirdparty/three.js/LICENSE create mode 100755 thirdparty/three.js/README.md create mode 100755 thirdparty/three.js/dust3d.three.js diff --git a/dust3d.pro b/dust3d.pro index 70981631..a60efbed 100644 --- a/dust3d.pro +++ b/dust3d.pro @@ -398,6 +398,21 @@ HEADERS += src/preferences.h HEADERS += src/shadervertex.h +SOURCES += src/scripteditwidget.cpp +HEADERS += src/scripteditwidget.h + +SOURCES += src/scriptvariableswidget.cpp +HEADERS += src/scriptvariableswidget.h + +SOURCES += src/scriptwidget.cpp +HEADERS += src/scriptwidget.h + +SOURCES += src/scriptrunner.cpp +HEADERS += src/scriptrunner.h + +SOURCES += src/variablesxml.cpp +HEADERS += src/variablesxml.h + SOURCES += src/updateschecker.cpp HEADERS += src/updateschecker.h @@ -741,6 +756,22 @@ HEADERS += thirdparty/bullet3/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2 SOURCES += thirdparty/bullet3/src/BulletCollision/CollisionShapes/btBoxShape.cpp HEADERS += thirdparty/bullet3/src/BulletCollision/CollisionShapes/btBoxShape.h +INCLUDEPATH += thirdparty/quickjs/quickjs-2019-07-09-dust3d + +DEFINES += "CONFIG_VERSION=\"\\\"2019-07-09\\\"\"" + +SOURCES += thirdparty/quickjs/quickjs-2019-07-09-dust3d/quickjs.c +HEADERS += thirdparty/quickjs/quickjs-2019-07-09-dust3d/quickjs.h + +SOURCES += thirdparty/quickjs/quickjs-2019-07-09-dust3d/cutils.c +HEADERS += thirdparty/quickjs/quickjs-2019-07-09-dust3d/cutils.h + +SOURCES += thirdparty/quickjs/quickjs-2019-07-09-dust3d/libunicode.c +HEADERS += thirdparty/quickjs/quickjs-2019-07-09-dust3d/libunicode.h + +SOURCES += thirdparty/quickjs/quickjs-2019-07-09-dust3d/libregexp.c +HEADERS += thirdparty/quickjs/quickjs-2019-07-09-dust3d/libregexp.h + INCLUDEPATH += thirdparty/crc64 SOURCES += thirdparty/crc64/crc64.c diff --git a/languages/dust3d_zh_CN.ts b/languages/dust3d_zh_CN.ts index d02f909e..13619237 100644 --- a/languages/dust3d_zh_CN.ts +++ b/languages/dust3d_zh_CN.ts @@ -398,6 +398,10 @@ Tips: Toggle Color 打开/关闭颜色 + + Script + 脚本 + ExportPreviewWidget diff --git a/resources.qrc b/resources.qrc index bbb815bd..0f0cd02e 100644 --- a/resources.qrc +++ b/resources.qrc @@ -14,6 +14,7 @@ resources/model-meerkat.ds3 resources/model-mosquito.ds3 resources/model-seagull.ds3 + resources/model-procedural-tree.ds3 resources/triangle.png resources/quad.png resources/pentagon.png @@ -25,6 +26,7 @@ shaders/default.frag shaders/default.core.vert shaders/default.core.frag + thirdparty/three.js/dust3d.three.js languages/dust3d_zh_CN.qm ACKNOWLEDGEMENTS.html AUTHORS diff --git a/resources/model-procedural-tree.ds3 b/resources/model-procedural-tree.ds3 new file mode 100755 index 00000000..3e3c29a9 --- /dev/null +++ b/resources/model-procedural-tree.ds3 @@ -0,0 +1,881 @@ +DUST3D 1.0 xml 0000000257 + + + +