forked from qt-creator/qt-creator
Use Utils::Archive instead of java's jar in AndroidSdkDownloader
The exctraction of the downloaded commandlinetools zip file via java's jar tool did suddenly not work anymore on Windows. The exit code of jarExtractProc in AndroidSdkDownloader::extractSdk would be != 0. Instead of fixing the jar usage, this change replaces it with the recently added Utils::Archive. That has the advantage that it preserves the file permissions while exctracting, so that we can also get rid of setSdkFilesExecPermission. Another advantage is that the SDK can be extracted even before a jdk has been selected. Change-Id: I99cc2aff8e183108eb11dbf96f06557e5b299d56 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
@@ -712,14 +712,8 @@ void AndroidSettingsWidget::downloadSdk()
|
||||
.arg(m_ui.SDKLocationPathChooser->filePath().cleanPath().toUserOutput());
|
||||
auto userInput = QMessageBox::information(this, AndroidSdkDownloader::dialogTitle(),
|
||||
message, QMessageBox::Yes | QMessageBox::No);
|
||||
if (userInput == QMessageBox::Yes) {
|
||||
if (m_androidSummary->rowsOk({JavaPathExistsAndWritableRow})) {
|
||||
auto javaPath = m_ui.OpenJDKLocationPathChooser->filePath();
|
||||
m_sdkDownloader.downloadAndExtractSdk(
|
||||
javaPath,
|
||||
m_ui.SDKLocationPathChooser->filePath().cleanPath());
|
||||
}
|
||||
}
|
||||
if (userInput == QMessageBox::Yes)
|
||||
m_sdkDownloader.downloadAndExtractSdk(m_ui.SDKLocationPathChooser->filePath().cleanPath());
|
||||
}
|
||||
|
||||
// AndroidSettingsPage
|
||||
|
||||
Reference in New Issue
Block a user