Commit 36256d6e authored by Eike Ziller's avatar Eike Ziller

Remove outdated installer creation script and resources

It is no longer used (it is using same scripts as Qt now),
and contains outdated resources.

Change-Id: I0576d694ef16ced49303dfc4d6075b742dbcc3b1
Reviewed-by: Iikka Eklund's avatarIikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Riitta-Leena Miettinen's avatarLeena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 4514208a
<?xml version="1.0"?>
<Installer>
<Name>Qt Creator</Name>
<Version>{version}</Version>
<Title>Qt Creator {display_version}</Title>
<Publisher>Qt Project</Publisher>
<ProductUrl>http://www.qt.io</ProductUrl>
<InstallerWindowIcon>logo.png</InstallerWindowIcon>
<Watermark>watermark.png</Watermark>
<WizardDefaultHeight>520</WizardDefaultHeight>
<MaintenanceToolName>QtCreatorUninstaller</MaintenanceToolName>
<!-- @homeDir@ and @rootDir@ are some of the supported vars -->
<TargetDir>@homeDir@/qtcreator-{display_version}</TargetDir>
<AdminTargetDir>/opt/qtcreator-{display_version}</AdminTargetDir>
</Installer>
<?xml version="1.0"?>
<Installer>
<Name>Qt Creator</Name>
<Version>{version}</Version>
<Title>Qt Creator {display_version}</Title>
<Publisher>Qt Project</Publisher>
<ProductUrl>http://www.qt.io</ProductUrl>
<InstallerWindowIcon>logo.png</InstallerWindowIcon>
<Background>background.png</Background>
<WizardDefaultHeight>560</WizardDefaultHeight>
<MaintenanceToolName>Uninstall Qt Creator</MaintenanceToolName>
<!-- @homeDir@ and @rootDir@ are some of the supported vars -->
<TargetDir>@homeDir@/Applications/Qt Creator {display_version}</TargetDir>
<AllowSpaceInPath>true</AllowSpaceInPath>
</Installer>
<?xml version="1.0"?>
<Installer>
<Name>Qt Creator</Name>
<Version>{version}</Version>
<Title>Qt Creator {display_version}</Title>
<Publisher>Qt Project</Publisher>
<ProductUrl>http://www.qt.io</ProductUrl>
<InstallerWindowIcon>logo.png</InstallerWindowIcon>
<Watermark>watermark.png</Watermark>
<WizardDefaultHeight>560</WizardDefaultHeight>
<MaintenanceToolName>QtCreatorUninst</MaintenanceToolName>
<!-- @homeDir@ and @rootDir@ are some of the supported vars -->
<TargetDir>@rootDir@/Qt/qtcreator-{display_version}</TargetDir>
<StartMenuDir>Qt Creator</StartMenuDir>
</Installer>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AssociateCommonFiletypesForm</class>
<widget class="QWidget"
name="AssociateCommonFiletypesForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>557</width>
<height>35</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout"
name="verticalLayout">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint"
stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox"
name="AssociateCommonFiletypesCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;body&gt;Associate common file types (.c/.h, .cc/.hh, .cxx/.hxx, .c++/.h++, .cpp/.hpp) with Qt Creator.&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Associate common file types with Qt Creator.</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LaunchQtCreatorCheckBoxForm</class>
<widget class="QWidget" name="LaunchQtCreatorCheckBoxForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>112</width>
<height>17</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="launchQtCreatorCheckBox">
<property name="text">
<string>Launch Qt Creator</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
<?xml version="1.0"?>
<Package>
<DisplayName>Qt Creator Application</DisplayName>
<Description>The IDE of choice for Qt development.</Description>
<Version>{version}</Version>
<ReleaseDate>{date}</ReleaseDate>
<Name>org.qtproject.qtcreator.application</Name>
<Script>installscript.qs</Script>
<Licenses>
<License name="GNU GPL version 3 (with exception clauses)" file="LICENSE.GPL3-EXCEPT" />
</Licenses>
<ForcedInstallation>true</ForcedInstallation>
<Default>true</Default>
<AutoDependOn>org.qtproject.qtcreator</AutoDependOn>
<UserInterfaces>
<UserInterface>associatecommonfiletypesform.ui</UserInterface>
<UserInterface>launchqtcreatorcheckboxform.ui</UserInterface>
</UserInterfaces>
</Package>
<?xml version="1.0"?>
<Package>
<DisplayName>Qt Creator</DisplayName>
<Description>Installs the Qt Creator IDE.</Description>
<Version>{version}</Version>
<ReleaseDate>{date}</ReleaseDate>
<Name>org.qtproject.qtcreator</Name>
<!-- <Script>installscript.js</Script> -->
</Package>
......@@ -20,11 +20,6 @@ DISTFILES += dist/copyright_template.txt \
$$files(dist/changes-*) \
qtcreator.qbs \
qbs/pluginjson/pluginjson.qbs \
$$files(dist/installer/ifw/config/config-*) \
dist/installer/ifw/packages/org.qtproject.qtcreator/meta/package.xml.in \
dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs \
dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/package.xml.in \
dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/license.txt \
$$files(scripts/*.py) \
$$files(scripts/*.sh) \
$$files(scripts/*.pl)
......@@ -102,9 +97,6 @@ else: PLATFORM = "unknown"
BASENAME = $$(INSTALL_BASENAME)
isEmpty(BASENAME): BASENAME = qt-creator-$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
macx:INSTALLER_NAME = "qt-creator-$${QTCREATOR_VERSION}"
else:INSTALLER_NAME = "$${BASENAME}"
linux {
appstream.files = dist/org.qt-project.qtcreator.appdata.xml
appstream.path = $$QTC_PREFIX/share/metainfo/
......@@ -150,20 +142,11 @@ isEmpty(INSTALLER_ARCHIVE_FROM_ENV) {
bindist.commands = 7z a -mx9 $$OUT_PWD/$${BASENAME}.7z \"$$BINDIST_SOURCE\"
#bindist_installer.depends = deployqt
bindist_installer.commands = 7z a -mx9 $${INSTALLER_ARCHIVE} \"$$BINDIST_INSTALLER_SOURCE\"
installer.depends = bindist_installer
installer.commands = python -u $$PWD/scripts/packageIfw.py -i \"$(IFW_PATH)\" -v $${QTCREATOR_VERSION} -a \"$${INSTALLER_ARCHIVE}\" "$$INSTALLER_NAME"
macx {
codesign_installer.commands = codesign -s \"$(SIGNING_IDENTITY)\" $(SIGNING_FLAGS) \"$${INSTALLER_NAME}.app\"
dmg_installer.commands = hdiutil create -srcfolder "$${INSTALLER_NAME}.app" -volname \"Qt Creator\" -format UDBZ "$${BASENAME}-installer.dmg" -ov -scrub -size 1g -verbose
QMAKE_EXTRA_TARGETS += codesign_installer dmg_installer
}
win32 {
deployqt.commands ~= s,/,\\\\,g
bindist.commands ~= s,/,\\\\,g
bindist_installer.commands ~= s,/,\\\\,g
installer.commands ~= s,/,\\\\,g
}
QMAKE_EXTRA_TARGETS += deployqt bindist bindist_installer installer
QMAKE_EXTRA_TARGETS += deployqt bindist bindist_installer
#!/usr/bin/env python
############################################################################
#
# Copyright (C) 2016 The Qt Company Ltd.
# Contact: https://www.qt.io/licensing/
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the commercial license agreement provided with the
# Software or, alternatively, in accordance with the terms contained in
# a written agreement between you and The Qt Company. For licensing terms
# and conditions see https://www.qt.io/terms-conditions. For further
# information use the contact form at https://www.qt.io/contact-us.
#
# GNU General Public License Usage
# Alternatively, this file may be used under the terms of the GNU
# General Public License version 3 as published by the Free Software
# Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
# included in the packaging of this file. Please review the following
# information to ensure the GNU General Public License requirements will
# be met: https://www.gnu.org/licenses/gpl-3.0.html.
#
############################################################################
import os
import sys
import datetime
import getopt
import subprocess
import fnmatch
import tempfile
import shutil
import inspect
def usage():
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:
template = f.read()
with open(outfile, 'w') as f:
f.write(template.format(**substitutions))
def ifw_template_dir():
script_dir = os.path.dirname(inspect.getfile(inspect.currentframe()))
source_dir = os.path.normpath(os.path.join(script_dir, '..'))
return os.path.normpath(os.path.join(source_dir, 'dist', 'installer', 'ifw'))
def main():
try:
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)
if len(args) < 1:
usage()
sys.exit(2)
version = ''
display_version = ''
ifw_location = ''
archives = []
debug = False
for o, a in opts:
if o in ['-h', '--help']:
usage()
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 ['--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)!')
if not archives:
raise ValueError('No archive(s) specified (--archive)!')
installer_name = args[0]
config_postfix = ''
if sys.platform == 'darwin':
config_postfix = '-mac'
if sys.platform.startswith('win'):
config_postfix = '-windows'
if sys.platform.startswith('linux'):
config_postfix = '-linux'
installer_name = installer_name + '.run'
config_name = 'config' + config_postfix + '.xml'
try:
temp_dir = tempfile.mkdtemp()
except:
raise IOError('Failed to create a temporary directory!')
if debug:
print('Working directory: {0}'.format(temp_dir))
try:
substs = {}
substs['version'] = version
substs['display_version'] = display_version
substs['date'] = datetime.date.today().isoformat()
substs['archives'] = ','.join(archives)
template_dir = ifw_template_dir()
out_config_dir = os.path.join(temp_dir,'config')
out_packages_dir = os.path.join(temp_dir, 'packages')
shutil.copytree(os.path.join(template_dir, 'packages'), os.path.join(temp_dir, 'packages'))
shutil.copytree(os.path.join(template_dir, 'config'), os.path.join(temp_dir, 'config'))
for root, dirnames, filenames in os.walk(out_packages_dir):
for template in fnmatch.filter(filenames, '*.in'):
substitute_file(os.path.join(root, template), os.path.join(root, template[:-3]), substs)
os.remove(os.path.join(root, template))
for root, dirnames, filenames in os.walk(out_config_dir):
for template in fnmatch.filter(filenames, '*.in'):
substitute_file(os.path.join(root, template), os.path.join(root, template[:-3]), substs)
os.remove(os.path.join(root, template))
data_path = os.path.join(out_packages_dir, 'org.qtproject.qtcreator.application', 'data')
if not os.path.exists(data_path):
os.makedirs(data_path)
for archive in archives:
shutil.copy(archive, data_path)
ifw_call = [os.path.join(ifw_location, 'bin', 'binarycreator'), '-c', os.path.join(out_config_dir, config_name), '-p', out_packages_dir, installer_name, '--offline-only' ]
if debug:
ifw_call.append('-v')
subprocess.check_call(ifw_call, stderr=subprocess.STDOUT)
finally:
if not debug:
print('Cleaning up...')
shutil.rmtree(temp_dir)
print('Done.')
if __name__ == '__main__':
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment