diff options
| author | ruki <[email protected]> | 2023-11-12 00:37:33 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-12 00:37:33 +0800 |
| commit | 3d00033b3455adefa71d9b08d14fb14dbfc02505 (patch) | |
| tree | dd01907c6ab0081fe25675d91626fa7331728554 /xmake/plugins/pack/xpack.lua | |
| parent | fb648845e465bf0c376f6d0d4197c8243abdaecd (diff) | |
improve nsis spec
Diffstat (limited to 'xmake/plugins/pack/xpack.lua')
| -rw-r--r-- | xmake/plugins/pack/xpack.lua | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/xmake/plugins/pack/xpack.lua b/xmake/plugins/pack/xpack.lua index 8c4537f2b..13bf924bb 100644 --- a/xmake/plugins/pack/xpack.lua +++ b/xmake/plugins/pack/xpack.lua @@ -215,26 +215,29 @@ function xpack:specvars() local specvars = self._specvars if specvars == nil then specvars = { - ARCH = self:arch() - , PLAT = self:plat() - , HOST = os.host() - , MODE = config.get("mode") or "release" + PACKAGE_ARCH = self:arch(), + PACKAGE_PLAT = self:plat(), + PACKAGE_NAME = self:name(), + PACKAGE_DESCRIPTION = self:description() or "", + PACKAGE_FILENAME = self:filename(), + PACKAGE_COPYRIGHT = self:get("copyright") or "", + PACKAGE_COMPANY = self:get("company") or "" } -- get version local version, version_build = self:version() if version then - specvars.VERSION = version + specvars.VERSION = version or "0.0.0" try {function () local v = semver.new(version) if v then - specvars.VERSION_MAJOR = v:major() - specvars.VERSION_MINOR = v:minor() - specvars.VERSION_ALTER = v:patch() + specvars.PACKAGE_VERSION_MAJOR = v:major() or "0" + specvars.PACKAGE_VERSION_MINOR = v:minor() or "0" + specvars.PACKAGE_VERSION_ALTER = v:patch() or "0" end end} if version_build then - specvars.VERSION_BUILD = version_build + specvars.PACKAGE_VERSION_BUILD = version_build or "" end end |
