Hi, Looking into that... So I have a simple example like that: Application { Profile { name: "a" baseProfile: project.profile } Profile { name: "b" baseProfile: project.profile } qbs.profiles: ["a", "b"] files: [ "main.cpp" ] } I get this error: Result of expression 'qbs.targetOS' [undefined] is not an object. In NativeBinary.qbs
Am I missing something here? The targetOS property is not set when the Profile appears in the Product? Thanks Raph Le dim. 7 juin 2020 à 10:51, Иван Комиссаров <abba...@gmail.com> a écrit : > Hello, Raphael! > > I’ve seen your new patch and it looks really interesting. > > So, for now, you have 2 separate patches for the AAB support, right? > [0] https://codereview.qt-project.org/c/qbs/qbs/+/303358 > [1] https://codereview.qt-project.org/c/qbs/qbs/+/289726 > > The multiplexing over type seems to be a very useful feature, but I’m > afraid it’s not that easy to implement. I find it useful to multiplex a > library over "staticlibrary"/"dynamiclibrary" types, but how do I link to > such a multiplexed library? I am not sure it’s the simplest way to go. > > I would like to suggest similar solution which would not require (at > least, for now) radically changing the way how multiplexing works. > Could you please try this approach: > 1. Introduce "property string packageType" with 2 (3 values?) - «apk», > «aab», (undefined?) in the sdk module and make rules dependent on that. > Undefined could be used for console applications (see below). > 2. Change the type of the Android product from «android.apk» to > «android.package» (or even simply use «application» if possible) > 3. Set the new property in the Application.qbs by default, e.g. to > preserve the old behavior, you can do like this: > NativeBinary { > type: isForAndroid && !consoleApplication ? «Android.package» : > «application» // could it be simply «application»? > sdk.packageType: !consoleApplication ? «apk» : undefined > } > > Now, you want to build both apk and aab in one go. You can use > multiplexing over profiles: > > Application { > Profile { > name: «a» > sdk.packageType: «apk» > baseProfile: project.profile > } > Profile { > name: «b» > sdk.packageType: «aab» > baseProfile: project.profile > } > qbs.profiles: [«a», «b»] > } > > Will that work? If no, would it be possible to make it working? > Note that this is pseudo code, feel free to change the details. > > Ivan. > > 17 апр. 2020 г., в 13:03, Raphael Cotty <raphael.co...@gmail.com> > написал(а): > > The android tool aapt2 manages resources. Some output files required for > the aab package need to be in the protobuf format. Also the R.java > generated by aap2 is different from apk to aab. > That's what I meant by context. > The aab package doesn't need the apk package to be built. > > Because both packages need exactly the same input and because some of the > rules are the same (java ones, dex one) I think it makes sense to build > both packages by the same product. > > >
_______________________________________________ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs