Make "/ovale version" print the version number of the project.
Johnny C. Lam [06-04-14 - 20:23]
Make "/ovale version" print the version number of the project.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1513 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/Ovale.lua b/Ovale.lua
index 9eec4bf..0d32e01 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -32,6 +32,9 @@ local OVALE_TRUE_STRING = tostring(true)
--</private-static-properties>
--<public-static-properties>
+-- Project version number.
+Ovale.version = "@project-version@"
+-- Localization string table.
Ovale.L = L
--The table of check boxes definition
Ovale.casesACocher = {}
diff --git a/OvaleOptions.lua b/OvaleOptions.lua
index 4ef4d92..d61e0bf 100644
--- a/OvaleOptions.lua
+++ b/OvaleOptions.lua
@@ -22,6 +22,7 @@ local OvaleScripts = nil
local OvaleSpellBook = nil
local OvaleState = nil
+local format = string.format
local strgmatch = string.gmatch
local strgsub = string.gsub
local tostring = tostring
@@ -702,6 +703,12 @@ local self_options =
type = "execute",
func = function() Ovale.Profiler:Info() end,
},
+ version = {
+ order = -14,
+ name = "Show version number",
+ type = "execute",
+ func = function() Ovale:Print(Ovale.version) end,
+ },
},
},
},