summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2016-03-11 14:49:20 +0100
committerEike Ziller <eike.ziller@theqtcompany.com>2016-03-14 13:18:22 +0000
commitdb61acce80a7373f3b4cfcb84ca3af1e6264c3ac (patch)
tree0d3db559046793b5869478dffec0003f187730d5 /scripts
parentc3772bfd4c52c453179b7e121900c06f72ed36a2 (diff)
downloadqt-creator-db61acce80a7373f3b4cfcb84ca3af1e6264c3ac.tar.gz
Installer: Support different display version than component version
The component version must be numeric, but we want to display e.g. Qt Creator 4.0.0-beta1 in the installer title. The change adds a -d parameter to the script and adds corresponding replacement variables. Display version falls back to component version. Change-Id: Ia8bcd05444e280f8a44ab321b043f4031725600d Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/packageIfw.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/packageIfw.py b/scripts/packageIfw.py
index 020f9067e0..f594393307 100755
--- a/scripts/packageIfw.py
+++ b/scripts/packageIfw.py
@@ -36,7 +36,7 @@ import shutil
import inspect
def usage():
- print('Usage: %s [-v|--version-string=versionstring] [-i|--installer-path=/path/to/installerfw] [-a|--archive=archive.7z] [-d|--debug] <outputname>' % os.path.basename(sys.argv[0]))
+ print('Usage: %s [-v|--version-string=versionstring] [-d|--display-version=versionstring] [-i|--installer-path=/path/to/installerfw] [-a|--archive=archive.7z] [--debug] <outputname>' % os.path.basename(sys.argv[0]))
def substitute_file(infile, outfile, substitutions):
with open(infile, 'r') as f:
@@ -51,7 +51,7 @@ def ifw_template_dir():
def main():
try:
- opts, args = getopt.gnu_getopt(sys.argv[1:], 'hv:i:a:d', ['help', 'version-string=', 'installer-path=', 'archive', 'debug'])
+ opts, args = getopt.gnu_getopt(sys.argv[1:], 'hv:d:i:a:', ['help', 'version-string=', 'display-version=', 'installer-path=', 'archive', 'debug'])
except:
usage()
sys.exit(2)
@@ -61,6 +61,7 @@ def main():
sys.exit(2)
version = ''
+ display_version = ''
ifw_location = ''
archives = []
debug = False
@@ -70,16 +71,21 @@ def main():
sys.exit(0)
if o in ('-v', '--version-string'):
version = a
+ if o in ['-d', '--display-version']:
+ display_version = a
if o in ('-i', '--installer-path'):
ifw_location = a
if o in ('-a', '--archive'):
archives.append(a)
- if o in ('-d', '--debug'):
+ if o in ['--debug']:
debug = True
if (version == ''):
raise Exception('Version not specified (--version-string)!')
+ if not display_version:
+ display_version = version
+
if (ifw_location == ''):
raise Exception('Installer framework location not specified (--installer-path)!')
@@ -108,6 +114,7 @@ def main():
try:
substs = {}
substs['version'] = version
+ substs['display_version'] = display_version
substs['date'] = datetime.date.today().isoformat()
substs['archives'] = ','.join(archives)