diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-03-13 12:32:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-18 08:21:49 +0100 |
commit | 782b827306ea735803f7b31ff996b1ca316b896b (patch) | |
tree | eb2ce65c30298ffdf923c3ec1a920a0b691d8433 | |
parent | 626f71781a1e045e583b18a4d719ee863dacbbf1 (diff) | |
download | qttools-782b827306ea735803f7b31ff996b1ca316b896b.tar.gz |
qtd3dservice: Remove control file handling
This is no longer necessary, as d3dcompiler_qt no longer relies
on a control file.
Change-Id: I689afaf02f30adc3d733aa6fa47bd96c85f8459b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
-rw-r--r-- | src/qtd3dservice/appxhandler.cpp | 22 | ||||
-rw-r--r-- | src/qtd3dservice/d3dservice.cpp | 4 | ||||
-rw-r--r-- | src/qtd3dservice/xaphandler.cpp | 43 |
3 files changed, 0 insertions, 69 deletions
diff --git a/src/qtd3dservice/appxhandler.cpp b/src/qtd3dservice/appxhandler.cpp index 5e956a733..f6623ea23 100644 --- a/src/qtd3dservice/appxhandler.cpp +++ b/src/qtd3dservice/appxhandler.cpp @@ -215,7 +215,6 @@ extern int handleAppxDevice(int deviceIndex, const QString &app, const QString & + QStringLiteral("\\Packages\\") + QString::fromWCharArray(WindowsGetStringRawBuffer(packageFamilyName, Q_NULLPTR)) + QStringLiteral("\\LocalState\\d3dcompiler"); - const QString remoteControlFile = remoteBase + QStringLiteral("\\control"); const QString remoteSourcePath = remoteBase + QStringLiteral("\\source\\"); const QString remoteBinaryPath = remoteBase + QStringLiteral("\\binary\\"); @@ -239,17 +238,6 @@ extern int handleAppxDevice(int deviceIndex, const QString &app, const QString & dir.cd(QStringLiteral("d3dcompiler")); } - // Check if control file exists - if (!QFile::exists(remoteControlFile)) { - QFile file(remoteControlFile); - if (!file.open(QFile::WriteOnly)) { - qCWarning(lcD3DService) << "Could not create control file:" << file.errorString(); - Sleep(1000); - continue; - } - file.write("Qt D3D compilation service"); - } - if (!QFile::exists(remoteSourcePath)) { if (!dir.mkpath(QStringLiteral("source"))) { qCWarning(lcD3DService) << "Could not create source directory."; @@ -269,16 +257,6 @@ extern int handleAppxDevice(int deviceIndex, const QString &app, const QString & checkDirectories = false; } - QFile file(remoteControlFile); - if (!file.open(QFile::WriteOnly)) { - qCWarning(lcD3DService) << "Could not create control file:" - << file.errorString(); - checkDirectories = true; - Sleep(1000); - continue; - } - file.write("Qt D3D compilation service"); - // Ok, ready to check for shaders QDirIterator it(remoteSourcePath); while (it.hasNext()) { diff --git a/src/qtd3dservice/d3dservice.cpp b/src/qtd3dservice/d3dservice.cpp index f8843c1a0..1594cb086 100644 --- a/src/qtd3dservice/d3dservice.cpp +++ b/src/qtd3dservice/d3dservice.cpp @@ -180,10 +180,6 @@ static QString prepareCache(const QString &device, const QString &app) return QString(); if (!baseDir.mkpath(QStringLiteral("binary"))) return QString(); - QFile controlFile(baseDir.absoluteFilePath(QStringLiteral("control"))); - if (!controlFile.open(QFile::WriteOnly)) - return QString(); - controlFile.write(QByteArrayLiteral("Qt D3D shader compilation service")); return QDir::toNativeSeparators(baseDir.absolutePath()); } diff --git a/src/qtd3dservice/xaphandler.cpp b/src/qtd3dservice/xaphandler.cpp index a8006ef2e..3c306e40a 100644 --- a/src/qtd3dservice/xaphandler.cpp +++ b/src/qtd3dservice/xaphandler.cpp @@ -216,13 +216,11 @@ extern int handleXapDevice(int deviceIndex, const QString &app, const QString &l return 1; } - const QString localControlFile = localBase + QStringLiteral("\\control"); const QString localSourcePath = localBase + QStringLiteral("\\source\\"); const QString localBinaryPath = localBase + QStringLiteral("\\binary\\"); const QString remoteBase = QStringLiteral("%FOLDERID_APPID_ISOROOT%\\") + app + QStringLiteral("\\d3dcompiler"); - const QString remoteControlFile = remoteBase + QStringLiteral("\\control"); const QString remoteSourcePath = remoteBase + QStringLiteral("\\source\\"); const QString remoteBinaryPath = remoteBase + QStringLiteral("\\binary\\"); @@ -253,9 +251,7 @@ extern int handleXapDevice(int deviceIndex, const QString &app, const QString &l return 1; } - int round = 0; bool wasDisconnected = true; - FileInfo controlFileInfo; forever { // If the run lock is signaled, it's time to quit if (WaitForSingleObject(runLock, 0) == WAIT_OBJECT_0) @@ -297,32 +293,6 @@ extern int handleXapDevice(int deviceIndex, const QString &app, const QString &l // Run certain setup steps once per connection if (wasDisconnected) { - // Check if control file exists - hr = connection->GetFileInfo(bstr(remoteControlFile), &controlFileInfo); - if (FAILED(hr)) { - if (hr != 0x80070003 /* Not found */) { - qCWarning(lcD3DService) << "Unable to obtain file info:" - << coreConServer->formatError(hr); - Sleep(1000); - continue; - } - // Not found, so let's upload it - hr = connection->SendFile(bstr(localControlFile), bstr(remoteControlFile), CREATE_ALWAYS, NULL); - if (FAILED(hr)) { - if (hr == 0x8973190e) { - // This can happen during normal reinstallation, so continue - qCDebug(lcD3DService) << "Unable to send control file, retrying..."; - wasDisconnected = true; - Sleep(1000); - } else { - qCWarning(lcD3DService) << "Unable to send control file:" - << coreConServer->formatError(hr); - return 1; - } - continue; - } - } - FileInfo remoteDirectoryInfo; hr = connection->GetFileInfo(bstr(remoteSourcePath), &remoteDirectoryInfo); if (FAILED(hr)) { @@ -363,19 +333,6 @@ extern int handleXapDevice(int deviceIndex, const QString &app, const QString &l wasDisconnected = false; } - // Update roughly every 30 seconds - if (round++ % 30 == 0) { - GetSystemTimeAsFileTime(&controlFileInfo.m_LastWriteTime); - hr = connection->SetFileInfo(bstr(remoteControlFile), &controlFileInfo); - round = 1; - if (FAILED(hr)) { - qCWarning(lcD3DService) << "Unable to update control file:" - << coreConServer->formatError(hr); - Sleep(1000); - continue; - } - } - // Ok, ready to check for shaders SAFEARRAY *listing; hr = connection4->GetDirectoryListing(bstr(remoteSourcePath), &listing); |