- Timestamp:
- Jul 29, 2020 12:58:57 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r85486 r85524 78 78 #include "CUnattended.h" 79 79 #include "CVirtualBoxErrorInfo.h" 80 #ifdef VBOX_WS_MAC 81 # include "CVirtualBox.h" 82 #endif 80 83 81 84 /* Other VBox stuff: */ … … 1275 1278 const CCloudMachine comMachine = pCloudItem->machine(); 1276 1279 1277 #if def VBOX_WS_WIN1280 #if defined(VBOX_WS_WIN) 1278 1281 /* Gather arguments: */ 1279 1282 QStringList arguments; … … 1283 1286 /* Execute console application finally: */ 1284 1287 QProcess::startDetached(QString("%1 %2").arg(strPath, arguments.join(' '))); 1285 #else /* !VBOX_WS_WIN */ 1288 #elif defined(VBOX_WS_MAC) 1289 /* Gather arguments: */ 1290 QStringList arguments; 1291 arguments << parseShellArguments(strArguments); 1292 1293 /* Make sure that isn't a request to start Open command: */ 1294 if (strPath != "open" && strPath != "/usr/bin/open") 1295 { 1296 /* In that case just add the command we have as simple argument: */ 1297 arguments << comMachine.GetSerialConsoleCommand(); 1298 } 1299 else 1300 { 1301 /* Otherwise upload command to external file which can be opened with Open command: */ 1302 QDir uiHomeFolder(uiCommon().virtualBox().GetHomeFolder()); 1303 const QString strAbsoluteCommandName = uiHomeFolder.absoluteFilePath("last.command"); 1304 QFile file(strAbsoluteCommandName); 1305 file.setPermissions(QFileDevice::ReadOwner | QFileDevice::WriteOwner | QFileDevice::ExeOwner); 1306 if (!file.open(QIODevice::WriteOnly)) 1307 AssertFailedReturnVoid(); 1308 file.write(comMachine.GetSerialConsoleCommand().toUtf8()); 1309 file.close(); 1310 arguments << strAbsoluteCommandName; 1311 } 1312 1313 /* Execute console application finally: */ 1314 QProcess::startDetached(strPath, arguments); 1315 #else /* !VBOX_WS_WIN && !VBOX_WS_MAC */ 1286 1316 /* Gather arguments: */ 1287 1317 QStringList arguments; … … 1291 1321 /* Execute console application finally: */ 1292 1322 QProcess::startDetached(strPath, arguments); 1293 #endif /* !VBOX_WS_WIN */1323 #endif /* !VBOX_WS_WIN && !VBOX_WS_MAC */ 1294 1324 } 1295 1325
Note:
See TracChangeset
for help on using the changeset viewer.