diff options
| author | ruki <[email protected]> | 2025-01-08 23:30:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-01-08 23:30:16 +0800 |
| commit | 6ef0f9be8bb89a2c8cabd6d950ac104fbf3c88d5 (patch) | |
| tree | cba29130af59b8551d87eba284ec9ac40327490f /xmake/core/package/package.lua | |
| parent | 7dec01ba2840236fc975d9213842108ed13e858d (diff) | |
improve package name
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index be736d2f0..502a0b0f8 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -90,7 +90,7 @@ function _instance:_memcache() return cache end --- get the package name +-- get the package name without namespace function _instance:name() return self._NAME end @@ -100,12 +100,22 @@ function _instance:namespace() return self._NAMESPACE end --- get the full name +-- get the full name (with namespace) function _instance:fullname() local namespace = self:namespace() return namespace and namespace .. "::" .. self:name() or self:name() end +-- get the display name (with namespace and ~label) +function _instance:displayname() + return self._DISPLAYNAME +end + +-- set the display name +function _instance:displayname_set(fullname) + self._DISPLAYNAME = displayname +end + -- get the type: package function _instance:type() return "package" @@ -1547,16 +1557,6 @@ function _instance:label() return requireinfo and requireinfo.label end --- get the display name -function _instance:displayname() - return self._DISPLAYNAME -end - --- set the display name -function _instance:displayname_set(displayname) - self._DISPLAYNAME = displayname -end - -- invalidate configs function _instance:_invalidate_configs() self._CONFIGS = nil |
