forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.6' into 4.7
Conflicts: src/plugins/qnx/qnxplugin.cpp Change-Id: I8ede5fa9c8daf3001e41fcba7cbee68edb9db3a6
This commit is contained in:
@@ -177,3 +177,13 @@ def is_debug(path, filenames):
|
|||||||
def is_not_debug(path, filenames):
|
def is_not_debug(path, filenames):
|
||||||
files = [fn for fn in filenames if os.path.isfile(os.path.join(path, fn))]
|
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))]
|
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)
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ import tempfile
|
|||||||
import common
|
import common
|
||||||
|
|
||||||
def parse_arguments():
|
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',
|
parser.add_argument('--7z', help='path to 7z binary',
|
||||||
default='7z.exe' if common.is_windows_platform() else '7z',
|
default='7z.exe' if common.is_windows_platform() else '7z',
|
||||||
metavar='<7z_binary>', dest='sevenzip')
|
metavar='<7z_binary>', dest='sevenzip')
|
||||||
@@ -52,6 +53,10 @@ def main():
|
|||||||
try:
|
try:
|
||||||
common.copytree(arguments.source_directory, tempdir, symlinks=True,
|
common.copytree(arguments.source_directory, tempdir, symlinks=True,
|
||||||
ignore=(common.is_not_debug if arguments.debug else common.is_debug))
|
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
|
zip_source = os.path.join(tempdir, '*') if arguments.exclude_toplevel else tempdir
|
||||||
subprocess.check_call([arguments.sevenzip, 'a', '-mx9',
|
subprocess.check_call([arguments.sevenzip, 'a', '-mx9',
|
||||||
arguments.target_archive, zip_source])
|
arguments.target_archive, zip_source])
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ import time
|
|||||||
import common
|
import common
|
||||||
|
|
||||||
def parse_arguments():
|
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('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('dmg_volumename', help='volume name to use for the disk image')
|
||||||
parser.add_argument('source_directory', help='directory with the Qt Creator sources')
|
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))
|
tempdir = os.path.join(tempdir_base, os.path.basename(arguments.binary_directory))
|
||||||
try:
|
try:
|
||||||
common.copytree(arguments.binary_directory, tempdir, symlinks=True, ignore=common.is_debug)
|
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'))
|
os.symlink('/Applications', os.path.join(tempdir, 'Applications'))
|
||||||
shutil.copy(os.path.join(arguments.source_directory, 'LICENSE.GPL3-EXCEPT'), tempdir)
|
shutil.copy(os.path.join(arguments.source_directory, 'LICENSE.GPL3-EXCEPT'), tempdir)
|
||||||
dmg_cmd = ['hdiutil', 'create', '-srcfolder', tempdir, '-volname', arguments.dmg_volumename,
|
dmg_cmd = ['hdiutil', 'create', '-srcfolder', tempdir, '-volname', arguments.dmg_volumename,
|
||||||
|
|||||||
@@ -116,7 +116,9 @@ static void addSystemHeaderPaths(QList<ProjectExplorer::HeaderPath> &paths,
|
|||||||
const Utils::FileName ndkPath = AndroidConfigurations::currentConfig().ndkLocation();
|
const Utils::FileName ndkPath = AndroidConfigurations::currentConfig().ndkLocation();
|
||||||
|
|
||||||
// Get short version (for example 4.9)
|
// 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;
|
Utils::FileName stdcppPath = ndkPath;
|
||||||
stdcppPath.appendPath("sources/cxx-stl/gnu-libstdc++/" + clangVersion);
|
stdcppPath.appendPath("sources/cxx-stl/gnu-libstdc++/" + clangVersion);
|
||||||
Utils::FileName includePath = stdcppPath;
|
Utils::FileName includePath = stdcppPath;
|
||||||
|
|||||||
@@ -2166,6 +2166,10 @@ void QmlEnginePrivate::handleFrame(const QVariantMap &response)
|
|||||||
watchHandler->insertItem(item);
|
watchHandler->insertItem(item);
|
||||||
evaluate(exp, -1, [this, iname, exp](const QVariantMap &response) {
|
evaluate(exp, -1, [this, iname, exp](const QVariantMap &response) {
|
||||||
handleEvaluateExpression(response, iname, exp);
|
handleEvaluateExpression(response, iname, exp);
|
||||||
|
|
||||||
|
// If there are no scopes, "this" may be the only thing to look up.
|
||||||
|
if (currentFrameScopes.isEmpty())
|
||||||
|
checkForFinishedUpdate();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ using namespace ProjectExplorer;
|
|||||||
DeviceCheckBuildStep::DeviceCheckBuildStep(BuildStepList *bsl)
|
DeviceCheckBuildStep::DeviceCheckBuildStep(BuildStepList *bsl)
|
||||||
: BuildStep(bsl, stepId())
|
: BuildStep(bsl, stepId())
|
||||||
{
|
{
|
||||||
setDefaultDisplayName(stepDisplayName());
|
setDefaultDisplayName(displayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DeviceCheckBuildStep::init(QList<const BuildStep *> &earlierSteps)
|
bool DeviceCheckBuildStep::init(QList<const BuildStep *> &earlierSteps)
|
||||||
@@ -92,7 +92,7 @@ Core::Id DeviceCheckBuildStep::stepId()
|
|||||||
return "ProjectExplorer.DeviceCheckBuildStep";
|
return "ProjectExplorer.DeviceCheckBuildStep";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DeviceCheckBuildStep::stepDisplayName()
|
QString DeviceCheckBuildStep::displayName()
|
||||||
{
|
{
|
||||||
return tr("Check for a configured device");
|
return tr("Check for a configured device");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
BuildStepConfigWidget *createConfigWidget() override;
|
BuildStepConfigWidget *createConfigWidget() override;
|
||||||
|
|
||||||
static Core::Id stepId();
|
static Core::Id stepId();
|
||||||
static QString stepDisplayName();
|
static QString displayName();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
|||||||
@@ -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_RUNCONFIGURATION_PREFIX[] = "Qt4ProjectManager.QNX.QNXRunConfiguration.";
|
||||||
|
|
||||||
|
const char QNX_QNX_DEPLOYCONFIGURATION_ID[] = "Qt4ProjectManager.QNX.QNXDeployConfiguration";
|
||||||
|
|
||||||
const char QNX_QNX_OS_TYPE[] = "QnxOsType";
|
const char QNX_QNX_OS_TYPE[] = "QnxOsType";
|
||||||
|
|
||||||
const char QNX_DEBUG_EXECUTABLE[] = "pdebug";
|
const char QNX_DEBUG_EXECUTABLE[] = "pdebug";
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ NamedWidget *QnxDeployConfiguration::createConfigWidget()
|
|||||||
QnxDeployConfigurationFactory::QnxDeployConfigurationFactory()
|
QnxDeployConfigurationFactory::QnxDeployConfigurationFactory()
|
||||||
{
|
{
|
||||||
registerDeployConfiguration<QnxDeployConfiguration>
|
registerDeployConfiguration<QnxDeployConfiguration>
|
||||||
("Qt4ProjectManager.QNX.QNXDeployConfiguration");
|
(Constants::QNX_QNX_DEPLOYCONFIGURATION_ID);
|
||||||
setDefaultDisplayName(QnxDeployConfiguration::tr("Deploy to QNX Device"));
|
setDefaultDisplayName(QnxDeployConfiguration::tr("Deploy to QNX Device"));
|
||||||
addSupportedTargetDeviceType(QnxDeviceFactory::deviceType());
|
addSupportedTargetDeviceType(QnxDeviceFactory::deviceType());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
#include <coreplugin/icontext.h>
|
#include <coreplugin/icontext.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
|
#include <projectexplorer/devicesupport/devicecheckbuildstep.h>
|
||||||
#include <projectexplorer/kitinformation.h>
|
#include <projectexplorer/kitinformation.h>
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
@@ -55,6 +56,9 @@
|
|||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
|
|
||||||
|
#include <remotelinux/genericdirectuploadstep.h>
|
||||||
|
#include <remotelinux/remotelinuxcheckforfreediskspacestep.h>
|
||||||
|
|
||||||
#include <qtsupport/qtkitinformation.h>
|
#include <qtsupport/qtkitinformation.h>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
@@ -64,6 +68,19 @@ using namespace ProjectExplorer;
|
|||||||
namespace Qnx {
|
namespace Qnx {
|
||||||
namespace Internal {
|
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
|
class QnxPluginPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -76,6 +93,9 @@ public:
|
|||||||
QnxQtVersionFactory qtVersionFactory;
|
QnxQtVersionFactory qtVersionFactory;
|
||||||
QnxDeviceFactory deviceFactory;
|
QnxDeviceFactory deviceFactory;
|
||||||
QnxDeployConfigurationFactory deployConfigFactory;
|
QnxDeployConfigurationFactory deployConfigFactory;
|
||||||
|
GenericQnxDeployStepFactory<RemoteLinux::GenericDirectUploadStep> directUploadDeployFactory;
|
||||||
|
GenericQnxDeployStepFactory<RemoteLinux::RemoteLinuxCheckForFreeDiskSpaceStep> checkForFreeDiskSpaceDeployFactory;
|
||||||
|
GenericQnxDeployStepFactory<DeviceCheckBuildStep> checkBuildDeployFactory;
|
||||||
QnxRunConfigurationFactory runConfigFactory;
|
QnxRunConfigurationFactory runConfigFactory;
|
||||||
QnxSettingsPage settingsPage;
|
QnxSettingsPage settingsPage;
|
||||||
QnxToolChainFactory toolChainFactory;
|
QnxToolChainFactory toolChainFactory;
|
||||||
|
|||||||
Reference in New Issue
Block a user