Merge remote-tracking branch 'origin/4.6' into 4.7

Conflicts:
	src/plugins/qnx/qnxplugin.cpp

Change-Id: I8ede5fa9c8daf3001e41fcba7cbee68edb9db3a6
This commit is contained in:
Eike Ziller
2018-05-16 10:09:15 +02:00
10 changed files with 54 additions and 7 deletions

View File

@@ -177,3 +177,13 @@ def is_debug(path, filenames):
def is_not_debug(path, filenames):
files = [fn for fn in filenames if os.path.isfile(os.path.join(path, fn))]
return [fn for fn in files if not is_debug_file(os.path.join(path, fn))]
def codesign(app_path):
signing_identity = os.environ.get('SIGNING_IDENTITY')
if is_mac_platform() and signing_identity:
codesign_call = ['codesign', '--force', '--deep', '-s', signing_identity, '-v']
signing_flags = os.environ.get('SIGNING_FLAGS')
if signing_flags:
codesign_call.extend(signing_flags.split())
codesign_call.append(app_path)
subprocess.check_call(codesign_call)

View File

@@ -33,7 +33,8 @@ import tempfile
import common
def parse_arguments():
parser = argparse.ArgumentParser(description="Create Qt Creator package, filtering out debug information files.")
parser = argparse.ArgumentParser(description="Create Qt Creator package, filtering out debug information files.",
epilog="To sign the contents before packaging on macOS, set the SIGNING_IDENTITY and optionally the SIGNING_FLAGS environment variables.")
parser.add_argument('--7z', help='path to 7z binary',
default='7z.exe' if common.is_windows_platform() else '7z',
metavar='<7z_binary>', dest='sevenzip')
@@ -52,6 +53,10 @@ def main():
try:
common.copytree(arguments.source_directory, tempdir, symlinks=True,
ignore=(common.is_not_debug if arguments.debug else common.is_debug))
# on macOS we might have to codesign (again) to account for removed debug info
if not arguments.debug:
common.codesign(tempdir)
# package
zip_source = os.path.join(tempdir, '*') if arguments.exclude_toplevel else tempdir
subprocess.check_call([arguments.sevenzip, 'a', '-mx9',
arguments.target_archive, zip_source])

View File

@@ -34,7 +34,8 @@ import time
import common
def parse_arguments():
parser = argparse.ArgumentParser(description='Create Qt Creator disk image, filtering out debug information files.')
parser = argparse.ArgumentParser(description='Create Qt Creator disk image, filtering out debug information files.',
epilog="To sign the contents before packaging on macOS, set the SIGNING_IDENTITY and optionally the SIGNING_FLAGS environment variables.")
parser.add_argument('target_diskimage', help='output .dmg file to create')
parser.add_argument('dmg_volumename', help='volume name to use for the disk image')
parser.add_argument('source_directory', help='directory with the Qt Creator sources')
@@ -47,6 +48,9 @@ def main():
tempdir = os.path.join(tempdir_base, os.path.basename(arguments.binary_directory))
try:
common.copytree(arguments.binary_directory, tempdir, symlinks=True, ignore=common.is_debug)
if common.is_mac_platform():
app_path = [app for app in os.listdir(tempdir) if app.endswith('.app')][0]
common.codesign(os.path.join(tempdir, app_path))
os.symlink('/Applications', os.path.join(tempdir, 'Applications'))
shutil.copy(os.path.join(arguments.source_directory, 'LICENSE.GPL3-EXCEPT'), tempdir)
dmg_cmd = ['hdiutil', 'create', '-srcfolder', tempdir, '-volname', arguments.dmg_volumename,

View File

@@ -116,7 +116,9 @@ static void addSystemHeaderPaths(QList<ProjectExplorer::HeaderPath> &paths,
const Utils::FileName ndkPath = AndroidConfigurations::currentConfig().ndkLocation();
// Get short version (for example 4.9)
const QString clangVersion = version.left(version.lastIndexOf('.'));
auto versionNumber = QVersionNumber::fromString(version);
const QString clangVersion = QString("%1.%2")
.arg(versionNumber.majorVersion()).arg(versionNumber.minorVersion());
Utils::FileName stdcppPath = ndkPath;
stdcppPath.appendPath("sources/cxx-stl/gnu-libstdc++/" + clangVersion);
Utils::FileName includePath = stdcppPath;

View File

@@ -2166,6 +2166,10 @@ void QmlEnginePrivate::handleFrame(const QVariantMap &response)
watchHandler->insertItem(item);
evaluate(exp, -1, [this, iname, exp](const QVariantMap &response) {
handleEvaluateExpression(response, iname, exp);
// If there are no scopes, "this" may be the only thing to look up.
if (currentFrameScopes.isEmpty())
checkForFinishedUpdate();
});
}

View File

@@ -38,7 +38,7 @@ using namespace ProjectExplorer;
DeviceCheckBuildStep::DeviceCheckBuildStep(BuildStepList *bsl)
: BuildStep(bsl, stepId())
{
setDefaultDisplayName(stepDisplayName());
setDefaultDisplayName(displayName());
}
bool DeviceCheckBuildStep::init(QList<const BuildStep *> &earlierSteps)
@@ -92,7 +92,7 @@ Core::Id DeviceCheckBuildStep::stepId()
return "ProjectExplorer.DeviceCheckBuildStep";
}
QString DeviceCheckBuildStep::stepDisplayName()
QString DeviceCheckBuildStep::displayName()
{
return tr("Check for a configured device");
}

