Make sure NSIS_VERSION is not just "v"
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7170 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
322c7ac6d2
commit
2e2dffb80d
1 changed files with 4 additions and 1 deletions
|
@ -278,12 +278,15 @@ if int(defenv['VER_PACKED'], 0) < int('0x03000000', 0) or int(defenv['VER_PACKED
|
|||
Exit(1)
|
||||
f.write('#define NSIS_PACKEDVERSION _T("%s")\n' % defenv['VER_PACKED'])
|
||||
|
||||
if 'VER_MAJOR' in defenv and defenv.get('VERSION','') == '':
|
||||
if defenv.get('VERSION','') == '' and 'VER_MAJOR' in defenv:
|
||||
defenv['VERSION'] = defenv['VER_MAJOR']
|
||||
if 'VER_MINOR' in defenv:
|
||||
defenv['VERSION'] += '.' + defenv['VER_MINOR']
|
||||
if 'VER_REVISION' in defenv:
|
||||
defenv['VERSION'] += '.' + defenv['VER_REVISION']
|
||||
if defenv.get('VERSION','') == '' and int(defenv['VER_PACKED'], 0) > int('0x02000000', 0):
|
||||
defenv['VERSION'] = '%i' % int(defenv['VER_PACKED'][2:][:2]) # Default to major version
|
||||
print('WARNING: VERSION not set, defaulting to %s!' % defenv['VERSION'])
|
||||
f.write('#define NSIS_VERSION _T("v%s")\n' % defenv['VERSION'])
|
||||
|
||||
f.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue