diff options
author | Max Bespalov <bespalov.maxim.a@gmail.com> | 2021-04-06 12:42:19 +0300 |
---|---|---|
committer | Raphaël Cotty <raphael.cotty@gmail.com> | 2021-04-07 06:19:28 +0000 |
commit | 475cf5064e04009ffdc730d7915b52af58c3dd69 (patch) | |
tree | 097e9f1de2f09a8d5f8d891760368bffb38d81f8 | |
parent | b11188646b2af369ad09f4e97b81f9fa4d50466c (diff) | |
download | qbs-475cf5064e04009ffdc730d7915b52af58c3dd69.tar.gz |
Android: Fix aapt compiling command on Windows
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 <raphael.cotty@gmail.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
-rw-r--r-- | share/qbs/modules/Android/sdk/utils.js | 3 |
1 files changed, 2 insertions, 1 deletions
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; |