View File

@@ -45,7 +45,7 @@ public:
BuildStepConfigWidget *createConfigWidget() override;
static Core::Id stepId();
static QString stepDisplayName();
static QString displayName();
};
} // namespace ProjectExplorer

View File

@@ -39,6 +39,8 @@ const char QNX_QNX_FEATURE[] = "QtSupport.Wizards.FeatureQNX";
const char QNX_QNX_RUNCONFIGURATION_PREFIX[] = "Qt4ProjectManager.QNX.QNXRunConfiguration.";
const char QNX_QNX_DEPLOYCONFIGURATION_ID[] = "Qt4ProjectManager.QNX.QNXDeployConfiguration";
const char QNX_QNX_OS_TYPE[] = "QnxOsType";
const char QNX_DEBUG_EXECUTABLE[] = "pdebug";

View File

@@ -60,7 +60,7 @@ NamedWidget *QnxDeployConfiguration::createConfigWidget()
QnxDeployConfigurationFactory::QnxDeployConfigurationFactory()
{
registerDeployConfiguration<QnxDeployConfiguration>
("Qt4ProjectManager.QNX.QNXDeployConfiguration");
(Constants::QNX_QNX_DEPLOYCONFIGURATION_ID);
setDefaultDisplayName(QnxDeployConfiguration::tr("Deploy to QNX Device"));
addSupportedTargetDeviceType(QnxDeviceFactory::deviceType());
}

View File

@@ -45,6 +45,7 @@
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <projectexplorer/devicesupport/devicecheckbuildstep.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -55,6 +56,9 @@
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <remotelinux/genericdirectuploadstep.h>
#include <remotelinux/remotelinuxcheckforfreediskspacestep.h>
#include <qtsupport/qtkitinformation.h>
#include <QAction>
@@ -64,6 +68,19 @@ using namespace ProjectExplorer;
namespace Qnx {
namespace Internal {
template <class Step>
class GenericQnxDeployStepFactory : public BuildStepFactory
{
public:
GenericQnxDeployStepFactory()
{
registerStep<Step>(Step::stepId());
setDisplayName(Step::displayName());
setSupportedConfiguration(Constants::QNX_QNX_DEPLOYCONFIGURATION_ID);
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
}
};
class QnxPluginPrivate
{
public:
@@ -76,6 +93,9 @@ public:
QnxQtVersionFactory qtVersionFactory;
QnxDeviceFactory deviceFactory;
QnxDeployConfigurationFactory deployConfigFactory;
GenericQnxDeployStepFactory<RemoteLinux::GenericDirectUploadStep> directUploadDeployFactory;
GenericQnxDeployStepFactory<RemoteLinux::RemoteLinuxCheckForFreeDiskSpaceStep> checkForFreeDiskSpaceDeployFactory;
GenericQnxDeployStepFactory<DeviceCheckBuildStep> checkBuildDeployFactory;
QnxRunConfigurationFactory runConfigFactory;
QnxSettingsPage settingsPage;
QnxToolChainFactory toolChainFactory;