forked from qt-creator/qt-creator
Nim: Use remote device when searching compilers there
Change-Id: Iab1cb1dbaaf789d2ad328ab70c3dec8839d4ffcc Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -28,6 +28,8 @@
|
|||||||
#include "nimconstants.h"
|
#include "nimconstants.h"
|
||||||
#include "nimtoolchain.h"
|
#include "nimtoolchain.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
@@ -52,11 +54,10 @@ NimToolChainFactory::NimToolChainFactory()
|
|||||||
QList<ToolChain *> NimToolChainFactory::autoDetect(const QList<ToolChain *> &alreadyKnown,
|
QList<ToolChain *> NimToolChainFactory::autoDetect(const QList<ToolChain *> &alreadyKnown,
|
||||||
const IDevice::Ptr &device)
|
const IDevice::Ptr &device)
|
||||||
{
|
{
|
||||||
Q_UNUSED(device);
|
|
||||||
QList<ToolChain *> result;
|
QList<ToolChain *> result;
|
||||||
|
|
||||||
Environment systemEnvironment = Environment::systemEnvironment();
|
IDevice::ConstPtr dev = device ? device : DeviceManager::defaultDesktopDevice();
|
||||||
const FilePath compilerPath = systemEnvironment.searchInPath("nim");
|
const FilePath compilerPath = dev->searchInPath(FilePath::fromString("nim"));
|
||||||
if (compilerPath.isEmpty())
|
if (compilerPath.isEmpty())
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
@@ -18,5 +18,6 @@ RUN apt-get update \
|
|||||||
g++ \
|
g++ \
|
||||||
gdb \
|
gdb \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
|
nim \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
Reference in New Issue
Block a user