From 475cf5064e04009ffdc730d7915b52af58c3dd69 Mon Sep 17 00:00:00 2001 From: Max Bespalov Date: Tue, 6 Apr 2021 12:42:19 +0300 Subject: Android: Fix aapt compiling command on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building appt2 package on windows aapt expects to see paths with windows separators. If path isn't converted you get "bad resource path" error. https://android.googlesource.com/platform/frameworks/base/+/9ba47d8/tools/aapt2/compile/Compile.cpp#59 Change-Id: Iabacb020920310533b034138e47d1839b845573a Reviewed-by: Raphaƫl Cotty Reviewed-by: Ivan Komissarov --- share/qbs/modules/Android/sdk/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/qbs/modules/Android/sdk/utils.js b/share/qbs/modules/Android/sdk/utils.js index 9511ae9de..264ad2da7 100644 --- a/share/qbs/modules/Android/sdk/utils.js +++ b/share/qbs/modules/Android/sdk/utils.js @@ -174,7 +174,8 @@ function prepareAapt2CompileResource(project, product, inputs, outputs, input, o throw "Cannot create directory '" + FileInfo.toNativeSeparators(compilesResourcesDir) + "'."; } - var args = ["compile", input.filePath, "-o", compilesResourcesDir]; + var args = ["compile", FileInfo.toNativeSeparators(input.filePath), + "-o", FileInfo.toNativeSeparators(compilesResourcesDir)]; var cmd = new Command(product.Android.sdk.aaptFilePath, args); var outputFileName = generateAapt2ResourceFileName(input.filePath); cmd.description = "compiling resource " + input.fileName + " into " + outputFileName; -- cgit v1.2.3