Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose version information to editor extensions #7746

Merged
merged 1 commit into from Jun 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 9 additions & 5 deletions editor/src/clj/editor/editor_extensions.clj
Expand Up @@ -31,15 +31,16 @@
[editor.process :as process]
[editor.properties :as properties]
[editor.resource :as resource]
[editor.system :as system]
[editor.types :as types]
[editor.util :as util]
[editor.workspace :as workspace])
(:import [org.luaj.vm2 LuaError LuaValue LuaFunction Prototype]
[clojure.lang MultiFn]
[com.dynamo.bob Platform]
(:import [clojure.lang MultiFn]
[com.defold.editor.luart SearchPath]
[com.dynamo.bob Platform]
[java.io File]
[java.nio.file Path]))
[java.nio.file Path]
[org.luaj.vm2 LuaError LuaFunction LuaValue Prototype]))

(set! *warn-on-reflection* true)

Expand Down Expand Up @@ -809,7 +810,10 @@
:globals {"editor" {"get" do-ext-get
"can_get" do-ext-can-get
"can_set" do-ext-can-set
"platform" (.getPair (Platform/getHostPlatform))}
"platform" (.getPair (Platform/getHostPlatform))
"version" (system/defold-version)
"engine_sha1" (system/defold-engine-sha1)
"editor_sha1" (system/defold-editor-sha1)}
"package" {"config" (string/join "\n" [File/pathSeparatorChar \; \? \! \-])}
"io" {"tmpfile" nil}
"os" {"execute" nil
Expand Down