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

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: default 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>
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt SDK.
**
** 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.
**
****************************************************************************/
// constructor
function Component()
{
component.loaded.connect(this, Component.prototype.loaded);
installer.installationFinished.connect(this, Component.prototype.installationFinishedPageIsShown);
installer.finishButtonClicked.connect(this, Component.prototype.installationFinished);
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
}
Component.prototype.loaded = function()
{
try {
if (installer.value("os") == "win" && installer.isInstaller())
installer.addWizardPageItem(component, "AssociateCommonFiletypesForm", QInstaller.TargetDirectory);
} catch(e) {
print(e);
}
}
Component.prototype.createOperationsForArchive = function(archive)
{
// if there are additional plugin 7zips, these must be extracted in .app/Contents on OS X
if (systemInfo.productType !== "osx" || archive.indexOf('qtcreator.7z') !== -1)
component.addOperation("Extract", archive, "@TargetDir@");
else
component.addOperation("Extract", archive, "@TargetDir@/Qt Creator.app/Contents");
}
Component.prototype.beginInstallation = function()
{
component.qtCreatorBinaryPath = installer.value("TargetDir");
if (installer.value("os") == "win") {
component.qtCreatorBinaryPath = component.qtCreatorBinaryPath + "\\bin\\qtcreator.exe";
component.qtCreatorBinaryPath = component.qtCreatorBinaryPath.replace(/\//g, "\\");
}
else if (installer.value("os") == "x11")
component.qtCreatorBinaryPath = component.qtCreatorBinaryPath + "/bin/qtcreator";
else if (installer.value("os") == "mac")
component.qtCreatorBinaryPath = component.qtCreatorBinaryPath + "/Qt Creator.app/Contents/MacOS/Qt Creator";
if ( installer.value("os") === "win" )
component.setStopProcessForUpdateRequest(component.qtCreatorBinaryPath, true);
}
registerCommonWindowsFileTypeExtensions = function()
{
var headerExtensions = new Array("h", "hh", "hxx", "h++", "hpp");
for (var i = 0; i < headerExtensions.length; ++i) {
component.addOperation( "RegisterFileType",
headerExtensions[i],
component.qtCreatorBinaryPath + " -client \"%1\"",
"C++ Header file",
"text/plain",
component.qtCreatorBinaryPath + ",3",
"ProgId=QtProject.QtCreator." + headerExtensions[i]);
}
var cppExtensions = new Array("cc", "cxx", "c++", "cp", "cpp");
for (var i = 0; i < cppExtensions.length; ++i) {
component.addOperation( "RegisterFileType",
cppExtensions[i],
component.qtCreatorBinaryPath + " -client \"%1\"",
"C++ Source file",
"text/plain",
component.qtCreatorBinaryPath + ",2",
"ProgId=QtProject.QtCreator." + cppExtensions[i]);
}
component.addOperation( "RegisterFileType",
"c",
component.qtCreatorBinaryPath + " -client \"%1\"",
"C Source file",
"text/plain",
component.qtCreatorBinaryPath + ",1",
"ProgId=QtProject.QtCreator.c");
}
registerWindowsFileTypeExtensions = function()
{
component.addOperation( "RegisterFileType",
"ui",
component.qtCreatorBinaryPath + " -client \"%1\"",
"Qt UI file",
"text/plain",
component.qtCreatorBinaryPath + ",4",
"ProgId=QtProject.QtCreator.ui");
component.addOperation( "RegisterFileType",
"pro",
component.qtCreatorBinaryPath + " \"%1\"",
"Qt Project file",
"text/plain",
component.qtCreatorBinaryPath + ",5",
"ProgId=QtProject.QtCreator.pro");
component.addOperation( "RegisterFileType",
"pri",
component.qtCreatorBinaryPath + " -client \"%1\"",
"Qt Project Include file",
"text/plain",
component.qtCreatorBinaryPath + ",6",
"ProgId=QtProject.QtCreator.pri");
component.addOperation( "RegisterFileType",
"qbs",
component.qtCreatorBinaryPath + " \"%1\"",
"Qbs Project file",
"text/plain",
component.qtCreatorBinaryPath + ",5",
"ProgId=QtProject.QtCreator.qbs");
component.addOperation( "RegisterFileType",
"qs",
component.qtCreatorBinaryPath + " -client \"%1\"",
"Qt Script file",
"text/plain",
component.qtCreatorBinaryPath + ",0",
"ProgId=QtProject.QtCreator.qs");
component.addOperation( "RegisterFileType",
"qml",
component.qtCreatorBinaryPath + " -client \"%1\"",
"Qt Quick Markup language file",
"text/plain",
component.qtCreatorBinaryPath + ",7",
"ProgId=QtProject.QtCreator.qml");
}
Component.prototype.createOperations = function()
{
// Call the base createOperations and afterwards set some registry settings
component.createOperations();
if ( installer.value("os") == "win" )
{
component.addOperation( "CreateShortcut",
component.qtCreatorBinaryPath,
"@StartMenuDir@/Qt Creator " + installer.value("ProductVersion") + ".lnk",
"workingDirectory=@homeDir@" );
// only install c runtime if it is needed, no minor version check of the c runtime till we need it
if (installer.value("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\VC\\Runtimes\\x86\\Installed") != 1) {
// return value 3010 means it need a reboot, but in most cases it is not needed for run Qt application
// return value 5100 means there's a newer version of the runtime already installed
component.addElevatedOperation("Execute", "{0,1638,3010,5100}", "@TargetDir@\\lib\\vcredist_msvc2013\\vcredist_x86.exe", "/norestart", "/q");
}
registerWindowsFileTypeExtensions();
if (component.userInterface("AssociateCommonFiletypesForm").AssociateCommonFiletypesCheckBox
.checked) {
registerCommonWindowsFileTypeExtensions();
}
}
if ( installer.value("os") == "x11" )
{
component.addOperation( "InstallIcons", "@TargetDir@/share/icons" );
component.addOperation( "CreateDesktopEntry",
"QtProject-qtcreator.desktop",
"Type=Application\nExec=" + component.qtCreatorBinaryPath + "\nPath=@TargetDir@\nName=Qt Creator\nGenericName=The IDE of choice for Qt development.\nGenericName[de]=Die IDE der Wahl zur Qt Entwicklung\nIcon=QtProject-qtcreator\nTerminal=false\nCategories=Development;IDE;Qt;\nMimeType=text/x-c++src;text/x-c++hdr;text/x-xsrc;application/x-designer;application/vnd.qt.qmakeprofile;application/vnd.qt.xml.resource;text/x-qml;text/x-qt.qml;text/x-qt.qbs;"
);
}
}
function isRoot()
{
if (installer.value("os") == "x11" || installer.value("os") == "mac")
{
var id = installer.execute("/usr/bin/id", new Array("-u"))[0];
id = id.replace(/(\r\n|\n|\r)/gm,"");
if (id === "0")
{
return true;
}
}
return false;
}
Component.prototype.installationFinishedPageIsShown = function()
{
isroot = isRoot();
try {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success && !isroot) {
installer.addWizardPageItem( component, "LaunchQtCreatorCheckBoxForm", QInstaller.InstallationFinished );
}
} catch(e) {
print(e);
}
}
Component.prototype.installationFinished = function()
{
try {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success && !isroot) {
var isLaunchQtCreatorCheckBoxChecked = component.userInterface("LaunchQtCreatorCheckBoxForm").launchQtCreatorCheckBox.checked;
if (isLaunchQtCreatorCheckBoxChecked)
installer.executeDetached(component.qtCreatorBinaryPath, new Array(), "@homeDir@");
}
} catch(e) {
print(e);
}
}
<?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)