From chgans at gmail.com Mon Oct 2 04:39:01 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Mon, 2 Oct 2017 15:39:01 +1300 Subject: [Qbs] Qt.core.qtBuildVariant is not supported by this Qt installation In-Reply-To: <20170929121442.6a8f4053@ckandeler-archlinux> References: <20170929104820.4db8b7d4@ckandeler-archlinux> <20170929121442.6a8f4053@ckandeler-archlinux> Message-ID: On 29 September 2017 at 23:14, Christian Kandeler wrote: > On Fri, 29 Sep 2017 22:53:08 +1300 > Christian Gagneraud wrote: > >> On 29 September 2017 at 21:48, Christian Kandeler >> wrote: >> > On Fri, 29 Sep 2017 10:45:08 +1300 >> > Christian Gagneraud wrote: >> > >> >> Hi there, >> >> >> >> Using QtC 4.4 with built-in Qbs, and custom Qt/toolchain builds >> >> (Qt-5.6), I can use qbs to open my projects in QtC. >> >> >> >> But today I had to investigate a bug in our code which required me to >> >> use a different custom build (still is 5.6, but older) >> >> >> >> With this Qt build Qbs complains with: >> >> /home/developer/.config/QtProject/qtcreator/qbs/1.9.0/profiles/qtc_NOS_imx6_d5c4604e/modules/Qt/core/core.qbs:181: >> >> warning: The following properties have invalid values: >> >> Qt.core.availableBuildVariants: the Qt installation supports no build variants >> >> Qt.core.qtBuildVariant: '' is not supported by this Qt installation >> > >> > Please show us the QT_CONFIG line(s) from that Qt's mkspecs/qconfig.pri file. Hi Christian, CONFIG += cross_compile shared qpa no_mocdepend release qt_no_framework QT_CONFIG += minimal-config small-config medium-config large-config full-config release_tools fontconfig evdev tslib directfb linuxfb c++11 accessibility egl eglfs eglfs_viv opengl opengles2 shared qpa reduce_exports clock-gettime clock-monotonic posix_fallocate mremap getaddrinfo ipv6ifname getifaddrs inotify eventfd threadsafe-cloexec system-jpeg system-png png system-freetype harfbuzz system-zlib nis iconv glib dbus dbus-linked openssl rpath gstreamer-0.10 icu concurrent audio-backend release It used to work, when adding kit manually. I think that this is where the regression comes from: Now i'm using an online repo that creates the kits automatically. Nonetheless, i am able to use these new auto-installed QtC kits: - create a new GUI project (qmake) - choose a cross-dev kit - setup the remote device - click run - play with the app on the target. All of the above in debug, release or profile mode. I'm using a specific mkspec in my kit (eg, /path/to/Qt/mkspecs/devices/arm-linux-g++), this mkspec sets "CROSS_COMPILE=arm-linux-gnueabi-", but the arm-linux-gnueabi-gcc is not on the PATH. So QtC prints some warning at start-up (and only at startup): Project ERROR: Compiler arm-linux-gnueabi-g++ not found. Check the value of CROSS_COMPILE -device-option Could not read qmake configuration file /.../mkspecs/devices/linux-arm-gnueabi-g++/qmake.conf. But then, i can still build/run OK (since i guess QtC uses the full compiler path via the toolchains settings). The old method was to setup the path *before* running QtC from the command line... So after a couple of trial and error, i can confirm that this is what upsets qbs. Removing CROSS_COMPILE from qmake.conf, makes qmake not happy at all. So for the moment, i set CROSS_COMPILE to a relative path to the toolchain, QtC doesn't complain, and Qbs works as before! I think this CROSS_COMPILE is needed when running qmake from the command line, but it should not be needed when using QtC kits. I want to be able to quickly switch b/w kits, and i want the kits to "obey" my choice of toolchains, i don't want them to rely on some hard-coded absolute or relative path, or the PATH since i have to deal with several version of "arm-linux-g++" This whole problem seems to be out of Qbs, nonetheless I think Qbs should output a better diagnostic message in that case. Thanks, Chris From chgans at gmail.com Tue Oct 3 12:49:51 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Tue, 3 Oct 2017 23:49:51 +1300 Subject: [Qbs] Qt.core.qtBuildVariant is not supported by this Qt installation In-Reply-To: References: <20170929104820.4db8b7d4@ckandeler-archlinux> <20170929121442.6a8f4053@ckandeler-archlinux> Message-ID: [cc qt-creator, from qbs mailing list] On 2 October 2017 at 15:39, Christian Gagneraud wrote: > I'm using a specific mkspec in my kit (eg, > /path/to/Qt/mkspecs/devices/arm-linux-g++), this mkspec sets > "CROSS_COMPILE=arm-linux-gnueabi-", but the arm-linux-gnueabi-gcc is > not on the PATH. > So QtC prints some warning at start-up (and only at startup): Actually, only when the project is loaded for the first time, what i refer to below as 'configure-time' > Project ERROR: Compiler arm-linux-gnueabi-g++ not found. Check the > value of CROSS_COMPILE -device-option > Could not read qmake configuration file > /.../mkspecs/devices/linux-arm-gnueabi-g++/qmake.conf. > > But then, i can still build/run OK (since i guess QtC uses the full > compiler path via the toolchains settings). > > The old method was to setup the path *before* running QtC from the > command line... which means that ${CROSS_COMPILE}g++ resolves to a g++ binary in an uncontrolled environment (Qtc+qmake integration). I think Boot2Qt/Yocto got it sorted, but haven't figured it out, i haven't build BootToQt for a while. The last time was with TI/beagle for fun and on an evalation license, second time on an open source license, and now i'm dealing with very-custom ARM toolchains/roots, so no Yocto involved. I think that yocto is still using the old method (setup-env sourcing), Boot2Qt hasn't merged it's solution yet. My situation is very similar, no surprise: I have to patch qt.conf, qmake.conf, ... > > So after a couple of trial and error, i can confirm that this is what > upsets qbs. > > Removing CROSS_COMPILE from qmake.conf, makes qmake not happy at all. > So for the moment, i set CROSS_COMPILE to a relative path to the > toolchain, QtC doesn't complain, and Qbs works as before! At 'configure time' only, build time is another story... > > I think this CROSS_COMPILE is needed when running qmake from the > command line, but it should not be needed when using QtC kits. > I want to be able to quickly switch b/w kits, and i want the kits to > "obey" my choice of toolchains, i don't want them to rely on some > hard-coded absolute or relative path, or the PATH since i have to deal > with several version of "arm-linux-g++" Actually, several variants of "CROSS_COMPILE=arm-linux-g++" But relative path don't work here with qmake at QtC build time. It makes QtC/qmake happy at 'configure-kit' time only. So with a relative path in CROSS_COMPILE, i cannot build because the relative path at QtC build time somehow doesn't point to the right place while it did at 'configure-kit' time. Current directory issue? It's like the compiler is called using a shell command which starts with qmake's $CROSS_COMPILE, which value has been evaluated at QtC configure time, bypassing QtC's kits. qmake's $CROSS_COMPILE is unreliable because it depends on qmake understandings of the "world". I don't care and i don't want that. Can't i control $CROSS_COMPILE with QtC kits only? Or do i need to keep QtC *and* qmake happy, and then my build system? Does QtC depends on qmake when it comes to Qt, from a developer/user POV? Basically is qmake's CROSS_COMPILE injected into QtC at some point or not? Qtc relies on qmake's idea of CROSS_COMPILE at configure time, but Qtc ignores it at build time, what can go wrong? Why do i even need to have an explicit CROSS_COMPILE in "devices/stuff/me-g++" qmake's mkspec? (unrelated to QtC) And why should I even have to deal with CROSS_COMPILE in QtC, we're using "toolchain/bsp + Qt + Device = kit", independently of build systems, don't we? So many stupid questions, sorry... It reminds me 15 years ago: make ARCH=$arch CROSS_COMPILE=/path/to/$host-$target/bin/ Chris > > This whole problem seems to be out of Qbs, nonetheless I think Qbs > should output a better diagnostic message in that case. > > > Thanks, > > Chris From christian.kandeler at qt.io Thu Oct 5 16:45:20 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Thu, 5 Oct 2017 16:45:20 +0200 Subject: [Qbs] qbs 1.9.1 Message-ID: <20171005164520.491a6bc6@ckandeler-archlinux> Hello, I'd like to announce the release of Qbs 1.9.1, fixing a couple of issues uncovered in version 1.9.0. Source and binary packages as well as a change log can be found at https://download.qt.io/official_releases/qbs/1.9.1/. This release of Qbs will also be shipped as part of Qt Creator 4.4.1. Christian From christian.kandeler at qt.io Thu Oct 5 17:02:39 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Thu, 5 Oct 2017 17:02:39 +0200 Subject: [Qbs] Qt.core.qtBuildVariant is not supported by this Qt installation In-Reply-To: References: <20170929104820.4db8b7d4@ckandeler-archlinux> <20170929121442.6a8f4053@ckandeler-archlinux> Message-ID: <20171005170239.4340a9dd@ckandeler-archlinux> On Mon, 2 Oct 2017 15:39:01 +1300 Christian Gagneraud wrote: > On 29 September 2017 at 23:14, Christian Kandeler > wrote: > > On Fri, 29 Sep 2017 22:53:08 +1300 > > Christian Gagneraud wrote: > > > >> On 29 September 2017 at 21:48, Christian Kandeler > >> wrote: > >> > On Fri, 29 Sep 2017 10:45:08 +1300 > >> > Christian Gagneraud wrote: > >> > > >> >> Hi there, > >> >> > >> >> Using QtC 4.4 with built-in Qbs, and custom Qt/toolchain builds > >> >> (Qt-5.6), I can use qbs to open my projects in QtC. > >> >> > >> >> But today I had to investigate a bug in our code which required me to > >> >> use a different custom build (still is 5.6, but older) > >> >> > >> >> With this Qt build Qbs complains with: > >> >> /home/developer/.config/QtProject/qtcreator/qbs/1.9.0/profiles/qtc_NOS_imx6_d5c4604e/modules/Qt/core/core.qbs:181: > >> >> warning: The following properties have invalid values: > >> >> Qt.core.availableBuildVariants: the Qt installation supports no build variants > >> >> Qt.core.qtBuildVariant: '' is not supported by this Qt installation > >> > > >> > Please show us the QT_CONFIG line(s) from that Qt's mkspecs/qconfig.pri file. > > Hi Christian, > > CONFIG += cross_compile shared qpa no_mocdepend release qt_no_framework > > QT_CONFIG += minimal-config small-config medium-config large-config > full-config release_tools fontconfig evdev tslib directfb linuxfb > c++11 accessibility egl eglfs eglfs_viv opengl opengles2 shared qpa > reduce_exports clock-gettime clock-monotonic posix_fallocate mremap > getaddrinfo ipv6ifname getifaddrs inotify eventfd threadsafe-cloexec > system-jpeg system-png png system-freetype harfbuzz system-zlib nis > iconv glib dbus dbus-linked openssl rpath gstreamer-0.10 icu > concurrent audio-backend release > > It used to work, when adding kit manually. I think that this is where > the regression comes from: Now i'm using an online repo that creates > the kits automatically. > > Nonetheless, i am able to use these new auto-installed QtC kits: > - create a new GUI project (qmake) > - choose a cross-dev kit > - setup the remote device > - click run > - play with the app on the target. > > All of the above in debug, release or profile mode. > > I'm using a specific mkspec in my kit (eg, > /path/to/Qt/mkspecs/devices/arm-linux-g++), this mkspec sets > "CROSS_COMPILE=arm-linux-gnueabi-", but the arm-linux-gnueabi-gcc is > not on the PATH. > So QtC prints some warning at start-up (and only at startup): > Project ERROR: Compiler arm-linux-gnueabi-g++ not found. Check the > value of CROSS_COMPILE -device-option > Could not read qmake configuration file > /.../mkspecs/devices/linux-arm-gnueabi-g++/qmake.conf. > > But then, i can still build/run OK (since i guess QtC uses the full > compiler path via the toolchains settings). > > The old method was to setup the path *before* running QtC from the > command line... > > So after a couple of trial and error, i can confirm that this is what > upsets qbs. > > Removing CROSS_COMPILE from qmake.conf, makes qmake not happy at all. > So for the moment, i set CROSS_COMPILE to a relative path to the > toolchain, QtC doesn't complain, and Qbs works as before! > > I think this CROSS_COMPILE is needed when running qmake from the > command line, but it should not be needed when using QtC kits. > I want to be able to quickly switch b/w kits, and i want the kits to > "obey" my choice of toolchains, i don't want them to rely on some > hard-coded absolute or relative path, or the PATH since i have to deal > with several version of "arm-linux-g++" > > This whole problem seems to be out of Qbs, nonetheless I think Qbs > should output a better diagnostic message in that case. Hi Christian, I've read this message now a couple of times, but I must admit I haven't grasped how any of that relates to the original problem. All I can say is that as far as I can tell from the code we use in qbs to set up Qt modules and from your original error message, it looks to me that qbs receives the information (from Qt Creator) that QT_CONFIG contains neither "debug" nor "release", and thus the list of supported build variants is empty. If that is the case (perhaps because Creator has concluded that the Qt version is not functional), then there is not much qbs can do about it. Christian From chgans at gmail.com Fri Oct 6 13:59:33 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Sat, 7 Oct 2017 00:59:33 +1300 Subject: [Qbs] Qt.core.qtBuildVariant is not supported by this Qt installation Message-ID: On 6 October 2017 at 04:02, Christian Kandeler wrote: >> I think this CROSS_COMPILE is needed when running qmake from the >> command line, but it should not be needed when using QtC kits. >> I want to be able to quickly switch b/w kits, and i want the kits to >> "obey" my choice of toolchains, i don't want them to rely on some >> hard-coded absolute or relative path, or the PATH since i have to deal >> with several version of "arm-linux-g++" >> >> This whole problem seems to be out of Qbs, nonetheless I think Qbs >> should output a better diagnostic message in that case. > > Hi Christian, > > I've read this message now a couple of times, but I must admit I haven't grasped > how any of that relates to the original problem. All I can say is that as far as I > can tell from the code we use in qbs to set up Qt modules and from your original > error message, it looks to me that qbs receives the information (from Qt Creator) > that QT_CONFIG contains neither "debug" nor "release", and thus the list of > supported build variants is empty. If that is the case (perhaps because Creator > has concluded that the Qt version is not functional), then there is not much qbs > can do about it. Sorry for not being clear. Basically what i said was: - With QtC, If your device mkspec is broken (a qmake/Qt thing), Qbs will give you weird error messages. - In my respect It shouldn't, because I'm aiming to control qbs profiles from QtC, including cross-compile specifics of all sorts, without Qt/qmake's assistance. - This doesn't seem to be Qbs's fault (more like Qtc+Qt+qmake integration fault) - The "Qt Online Installer" gives you the possibility to make some developer's QtC "Build and run" settings appears read only (auto-detected). Which is good as a sdk packager's safety lock. I think Qbs profiles cannot be made read-only in QtC. - I suggested that Qbs could maybe bail out earlier with a more explicit error message. The error message about "Qt.core.qtBuildVariant" was far away from the "CROSS_COMPILE" problem in qt5/mkspecs/devices/mine/qmake.conf. I'm not blaming Qbs, but suggesting that an early warning system could have say something like: warning : Qbs.profiles..qt.sanity: something is weird. Is it possible? Is it worth opening an issue? Thanks, Chris From christian.kandeler at qt.io Fri Oct 6 15:12:02 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Fri, 6 Oct 2017 15:12:02 +0200 Subject: [Qbs] Qt.core.qtBuildVariant is not supported by this Qt installation In-Reply-To: References: Message-ID: <20171006151202.518ce850@ckandeler-archlinux> On Sat, 7 Oct 2017 00:59:33 +1300 Christian Gagneraud wrote: > Sorry for not being clear. Basically what i said was: > - With QtC, If your device mkspec is broken (a qmake/Qt thing), Qbs > will give you weird error messages. > - In my respect It shouldn't, because I'm aiming to control qbs > profiles from QtC, including cross-compile specifics of all sorts, > without Qt/qmake's assistance. > - This doesn't seem to be Qbs's fault (more like Qtc+Qt+qmake integration fault) Well, qmake is at the moment the "official entry point" into a Qt installation, so in the end, all information is derived from it. In particular, the active mkspec is relevant also for what qbs gets to know about this particular Qt configuration. > The error message about "Qt.core.qtBuildVariant" was far away from the > "CROSS_COMPILE" problem in qt5/mkspecs/devices/mine/qmake.conf. > I'm not blaming Qbs, but suggesting that an early warning system could > have say something like: > warning : Qbs.profiles..qt.sanity: something is weird. That's *kind of* what happened: The Qt.core module in qbs has a validate script. This script does some sanity checks, one of them being that the list of build variants is not empty. This one failed, resulting in the output you saw. The preceding checks succeeded, meaning we detected no problem with e.g. the path to the libraries or the version number. So what kind of check would you suggest that would also have caught the problem, but with a better error message? Christian From denis.shienkov at gmail.com Sat Oct 7 18:51:06 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Sat, 7 Oct 2017 19:51:06 +0300 Subject: [Qbs] How to get a product's source directory from the artifact from inputsFromDependencies Message-ID: <2875732f-c16e-ee56-ef57-d1502e1308e1@gmail.com> Hi all. I need to create e.g the 'zip' archive of output binaries of my project, where my project contains some of application's products. I have looked on qbs\src\packages\archive\archive.qbs example, where are used the windeployqt utility. It is fine, but I need to use the --qmldir argument for the windeployqt utility (as my products are qml applications). As I can see, we can get only the install-root paths from the inputsFromDependencies: ["installable"] property.. but seems, it is not enough for me, because I need to get by some way the full paths of source directories of products of input artifacts. Is it possible to get a path to source directories of products from the inputsFromDependencies property? As I understands, this dependencies contains an artifacts of products... So, how to get the product's source directory from own artifact? Is it possible? BR, Denis From denis.shienkov at gmail.com Mon Oct 9 17:32:06 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Mon, 9 Oct 2017 18:32:06 +0300 Subject: [Qbs] qbs ignores the 'manual' cpp.linkerMode behavior Message-ID: Hi all, I use the AVR-GCC compiler, and I need to use following command line: "-nostartfiles -nodefaultlibs -nostdlib -Wl,-Map="$(OutputFileName).map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mrelax -Wl,-section-start=.text=0x1f400 -Wl,-section-start=.ExtReset=0x1e000 -Wl,-section-start=.noinit=0x801032 -mmcu=at90can128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\gcc\dev\at90can128" " but, the qbs is too 'intelligent' and generates a wrong command line for this options: cpp.linkerMode: "manual" cpp.linkerName: cpp.compilerName cpp.linkerFlags: [ "-nostartfiles", "-nodefaultlibs", "-nostdlib", "-Wl,-Map=" + product.targetName + ".map", "-Wl,--start-group", "-Wl,--end-group", "-Wl,--gc-sections", "-Wl,-section-start=.text=0x1f400", "-Wl,-section-start=.ExtReset=0x1e000", "-Wl,-section-start=.noinit=0x801032", "-Wc,-mmcu=" + avrdevice, "-B", "C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/" + avrdevice, "-mrelax", ] resulting line looks like: " "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe" -Xlinker -nostartfiles -Xlinker -nodefaultlibs -Xlinker -nostdlib -Xlinker "-Wl,-Map=monitorapp.map" -Xlinker "-Wl,--start-group" -Xlinker "-Wl,--end-group" -Xlinker "-Wl,--gc-sections" -Xlinker "-Wl,-section-start=.text=0x1f400" -Xlinker "-Wl,-section-start=.ExtReset=0x1e000" -Xlinker "-Wl,-section-start=.noinit=0x801032" -Xlinker "-Wc,-mmcu=at90can128" -Xlinker -B -Xlinker "C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/at90can128" -Xlinker -mrelax " it insert еру -XLinker flags everywher*e...* How to disable an 'intelligent' feature ? BR, Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From timur.kristof at gmail.com Mon Oct 9 22:40:48 2017 From: timur.kristof at gmail.com (timur.kristof at gmail.com) Date: Mon, 09 Oct 2017 22:40:48 +0200 Subject: [Qbs] qbs ignores the 'manual' cpp.linkerMode behavior In-Reply-To: References: Message-ID: <1507581648.3075.16.camel@gmail.com> Hi Denis, This issue has been asked several times. The short answer is this: put the real linker flags without -Wl into linkerFlags and put the other ones into driverFlags. linkerName and linkerMode are uneeded (as far as I know). Here is an example of how I did it: https://github.com/Venemo/efm32-qbs-example/blob/master/qbs-custom/impo rts/ArmMcuProduct.qbs Hope this helps, Timur On Mon, 2017-10-09 at 18:32 +0300, Denis Shienkov wrote: > Hi all, > > I use the AVR-GCC compiler, and I need to use following command line: > > "-nostartfiles -nodefaultlibs -nostdlib -Wl,- > Map="$(OutputFileName).map" -Wl,--start-group -Wl,-lm -Wl,--end- > group -Wl,--gc-sections -mrelax -Wl,-section-start=.text=0x1f400 > -Wl,-section-start=.ExtReset=0x1e000 -Wl,-section- > start=.noinit=0x801032 -mmcu=at90can128 -B "C:\Program Files > (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\gcc\dev\at90can > 128" " > > but, the qbs is too 'intelligent' and generates a wrong command line > for this options: > > cpp.linkerMode: "manual" > cpp.linkerName: cpp.compilerName > > cpp.linkerFlags: [ > "-nostartfiles", > "-nodefaultlibs", > "-nostdlib", > "-Wl,-Map=" + product.targetName + ".map", > "-Wl,--start-group", > "-Wl,--end-group", > "-Wl,--gc-sections", > "-Wl,-section-start=.text=0x1f400", > "-Wl,-section-start=.ExtReset=0x1e000", > "-Wl,-section-start=.noinit=0x801032", > "-Wc,-mmcu=" + avrdevice, > "-B", > "C:/Program Files > (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/" + > avrdevice, > "-mrelax", > ] > > resulting line looks like: > > " > "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu- > toolchain\bin\avr-gcc.exe" -Xlinker -nostartfiles -Xlinker > -nodefaultlibs -Xlinker -nostdlib -Xlinker "-Wl,-Map=monitorapp.map" > -Xlinker "-Wl,--start-group" -Xlinker "-Wl,--end-group" -Xlinker "- > Wl,--gc-sections" -Xlinker "-Wl,-section-start=.text=0x1f400" > -Xlinker "-Wl,-section-start=.ExtReset=0x1e000" -Xlinker "-Wl,- > section-start=.noinit=0x801032" -Xlinker "-Wc,-mmcu=at90can128" > -Xlinker -B -Xlinker "C:/Program Files > (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/at90can > 128" -Xlinker -mrelax > " > it insert еру -XLinker flags everywhere... > > How to disable an 'intelligent' feature ? > > BR, > Denis > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs From Jake.Petroules at qt.io Mon Oct 9 23:08:13 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Mon, 9 Oct 2017 21:08:13 +0000 Subject: [Qbs] qbs ignores the 'manual' cpp.linkerMode behavior In-Reply-To: <1507581648.3075.16.camel@gmail.com> References: <1507581648.3075.16.camel@gmail.com> Message-ID: Indeed it has, and your advice is correct. This is probably a good candidate for our FAQ. I've created a task for it: https://bugreports.qt.io/browse/QBS-1213 > On Oct 9, 2017, at 10:40 PM, timur.kristof at gmail.com wrote: > > Hi Denis, > > This issue has been asked several times. > The short answer is this: put the real linker flags without -Wl into > linkerFlags and put the other ones into driverFlags. > > linkerName and linkerMode are uneeded (as far as I know). > > Here is an example of how I did it: > https://github.com/Venemo/efm32-qbs-example/blob/master/qbs-custom/impo > rts/ArmMcuProduct.qbs > > > > Hope this helps, > Timur > > On Mon, 2017-10-09 at 18:32 +0300, Denis Shienkov wrote: >> Hi all, >> >> I use the AVR-GCC compiler, and I need to use following command line: >> >> "-nostartfiles -nodefaultlibs -nostdlib -Wl,- >> Map="$(OutputFileName).map" -Wl,--start-group -Wl,-lm -Wl,--end- >> group -Wl,--gc-sections -mrelax -Wl,-section-start=.text=0x1f400 >> -Wl,-section-start=.ExtReset=0x1e000 -Wl,-section- >> start=.noinit=0x801032 -mmcu=at90can128 -B "C:\Program Files >> (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\gcc\dev\at90can >> 128" " >> >> but, the qbs is too 'intelligent' and generates a wrong command line >> for this options: >> >> cpp.linkerMode: "manual" >> cpp.linkerName: cpp.compilerName >> >> cpp.linkerFlags: [ >> "-nostartfiles", >> "-nodefaultlibs", >> "-nostdlib", >> "-Wl,-Map=" + product.targetName + ".map", >> "-Wl,--start-group", >> "-Wl,--end-group", >> "-Wl,--gc-sections", >> "-Wl,-section-start=.text=0x1f400", >> "-Wl,-section-start=.ExtReset=0x1e000", >> "-Wl,-section-start=.noinit=0x801032", >> "-Wc,-mmcu=" + avrdevice, >> "-B", >> "C:/Program Files >> (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/" + >> avrdevice, >> "-mrelax", >> ] >> >> resulting line looks like: >> >> " >> "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu- >> toolchain\bin\avr-gcc.exe" -Xlinker -nostartfiles -Xlinker >> -nodefaultlibs -Xlinker -nostdlib -Xlinker "-Wl,-Map=monitorapp.map" >> -Xlinker "-Wl,--start-group" -Xlinker "-Wl,--end-group" -Xlinker "- >> Wl,--gc-sections" -Xlinker "-Wl,-section-start=.text=0x1f400" >> -Xlinker "-Wl,-section-start=.ExtReset=0x1e000" -Xlinker "-Wl,- >> section-start=.noinit=0x801032" -Xlinker "-Wc,-mmcu=at90can128" >> -Xlinker -B -Xlinker "C:/Program Files >> (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/at90can >> 128" -Xlinker -mrelax >> " >> it insert еру -XLinker flags everywhere... >> >> How to disable an 'intelligent' feature ? >> >> BR, >> Denis >> _______________________________________________ >> Qbs mailing list >> Qbs at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From denis.shienkov at gmail.com Tue Oct 10 09:20:01 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Tue, 10 Oct 2017 10:20:01 +0300 Subject: [Qbs] qbs ignores the 'manual' cpp.linkerMode behavior In-Reply-To: References: <1507581648.3075.16.camel@gmail.com> Message-ID: <196aee46-8649-1c35-0800-f6d71ec9ff41@gmail.com> Hmm, how, then, about the smart *assembler* options? For example, I have an assembler files *.s which contains both asm-code and c-code. It compiles before in Atmel Studio, using the "avr-gcc -x assembler-with-cpp" option. But, in QBS it fails, because QBS launch the 'avr-as' instead of 'avr-gcc', and, seems the 'avr-as' have not similar option, so, future linking fails. So, I use workaround: cpp.assemblerName: cpp.compilerName and pass to cpp.assemblerFlags propery the required compiler options. I'm not sure if it is correct decision. BR, Denis 10.10.2017 0:08, Jake Petroules пишет: > Indeed it has, and your advice is correct. This is probably a good candidate for our FAQ. I've created a task for it: https://bugreports.qt.io/browse/QBS-1213 > >> On Oct 9, 2017, at 10:40 PM, timur.kristof at gmail.com wrote: >> >> Hi Denis, >> >> This issue has been asked several times. >> The short answer is this: put the real linker flags without -Wl into >> linkerFlags and put the other ones into driverFlags. >> >> linkerName and linkerMode are uneeded (as far as I know). >> >> Here is an example of how I did it: >> https://github.com/Venemo/efm32-qbs-example/blob/master/qbs-custom/impo >> rts/ArmMcuProduct.qbs >> >> >> >> Hope this helps, >> Timur >> >> On Mon, 2017-10-09 at 18:32 +0300, Denis Shienkov wrote: >>> Hi all, >>> >>> I use the AVR-GCC compiler, and I need to use following command line: >>> >>> "-nostartfiles -nodefaultlibs -nostdlib -Wl,- >>> Map="$(OutputFileName).map" -Wl,--start-group -Wl,-lm -Wl,--end- >>> group -Wl,--gc-sections -mrelax -Wl,-section-start=.text=0x1f400 >>> -Wl,-section-start=.ExtReset=0x1e000 -Wl,-section- >>> start=.noinit=0x801032 -mmcu=at90can128 -B "C:\Program Files >>> (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\gcc\dev\at90can >>> 128" " >>> >>> but, the qbs is too 'intelligent' and generates a wrong command line >>> for this options: >>> >>> cpp.linkerMode: "manual" >>> cpp.linkerName: cpp.compilerName >>> >>> cpp.linkerFlags: [ >>> "-nostartfiles", >>> "-nodefaultlibs", >>> "-nostdlib", >>> "-Wl,-Map=" + product.targetName + ".map", >>> "-Wl,--start-group", >>> "-Wl,--end-group", >>> "-Wl,--gc-sections", >>> "-Wl,-section-start=.text=0x1f400", >>> "-Wl,-section-start=.ExtReset=0x1e000", >>> "-Wl,-section-start=.noinit=0x801032", >>> "-Wc,-mmcu=" + avrdevice, >>> "-B", >>> "C:/Program Files >>> (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/" + >>> avrdevice, >>> "-mrelax", >>> ] >>> >>> resulting line looks like: >>> >>> " >>> "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu- >>> toolchain\bin\avr-gcc.exe" -Xlinker -nostartfiles -Xlinker >>> -nodefaultlibs -Xlinker -nostdlib -Xlinker "-Wl,-Map=monitorapp.map" >>> -Xlinker "-Wl,--start-group" -Xlinker "-Wl,--end-group" -Xlinker "- >>> Wl,--gc-sections" -Xlinker "-Wl,-section-start=.text=0x1f400" >>> -Xlinker "-Wl,-section-start=.ExtReset=0x1e000" -Xlinker "-Wl,- >>> section-start=.noinit=0x801032" -Xlinker "-Wc,-mmcu=at90can128" >>> -Xlinker -B -Xlinker "C:/Program Files >>> (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/at90can >>> 128" -Xlinker -mrelax >>> " >>> it insert еру -XLinker flags everywhere... >>> >>> How to disable an 'intelligent' feature ? >>> >>> BR, >>> Denis >>> _______________________________________________ >>> Qbs mailing list >>> Qbs at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/qbs >> _______________________________________________ >> Qbs mailing list >> Qbs at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs From Jake.Petroules at qt.io Tue Oct 10 09:21:39 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Tue, 10 Oct 2017 07:21:39 +0000 Subject: [Qbs] qbs ignores the 'manual' cpp.linkerMode behavior In-Reply-To: <196aee46-8649-1c35-0800-f6d71ec9ff41@gmail.com> References: <1507581648.3075.16.camel@gmail.com> <196aee46-8649-1c35-0800-f6d71ec9ff41@gmail.com> Message-ID: <4A587FBF-4007-4629-B2C4-C7C4BA3E26FB@qt.io> Yes, I think your solution seems reasonable. It's possible we might want a similar cpp.assemblerMode option as well, but I'm not sure. > On Oct 10, 2017, at 9:20 AM, Denis Shienkov wrote: > > Hmm, how, then, about the smart *assembler* options? > > For example, I have an assembler files *.s which contains both asm-code and c-code. It compiles before in Atmel Studio, using the "avr-gcc -x assembler-with-cpp" option. But, in QBS it fails, because QBS launch the 'avr-as' instead of 'avr-gcc', and, seems the 'avr-as' have not similar option, so, future linking fails. > > So, I use workaround: > > cpp.assemblerName: cpp.compilerName > > and pass to cpp.assemblerFlags propery the required compiler options. > > I'm not sure if it is correct decision. > > BR, > Denis > > 10.10.2017 0:08, Jake Petroules пишет: >> Indeed it has, and your advice is correct. This is probably a good candidate for our FAQ. I've created a task for it: https://bugreports.qt.io/browse/QBS-1213 >> >>> On Oct 9, 2017, at 10:40 PM, timur.kristof at gmail.com wrote: >>> >>> Hi Denis, >>> >>> This issue has been asked several times. >>> The short answer is this: put the real linker flags without -Wl into >>> linkerFlags and put the other ones into driverFlags. >>> >>> linkerName and linkerMode are uneeded (as far as I know). >>> >>> Here is an example of how I did it: >>> https://github.com/Venemo/efm32-qbs-example/blob/master/qbs-custom/impo >>> rts/ArmMcuProduct.qbs >>> >>> >>> >>> Hope this helps, >>> Timur >>> >>> On Mon, 2017-10-09 at 18:32 +0300, Denis Shienkov wrote: >>>> Hi all, >>>> >>>> I use the AVR-GCC compiler, and I need to use following command line: >>>> >>>> "-nostartfiles -nodefaultlibs -nostdlib -Wl,- >>>> Map="$(OutputFileName).map" -Wl,--start-group -Wl,-lm -Wl,--end- >>>> group -Wl,--gc-sections -mrelax -Wl,-section-start=.text=0x1f400 >>>> -Wl,-section-start=.ExtReset=0x1e000 -Wl,-section- >>>> start=.noinit=0x801032 -mmcu=at90can128 -B "C:\Program Files >>>> (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\gcc\dev\at90can >>>> 128" " >>>> >>>> but, the qbs is too 'intelligent' and generates a wrong command line >>>> for this options: >>>> >>>> cpp.linkerMode: "manual" >>>> cpp.linkerName: cpp.compilerName >>>> >>>> cpp.linkerFlags: [ >>>> "-nostartfiles", >>>> "-nodefaultlibs", >>>> "-nostdlib", >>>> "-Wl,-Map=" + product.targetName + ".map", >>>> "-Wl,--start-group", >>>> "-Wl,--end-group", >>>> "-Wl,--gc-sections", >>>> "-Wl,-section-start=.text=0x1f400", >>>> "-Wl,-section-start=.ExtReset=0x1e000", >>>> "-Wl,-section-start=.noinit=0x801032", >>>> "-Wc,-mmcu=" + avrdevice, >>>> "-B", >>>> "C:/Program Files >>>> (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/" + >>>> avrdevice, >>>> "-mrelax", >>>> ] >>>> >>>> resulting line looks like: >>>> >>>> " >>>> "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu- >>>> toolchain\bin\avr-gcc.exe" -Xlinker -nostartfiles -Xlinker >>>> -nodefaultlibs -Xlinker -nostdlib -Xlinker "-Wl,-Map=monitorapp.map" >>>> -Xlinker "-Wl,--start-group" -Xlinker "-Wl,--end-group" -Xlinker "- >>>> Wl,--gc-sections" -Xlinker "-Wl,-section-start=.text=0x1f400" >>>> -Xlinker "-Wl,-section-start=.ExtReset=0x1e000" -Xlinker "-Wl,- >>>> section-start=.noinit=0x801032" -Xlinker "-Wc,-mmcu=at90can128" >>>> -Xlinker -B -Xlinker "C:/Program Files >>>> (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/at90can >>>> 128" -Xlinker -mrelax >>>> " >>>> it insert еру -XLinker flags everywhere... >>>> >>>> How to disable an 'intelligent' feature ? >>>> >>>> BR, >>>> Denis >>>> _______________________________________________ >>>> Qbs mailing list >>>> Qbs at qt-project.org >>>> http://lists.qt-project.org/mailman/listinfo/qbs >>> _______________________________________________ >>> Qbs mailing list >>> Qbs at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/qbs > -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From denis.shienkov at gmail.com Tue Oct 10 09:30:24 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Tue, 10 Oct 2017 10:30:24 +0300 Subject: [Qbs] qbs ignores the 'manual' cpp.linkerMode behavior In-Reply-To: <4A587FBF-4007-4629-B2C4-C7C4BA3E26FB@qt.io> References: <1507581648.3075.16.camel@gmail.com> <196aee46-8649-1c35-0800-f6d71ec9ff41@gmail.com> <4A587FBF-4007-4629-B2C4-C7C4BA3E26FB@qt.io> Message-ID: Ok, many thanks, guys. :) 10.10.2017 10:21, Jake Petroules пишет: > Yes, I think your solution seems reasonable. It's possible we might want a similar cpp.assemblerMode option as well, but I'm not sure. From daniel.engelke at basyskom.com Tue Oct 10 10:32:23 2017 From: daniel.engelke at basyskom.com (Daniel Engelke) Date: Tue, 10 Oct 2017 10:32:23 +0200 Subject: [Qbs] Unable to build for android - Qt.core could not be loaded Message-ID: Hi, I'm trying to build a qbs project (works fine on desktop) for android. However I essentially get the same result as this describes https://bugreports.qt.io/browse/QTCREATORBUG-18977.2 Does anyone have any idea what the problem could be or a possible workaround? Tried NDK 10e as well, same result. Building with qmake with the same kit is no problem. Currently the documentation is a bit sparse on the android / iOS topic. Are there more extended documents about it? Br Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christian.Kandeler at qt.io Tue Oct 10 14:18:18 2017 From: Christian.Kandeler at qt.io (Christian Kandeler) Date: Tue, 10 Oct 2017 12:18:18 +0000 Subject: [Qbs] Unable to build for android - Qt.core could not be loaded In-Reply-To: References: Message-ID: Hi Daniel, at the moment, Qt Creator supports only qmake for Android development. You might be able to build stuff by declaring the target to be remote Linux and manually setting some Qbs properties in the Kit widget, but of course that does not get you deployment support and all these nice things you expect from an IDE. Christian ________________________________________ From: Qbs on behalf of Daniel Engelke Sent: Tuesday, October 10, 2017 10:32 AM To: qbs at qt-project.org Subject: [Qbs] Unable to build for android - Qt.core could not be loaded Hi, I'm trying to build a qbs project (works fine on desktop) for android. However I essentially get the same result as this describes https://bugreports.qt.io/browse/QTCREATORBUG-18977.2 Does anyone have any idea what the problem could be or a possible workaround? Tried NDK 10e as well, same result. Building with qmake with the same kit is no problem. Currently the documentation is a bit sparse on the android / iOS topic. Are there more extended documents about it? Br Daniel From Christian.Kandeler at qt.io Tue Oct 10 14:20:54 2017 From: Christian.Kandeler at qt.io (Christian Kandeler) Date: Tue, 10 Oct 2017 12:20:54 +0000 Subject: [Qbs] How to get a product's source directory from the artifact from inputsFromDependencies In-Reply-To: <2875732f-c16e-ee56-ef57-d1502e1308e1@gmail.com> References: <2875732f-c16e-ee56-ef57-d1502e1308e1@gmail.com> Message-ID: Hi Denis, > I need to create e.g the 'zip' archive of output binaries of my project, > where my project contains some of application's products. > > I have looked on qbs\src\packages\archive\archive.qbs example, where are > used the windeployqt utility. It is fine, but I need to use the --qmldir > argument for the windeployqt utility (as my products are qml > applications). As I can see, we can get only the install-root paths from > the inputsFromDependencies: ["installable"] property.. but seems, it is > not enough for me, because I need to get by some way the full paths of > source directories of products of input artifacts. Why? In particular, why do you care about the product directory, rather than the one of the actual file? Christian From denis.shienkov at gmail.com Tue Oct 10 15:00:18 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Tue, 10 Oct 2017 16:00:18 +0300 Subject: [Qbs] How to get a product's source directory from the artifact from inputsFromDependencies In-Reply-To: References: <2875732f-c16e-ee56-ef57-d1502e1308e1@gmail.com> Message-ID: > Why? In particular, why do you care about the product directory, rather than the one of the actual file? Because the qml directory is in appropriate product's source directory. And I need to specify the --qmldir then. 2017-10-10 15:20 GMT+03:00 Christian Kandeler : > Hi Denis, > > > I need to create e.g the 'zip' archive of output binaries of my project, > > where my project contains some of application's products. > > > > I have looked on qbs\src\packages\archive\archive.qbs example, where are > > used the windeployqt utility. It is fine, but I need to use the --qmldir > > argument for the windeployqt utility (as my products are qml > > applications). As I can see, we can get only the install-root paths from > > the inputsFromDependencies: ["installable"] property.. but seems, it is > > not enough for me, because I need to get by some way the full paths of > > source directories of products of input artifacts. > > Why? In particular, why do you care about the product directory, rather > than the one of the actual file? > > > Christian > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christian.Kandeler at qt.io Tue Oct 10 15:30:33 2017 From: Christian.Kandeler at qt.io (Christian Kandeler) Date: Tue, 10 Oct 2017 13:30:33 +0000 Subject: [Qbs] How to get a product's source directory from the artifact from inputsFromDependencies In-Reply-To: References: <2875732f-c16e-ee56-ef57-d1502e1308e1@gmail.com> , Message-ID: Great, another tool that assumes a fixed project directory structure. I guess you can get it to work by iterating over all the QML files, taking the parent directory and giving the "highest" one to the --qmldir option. Christian ________________________________________ From: Denis Shienkov Sent: Tuesday, October 10, 2017 3:00 PM To: Christian Kandeler Cc: qbs at qt-project.org Subject: Re: [Qbs] How to get a product's source directory from the artifact from inputsFromDependencies > Why? In particular, why do you care about the product directory, rather than the one of the actual file? Because the qml directory is in appropriate product's source directory. And I need to specify the --qmldir then. 2017-10-10 15:20 GMT+03:00 Christian Kandeler >: Hi Denis, > I need to create e.g the 'zip' archive of output binaries of my project, > where my project contains some of application's products. > > I have looked on qbs\src\packages\archive\archive.qbs example, where are > used the windeployqt utility. It is fine, but I need to use the --qmldir > argument for the windeployqt utility (as my products are qml > applications). As I can see, we can get only the install-root paths from > the inputsFromDependencies: ["installable"] property.. but seems, it is > not enough for me, because I need to get by some way the full paths of > source directories of products of input artifacts. Why? In particular, why do you care about the product directory, rather than the one of the actual file? Christian _______________________________________________ Qbs mailing list Qbs at qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs From denis.shienkov at gmail.com Wed Oct 11 10:38:49 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Wed, 11 Oct 2017 11:38:49 +0300 Subject: [Qbs] Rule with merging of inputs tuples (pairs) Message-ID: Hi all, is it possible to do something this? I have following set of files as inputs: 1) a1.bin, a2.bin, a3.bin, ..., aN.bin 2) b1.bin, b2.bin, b3.bin, ..., bN.bin I need to do some processing for this files to have on outputs like: c1.bin = a1.bin + b1.bin c2.bin = a2.bin + b2.bin c3.bin = a3.bin + b3.bin ... cN.bin = aN.bin + bN.bin A numbers of input A and B files are equal, so, a number of output C files should be too equal. The processing it is an usual 'copy' command, like: copy /b aN.bin + bN.bin cN.bin I have created a Rule: Rule { inputs: ["a_binary", "b_binary"] Artifact { fileTags: ["c_binary"] filePath: "c.bin"; } prepare: { // Do something to call the // copy /b aN.bin + bN.bin cN.bin command. } } but is is unclear how to define an output artifact's file pach, because it should be different for each input, e.g. should be c1.bin, c2.bin and so on.? Or, maybe it is better solution, and I'm wrong? BR, Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.bornemann at qt.io Wed Oct 11 11:12:25 2017 From: joerg.bornemann at qt.io (Joerg Bornemann) Date: Wed, 11 Oct 2017 11:12:25 +0200 Subject: [Qbs] Rule with merging of inputs tuples (pairs) In-Reply-To: References: Message-ID: On 10/11/2017 10:38 AM, Denis Shienkov wrote: [...] > I have created a Rule: > > Rule{ > inputs:["a_binary","b_binary"] > Artifact{ > fileTags:["c_binary"] > filePath:"c.bin"; > } [...] > } > > > but is is unclear how to define an output artifact's file pach, because > it should be different > for each input, e.g. should be c1.bin, c2.bin and so on.? IIUC you want the rule to be run once on the whole set of inputs. That's what we call a multiplex rule. Write Rule { multiplex: true ... } And you can operate on all a_binary and b_binary artifacts in your product. BR, Joerg From Christian.Kandeler at qt.io Wed Oct 11 11:18:27 2017 From: Christian.Kandeler at qt.io (Christian Kandeler) Date: Wed, 11 Oct 2017 09:18:27 +0000 Subject: [Qbs] Rule with merging of inputs tuples (pairs) In-Reply-To: References: Message-ID: Your problem is not mainly the output file path, but that you need to create the mapping first, because qbs cannot know about it. As for the concrete solution, the first thing to understand is that you need to create a multiplex rule: Rule { multiplex: true This is because otherwise, the rule would be invoked per input artifact, but you need to see several inputs at once. Then, derive the output file paths: outputArtifacts: { var list = []; // Iterate over one of inputs["a_binary"] or inputs["b_binary"] and // add the tuple { , "c_binary" } to list. return list; } Finally, in the prepare script, you create tuples { , , } of matching artifacts from all the inputs and outputs and create one copy command per such tuple. As you can see, there is a bit of "manual labor" involved, because qbs has no information about which two input artifacts belong together. Christian ________________________________________ From: Denis Shienkov Sent: Wednesday, October 11, 2017 10:38 AM To: qbs at qt-project.org; Christian Kandeler; Jake Petroules Subject: Rule with merging of inputs tuples (pairs) Hi all, is it possible to do something this? I have following set of files as inputs: 1) a1.bin, a2.bin, a3.bin, ..., aN.bin 2) b1.bin, b2.bin, b3.bin, ..., bN.bin I need to do some processing for this files to have on outputs like: c1.bin = a1.bin + b1.bin c2.bin = a2.bin + b2.bin c3.bin = a3.bin + b3.bin ... cN.bin = aN.bin + bN.bin A numbers of input A and B files are equal, so, a number of output C files should be too equal. The processing it is an usual 'copy' command, like: copy /b aN.bin + bN.bin cN.bin I have created a Rule: Rule { inputs: ["a_binary", "b_binary"] Artifact { fileTags: ["c_binary"] filePath: "c.bin"; } prepare: { // Do something to call the // copy /b aN.bin + bN.bin cN.bin command. } } but is is unclear how to define an output artifact's file pach, because it should be different for each input, e.g. should be c1.bin, c2.bin and so on.? Or, maybe it is better solution, and I'm wrong? BR, Denis From denis.shienkov at gmail.com Wed Oct 11 13:52:36 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Wed, 11 Oct 2017 14:52:36 +0300 Subject: [Qbs] Rule with merging of inputs tuples (pairs) In-Reply-To: References: Message-ID: Many thanks, it works. 2017-10-11 12:18 GMT+03:00 Christian Kandeler : > Your problem is not mainly the output file path, but that you need to > create the mapping first, because qbs cannot know about it. > As for the concrete solution, the first thing to understand is that you > need to create a multiplex rule: > Rule { > multiplex: true > > This is because otherwise, the rule would be invoked per input artifact, > but you need to see several inputs at once. > > Then, derive the output file paths: > > outputArtifacts: { > var list = []; > // Iterate over one of inputs["a_binary"] or inputs["b_binary"] and > // add the tuple { , "c_binary" } to list. > return list; > } > > Finally, in the prepare script, you create tuples { , , > } of matching artifacts from all the inputs and outputs and create > one copy command per such tuple. > > As you can see, there is a bit of "manual labor" involved, because qbs has > no information about which two input artifacts belong together. > > > Christian > > ________________________________________ > From: Denis Shienkov > Sent: Wednesday, October 11, 2017 10:38 AM > To: qbs at qt-project.org; Christian Kandeler; Jake Petroules > Subject: Rule with merging of inputs tuples (pairs) > > Hi all, > > is it possible to do something this? > > I have following set of files as inputs: > > 1) a1.bin, a2.bin, a3.bin, ..., aN.bin > 2) b1.bin, b2.bin, b3.bin, ..., bN.bin > > I need to do some processing for this files to have on outputs > like: > > c1.bin = a1.bin + b1.bin > c2.bin = a2.bin + b2.bin > c3.bin = a3.bin + b3.bin > ... > cN.bin = aN.bin + bN.bin > > A numbers of input A and B files are equal, > so, a number of output C files should be too equal. > > The processing it is an usual 'copy' command, like: > > copy /b aN.bin + bN.bin cN.bin > > I have created a Rule: > > Rule { > > inputs: ["a_binary", "b_binary"] > > > Artifact { > > fileTags: ["c_binary"] > > filePath: "c.bin"; > > } > > > prepare: { > > // Do something to call the > // copy /b aN.bin + bN.bin cN.bin command. > > } > > } > > but is is unclear how to define an output artifact's file pach, because it > should be different > for each input, e.g. should be c1.bin, c2.bin and so on.? > > Or, maybe it is better solution, and I'm wrong? > > BR, > Denis > > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.shienkov at gmail.com Wed Oct 11 19:11:26 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Wed, 11 Oct 2017 20:11:26 +0300 Subject: [Qbs] Second rule reads empty file generated by first rule Message-ID: Hi all, I have a project with some rules: 'producer' and 'consumer', The 'producer' generates an artifact with the JSON file, and the 'consumer' receive this artifact on input and does trying to read content of this JSON file. BUT: The consumer always reads an empty content, even the file exists and is not empty. == Producer == Rule { //alwaysRun: true multiplex: true inputs: ["rwwcoreapp", "nrwwcoreapp", "mergedcoreapp"] Artifact { fileTags: ["firmwarebin"] filePath: product.targetName + ".bin" } Artifact { fileTags: ["firmwarecrc"] filePath: "crcs.json" } prepare: { var cmd = new JavaScriptCommand(); cmd.workingDirectory = product.buildDirectory cmd.patcher = project.sourceDirectory + "/tools/patcher.exe"; cmd.outputFirmwareFilePath = outputs["firmwarebin"][0].filePath; cmd.outputCrcFilePath = outputs["firmwarecrc"][0].filePath; cmd.inputMergedFilePaths = inputs["mergedcoreapp"].map(function(a) { return a.filePath; }).sort(); cmd.inputRwwFilePaths = inputs["rwwcoreapp"].map(function(a) { return a.filePath; }).sort(); cmd.inputNrwwFilePaths = inputs["nrwwcoreapp"].map(function(a) { return a.filePath; }).sort(); cmd.crcSize = 2; cmd.sourceCode = function() { var p = new Process(); p.setWorkingDirectory(workingDirectory); // TODO: Make it more good!! var crcStarts = [ 0x1EBFE, 0x1F3FE ]; var crcEnds = [ 0x1EBFE + crcSize, 0x1F3FE + crcSize ]; var crcConfigs = { }; crcConfigs["crcs"] = []; // Patch each of NRWW file. for (var i = 0; i < inputMergedFilePaths.length; ++i) { var args = [ // Some arguments ]; var crcValue = p.exec(patcher, args, false); var startOffset = crcStarts[i]; var endOffset = crcEnds[i]; var crcConfig = {}; crcConfig["crcValue"] = crcValue; crcConfig["startOffset"] = startOffset; crcConfig["endOffset"] = endOffset; crcConfigs["crcs"].push(crcConfig); } // Generate JSON file. var tf = new TextFile(outputCrcFilePath, TextFile.WriteOnly); tf.writeLine(JSON.stringify(crcConfigs, undefined, 4)); // Generate final binary firmware. var args = [ "/C", "copy", "/b" ]; for (var i = 0; i < inputRwwFilePaths.length; ++i) { args.push(FileInfo.toWindowsSeparators(inputRwwFilePaths[i])); args.push("+"); args.push(FileInfo.toWindowsSeparators(inputNrwwFilePaths[i])); if (i < (inputRwwFilePaths.length - 1)) args.push("+"); } args.push(FileInfo.toWindowsSeparators(outputFirmwareFilePath)); p.exec("cmd.exe", args, true); } cmd.description = "generating " + FileInfo.fileName(cmd.outputFirmwareFilePath); return cmd; } } == Consumer== Rule { //alwaysRun: true multiplex: true inputs: ["firmwarecrc"] inputsFromDependencies: ["hex", "firmwarecrc"] explicitlyDependsOn: ["firmwarecrc"] Artifact { fileTags: ["firmwarehex"] filePath: product.targetName + ".hex" } prepare: { var cmd = new JavaScriptCommand(); cmd.workingDirectory = product.buildDirectory cmd.sreccat = project.sourceDirectory + "/tools/srec_cat.exe"; cmd.inputCrcFilePath = inputs["firmwarecrc"][0].filePath; cmd.inputHexFilePaths = inputs["hex"].map(function(a) { return a.filePath; }).sort(); cmd.outputFirmwareFilePath = outputs["firmwarehex"][0].filePath; cmd.description = "generating " + FileInfo.fileName(cmd.outputFirmwareFilePath); cmd.sourceCode = function() { var p = new Process(); p.setWorkingDirectory(workingDirectory); // Merge all hex files to one. var srecArgs = []; for (var i = 0; i < inputHexFilePaths.length; ++i) { srecArgs.push(inputHexFilePaths[i]); srecArgs.push("-I"); } srecArgs.push("-o"); srecArgs.push(outputFirmwareFilePath); srecArgs.push("-I"); p.exec(sreccat, srecArgs, true); // Add crc var tf = new TextFile(inputCrcFilePath, TextFile.ReadOnly); var content = tf.readAll(); console.info("tf: " + inputCrcFilePath + ", content : " + content); //var crcs = JSON.parse(tf.readAll())["crcs"]; } return cmd; } } I had tries to add the 'firmwarecrc' target to inputsFromDependencies, and to explicitlyDependsOn .. *But, it does not help... What's wrong?* BR, Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: From resurrection at centrum.cz Thu Oct 12 08:26:42 2017 From: resurrection at centrum.cz (resurrection at centrum.cz) Date: Thu, 12 Oct 2017 08:26:42 +0200 Subject: [Qbs] =?utf-8?q?Depending_on_item_with_dynamic_name?= Message-ID: <20171012082642.A10421E5@centrum.cz> Hi, is there a way do depend on a product with dynamically generated name? Via id prehaps or some other identifier?   E.g.:   import qbs import qbs.FileInfo   Project {     Product     {         name: FileInfo.baseName(sourceDirectory)     }     Product     {         Depends { name: "???" }     } }   Is there a way to depend on the first product in the second one? -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.bornemann at qt.io Thu Oct 12 10:22:32 2017 From: joerg.bornemann at qt.io (Joerg Bornemann) Date: Thu, 12 Oct 2017 10:22:32 +0200 Subject: [Qbs] Depending on item with dynamic name In-Reply-To: <20171012082642.A10421E5@centrum.cz> References: <20171012082642.A10421E5@centrum.cz> Message-ID: <8bb8ba66-8bac-910a-7cf6-5b8619738191@qt.io> On 10/12/2017 08:26 AM, resurrection at centrum.cz wrote: > is there a way do depend on a product with dynamically generated name? > Via id prehaps or some other identifier? > > E.g.: > > /import qbs/ > > /import qbs.FileInfo/ > > /Project/ > /{/ > /    Product/ > /    {/ > /        name: FileInfo.baseName(sourceDirectory)/ > /    }/ > /    Product/ > /    {/ > /        Depends { name: "???" }/ > /    }/ > /}/ > > Is there a way to depend on the first product in the second one? Note the following in the docs for Product.name: "The value of this property must be a simple JavaScript expression that does not depend on module properties or values that are non-local to this product." The following works though: Project { property string theName: FileInfo.fileName(path) Product { name: project.theName ... } Product { Depends { name: project.theName } ... } } Christian, do we want to claim this as supported? Joerg From joerg.bornemann at qt.io Thu Oct 12 10:25:03 2017 From: joerg.bornemann at qt.io (Joerg Bornemann) Date: Thu, 12 Oct 2017 10:25:03 +0200 Subject: [Qbs] Second rule reads empty file generated by first rule In-Reply-To: References: Message-ID: <516f84bf-2416-1336-d71b-c38105b3f6fe@qt.io> On 10/11/2017 07:11 PM, Denis Shienkov wrote: > I have a project with some rules: 'producer' and 'consumer', > > The 'producer' generates an artifact with the JSON file, and the > 'consumer' receive this artifact on input and does trying to read > content of this JSON file. > > BUT: The consumer always reads an empty content, even the file exists > and is not empty. The reason might be: You don't call close() on the TextFile you're writing. BR, Joerg From denis.shienkov at gmail.com Thu Oct 12 10:50:50 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Thu, 12 Oct 2017 11:50:50 +0300 Subject: [Qbs] Second rule reads empty file generated by first rule In-Reply-To: <516f84bf-2416-1336-d71b-c38105b3f6fe@qt.io> References: <516f84bf-2416-1336-d71b-c38105b3f6fe@qt.io> Message-ID: > The reason might be: You don't call close() on the TextFile you're writing. Ohh.. Yes, exactly!! Many many thanks, thanks for your time. ))) BR, Denis 2017-10-12 11:25 GMT+03:00 Joerg Bornemann : > On 10/11/2017 07:11 PM, Denis Shienkov wrote: > > I have a project with some rules: 'producer' and 'consumer', >> >> The 'producer' generates an artifact with the JSON file, and the >> 'consumer' receive this artifact on input and does trying to read content >> of this JSON file. >> >> BUT: The consumer always reads an empty content, even the file exists and >> is not empty. >> > > The reason might be: You don't call close() on the TextFile you're writing. > > > BR, > > Joerg > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.kandeler at qt.io Fri Oct 13 12:32:24 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Fri, 13 Oct 2017 12:32:24 +0200 Subject: [Qbs] Branch 1.10 created Message-ID: <20171013123224.4cc3b72c@ckandeler-archlinux> Hi, we have branched off qbs 1.10 today. Scheduled release date for version 1.10.0 is the end of November. We recommend users to try this branch with their projects and report back any new problems they find. Contributors are requested to push bug fixes to this branch, while features go to master. Christian From nunosantos at imaginando.pt Mon Oct 16 00:08:19 2017 From: nunosantos at imaginando.pt (Nuno Santos) Date: Sun, 15 Oct 2017 23:08:19 +0100 Subject: [Qbs] Handling particularities of different OS's Message-ID: <9491A91A-2B67-4C7F-BE75-A05FE6FF29BD@imaginando.pt> Hi, I’m giving my first steps with qbs in order to embrace the future and start porting my framework to it. I have just tried it for the first time today but I have already been faced with a new problem I can’t find on documentation. Problem: - I support iOS, Android, Windows & Mac For the same app/lib I might need to include different source files and links with different libs. How can I conditionally add this sections and based on what? I’m basically looking for the equivalent to macs { ,} android { }, etc Is there any documentation that covers this and that I might have skipped? Thanks! Regards, Nuno Santos From chgans at gmail.com Mon Oct 16 00:16:11 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Mon, 16 Oct 2017 11:16:11 +1300 Subject: [Qbs] Handling particularities of different OS's In-Reply-To: <9491A91A-2B67-4C7F-BE75-A05FE6FF29BD@imaginando.pt> References: <9491A91A-2B67-4C7F-BE75-A05FE6FF29BD@imaginando.pt> Message-ID: Hi, Have a look at http://doc.qt.io/qbs/group-item.html Chris From christian.kandeler at qt.io Mon Oct 16 10:54:31 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Mon, 16 Oct 2017 10:54:31 +0200 Subject: [Qbs] Handling particularities of different OS's In-Reply-To: <9491A91A-2B67-4C7F-BE75-A05FE6FF29BD@imaginando.pt> References: <9491A91A-2B67-4C7F-BE75-A05FE6FF29BD@imaginando.pt> Message-ID: <20171016105431.6fb453c3@ckandeler-archlinux> On Sun, 15 Oct 2017 23:08:19 +0100 Nuno Santos wrote: > I’m giving my first steps with qbs in order to embrace the future and start porting my framework to it. I have just tried it for the first time today but I have already been faced with a new problem I can’t find on documentation. Problem: > > - I support iOS, Android, Windows & Mac > > For the same app/lib I might need to include different source files This is done via the Group item: https://doc.qt.io/qbs/group-item.html > and links with different libs. This is done via the Properties item: https://doc.qt.io/qbs/properties-item.html > I’m basically looking for the equivalent to macs { ,} android { }, etc The two items mentioned above should cover this. In both cases, use a condition based on the target OS, e.g. "condition: qbs.targetOS.contains('macos')". Christian From nunosantos at imaginando.pt Tue Oct 17 00:55:46 2017 From: nunosantos at imaginando.pt (Nuno Santos) Date: Mon, 16 Oct 2017 23:55:46 +0100 Subject: [Qbs] Handling particularities of different OS's In-Reply-To: <20171016105431.6fb453c3@ckandeler-archlinux> References: <9491A91A-2B67-4C7F-BE75-A05FE6FF29BD@imaginando.pt> <20171016105431.6fb453c3@ckandeler-archlinux> Message-ID: Hi, Thanks for your reply. I’m trying it already but I’m having other kinds of problems I’m still not comfortable with. I will investigate. Thanks! Regards, Nuno > On 16 Oct 2017, at 09:54, Christian Kandeler wrote: > > On Sun, 15 Oct 2017 23:08:19 +0100 > Nuno Santos wrote: > >> I’m giving my first steps with qbs in order to embrace the future and start porting my framework to it. I have just tried it for the first time today but I have already been faced with a new problem I can’t find on documentation. Problem: >> >> - I support iOS, Android, Windows & Mac >> >> For the same app/lib I might need to include different source files > > This is done via the Group item: https://doc.qt.io/qbs/group-item.html > >> and links with different libs. > > This is done via the Properties item: > https://doc.qt.io/qbs/properties-item.html > >> I’m basically looking for the equivalent to macs { ,} android { }, etc > > The two items mentioned above should cover this. In both cases, use a condition based on the target OS, e.g. "condition: qbs.targetOS.contains('macos')". > > > Christian > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs From hkarel at yandex.ru Tue Oct 17 11:20:12 2017 From: hkarel at yandex.ru (=?UTF-8?B?0JrQsNGA0LXQu9C40L0g0J/QsNCy0LXQuw==?=) Date: Tue, 17 Oct 2017 12:20:12 +0300 Subject: [Qbs] How build 32 bit application on 64 host OS Message-ID: <67baec61-4310-4adf-9d88-1993fe58c133@yandex.ru> Hi, I'm working in Ubuntu 14.04, 64 bit. I use QtCreatir 4.4.1 Now I needed to build a small qbs project for two architectures: intel 64 and 32 bits. I have installed qt4 system libraries, 64 and 32 bits respectively. qmake - only 64 bits. Simultaneously install the qmake to 64 and 32 bits - I can not, packages are mutually exclusive. Tell me how to assemble the project simultaneously for 64 and 32 bits? -- BR, Pavel Karelin From christian.kandeler at qt.io Tue Oct 17 13:09:09 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Tue, 17 Oct 2017 13:09:09 +0200 Subject: [Qbs] How build 32 bit application on 64 host OS In-Reply-To: <67baec61-4310-4adf-9d88-1993fe58c133@yandex.ru> References: <67baec61-4310-4adf-9d88-1993fe58c133@yandex.ru> Message-ID: <20171017130909.5dc27422@ckandeler-archlinux> On Tue, 17 Oct 2017 12:20:12 +0300 Карелин Павел wrote: > I'm working in Ubuntu 14.04, 64 bit. I use QtCreatir 4.4.1 > Now I needed to build a small qbs project for two architectures: intel > 64 and 32 bits. > I have installed qt4 system libraries, 64 and 32 bits respectively. > qmake - only 64 bits. > Simultaneously install the qmake to 64 and 32 bits - I can not, packages > are mutually exclusive. Hm, doesn't that mean that one of the two Qt installations is incomplete with regards to developing for it? You cannot build qmake projects with the 32-bit version either, right? At the moment, qmake is our entry point for setting up the Qt modules using setup-qt. If you are working on the command line only, you might get away with installing the two packages one after the other (both with their associated qmake), calling setup-qt while they are "complete". However, in Qt Creator you always need the right qmake. Christian From enmarantispam at gmail.com Tue Oct 17 14:55:07 2017 From: enmarantispam at gmail.com (NIkolai Marchenko) Date: Tue, 17 Oct 2017 15:55:07 +0300 Subject: [Qbs] Why is there Rule:alwaysRun but not Probe:alwaysRun? Message-ID: Both run arbitary scripts to do their work. QBS cannot assume that one script is better or more expensive than the other since both are arbitary and external to build system. So why defend the policy of not allowing alwaysSrun for Probes ? This makes no sense to me -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.bornemann at qt.io Tue Oct 17 15:33:17 2017 From: joerg.bornemann at qt.io (Joerg Bornemann) Date: Tue, 17 Oct 2017 15:33:17 +0200 Subject: [Qbs] Why is there Rule:alwaysRun but not Probe:alwaysRun? In-Reply-To: References: Message-ID: On 10/17/2017 02:55 PM, NIkolai Marchenko wrote: > Both run arbitary scripts to do their work. QBS cannot assume that one > script is better or more expensive than the other since both are > arbitary and external to build system. So why defend the policy of not > allowing alwaysSrun for Probes ? This makes no sense to me Could you sketch a use case for probes that always run, please? Cheers, Joerg From enmarantispam at gmail.com Tue Oct 17 15:45:54 2017 From: enmarantispam at gmail.com (NIkolai Marchenko) Date: Tue, 17 Oct 2017 16:45:54 +0300 Subject: [Qbs] Why is there Rule:alwaysRun but not Probe:alwaysRun? In-Reply-To: References: Message-ID: I could just as well ask you to provide a use case for why is it necessary to update the Rule artifacts that don't need updating (according to QBS). Yet alwaysRun still exists. As for Probes: getting the git tag and commit is certainly possible by attaching to a HEAD file in the repo, but this is completely counterintuitive and getting a tag and commit very certainly is not an "expensive operation that takes time". Why not simply let us set alwaysRun and take responsibility for this running each time? Or, if you think it more sensible, provide an option for the probe rerunOnFileChange: [list of files] which is what people are doing at the moment anyway so you might as well make it officialy supported function On Tue, Oct 17, 2017 at 4:33 PM, Joerg Bornemann wrote: > On 10/17/2017 02:55 PM, NIkolai Marchenko wrote: > > Both run arbitary scripts to do their work. QBS cannot assume that one >> script is better or more expensive than the other since both are arbitary >> and external to build system. So why defend the policy of not allowing >> alwaysSrun for Probes ? This makes no sense to me >> > > Could you sketch a use case for probes that always run, please? > > > Cheers, > > Joerg > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nunosantos at imaginando.pt Wed Oct 18 01:22:04 2017 From: nunosantos at imaginando.pt (Nuno Santos) Date: Wed, 18 Oct 2017 00:22:04 +0100 Subject: [Qbs] How to create and launch an iOS app on QtCreator with qbs? Message-ID: <865F53EA-9A03-4D16-8258-DABABEBC53E1@imaginando.pt> Hi, I have created a iOS quick app template using qbs as build tool, however when I try to launch it on a device, it asks me for the executable. This was not the behaviour I was expecting. What am I missing? Thanks! Regards, Nuno From chgans at gmail.com Wed Oct 18 06:54:10 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Wed, 18 Oct 2017 17:54:10 +1300 Subject: [Qbs] How build 32 bit application on 64 host OS In-Reply-To: <20171017130909.5dc27422@ckandeler-archlinux> References: <67baec61-4310-4adf-9d88-1993fe58c133@yandex.ru> <20171017130909.5dc27422@ckandeler-archlinux> Message-ID: On 18/10/2017 12:09 AM, Christian Kandeler wrote: > On Tue, 17 Oct 2017 12:20:12 +0300 Карелин Павел > wrote: > >> I'm working in Ubuntu 14.04, 64 bit. I use QtCreatir 4.4.1 Now I >> needed to build a small qbs project for two architectures: intel 64 >> and 32 bits. I have installed qt4 system libraries, 64 and 32 bits >> respectively. qmake - only 64 bits. Simultaneously install the >> qmake to 64 and 32 bits - I can not, packages are mutually >> exclusive. > > Hm, doesn't that mean that one of the two Qt installations is > incomplete with regards to developing for it? You cannot build qmake > projects with the 32-bit version either, right? At the moment, qmake > is our entry point for setting up the Qt modules using setup-qt. If > you are working on the command line only, you might get away with > installing the two packages one after the other (both with their > associated qmake), calling setup-qt while they are "complete". > However, in Qt Creator you always need the right qmake. I have similar problem, and i'm starting to think that Ubuntu is broken (17.04). You cannot even compile qt for x86_32 on a x86_64 host without breaking your distro due to package conflicts (Thiago told me it is doable on OpenSuse). BTW, Qt has dropped linux-32 support starting with Qt-5.6 ... I am now using a 32 bits VM in the mean time for my dev, If you build a 32 bits version of Qt within the 32 bits VM, then when you install it on linux-64 system it won't work, qmake cannot be run (something to do with rpath and/or ld.so), i have wasted lot of time on this, and i still don't have a solution. Anyway, this is not a qbs-specific nor a qtc-specific problem, it is a qmake and/or ubuntu issue. Карелин, you might want to resend your message to the "interest" mailing list. chris From christian.kandeler at qt.io Wed Oct 18 09:38:23 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Wed, 18 Oct 2017 09:38:23 +0200 Subject: [Qbs] How to create and launch an iOS app on QtCreator with qbs? In-Reply-To: <865F53EA-9A03-4D16-8258-DABABEBC53E1@imaginando.pt> References: <865F53EA-9A03-4D16-8258-DABABEBC53E1@imaginando.pt> Message-ID: <20171018093823.42b4710b@ckandeler-archlinux> On Wed, 18 Oct 2017 00:22:04 +0100 Nuno Santos wrote: > I have created a iOS quick app template using qbs as build tool, however when I try to launch it on a device, it asks me for the executable. Qt Creator's iOS support is qmake-only at the moment: https://bugreports.qt.io/browse/QTCREATORBUG-14858 Christian From nunosantos at imaginando.pt Wed Oct 18 10:04:25 2017 From: nunosantos at imaginando.pt (Nuno Santos) Date: Wed, 18 Oct 2017 09:04:25 +0100 Subject: [Qbs] How to create and launch an iOS app on QtCreator with qbs? In-Reply-To: <20171018093823.42b4710b@ckandeler-archlinux> References: <865F53EA-9A03-4D16-8258-DABABEBC53E1@imaginando.pt> <20171018093823.42b4710b@ckandeler-archlinux> Message-ID: <060B585D-C015-42A3-830A-58CB0D222711@imaginando.pt> Christian, Thanks for you reply. But qbs works for iOS? Can I write it hand? Is there any template around? Or is it a no go? Regards, Nuno > On 18 Oct 2017, at 08:38, Christian Kandeler wrote: > > On Wed, 18 Oct 2017 00:22:04 +0100 > Nuno Santos wrote: > >> I have created a iOS quick app template using qbs as build tool, however when I try to launch it on a device, it asks me for the executable. > > Qt Creator's iOS support is qmake-only at the moment: https://bugreports.qt.io/browse/QTCREATORBUG-14858 > > > Christian > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs From Jake.Petroules at qt.io Wed Oct 18 13:03:31 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Wed, 18 Oct 2017 11:03:31 +0000 Subject: [Qbs] How to create and launch an iOS app on QtCreator with qbs? In-Reply-To: <060B585D-C015-42A3-830A-58CB0D222711@imaginando.pt> References: <865F53EA-9A03-4D16-8258-DABABEBC53E1@imaginando.pt> <20171018093823.42b4710b@ckandeler-archlinux> <060B585D-C015-42A3-830A-58CB0D222711@imaginando.pt> Message-ID: <12D74740-F153-41BB-89CF-49A1B4D39654@qt.io> Qbs does work for iOS but it currently doesn't support some key features like bundle embedding, so for the time being you'll still need to use something like macdeployqt. You can't use macdeployqt itself because that only supports macOS and not iOS. But if you have a statically linked Qt, Qbs may work OK. Run qbs-setup-toolchains --detect and try to build with one of the generated iOS profiles like xcode-iphoneos-clang. > On Oct 18, 2017, at 10:04 AM, Nuno Santos wrote: > > Christian, > > Thanks for you reply. > > But qbs works for iOS? Can I write it hand? Is there any template around? > > Or is it a no go? > > Regards, > > Nuno > >> On 18 Oct 2017, at 08:38, Christian Kandeler wrote: >> >> On Wed, 18 Oct 2017 00:22:04 +0100 >> Nuno Santos wrote: >> >>> I have created a iOS quick app template using qbs as build tool, however when I try to launch it on a device, it asks me for the executable. >> >> Qt Creator's iOS support is qmake-only at the moment: https://bugreports.qt.io/browse/QTCREATORBUG-14858 >> >> >> Christian >> _______________________________________________ >> Qbs mailing list >> Qbs at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs > > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From nunosantos at imaginando.pt Wed Oct 18 13:09:43 2017 From: nunosantos at imaginando.pt (Nuno Santos) Date: Wed, 18 Oct 2017 12:09:43 +0100 Subject: [Qbs] How to create and launch an iOS app on QtCreator with qbs? In-Reply-To: <12D74740-F153-41BB-89CF-49A1B4D39654@qt.io> References: <865F53EA-9A03-4D16-8258-DABABEBC53E1@imaginando.pt> <20171018093823.42b4710b@ckandeler-archlinux> <060B585D-C015-42A3-830A-58CB0D222711@imaginando.pt> <12D74740-F153-41BB-89CF-49A1B4D39654@qt.io> Message-ID: Ok. I will try. Are there plans to support iOS out of the box? What about? Android is it supported already? Because I have been faced with the same problem as iOS. My goals is adapt myself to qbs and porting it slowly so when it gets fully support I’m ready to jump on it. There is stills so much to learn and process. This will definitely be a long process. Thx, Regards, Nuno > On 18 Oct 2017, at 12:03, Jake Petroules wrote: > > Qbs does work for iOS but it currently doesn't support some key features like bundle embedding, so for the time being you'll still need to use something like macdeployqt. You can't use macdeployqt itself because that only supports macOS and not iOS. > > But if you have a statically linked Qt, Qbs may work OK. > > Run qbs-setup-toolchains --detect and try to build with one of the generated iOS profiles like xcode-iphoneos-clang. > >> On Oct 18, 2017, at 10:04 AM, Nuno Santos wrote: >> >> Christian, >> >> Thanks for you reply. >> >> But qbs works for iOS? Can I write it hand? Is there any template around? >> >> Or is it a no go? >> >> Regards, >> >> Nuno >> >>> On 18 Oct 2017, at 08:38, Christian Kandeler wrote: >>> >>> On Wed, 18 Oct 2017 00:22:04 +0100 >>> Nuno Santos wrote: >>> >>>> I have created a iOS quick app template using qbs as build tool, however when I try to launch it on a device, it asks me for the executable. >>> >>> Qt Creator's iOS support is qmake-only at the moment: https://bugreports.qt.io/browse/QTCREATORBUG-14858 >>> >>> >>> Christian >>> _______________________________________________ >>> Qbs mailing list >>> Qbs at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/qbs >> >> _______________________________________________ >> Qbs mailing list >> Qbs at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs > > -- > Jake Petroules - jake.petroules at qt.io > The Qt Company - Silicon Valley > Qbs build tool evangelist - qbs.io > From hkarel at yandex.ru Wed Oct 18 13:10:34 2017 From: hkarel at yandex.ru (=?UTF-8?B?0JrQsNGA0LXQu9C40L0g0J/QsNCy0LXQuw==?=) Date: Wed, 18 Oct 2017 14:10:34 +0300 Subject: [Qbs] How build 32 bit application on 64 host OS In-Reply-To: References: <67baec61-4310-4adf-9d88-1993fe58c133@yandex.ru> <20171017130909.5dc27422@ckandeler-archlinux> Message-ID: <7c2a1507-5812-d5ed-db8a-ed126ddcfbd4@yandex.ru> Good afternoon, guys Thank you for your responses. They gave me some food for thought. Yesterday I spent half a day trying to substitute package qmake (from 64 bit to 32 bit). But I did not achieve much success. In addition to the problems with creating Qt-profile in QtCreator for qmake-32, were added problems with resolution of header files for 32 bit libraries. For me, it remains a mystery why header files for 32-bit libraries are located in /usr/lib/x86_64-linux-gnu directory, while the libraries themselves are in /usr/lib/i386-linux-gnu ... The funny thing about this situation is that the program should work on OrangePi One (architecture armv7). But since OrangePi had an emulator for Intel architecture 32 bit (ExaGear), then I thought why should I not immediately compile a program for Intel-32 on my working computer...  So I started this adventure ... While I decided to stay on the native assembly on OrangePi -- BR, Pavel Karelin 18.10.2017 07:54, Christian Gagneraud пишет: > On 18/10/2017 12:09 AM, Christian Kandeler wrote: >> On Tue, 17 Oct 2017 12:20:12 +0300 Карелин Павел >> wrote: >> >>> I'm working in Ubuntu 14.04, 64 bit. I use QtCreatir 4.4.1 Now I >>> needed to build a small qbs project for two architectures: intel 64 >>> and 32 bits. I have installed qt4 system libraries, 64 and 32 bits >>> respectively. qmake - only 64 bits. Simultaneously install the >>> qmake to 64 and 32 bits - I can not, packages are mutually >>> exclusive. >> >> Hm, doesn't that mean that one of the two Qt installations is >> incomplete with regards to developing for it? You cannot build qmake >> projects with the 32-bit version either, right? At the moment, qmake >> is our entry point for setting up the Qt modules using setup-qt. If >> you are working on the command line only, you might get away with >> installing the two packages one after the other (both with their >> associated qmake), calling setup-qt while they are "complete". >> However, in Qt Creator you always need the right qmake. > > I have similar problem, and i'm starting to think that Ubuntu is > broken (17.04). > > You cannot even compile qt for x86_32 on a x86_64 host without > breaking your distro due to package conflicts (Thiago told me it is > doable on OpenSuse). > > BTW, Qt has dropped linux-32 support starting with Qt-5.6 ... > > I am now using a 32 bits VM in the mean time for my dev, If you build > a 32 bits version of Qt within the 32 bits VM, then when you install > it on linux-64 system it won't work, qmake cannot be run (something to > do with rpath and/or ld.so), i have wasted lot of time on this, and i > still don't have a solution. > > Anyway, this is not a qbs-specific nor a qtc-specific problem, it is a > qmake and/or ubuntu issue. > > Карелин, you might want to resend your message to the "interest" > mailing list. > > > chris > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jake.Petroules at qt.io Wed Oct 18 13:13:09 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Wed, 18 Oct 2017 11:13:09 +0000 Subject: [Qbs] How to create and launch an iOS app on QtCreator with qbs? In-Reply-To: References: <865F53EA-9A03-4D16-8258-DABABEBC53E1@imaginando.pt> <20171018093823.42b4710b@ckandeler-archlinux> <060B585D-C015-42A3-830A-58CB0D222711@imaginando.pt> <12D74740-F153-41BB-89CF-49A1B4D39654@qt.io> Message-ID: <6BB00561-13F1-4698-A2D6-6B14C745DF0C@qt.io> > On Oct 18, 2017, at 1:09 PM, Nuno Santos wrote: > > Ok. I will try. > > Are there plans to support iOS out of the box? Without a doubt. We already support quite a few iOS features out of the box, actually (like asset catalogs, storyboards, etc.). The major thing that's missing is bundle embedding, i.e. a rough equivalent of macdeployqt. > What about? Android is it supported already? Because I have been faced with the same problem as iOS. Android is in a similar boat as iOS; most of the base stuff is there but still missing an "androiddeployqt" equivalent. > My goals is adapt myself to qbs and porting it slowly so when it gets fully support I’m ready to jump on it. > > There is stills so much to learn and process. This will definitely be a long process. And we're here to help! The feedback from customers like yourself is very valuable, so we certainly do appreciate it. > Thx, > > Regards, > > Nuno > >> On 18 Oct 2017, at 12:03, Jake Petroules wrote: >> >> Qbs does work for iOS but it currently doesn't support some key features like bundle embedding, so for the time being you'll still need to use something like macdeployqt. You can't use macdeployqt itself because that only supports macOS and not iOS. >> >> But if you have a statically linked Qt, Qbs may work OK. >> >> Run qbs-setup-toolchains --detect and try to build with one of the generated iOS profiles like xcode-iphoneos-clang. >> >>> On Oct 18, 2017, at 10:04 AM, Nuno Santos wrote: >>> >>> Christian, >>> >>> Thanks for you reply. >>> >>> But qbs works for iOS? Can I write it hand? Is there any template around? >>> >>> Or is it a no go? >>> >>> Regards, >>> >>> Nuno >>> >>>> On 18 Oct 2017, at 08:38, Christian Kandeler wrote: >>>> >>>> On Wed, 18 Oct 2017 00:22:04 +0100 >>>> Nuno Santos wrote: >>>> >>>>> I have created a iOS quick app template using qbs as build tool, however when I try to launch it on a device, it asks me for the executable. >>>> >>>> Qt Creator's iOS support is qmake-only at the moment: https://bugreports.qt.io/browse/QTCREATORBUG-14858 >>>> >>>> >>>> Christian >>>> _______________________________________________ >>>> Qbs mailing list >>>> Qbs at qt-project.org >>>> http://lists.qt-project.org/mailman/listinfo/qbs >>> >>> _______________________________________________ >>> Qbs mailing list >>> Qbs at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/qbs >> >> -- >> Jake Petroules - jake.petroules at qt.io >> The Qt Company - Silicon Valley >> Qbs build tool evangelist - qbs.io >> > > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From daniel.engelke at basyskom.com Wed Oct 18 13:36:12 2017 From: daniel.engelke at basyskom.com (Daniel Engelke) Date: Wed, 18 Oct 2017 13:36:12 +0200 Subject: [Qbs] How to create and launch an iOS app on QtCreator with qbs? In-Reply-To: <6BB00561-13F1-4698-A2D6-6B14C745DF0C@qt.io> References: <865F53EA-9A03-4D16-8258-DABABEBC53E1@imaginando.pt> <20171018093823.42b4710b@ckandeler-archlinux> <060B585D-C015-42A3-830A-58CB0D222711@imaginando.pt> <12D74740-F153-41BB-89CF-49A1B4D39654@qt.io> <6BB00561-13F1-4698-A2D6-6B14C745DF0C@qt.io> Message-ID: <3cca8f83-beec-f08f-a404-149893ea573a@basyskom.com> Hi, Since I had the same issues. Can we do a quick update on the docs to state that iOS and android deployment is still work in progress? Otherwise I think these questions will keep repeating. Because as it is, it's fairly hard to see that those core features are missing (mostly since some android and iOS features are actually implemented already). Br Daniel On 10/18/2017 01:13 PM, Jake Petroules wrote: > >> On Oct 18, 2017, at 1:09 PM, Nuno Santos wrote: >> >> Ok. I will try. >> >> Are there plans to support iOS out of the box? > Without a doubt. We already support quite a few iOS features out of the box, actually (like asset catalogs, storyboards, etc.). The major thing that's missing is bundle embedding, i.e. a rough equivalent of macdeployqt. > >> What about? Android is it supported already? Because I have been faced with the same problem as iOS. > Android is in a similar boat as iOS; most of the base stuff is there but still missing an "androiddeployqt" equivalent. > >> My goals is adapt myself to qbs and porting it slowly so when it gets fully support I’m ready to jump on it. >> >> There is stills so much to learn and process. This will definitely be a long process. > And we're here to help! The feedback from customers like yourself is very valuable, so we certainly do appreciate it. > >> Thx, >> >> Regards, >> >> Nuno >> >>> On 18 Oct 2017, at 12:03, Jake Petroules wrote: >>> >>> Qbs does work for iOS but it currently doesn't support some key features like bundle embedding, so for the time being you'll still need to use something like macdeployqt. You can't use macdeployqt itself because that only supports macOS and not iOS. >>> >>> But if you have a statically linked Qt, Qbs may work OK. >>> >>> Run qbs-setup-toolchains --detect and try to build with one of the generated iOS profiles like xcode-iphoneos-clang. >>> >>>> On Oct 18, 2017, at 10:04 AM, Nuno Santos wrote: >>>> >>>> Christian, >>>> >>>> Thanks for you reply. >>>> >>>> But qbs works for iOS? Can I write it hand? Is there any template around? >>>> >>>> Or is it a no go? >>>> >>>> Regards, >>>> >>>> Nuno >>>> >>>>> On 18 Oct 2017, at 08:38, Christian Kandeler wrote: >>>>> >>>>> On Wed, 18 Oct 2017 00:22:04 +0100 >>>>> Nuno Santos wrote: >>>>> >>>>>> I have created a iOS quick app template using qbs as build tool, however when I try to launch it on a device, it asks me for the executable. >>>>> Qt Creator's iOS support is qmake-only at the moment: https://bugreports.qt.io/browse/QTCREATORBUG-14858 >>>>> >>>>> >>>>> Christian >>>>> _______________________________________________ >>>>> Qbs mailing list >>>>> Qbs at qt-project.org >>>>> http://lists.qt-project.org/mailman/listinfo/qbs >>>> _______________________________________________ >>>> Qbs mailing list >>>> Qbs at qt-project.org >>>> http://lists.qt-project.org/mailman/listinfo/qbs >>> -- >>> Jake Petroules - jake.petroules at qt.io >>> The Qt Company - Silicon Valley >>> Qbs build tool evangelist - qbs.io >>> >> _______________________________________________ >> Qbs mailing list >> Qbs at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs -- Daniel Engelke Software Engineer basysKom GmbH Robert-Bosch-Str. 7 | 64293 Darmstadt | Germany Tel: +49 6151 870 589 -0 | Fax: -199 daniel.engelke at basyskom.com | www.basyskom.com Handelsregister: Darmstadt HRB 9352 Geschaeftsfuehrung: Dr. Eva Brucherseifer, Heike Ziegler -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jake.Petroules at qt.io Wed Oct 18 13:46:37 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Wed, 18 Oct 2017 11:46:37 +0000 Subject: [Qbs] How to create and launch an iOS app on QtCreator with qbs? In-Reply-To: <3cca8f83-beec-f08f-a404-149893ea573a@basyskom.com> References: <865F53EA-9A03-4D16-8258-DABABEBC53E1@imaginando.pt> <20171018093823.42b4710b@ckandeler-archlinux> <060B585D-C015-42A3-830A-58CB0D222711@imaginando.pt> <12D74740-F153-41BB-89CF-49A1B4D39654@qt.io> <6BB00561-13F1-4698-A2D6-6B14C745DF0C@qt.io> <3cca8f83-beec-f08f-a404-149893ea573a@basyskom.com> Message-ID: <7543F754-9194-43A4-82FC-6A2078ECAEE5@qt.io> That's probably a good idea. We need to get some docs pages that discuss relevant topics specific to each of the platforms we support anyways. I think Leena was working on a patch for that already... > On Oct 18, 2017, at 1:36 PM, Daniel Engelke wrote: > > Hi, > > Since I had the same issues. Can we do a quick update on the docs to state that iOS and android deployment is still work in progress? Otherwise I think these questions will keep repeating. > Because as it is, it's fairly hard to see that those core features are missing (mostly since some android and iOS features are actually implemented already). > > Br Daniel > > On 10/18/2017 01:13 PM, Jake Petroules wrote: >> >>> On Oct 18, 2017, at 1:09 PM, Nuno Santos >>> wrote: >>> >>> Ok. I will try. >>> >>> Are there plans to support iOS out of the box? >>> >> Without a doubt. We already support quite a few iOS features out of the box, actually (like asset catalogs, storyboards, etc.). The major thing that's missing is bundle embedding, i.e. a rough equivalent of macdeployqt. >> >> >>> What about? Android is it supported already? Because I have been faced with the same problem as iOS. >>> >> Android is in a similar boat as iOS; most of the base stuff is there but still missing an "androiddeployqt" equivalent. >> >> >>> My goals is adapt myself to qbs and porting it slowly so when it gets fully support I’m ready to jump on it. >>> >>> There is stills so much to learn and process. This will definitely be a long process. >>> >> And we're here to help! The feedback from customers like yourself is very valuable, so we certainly do appreciate it. >> >> >>> Thx, >>> >>> Regards, >>> >>> Nuno >>> >>> >>>> On 18 Oct 2017, at 12:03, Jake Petroules >>>> wrote: >>>> >>>> Qbs does work for iOS but it currently doesn't support some key features like bundle embedding, so for the time being you'll still need to use something like macdeployqt. You can't use macdeployqt itself because that only supports macOS and not iOS. >>>> >>>> But if you have a statically linked Qt, Qbs may work OK. >>>> >>>> Run qbs-setup-toolchains --detect and try to build with one of the generated iOS profiles like xcode-iphoneos-clang. >>>> >>>> >>>>> On Oct 18, 2017, at 10:04 AM, Nuno Santos >>>>> wrote: >>>>> >>>>> Christian, >>>>> >>>>> Thanks for you reply. >>>>> >>>>> But qbs works for iOS? Can I write it hand? Is there any template around? >>>>> >>>>> Or is it a no go? >>>>> >>>>> Regards, >>>>> >>>>> Nuno >>>>> >>>>> >>>>>> On 18 Oct 2017, at 08:38, Christian Kandeler >>>>>> wrote: >>>>>> >>>>>> On Wed, 18 Oct 2017 00:22:04 +0100 >>>>>> Nuno Santos >>>>>> >>>>>> wrote: >>>>>> >>>>>> >>>>>>> I have created a iOS quick app template using qbs as build tool, however when I try to launch it on a device, it asks me for the executable. >>>>>>> >>>>>> Qt Creator's iOS support is qmake-only at the moment: https://bugreports.qt.io/browse/QTCREATORBUG-14858 >>>>>> >>>>>> >>>>>> >>>>>> Christian >>>>>> _______________________________________________ >>>>>> Qbs mailing list >>>>>> >>>>>> Qbs at qt-project.org >>>>>> http://lists.qt-project.org/mailman/listinfo/qbs >>>>> _______________________________________________ >>>>> Qbs mailing list >>>>> >>>>> Qbs at qt-project.org >>>>> http://lists.qt-project.org/mailman/listinfo/qbs >>>> -- >>>> Jake Petroules - >>>> jake.petroules at qt.io >>>> >>>> The Qt Company - Silicon Valley >>>> Qbs build tool evangelist - qbs.io >>>> >>>> >>> _______________________________________________ >>> Qbs mailing list >>> >>> Qbs at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/qbs > > -- > Daniel Engelke > Software Engineer > > basysKom GmbH > Robert-Bosch-Str. 7 | 64293 Darmstadt | Germany > Tel: +49 6151 870 589 -0 | Fax: -199 > daniel.engelke at basyskom.com | www.basyskom.com > > Handelsregister: Darmstadt HRB 9352 > Geschaeftsfuehrung: Dr. Eva Brucherseifer, Heike Ziegler -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From xbenlau at gmail.com Wed Oct 18 21:04:15 2017 From: xbenlau at gmail.com (Ben Lau) Date: Thu, 19 Oct 2017 03:04:15 +0800 Subject: [Qbs] Writing a custom script by QBS Message-ID: Hello, I am still new to QBS. I am looking for a suggestion about how to write and run a custom script by QBS. Besides building the binary, developers may need additional custom scripts for deployment, code analysis, starting a mock server for testing etc. This kind of task may not have a file output locally. Can I write this kind of script by QBS? I usually write this kind of script as a shell script, but it is not a cross-platform solution which does not work with Windows. Thanks for any advise. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pahaa7 at mail.ru Wed Oct 18 23:24:10 2017 From: pahaa7 at mail.ru (pahaa7 at mail.ru) Date: Thu, 19 Oct 2017 00:24:10 +0300 Subject: [Qbs] Add extra tags to intermediate artifacts Message-ID: <6127E6B4-C1B5-4831-A1CD-D41B67E7E763@mail.ru> Hello I am trying to implement custom deploy module In that module I have created a rule that consumes files tagged “deployable” and produces files tagged “deployPackage” Also I have a rule for some image pre-processing. It produces artifacts tagged “processedImage” For workaround I added “processedImage” and “application” tags to deploy rule inputs, but it looks like not flexible solution. If user of this module adds some other modules that produce different type of content with different tags, my deploy rule will skip that content. I am trying to find some mechanism to add “deployable” tag to artifacts produced by imagePreprocessor and cpp modules. This example fails to add the tag to executable: CppApplication{ type: “deployPackage” files: [ … ] Group{ fileTagsFilter: “application” overrideTags: false fileTags: “deployable” } Depends{ name: “deployModule” } } Regards Pavel From christian.kandeler at qt.io Thu Oct 19 09:49:17 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Thu, 19 Oct 2017 09:49:17 +0200 Subject: [Qbs] Add extra tags to intermediate artifacts In-Reply-To: <6127E6B4-C1B5-4831-A1CD-D41B67E7E763@mail.ru> References: <6127E6B4-C1B5-4831-A1CD-D41B67E7E763@mail.ru> Message-ID: <20171019094917.5b43fc58@ckandeler-archlinux> > I am trying to implement custom deploy module > In that module I have created a rule that consumes files tagged “deployable” and produces files tagged “deployPackage” > Also I have a rule for some image pre-processing. It produces artifacts tagged “processedImage” > For workaround I added “processedImage” and “application” tags to deploy rule inputs, but it looks like not flexible solution. If user of this module adds some other modules that produce different type of content with different tags, my deploy rule will skip that content. > I am trying to find some mechanism to add “deployable” tag to artifacts produced by imagePreprocessor and cpp modules. This example fails to add the tag to executable: > > CppApplication{ > type: “deployPackage” > files: [ … ] > Group{ > fileTagsFilter: “application” > overrideTags: false > fileTags: “deployable” > } > Depends{ name: “deployModule” } > } This should work with the upcoming qbs 1.10 release. I assume you are using a released version such as 1.9.x? If so, you might want to try with the 1.10 branch. If that doesn't work for you either, please file a bug report and attach a minimal, but complete example to reproduce the problem. Christian From christian.kandeler at qt.io Thu Oct 19 10:19:47 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Thu, 19 Oct 2017 10:19:47 +0200 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: References: Message-ID: <20171019101947.1bdadc0c@ckandeler-archlinux> On Thu, 19 Oct 2017 03:04:15 +0800 Ben Lau wrote: > I am still new to QBS. I am looking for a suggestion about how to write and > run a custom script by QBS. > > Besides building the binary, developers may need additional custom scripts > for deployment, code analysis, starting a mock server for testing etc. This > kind of task may not have a file output locally. > > Can I write this kind of script by QBS? I usually write this kind of > script as a shell script, but it is not a cross-platform solution which > does not work with Windows. You should be able to use the normal mechanisms that are also used for building. Here's a sketch for for remote deployment (untested): Product { name: "remote deployer" type: ["mydeploytarget"] // You typically don't want to do uploads after every build, so this product's rules are not // executed unless you specifically request it. builtByDefault: false // Assuming you want to upload e.g. some tar archive you've created from your build. Depends { name: "mypackage" } // These as well as the rule below would typically be moved into a dedicated module // for better re-usability, but it's easier to demonstrate with a self-contained // product. property string remoteUser property string serverName property string targetDir Rule { // The target type(s) of your dependency/dependencies. inputsFromDependencies: ["archiver.archive"] Artifact { // Just a dummy. Does not have to get created. We should probably // have syntactic sugar for this. filePath: "deploydummy" fileTags: ["mydeploytarget"] } prepare: { var targetString = product.remoteUser + '@' + product.serverName + '/' + product.targetDir; var cmd = new Command("scp", [input.filePath, targetString]); cmd.description = "uploading " + input.fileName; return [cmd]; } } } Now this should upload your archive (possibly rebuilding if necessary): $ qbs -p "remote deployer" Christian From xbenlau at gmail.com Thu Oct 19 18:08:27 2017 From: xbenlau at gmail.com (Ben Lau) Date: Fri, 20 Oct 2017 00:08:27 +0800 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: <20171019101947.1bdadc0c@ckandeler-archlinux> References: <20171019101947.1bdadc0c@ckandeler-archlinux> Message-ID: Hi Christian, Thanks for your reply. I have tried to run your example (by removing the dependence). It will complain: *ERROR: *Cannot run: Product 'remote deployer' is not an application. On 19 October 2017 at 16:19, Christian Kandeler wrote: > On Thu, 19 Oct 2017 03:04:15 +0800 > Ben Lau wrote: > > > I am still new to QBS. I am looking for a suggestion about how to write > and > > run a custom script by QBS. > > > > Besides building the binary, developers may need additional custom > scripts > > for deployment, code analysis, starting a mock server for testing etc. > This > > kind of task may not have a file output locally. > > > > Can I write this kind of script by QBS? I usually write this kind of > > script as a shell script, but it is not a cross-platform solution which > > does not work with Windows. > > You should be able to use the normal mechanisms that are also used for > building. Here's a sketch for for remote deployment (untested): > > Product { > name: "remote deployer" > > type: ["mydeploytarget"] > > // You typically don't want to do uploads after every build, so this > product's rules are not > // executed unless you specifically request it. > builtByDefault: false > > // Assuming you want to upload e.g. some tar archive you've created > from your build. > Depends { name: "mypackage" } > > // These as well as the rule below would typically be moved into a > dedicated module > // for better re-usability, but it's easier to demonstrate with a > self-contained > // product. > property string remoteUser > property string serverName > property string targetDir > > Rule { > // The target type(s) of your dependency/dependencies. > inputsFromDependencies: ["archiver.archive"] > > Artifact { > // Just a dummy. Does not have to get created. We should > probably > // have syntactic sugar for this. > filePath: "deploydummy" > > fileTags: ["mydeploytarget"] > } > > prepare: { > var targetString = product.remoteUser + '@' + > product.serverName + '/' + product.targetDir; > var cmd = new Command("scp", [input.filePath, targetString]); > cmd.description = "uploading " + input.fileName; > return [cmd]; > } > } > } > > Now this should upload your archive (possibly rebuilding if necessary): > $ qbs -p "remote deployer" > > > Christian > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.kandeler at qt.io Thu Oct 19 18:13:11 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Thu, 19 Oct 2017 18:13:11 +0200 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: References: <20171019101947.1bdadc0c@ckandeler-archlinux> Message-ID: <20171019181250.4ed2a2db@ckandeler-archlinux> On Fri, 20 Oct 2017 00:08:27 +0800 Ben Lau wrote: > Thanks for your reply. I have tried to run your example (by removing the > dependence). It will complain: > > *ERROR: *Cannot run: Product 'remote deployer' is not an application. You're not supposed to run it. Just build it, as described. Christian From xbenlau at gmail.com Thu Oct 19 18:26:57 2017 From: xbenlau at gmail.com (Ben Lau) Date: Fri, 20 Oct 2017 00:26:57 +0800 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: <20171019181250.4ed2a2db@ckandeler-archlinux> References: <20171019101947.1bdadc0c@ckandeler-archlinux> <20171019181250.4ed2a2db@ckandeler-archlinux> Message-ID: On 20 October 2017 at 00:13, Christian Kandeler wrote: > On Fri, 20 Oct 2017 00:08:27 +0800 > Ben Lau wrote: > > > Thanks for your reply. I have tried to run your example (by removing the > > dependence). It will complain: > > > > *ERROR: *Cannot run: Product 'remote deployer' is not an application. > > You're not supposed to run it. Just build it, as described. > > > Christian > Sorry for the mistake. And that is the result. It is not triggered. $ qbs -p "remote deployer" Restoring build graph from disk Building for configuration default Build done for configuration default. -------------- next part -------------- An HTML attachment was scrubbed... URL: From william at gallaf.net Thu Oct 19 20:15:36 2017 From: william at gallaf.net (William Gallafent) Date: Thu, 19 Oct 2017 19:15:36 +0100 Subject: [Qbs] Does QBS know about old-school macOS resources / Rez ? Message-ID: <81bde3a9-1a01-6837-ba23-20807eba84f2@gallaf.net> Hello everyone, Does QBS have any awareness of macOS resource files (the extremely old-fashioned ones, which still exist, and which are compiled using /usr/bin/Rez, which has been deprecated since Xcode 6, but not replaced!)? These are still needed to compile certain specialised pieces of software (for example, Adobe PhotoShop Plug-Ins …). QMake supports these using the rez.prf component. The only location I can see Rez mentioned in the github repo is in MacOSX-Product-Types.xcspec — in some of the Xcode boilerplate, so I'm guessing not. I thought I'd ask here before embarking on writing my own Rez module for QBS, according to the instructions at http://doc.qt.io/qbs/module-item.html — I assume that's the right thing to do in this case (have been away from QBS for a while and just restarting!). Thanks in advance! -- Bill Gallafent From Jake.Petroules at qt.io Thu Oct 19 20:34:40 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Thu, 19 Oct 2017 18:34:40 +0000 Subject: [Qbs] Does QBS know about old-school macOS resources / Rez ? In-Reply-To: <81bde3a9-1a01-6837-ba23-20807eba84f2@gallaf.net> References: <81bde3a9-1a01-6837-ba23-20807eba84f2@gallaf.net> Message-ID: <4D620D9E-F36B-4373-A69A-1476D04D6632@qt.io> The best thing to do is upstream this module! Currently there is no support but I have no opposition to adding it and it would be great to have a user case such as yours to validate the implementation. Please post your module for review once it's ready, I'd be happy to help. > On Oct 19, 2017, at 8:15 PM, William Gallafent wrote: > > Hello everyone, > > Does QBS have any awareness of macOS resource files (the extremely old-fashioned ones, which still exist, and which are compiled using /usr/bin/Rez, which has been deprecated since Xcode 6, but not replaced!)? > > These are still needed to compile certain specialised pieces of software (for example, Adobe PhotoShop Plug-Ins …). > > QMake supports these using the rez.prf component. > > The only location I can see Rez mentioned in the github repo is in MacOSX-Product-Types.xcspec — in some of the Xcode boilerplate, so I'm guessing not. > > I thought I'd ask here before embarking on writing my own Rez module for QBS, according to the instructions at http://doc.qt.io/qbs/module-item.html — I assume that's the right thing to do in this case (have been away from QBS for a while and just restarting!). > > Thanks in advance! > > -- > Bill Gallafent > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From christian.kandeler at qt.io Fri Oct 20 09:54:02 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Fri, 20 Oct 2017 09:54:02 +0200 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: References: <20171019101947.1bdadc0c@ckandeler-archlinux> <20171019181250.4ed2a2db@ckandeler-archlinux> Message-ID: <20171020095402.5665c647@ckandeler-archlinux> On Fri, 20 Oct 2017 00:26:57 +0800 Ben Lau wrote: > > > Thanks for your reply. I have tried to run your example (by removing the > > > dependence). It will complain: > > > > > > *ERROR: *Cannot run: Product 'remote deployer' is not an application. > > > > You're not supposed to run it. Just build it, as described. > > > Sorry for the mistake. And that is the result. It is not triggered. If you've removed the dependency, that's to be expected: The rule has no inputs now, i.e. there's nothing to upload. You'll need to adapt the example, e.g. by depending on a simple CppApplication product and changing the rule input tag to "application". Christian From xbenlau at gmail.com Fri Oct 20 10:01:30 2017 From: xbenlau at gmail.com (Ben Lau) Date: Fri, 20 Oct 2017 16:01:30 +0800 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: <20171020095402.5665c647@ckandeler-archlinux> References: <20171019101947.1bdadc0c@ckandeler-archlinux> <20171019181250.4ed2a2db@ckandeler-archlinux> <20171020095402.5665c647@ckandeler-archlinux> Message-ID: On 20 October 2017 at 15:54, Christian Kandeler wrote: > On Fri, 20 Oct 2017 00:26:57 +0800 > Ben Lau wrote: > > > > > Thanks for your reply. I have tried to run your example (by removing > the > > > > dependence). It will complain: > > > > > > > > *ERROR: *Cannot run: Product 'remote deployer' is not an application. > > > > > > You're not supposed to run it. Just build it, as described. > > > > > Sorry for the mistake. And that is the result. It is not triggered. > > If you've removed the dependency, that's to be expected: The rule has no > inputs now, i.e. there's nothing to upload. You'll need to adapt the > example, e.g. by depending on a simple CppApplication product and changing > the rule input tag to "application". > > > Christian > What if it change the condition. Let's it just starts a web server for providing mock data to test network service? For example, just run `http-server $SRCDIR/mockdata`? (Assume the data is hard coded in a few set of json files) -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.kandeler at qt.io Fri Oct 20 10:07:42 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Fri, 20 Oct 2017 10:07:42 +0200 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: References: <20171019101947.1bdadc0c@ckandeler-archlinux> <20171019181250.4ed2a2db@ckandeler-archlinux> <20171020095402.5665c647@ckandeler-archlinux> Message-ID: <20171020100712.616d6751@ckandeler-archlinux> On Fri, 20 Oct 2017 16:01:30 +0800 Ben Lau wrote: > What if it change the condition. Let's it just starts a web server for > providing mock data to test network service? > > For example, just run `http-server $SRCDIR/mockdata`? (Assume the data is > hard coded in a few set of json files) I'm not sure I get what you are saying, but if you mean that your rule should have no inputs (which is questionable in your example, since it should depend on the json files), then just set the rule's "requiresInputs" property to true. Christian From xbenlau at gmail.com Fri Oct 20 10:41:33 2017 From: xbenlau at gmail.com (Ben Lau) Date: Fri, 20 Oct 2017 16:41:33 +0800 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: <20171020100712.616d6751@ckandeler-archlinux> References: <20171019101947.1bdadc0c@ckandeler-archlinux> <20171019181250.4ed2a2db@ckandeler-archlinux> <20171020095402.5665c647@ckandeler-archlinux> <20171020100712.616d6751@ckandeler-archlinux> Message-ID: On 20 October 2017 at 16:07, Christian Kandeler wrote: > On Fri, 20 Oct 2017 16:01:30 +0800 > Ben Lau wrote: > > > What if it change the condition. Let's it just starts a web server for > > providing mock data to test network service? > > > > For example, just run `http-server $SRCDIR/mockdata`? (Assume the data is > > hard coded in a few set of json files) > > I'm not sure I get what you are saying, but if you mean that your rule > should have no inputs (which is questionable in your example, since it > should depend on the json files), then just set the rule's "requiresInputs" > property to true. > > > Christian > yes, I wish to have a rule without input. As the mock data is hard coded, it is not generated dynamically. But even an non-sense example is not a problem, I want to know a generic way in writing a custom script by QBS and what is the restriction. >From my first email, I have raised few examples deployment = depends on a product's output , but no output file starting a mock server = no dependence, just run a command, never stop, no output file code analysis = depends on the source files, may/may not have a output file (eg, the eslint in Javascript) To simulate the condition of `code analysis`, I made this script and just run `ls` command (in real case, it should be replaced by another tools) Product { id: ls name: "ls" type: ["ls"] builtByDefault: false Rule { requiresInputs: false multiplex: true Artifact { filePath: "deploydummy" fileTags: ["ls"] } prepare: { var cmd = new Command("ls"); cmd.description = "ls " return [cmd]; } } } That works for the first time, but if I run `qbs -p ls` again. That will just report: $ qbs -p ls Restoring build graph from disk Building for configuration default Build done for configuration default. Any solution for this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.kandeler at qt.io Fri Oct 20 11:06:30 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Fri, 20 Oct 2017 11:06:30 +0200 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: References: <20171019101947.1bdadc0c@ckandeler-archlinux> <20171019181250.4ed2a2db@ckandeler-archlinux> <20171020095402.5665c647@ckandeler-archlinux> <20171020100712.616d6751@ckandeler-archlinux> Message-ID: <20171020110630.64e1acfc@ckandeler-archlinux> On Fri, 20 Oct 2017 16:41:33 +0800 Ben Lau wrote: > From my first email, I have raised few examples > > deployment = depends on a product's output , but no output file > starting a mock server = no dependence, just run a command, never stop, no > output file The "never stop" part is of course not so well-suited for a build process. You'd probably just run a script there that starts the real process in the background and then returns. > To simulate the condition of `code analysis`, I made this script and just > run `ls` command (in real case, it should be replaced by another tools) [ ... ] > That works for the first time, but if I run `qbs -p ls` again. That will > just report: > > $ qbs -p ls > > Restoring build graph from disk > Building for configuration default > Build done for configuration default. > > Any solution for this problem? By default, rules only run if they have to, that is, if an input file was updated or a property that was used in the script has changed. If you don't want that, you can set the "alwaysRun" property to true. You might want to take a look at the documentation, by the way: https://doc.qt.io/qbs/rule-item.html Christian From xbenlau at gmail.com Fri Oct 20 11:44:54 2017 From: xbenlau at gmail.com (Ben Lau) Date: Fri, 20 Oct 2017 17:44:54 +0800 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: <20171020110630.64e1acfc@ckandeler-archlinux> References: <20171019101947.1bdadc0c@ckandeler-archlinux> <20171019181250.4ed2a2db@ckandeler-archlinux> <20171020095402.5665c647@ckandeler-archlinux> <20171020100712.616d6751@ckandeler-archlinux> <20171020110630.64e1acfc@ckandeler-archlinux> Message-ID: On 20 October 2017 at 17:06, Christian Kandeler wrote: > On Fri, 20 Oct 2017 16:41:33 +0800 > Ben Lau wrote: > > > From my first email, I have raised few examples > > > > deployment = depends on a product's output , but no output file > > starting a mock server = no dependence, just run a command, never stop, > no > > output file > > The "never stop" part is of course not so well-suited for a build process. > You'd probably just run a script there that starts the real process in the > background and then returns. > > At least that is quite a common use-case for gulp / grunt, they may use it to start a web server and even perform a hot-reload if any files was changed. If the objective of QBS is not a Qt only build system, I think that should be an use-case worth to consider. > > To simulate the condition of `code analysis`, I made this script and just > > run `ls` command (in real case, it should be replaced by another tools) > > [ ... ] > > > That works for the first time, but if I run `qbs -p ls` again. That will > > just report: > > > > $ qbs -p ls > > > > Restoring build graph from disk > > Building for configuration default > > Build done for configuration default. > > > > Any solution for this problem? > > By default, rules only run if they have to, that is, if an input file was > updated or a property that was used in the script has changed. If you don't > want that, you can set the "alwaysRun" property to true. > You might want to take a look at the documentation, by the way: > https://doc.qt.io/qbs/rule-item.html > > I see. Thx. Let's summarize about how to write a custom script by QBS 1. Write it as a part of the "build" process, then run by `qbs -p scriptName` 2. Set "alwaysRun" and "builtByDefault" to true 3. Set "requiresInputs" to false if input are not needed. -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.kandeler at qt.io Fri Oct 20 13:25:43 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Fri, 20 Oct 2017 13:25:43 +0200 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: References: <20171019101947.1bdadc0c@ckandeler-archlinux> <20171019181250.4ed2a2db@ckandeler-archlinux> <20171020095402.5665c647@ckandeler-archlinux> <20171020100712.616d6751@ckandeler-archlinux> <20171020110630.64e1acfc@ckandeler-archlinux> Message-ID: <20171020132543.0e9d3ede@ckandeler-archlinux> On Fri, 20 Oct 2017 17:44:54 +0800 Ben Lau wrote: > Let's summarize about how to write a custom script by QBS > > 1. Write it as a part of the "build" process, then run by `qbs -p > scriptName` Yes, the "script name" is a "product" in qbs lingo. > 3. Set "requiresInputs" to false if input are not needed. Note that this is essentially implied if the rule does not declare any inputs. Christian From xbenlau at gmail.com Fri Oct 20 18:31:50 2017 From: xbenlau at gmail.com (Ben Lau) Date: Sat, 21 Oct 2017 00:31:50 +0800 Subject: [Qbs] Writing a custom script by QBS In-Reply-To: <20171020132543.0e9d3ede@ckandeler-archlinux> References: <20171019101947.1bdadc0c@ckandeler-archlinux> <20171019181250.4ed2a2db@ckandeler-archlinux> <20171020095402.5665c647@ckandeler-archlinux> <20171020100712.616d6751@ckandeler-archlinux> <20171020110630.64e1acfc@ckandeler-archlinux> <20171020132543.0e9d3ede@ckandeler-archlinux> Message-ID: On 20 October 2017 at 19:25, Christian Kandeler wrote: > On Fri, 20 Oct 2017 17:44:54 +0800 > Ben Lau wrote: > > > Let's summarize about how to write a custom script by QBS > > > > 1. Write it as a part of the "build" process, then run by `qbs -p > > scriptName` > > Yes, the "script name" is a "product" in qbs lingo. > > > 3. Set "requiresInputs" to false if input are not needed. > > Note that this is essentially implied if the rule does not declare any > inputs. > > > Christian > _______________________________________________ > To make it more simple to use, I have written a Script.qbs https://gist.github.com/benlau/ebbce60659f0dd17cb22064b58df7394 Usage : Script { id: ls name: "ls" command: "ls" arguments: ["-lh"] } or Script { id: ls name: "ls" function script() { var process = Process(); process.start("ls", ["-lh"]); console.info(process.readStdOut()); } } By the way, is there any method to list all available product within a project by qbs itself? I am thinking about to make a script like `qbs -p listScript` then it will search for all products and check is it a script then return. -------------- next part -------------- An HTML attachment was scrubbed... URL: From xbenlau at gmail.com Sat Oct 21 10:23:24 2017 From: xbenlau at gmail.com (Ben Lau) Date: Sat, 21 Oct 2017 16:23:24 +0800 Subject: [Qbs] Recursive file installation and preserve the folder structure Message-ID: Hello, I would like to write to QBS file to install a folder of files to a target directory recursively. That is the folder structure . ├── A │ ├── 1 │ │ └── A1.txt │ └── A.txt └── installer.qbs And that is the qbs file: import qbs import qbs.Environment Project { Product { Group { name: "all" files: "**" qbs.install: true qbs.installRoot: "/tmp/qbs" } } } However, if I run the qbs by `qbs install -v`. All the files will be copied in the same folder. The directory structure is broken. $ qbs install -v DEBUG: Copying file '/Users/benlau/src/github/junkcode/qt/qbs/A/1/A1.txt' into target directory '/tmp/qbs'. DEBUG: Copying file '/Users/benlau/src/github/junkcode/qt/qbs/A/A.txt' into target directory '/tmp/qbs'. $ ls /tmp/qbs A.txt A1.txt Any method to preserve the folder structure during installation? Thx for any advise The example source code https://github.com/benlau/junkcode/tree/master/qt/qbs -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.epting at stryker.com Sat Oct 21 10:55:35 2017 From: thomas.epting at stryker.com (Epting, Thomas) Date: Sat, 21 Oct 2017 08:55:35 +0000 Subject: [Qbs] Recursive file installation and preserve the folder structure In-Reply-To: References: Message-ID: Hi Ben, You have to use the qbs.installSourceBase property in such cases. Group { qbs.install: true qbs.installDir: "path/to/target/target" qbs.installSourceBase: "path/to/source" files : [ "path/to/source/**" ] } Best regards, Thomas Von: Qbs [mailto:qbs-bounces+thomas.epting=stryker.com at qt-project.org] Im Auftrag von Ben Lau Gesendet: Samstag, 21. Oktober 2017 10:23 An: qbs at qt-project.org Betreff: [Qbs] Recursive file installation and preserve the folder structure Hello, I would like to write to QBS file to install a folder of files to a target directory recursively. That is the folder structure . ├── A │ ├── 1 │ │ └── A1.txt │ └── A.txt └── installer.qbs And that is the qbs file: import qbs import qbs.Environment Project { Product { Group { name: "all" files: "**" qbs.install: true qbs.installRoot: "/tmp/qbs" } } } However, if I run the qbs by `qbs install -v`. All the files will be copied in the same folder. The directory structure is broken. $ qbs install -v DEBUG: Copying file '/Users/benlau/src/github/junkcode/qt/qbs/A/1/A1.txt' into target directory '/tmp/qbs'. DEBUG: Copying file '/Users/benlau/src/github/junkcode/qt/qbs/A/A.txt' into target directory '/tmp/qbs'. $ ls /tmp/qbs A.txt A1.txt Any method to preserve the folder structure during installation? Thx for any advise The example source code https://github.com/benlau/junkcode/tree/master/qt/qbs -------------- next part -------------- An HTML attachment was scrubbed... URL: From pahaa7 at mail.ru Sat Oct 21 13:14:40 2017 From: pahaa7 at mail.ru (=?UTF-8?B?0J/QsNCy0LXQuyDQm9GL0YHQtdC90LrQvg==?=) Date: Sat, 21 Oct 2017 14:14:40 +0300 Subject: [Qbs] =?utf-8?q?Add_extra_tags_to_intermediate_artifacts?= In-Reply-To: References: Message-ID: <1508584480.905347514@f348.i.mail.ru> Thank you, it works with 1.10 When it gonna be released? By Qt 5.10 release or earlier? Regards Pavel > >> I am trying to implement custom deploy module >> In that module I have created a rule that consumes files tagged ?deployable? and produces files tagged ?deployPackage? >> Also I have a rule for some image pre-processing. It produces artifacts tagged ?processedImage? >> For workaround I added ?processedImage? and ?application? tags to deploy rule inputs, but it looks like not flexible solution. If user of this module adds some other modules that produce different type of content with different tags, my deploy rule will skip that content. >> I am trying to find some mechanism to add ?deployable? tag to artifacts produced by imagePreprocessor and cpp modules. This example fails to add the tag to executable: >> >> CppApplication{ >> type: ?deployPackage? >> files: [ ? ] >> Group{ >> fileTagsFilter: ?application? >> overrideTags: false >> fileTags: ?deployable? >> } >> Depends{ name: ?deployModule? } >> } > >This should work with the upcoming qbs 1.10 release. I assume you are using a released version such as 1.9.x? If so, you might want to try with the 1.10 branch. If that doesn't work for you either, please file a bug report and attach a minimal, but complete example to reproduce the problem. > > >Christian > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jake.Petroules at qt.io Sat Oct 21 13:40:32 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Sat, 21 Oct 2017 11:40:32 +0000 Subject: [Qbs] Add extra tags to intermediate artifacts In-Reply-To: <1508584480.905347514@f348.i.mail.ru> References: <1508584480.905347514@f348.i.mail.ru> Message-ID: <79FDDAF4-0DF0-45C9-A893-A3E1C19F90CE@qt.io> The release cycle of Qbs has nothing to do with the release cycle of Qt. Qbs 1.10 will be released around the same time as Qt Creator 4.5. > On Oct 21, 2017, at 1:14 PM, Павел Лысенко via Qbs wrote: > > Thank you, it works with 1.10 > When it gonna be released? By Qt 5.10 release or earlier? > > Regards > Pavel > > > > I am trying to implement custom deploy module > > In that module I have created a rule that consumes files tagged ?deployable? and produces files tagged ?deployPackage? > > Also I have a rule for some image pre-processing. It produces artifacts tagged ?processedImage? > > For workaround I added ?processedImage? and ?application? tags to deploy rule inputs, but it looks like not flexible solution. If user of this module adds some other modules that produce different type of content with different tags, my deploy rule will skip that content. > > I am trying to find some mechanism to add ?deployable? tag to artifacts produced by imagePreprocessor and cpp modules. This example fails to add the tag to executable: > > > > CppApplication{ > > type: ?deployPackage? > > files: [ ? ] > > Group{ > > fileTagsFilter: ?application? > > overrideTags: false > > fileTags: ?deployable? > > } > > Depends{ name: ?deployModule? } > > } > > This should work with the upcoming qbs 1.10 release. I assume you are using a released version such as 1.9.x? If so, you might want to try with the 1.10 branch. If that doesn't work for you either, please file a bug report and attach a minimal, but complete example to reproduce the problem. > > > Christian > > > > > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From resurrection at centrum.cz Sun Oct 22 08:24:33 2017 From: resurrection at centrum.cz (resurrection at centrum.cz) Date: Sun, 22 Oct 2017 08:24:33 +0200 Subject: [Qbs] =?utf-8?q?How_to_make_=27cpp=2Elink=3A_false=27_part_of_the?= =?utf-8?q?_Export_item_within_custom_item=3F?= Message-ID: <20171022082433.D1BAE0C6@centrum.cz> Having a custom Item I would like to disable linking to the dynamic library for all those that depend on it since it is a plugin just like what Jake talks about in the 1.9 release blog . Qbs generates the warning that cpp.link property was not declared when I place it in the Item's Export child item and the compilation fails with missing lib file. Simplified:   MyPluginItem.qbs DynamicLibrary {     Export     {         Depends { name: "cpp" }         cpp.link: false //<---- warning     }     Depends { name: "cpp" } }   MyProject.qbs Project {     MyPluginItem     {         name: "MyPlugin"     }       QtApplication     {         Depends { name: "MyPlugin" } //<---- does not work, compilation fails with missing MyPlugin.lib         Depends { name: "MyPlugin"; cpp.link: false } //<---- works     } }   Is there a way to prevent the linking from the plugin's side short of dropping dependency on the cpp module? I was looking throughout the docs and the cpp.link flag seems the the best option albeit unavailable in the Export item. -------------- next part -------------- An HTML attachment was scrubbed... URL: From resurrection at centrum.cz Sun Oct 22 09:11:30 2017 From: resurrection at centrum.cz (resurrection at centrum.cz) Date: Sun, 22 Oct 2017 09:11:30 +0200 Subject: [Qbs] =?utf-8?q?How_to_make_=27cpp=2Elink=3A_false=27_part_of_th?= =?utf-8?q?e_Export_item_within_custom_item=3F?= In-Reply-To: 000000001a250004955403c89856 References: 000000001a250004955403c89856 Message-ID: <20171022091130.1D270397@centrum.cz> And I will answer myself as the answer was in the Parameters item documentation: http://doc.qt.io/qbs/parameters-item.html   ______________________________________________________________ > Od: > Komu: > Datum: 22.10.2017 08:24 > Předmět: [Qbs] How to make 'cpp.link: false' part of the > Having a custom Item I would like to disable linking to the dynamic library for all those that depend on it since it is a plugin just like what Jake talks about in the 1.9 release blog . Qbs generates the warning that cpp.link property was not declared when I place it in the Item's Export child item and the compilation fails with missing lib file. Simplified:   MyPluginItem.qbs DynamicLibrary {     Export     {         Depends { name: "cpp" }         cpp.link: false //<---- warning     }     Depends { name: "cpp" } }   MyProject.qbs Project {     MyPluginItem     {         name: "MyPlugin"     }       QtApplication     {         Depends { name: "MyPlugin" } //<---- does not work, compilation fails with missing MyPlugin.lib         Depends { name: "MyPlugin"; cpp.link: false } //<---- works     } }   Is there a way to prevent the linking from the plugin's side short of dropping dependency on the cpp module? I was looking throughout the docs and the cpp.link flag seems the the best option albeit unavailable in the Export item. ---------- _______________________________________________ Qbs mailing list Qbs at qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs -------------- next part -------------- An HTML attachment was scrubbed... URL: From nunosantos at imaginando.pt Mon Oct 23 00:17:24 2017 From: nunosantos at imaginando.pt (Nuno Santos) Date: Sun, 22 Oct 2017 23:17:24 +0100 Subject: [Qbs] darwin - Installing DynamicLibrary (Framework) dependencies on the resulting bundle Message-ID: <3EA93CF6-4947-4223-A690-C87C968C76BE@imaginando.pt> Hi, I’m trying to a application project depend on custom set of libraries. The libraries are referenced on the project and marked as dependencies. The project builds but crashes on launch because the dependencies are not copied as frameworks to the resulting bundle. Is this a limitation of qbs at the moment? qbs 1.9.1 / Qt 5.7.1 / Mac OSX Thx Regards, Nuno From Jake.Petroules at qt.io Mon Oct 23 02:43:55 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Mon, 23 Oct 2017 00:43:55 +0000 Subject: [Qbs] darwin - Installing DynamicLibrary (Framework) dependencies on the resulting bundle In-Reply-To: <3EA93CF6-4947-4223-A690-C87C968C76BE@imaginando.pt> References: <3EA93CF6-4947-4223-A690-C87C968C76BE@imaginando.pt> Message-ID: <9EE5EEA2-D7C6-4E4E-B7F4-1FDF6E5CEFAF@qt.io> Yes, framework embedding is not yet supported, although this is a high priority item for a future release. It may not make THE next release in part because we want to make sure the solution is general enough to be applicable to other platforms as well, such as embedding libraries into Android APKs. > On Oct 22, 2017, at 3:17 PM, Nuno Santos wrote: > > Hi, > > I’m trying to a application project depend on custom set of libraries. The libraries are referenced on the project and marked as dependencies. The project builds but crashes on launch because the dependencies are not copied as frameworks to the resulting bundle. Is this a limitation of qbs at the moment? > > qbs 1.9.1 / Qt 5.7.1 / Mac OSX > > Thx > > Regards, > > Nuno > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From nunosantos at imaginando.pt Mon Oct 23 10:07:08 2017 From: nunosantos at imaginando.pt (Nuno Santos) Date: Mon, 23 Oct 2017 09:07:08 +0100 Subject: [Qbs] darwin - Installing DynamicLibrary (Framework) dependencies on the resulting bundle In-Reply-To: <9EE5EEA2-D7C6-4E4E-B7F4-1FDF6E5CEFAF@qt.io> References: <3EA93CF6-4947-4223-A690-C87C968C76BE@imaginando.pt> <9EE5EEA2-D7C6-4E4E-B7F4-1FDF6E5CEFAF@qt.io> Message-ID: <3D58825D-3775-423C-AA10-17011EC1802F@imaginando.pt> Jake, Thanks for your reply. So… what are my options then? Can I link the libraries without being Frameworks, have them installed to my product output dir and link them and use them with my application? While I have already managed to create a lib from my shared resources, which depends on other libs, I still couldn’t use this shared lib in a small test project. It always fails when running because it can’t find the libraries. Yesterday I have also tried to make them static libraries without success. So far I was trying to setup this libs as DynamicLibrary with as a bundle. I have now removed the bundle dependency and property but it also didn’t worked. This is what I have at the moment: // workspace/qbs-app-test/qbs-app-tes.qbs - generated by QtCreator import qbs Project { references: ["../shared/shared.qbs"] minimumQbsVersion: "1.7.1" CppApplication { Depends { name: "Qt.core" } Depends { name: "Qt.quick" } Depends { name: "shared” } // << this is my shared library dependency property pathList qmlImportPaths: [] cpp.cxxLanguageVersion: "c++11" cpp.defines: ["QT_DEPRECATED_WARNINGS"] files: ["main.cpp", "qml.qrc"] Group { fileTagsFilter: product.type qbs.install: true qbs.installSourceBase: product.buildDirectory } } } // workspace/shared/shared.qbs import qbs Project { name: "shared" references: [ "external/3rd-party-lib-1/3rd-party-lib-1.qbs", "external/3rd-party-lib-2/3rd-party-lib-2.qbs" ] DynamicLibrary { Depends { name: "cpp" } cpp.includePaths: [".", "external/", "external/3rd-party-lib-1", "external/3rd-party-lib-2"] cpp.frameworks: ["CoreFoundation", "AppKit", "IOKit"] Depends { name: "parseqt" } Depends { name: "dsp" } Depends { name: "Qt"; submodules: ["core", "gui", "qml", "network", "quick"] } files: [...] Export { Depends { name: "cpp" } cpp.includePaths: [product.sourceDirectory] } } } When I run the project right now this is what happens: dyld: Library not loaded: 3rd-party-lib-1.framework/Versions/A/3rd-party-lib-1 Referenced from: /Users/nsantos/workspace/build-qbs-app-test-Desktop_Qt_5_7_1_clang_64bit2-Debug/qtc_Desktop_Qt_5_7_1_clang_64bit2_Debug/install-root/Library/Frameworks/shared.framework/Versions/A/shared Reason: image not found The program has unexpectedly finished. What am I missing here? Thanks! Regards, Nuno > On 23 Oct 2017, at 01:43, Jake Petroules wrote: > > Yes, framework embedding is not yet supported, although this is a high priority item for a future release. It may not make THE next release in part because we want to make sure the solution is general enough to be applicable to other platforms as well, such as embedding libraries into Android APKs. > >> On Oct 22, 2017, at 3:17 PM, Nuno Santos wrote: >> >> Hi, >> >> I’m trying to a application project depend on custom set of libraries. The libraries are referenced on the project and marked as dependencies. The project builds but crashes on launch because the dependencies are not copied as frameworks to the resulting bundle. Is this a limitation of qbs at the moment? >> >> qbs 1.9.1 / Qt 5.7.1 / Mac OSX >> >> Thx >> >> Regards, >> >> Nuno >> _______________________________________________ >> Qbs mailing list >> Qbs at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs > > -- > Jake Petroules - jake.petroules at qt.io > The Qt Company - Silicon Valley > Qbs build tool evangelist - qbs.io > From Jake.Petroules at qt.io Mon Oct 23 18:39:33 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Mon, 23 Oct 2017 16:39:33 +0000 Subject: [Qbs] darwin - Installing DynamicLibrary (Framework) dependencies on the resulting bundle In-Reply-To: <3D58825D-3775-423C-AA10-17011EC1802F@imaginando.pt> References: <3EA93CF6-4947-4223-A690-C87C968C76BE@imaginando.pt> <9EE5EEA2-D7C6-4E4E-B7F4-1FDF6E5CEFAF@qt.io> <3D58825D-3775-423C-AA10-17011EC1802F@imaginando.pt> Message-ID: For now you can work around the issue by installing the shared library to a location within your app bundle. You can install a framework by putting this inside the DynamicLibrary block: Group { fileTagsFilter: ["bundle.content"] qbs.install: true qbs.installDir: "MyApp.app/Contents/Frameworks" qbs.installSourceBase: product.buildDirectory } However if you're writing multiple plugins that all depend on the same shared library that's where it gets a little tricky. I think you're installing your software as a series of plugins that get placed at $HOME/Library/Plug-Ins, right? If so, then: Group { fileTagsFilter: ["bundle.content"] qbs.install: true qbs.installDir: "Library/Frameworks" qbs.installSourceBase: product.buildDirectory } should be sufficient. You'll also likely want to set cpp.sonamePrefix: "@rpath" on your shared framework, and then something like cpp.rpaths: ["@loader_path/../../../Frameworks"] on your plugins (exact number of ../ will vary depending on your install layout). Do I understand correctly that this is about your audio plugins project? If so, a listing of all the file paths that your installer currently creates on the system when your product is installed, would be helpful in terms of giving recommendations. For example, something like: $HOME/Library/PlugIns/XYZ.bundle/Contents/Info.plist $HOME/Library/PlugIns/XYZ.bundle/Contents/MacOS/XYZ $HOME/Library/PlugIns/XYZ.bundle/Contents/Resources/blah $HOME/Library/PlugIns/Other.bundle/Contents/Info.plist $HOME/Library/PlugIns/Other.bundle/Contents/MacOS/Other $HOME/Library/PlugIns/Other.bundle/Contents/Resources/blah ... > On Oct 23, 2017, at 1:07 AM, Nuno Santos wrote: > > Jake, > > Thanks for your reply. > > So… what are my options then? Can I link the libraries without being Frameworks, have them installed to my product output dir and link them and use them with my application? > > While I have already managed to create a lib from my shared resources, which depends on other libs, I still couldn’t use this shared lib in a small test project. It always fails when running because it can’t find the libraries. Yesterday I have also tried to make them static libraries without success. > > So far I was trying to setup this libs as DynamicLibrary with as a bundle. I have now removed the bundle dependency and property but it also didn’t worked. > > This is what I have at the moment: > > // workspace/qbs-app-test/qbs-app-tes.qbs - generated by QtCreator > > import qbs > > Project { > references: ["../shared/shared.qbs"] > minimumQbsVersion: "1.7.1" > > CppApplication { > Depends { name: "Qt.core" } > Depends { name: "Qt.quick" } > Depends { name: "shared” } // << this is my shared library dependency > property pathList qmlImportPaths: [] > cpp.cxxLanguageVersion: "c++11" > > cpp.defines: ["QT_DEPRECATED_WARNINGS"] > > files: ["main.cpp", "qml.qrc"] > > Group { > fileTagsFilter: product.type > qbs.install: true > qbs.installSourceBase: product.buildDirectory > } > } > } > > // workspace/shared/shared.qbs > > import qbs > > Project { > name: "shared" > references: [ > "external/3rd-party-lib-1/3rd-party-lib-1.qbs", > "external/3rd-party-lib-2/3rd-party-lib-2.qbs" > ] > > DynamicLibrary { > Depends { name: "cpp" } > cpp.includePaths: [".", "external/", "external/3rd-party-lib-1", "external/3rd-party-lib-2"] > cpp.frameworks: ["CoreFoundation", "AppKit", "IOKit"] > Depends { name: "parseqt" } > Depends { name: "dsp" } > Depends { name: "Qt"; submodules: ["core", "gui", "qml", "network", "quick"] } > files: [...] > > Export { > Depends { name: "cpp" } > cpp.includePaths: [product.sourceDirectory] > } > } > } > > > When I run the project right now this is what happens: > > dyld: Library not loaded: 3rd-party-lib-1.framework/Versions/A/3rd-party-lib-1 > Referenced from: /Users/nsantos/workspace/build-qbs-app-test-Desktop_Qt_5_7_1_clang_64bit2-Debug/qtc_Desktop_Qt_5_7_1_clang_64bit2_Debug/install-root/Library/Frameworks/shared.framework/Versions/A/shared > Reason: image not found > The program has unexpectedly finished. > > > What am I missing here? > > Thanks! > > Regards, > > Nuno > >> On 23 Oct 2017, at 01:43, Jake Petroules wrote: >> >> Yes, framework embedding is not yet supported, although this is a high priority item for a future release. It may not make THE next release in part because we want to make sure the solution is general enough to be applicable to other platforms as well, such as embedding libraries into Android APKs. >> >>> On Oct 22, 2017, at 3:17 PM, Nuno Santos wrote: >>> >>> Hi, >>> >>> I’m trying to a application project depend on custom set of libraries. The libraries are referenced on the project and marked as dependencies. The project builds but crashes on launch because the dependencies are not copied as frameworks to the resulting bundle. Is this a limitation of qbs at the moment? >>> >>> qbs 1.9.1 / Qt 5.7.1 / Mac OSX >>> >>> Thx >>> >>> Regards, >>> >>> Nuno >>> _______________________________________________ >>> Qbs mailing list >>> Qbs at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/qbs >> >> -- >> Jake Petroules - jake.petroules at qt.io >> The Qt Company - Silicon Valley >> Qbs build tool evangelist - qbs.io >> > -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From resurrection at centrum.cz Tue Oct 24 23:30:42 2017 From: resurrection at centrum.cz (resurrection at centrum.cz) Date: Tue, 24 Oct 2017 23:30:42 +0200 Subject: [Qbs] qbs-autoproject Message-ID: <20171024233042.ADBE9522@centrum.cz> Hi everyone,   I would like to announce:   qbs-autoproject "A project file to end all project files." https://github.com/Resurr3ction/qbs-autoproject     It is the generic qbs project file that automatically detects projects, products and dependencies based on few configurable patterns and rules. I have written an extensive Readme that goes through various aspects of it.   You can try it immediately by just cloning the repository and opening the autoproject.qbs file to see it in action on the provided Example project.   I would like to express a huge thank you to the authors of Qbs as it was your work that allowed me to do this. Thank you!   In making this I had severe problems with probes getting often stuck in infinite loop. Simply closing the project and opening it again in Qt Creator fixed it most times but sometimes I had to delete the Qbs build directory to force it to regenerate the build-graph from scratch. Not quite sure if I can submit a proper bug-report for this so I am just mentioning it here. If you try it and run into it you might have better idea what is the issue.   Anyway, any feedback is of course very welcome!   Best wishes,   Michael Vlach  -------------- next part -------------- An HTML attachment was scrubbed... URL: From chgans at gmail.com Wed Oct 25 01:24:45 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Wed, 25 Oct 2017 12:24:45 +1300 Subject: [Qbs] qbs-autoproject In-Reply-To: <20171024233042.ADBE9522@centrum.cz> References: <20171024233042.ADBE9522@centrum.cz> Message-ID: <0afad241-86ed-7781-2302-e6f0d4ef7409@gmail.com> On 25/10/2017 10:30 AM, resurrection at centrum.cz wrote: > Hi everyone, > > I would like to announce: > > *qbs-autoproject* > > "A project file to end all project files." > > **https://github.com/Resurr3ction/qbs-autoproject Wow! It looks interesting, I will definitely give it a try on our project! > > It is the generic qbs project file that automatically detects projects, > products and dependencies based on few configurable patterns and rules. > I have written an extensive Readme that goes through various aspects of it. > > You can try it immediately by just cloning the repository and opening > the *autoproject.qbs* file to see it in action on the provided Example > project. > > I would like to express a huge thank you to the authors of Qbs as it was > your work that allowed me to do this. Thank you! > > In making this I had severe problems with probes getting often stuck in > infinite loop. Simply closing the project and opening it again in Qt > Creator fixed it most times but sometimes I had to delete the Qbs build > directory to force it to regenerate the build-graph from scratch. Not > quite sure if I can submit a proper bug-report for this so I am just > mentioning it here. If you try it and run into it you might have better > idea what is the issue. > > Anyway, any feedback is of course very welcome! > > Best wishes, > > Michael Vlach > > > > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > From chgans at gmail.com Wed Oct 25 04:18:44 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Wed, 25 Oct 2017 15:18:44 +1300 Subject: [Qbs] The case for *not* using Qbs Message-ID: Hi all, This is a friendly email, about something that i recently realised: Wide adoption of Qbs is limited by IDE support of Qbs. The case I have is: Our code base has 1 reference build system, and this is MSVC (and it sucks!). Since our products (not Qbs product, my company's product) runs on embedded Linux, the second build system used is qmake (we have a python script that kind-of parse MSVC solution/projects, and puke qmake files). Since the python script sucks too, some people have added support for CMake. And now there's me: I am/was considering adding support for Qbs. Why Qbs cannot win over CMake? The answer is IDE support for the build system. Apparently Visual Studio and Visual Code (works on Linux too!) now both support CMake in place of msvc, when (if it happens) will they support Qbs? I have co-worker who use Linux every-day, but yet they prefer Visual Code over QtC, and visual code doesn't support Qbs, at this stage there is no point in trying to push for Qbs, for this very simple reason Any thoughts? Chris From Jake.Petroules at qt.io Wed Oct 25 04:21:39 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Wed, 25 Oct 2017 02:21:39 +0000 Subject: [Qbs] The case for *not* using Qbs In-Reply-To: References: Message-ID: Qbs already has support for Visual Studio (https://doc-snapshots.qt.io/qbs/generators.html), and support for Xcode is in development and might make the 1.11 release. Visual Studio Code is rather interesting; no plans for that yet but it's something I definitely want to look at. > On Oct 24, 2017, at 7:18 PM, Christian Gagneraud wrote: > > Hi all, > > This is a friendly email, about something that i recently realised: > Wide adoption of Qbs is limited by IDE support of Qbs. > > The case I have is: > Our code base has 1 reference build system, and this is MSVC (and it sucks!). Since our products (not Qbs product, my company's product) runs on embedded Linux, the second build system used is qmake (we have a python script that kind-of parse MSVC solution/projects, and puke qmake files). Since the python script sucks too, some people have added support for CMake. And now there's me: I am/was considering adding support for Qbs. > > Why Qbs cannot win over CMake? The answer is IDE support for the build system. > > Apparently Visual Studio and Visual Code (works on Linux too!) now both support CMake in place of msvc, when (if it happens) will they support Qbs? > > I have co-worker who use Linux every-day, but yet they prefer Visual Code over QtC, and visual code doesn't support Qbs, at this stage there is no point in trying to push for Qbs, for this very simple reason > > Any thoughts? > > Chris > > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From chgans at gmail.com Wed Oct 25 04:49:41 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Wed, 25 Oct 2017 15:49:41 +1300 Subject: [Qbs] The case for *not* using Qbs In-Reply-To: References: Message-ID: <0f44d654-0286-a3dd-9173-7182af2140e8@gmail.com> On 25/10/2017 3:21 PM, Jake Petroules wrote: > Qbs already has support for Visual Studio > (https://doc-snapshots.qt.io/qbs/generators.html), and support for > Xcode is in development and might make the 1.11 release. That's true, but it's different, you cannot use the IDE to alter your project files, which is IMHO a limitation when you are a developer (as oppose to a reader or a builder). Don't get me wrong, i think the generators are cool. But what i'm talking here is support for Qbs inside the IDE. > Visual Studio Code is rather interesting; no plans for that yet but > it's something I definitely want to look at. Maybe an extension could be written, if their extension API allows for that. https://marketplace.visualstudio.com/items?itemName=twxs.cmake https://github.com/twxs/vs.language.cmake Chris > >> On Oct 24, 2017, at 7:18 PM, Christian Gagneraud >> wrote: >> >> Hi all, >> >> This is a friendly email, about something that i recently >> realised: Wide adoption of Qbs is limited by IDE support of Qbs. >> >> The case I have is: Our code base has 1 reference build system, and >> this is MSVC (and it sucks!). Since our products (not Qbs product, >> my company's product) runs on embedded Linux, the second build >> system used is qmake (we have a python script that kind-of parse >> MSVC solution/projects, and puke qmake files). Since the python >> script sucks too, some people have added support for CMake. And now >> there's me: I am/was considering adding support for Qbs. >> >> Why Qbs cannot win over CMake? The answer is IDE support for the >> build system. >> >> Apparently Visual Studio and Visual Code (works on Linux too!) now >> both support CMake in place of msvc, when (if it happens) will they >> support Qbs? >> >> I have co-worker who use Linux every-day, but yet they prefer >> Visual Code over QtC, and visual code doesn't support Qbs, at this >> stage there is no point in trying to push for Qbs, for this very >> simple reason >> >> Any thoughts? >> >> Chris >> >> _______________________________________________ Qbs mailing list >> Qbs at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs > From Jake.Petroules at qt.io Wed Oct 25 05:21:50 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Wed, 25 Oct 2017 03:21:50 +0000 Subject: [Qbs] The case for *not* using Qbs In-Reply-To: <0f44d654-0286-a3dd-9173-7182af2140e8@gmail.com> References: <0f44d654-0286-a3dd-9173-7182af2140e8@gmail.com> Message-ID: <2E29099D-FD1C-4CEC-A813-34D967ED645B@qt.io> > On Oct 24, 2017, at 7:49 PM, Christian Gagneraud wrote: > > On 25/10/2017 3:21 PM, Jake Petroules wrote: >> Qbs already has support for Visual Studio >> (https://doc-snapshots.qt.io/qbs/generators.html), and support for >> Xcode is in development and might make the 1.11 release. > > That's true, but it's different, you cannot use the IDE to alter your project files, which is IMHO a limitation when you are a developer (as oppose to a reader or a builder). > Don't get me wrong, i think the generators are cool. But what i'm talking here is support for Qbs inside the IDE. And you cannot use the IDE to alter your CMake project files either, so what's the actual difference here? >> Visual Studio Code is rather interesting; no plans for that yet but >> it's something I definitely want to look at. > > Maybe an extension could be written, if their extension API allows for that. > > https://marketplace.visualstudio.com/items?itemName=twxs.cmake > https://github.com/twxs/vs.language.cmake These are merely syntax highlighters, not full integrations in the sense of Qbs' Qt Creator integration. > Chris > > >>> On Oct 24, 2017, at 7:18 PM, Christian Gagneraud >>> wrote: >>> Hi all, >>> This is a friendly email, about something that i recently >>> realised: Wide adoption of Qbs is limited by IDE support of Qbs. >>> The case I have is: Our code base has 1 reference build system, and >>> this is MSVC (and it sucks!). Since our products (not Qbs product, >>> my company's product) runs on embedded Linux, the second build >>> system used is qmake (we have a python script that kind-of parse >>> MSVC solution/projects, and puke qmake files). Since the python >>> script sucks too, some people have added support for CMake. And now >>> there's me: I am/was considering adding support for Qbs. >>> Why Qbs cannot win over CMake? The answer is IDE support for the >>> build system. >>> Apparently Visual Studio and Visual Code (works on Linux too!) now >>> both support CMake in place of msvc, when (if it happens) will they >>> support Qbs? >>> I have co-worker who use Linux every-day, but yet they prefer >>> Visual Code over QtC, and visual code doesn't support Qbs, at this >>> stage there is no point in trying to push for Qbs, for this very >>> simple reason >>> Any thoughts? >>> Chris >>> _______________________________________________ Qbs mailing list Qbs at qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs > -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From chgans at gmail.com Wed Oct 25 05:49:34 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Wed, 25 Oct 2017 16:49:34 +1300 Subject: [Qbs] The case for *not* using Qbs In-Reply-To: <2E29099D-FD1C-4CEC-A813-34D967ED645B@qt.io> References: <0f44d654-0286-a3dd-9173-7182af2140e8@gmail.com> <2E29099D-FD1C-4CEC-A813-34D967ED645B@qt.io> Message-ID: <3da8ea78-574b-c558-10d3-a6dc4d7eeab6@gmail.com> On 25/10/2017 4:21 PM, Jake Petroules wrote: > > >> On Oct 24, 2017, at 7:49 PM, Christian Gagneraud >> wrote: >> >> On 25/10/2017 3:21 PM, Jake Petroules wrote: >>> Qbs already has support for Visual Studio >>> (https://doc-snapshots.qt.io/qbs/generators.html), and support >>> for Xcode is in development and might make the 1.11 release. >> >> That's true, but it's different, you cannot use the IDE to alter >> your project files, which is IMHO a limitation when you are a >> developer (as oppose to a reader or a builder). Don't get me wrong, >> i think the generators are cool. But what i'm talking here is >> support for Qbs inside the IDE. > > And you cannot use the IDE to alter your CMake project files either, > so what's the actual difference here? > >>> Visual Studio Code is rather interesting; no plans for that yet >>> but it's something I definitely want to look at. >> >> Maybe an extension could be written, if their extension API allows >> for that. >> >> https://marketplace.visualstudio.com/items?itemName=twxs.cmake >> https://github.com/twxs/vs.language.cmake > > These are merely syntax highlighters, not full integrations in the > sense of Qbs' Qt Creator integration. Ok, I see, the CMake plugin is actually a "Language support" plugin, not a "Build system" plugin and it looks like there is no "Build system" concept in their extension API. Chris From xbenlau at gmail.com Wed Oct 25 16:05:54 2017 From: xbenlau at gmail.com (Ben Lau) Date: Wed, 25 Oct 2017 22:05:54 +0800 Subject: [Qbs] Install hidden files Message-ID: Hello, I am using qbs to install a set of static files from a directory, but I found that hidden files (the file begin with ".") was not copied to target path. How can I force qbs to include hidden files? That is my qbs import qbs Product { Group { name: "all" files: "*" prefix: "static/" qbs.install: true qbs.installSourceBase: "." qbs.installRoot: "/tmp" } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.kandeler at qt.io Wed Oct 25 16:38:06 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Wed, 25 Oct 2017 16:38:06 +0200 Subject: [Qbs] Install hidden files In-Reply-To: References: Message-ID: <20171025163806.5e8f45f2@ckandeler-archlinux> On Wed, 25 Oct 2017 22:05:54 +0800 Ben Lau wrote: > I am using qbs to install a set of static files from a directory, but I > found that hidden files (the file begin with ".") was not copied to target > path. How can I force qbs to include hidden files? This is https://bugreports.qt.io/browse/QBS-1144. The proposed patch has some issues, so it hasn't been fixed yet. If you don't have too many of these hidden files, a possible workaround (or even the proper solution) could be to list them separately by name. Christian From denis.shienkov at gmail.com Thu Oct 26 18:33:35 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Thu, 26 Oct 2017 19:33:35 +0300 Subject: [Qbs] QBS integration with QtC 'issues' and/or 'compile output' panes Message-ID: <18d29ace-c858-57c2-72f0-c1ed7c76c660@gmail.com> Hi guys, Let's imagine a situation, then we use a some custom utility to pre-process a list of input source files (*.c, *.cpp). E.g. this utility checks the source code on some errors (like a static analyser), and prints out a numbers of lines, where it found some errors or warnings. To use this utility, we in usual way add some Rule, which receives an inputs: [ 'c', 'cpp' ], transforms it to output artifact, e.g. to some file with results. As I said before, the utility also prints out a results to the stdin/stderr, and I see this output inside of QtC "Compile Output" pane. So, my questions are: 1) Is it possible to duplicate this warnings/errors to the "Issues" windows, e.g. as it is done for compilers/linkers? 2) Is it possible that when I click on this 'issue' (as from "Issues" or from "Compile Output" pane), automatically it gets to the appropriate source file (to that line, where this issue occurred)? BR, Denis From ola at silentwings.no Thu Oct 26 20:28:09 2017 From: ola at silentwings.no (=?UTF-8?Q?Ola_R=C3=B8er_Thorsen?=) Date: Thu, 26 Oct 2017 20:28:09 +0200 Subject: [Qbs] Detecting changes in files inside .qrc-files automatically? Message-ID: Hi, I'm trying out qbs by building an existing Qt Quick-application normally being built with qmake. I've got my qml files in a qml.qrc file, and have included this qrc file in the files list in my qbs file. Everything builds fine from scratch. However it does not seem like qbs is able to detect if any of the qml files inside the qrc file have changed, so incremental builds where only qml files were modified do not work. Do I have to add the qml files to the qbs file as well as to the qrc-file, or did I miss something else? Best regards, Ola -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jake.Petroules at qt.io Thu Oct 26 20:31:38 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Thu, 26 Oct 2017 18:31:38 +0000 Subject: [Qbs] Detecting changes in files inside .qrc-files automatically? In-Reply-To: References: Message-ID: <31187AD5-CC67-415A-BA6F-E6C8E934FF2F@qt.io> This is supposed to work, but there may be a bug in the qrc scanner (QBS-697). Can you update that issue with an exact set of steps to reproduce the issue? We tried to reproduce it before but could not. > On Oct 26, 2017, at 11:28 AM, Ola Røer Thorsen wrote: > > Hi, > > I'm trying out qbs by building an existing Qt Quick-application normally being built with qmake. I've got my qml files in a qml.qrc file, and have included this qrc file in the files list in my qbs file. > > Everything builds fine from scratch. However it does not seem like qbs is able to detect if any of the qml files inside the qrc file have changed, so incremental builds where only qml files were modified do not work. > > Do I have to add the qml files to the qbs file as well as to the qrc-file, or did I miss something else? > > Best regards, > Ola > > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From ola at silentwings.no Thu Oct 26 20:35:57 2017 From: ola at silentwings.no (=?UTF-8?Q?Ola_R=C3=B8er_Thorsen?=) Date: Thu, 26 Oct 2017 20:35:57 +0200 Subject: [Qbs] Detecting changes in files inside .qrc-files automatically? In-Reply-To: <31187AD5-CC67-415A-BA6F-E6C8E934FF2F@qt.io> References: <31187AD5-CC67-415A-BA6F-E6C8E934FF2F@qt.io> Message-ID: 2017-10-26 20:31 GMT+02:00 Jake Petroules : > This is supposed to work, but there may be a bug in the qrc scanner > (QBS-697). > > Can you update that issue with an exact set of steps to reproduce the > issue? We tried to reproduce it before but could not. > > Sure. I'll see if I can isolate the issue and upload some code to reproduce it. Best regards, Ola -------------- next part -------------- An HTML attachment was scrubbed... URL: From larsivi at gmail.com Thu Oct 26 20:48:34 2017 From: larsivi at gmail.com (Lars Ivar Igesund) Date: Thu, 26 Oct 2017 18:48:34 +0000 Subject: [Qbs] Detecting changes in files inside .qrc-files automatically? In-Reply-To: References: <31187AD5-CC67-415A-BA6F-E6C8E934FF2F@qt.io> Message-ID: At least one alternative is to drop the qrc file altogether, put your QML files in one or more groups with fileTags: "qt.core.resource_data", and (optionally I think) set Qt.core.resource* properties on the product. I found this to be much cleaner, and it made it much simpler to put generated files into the resources. Best regards, Lars Ivar Igesund On Thu, Oct 26, 2017 at 8:36 PM Ola Røer Thorsen wrote: > 2017-10-26 20:31 GMT+02:00 Jake Petroules : > >> This is supposed to work, but there may be a bug in the qrc scanner >> (QBS-697). >> >> Can you update that issue with an exact set of steps to reproduce the >> issue? We tried to reproduce it before but could not. >> >> > Sure. I'll see if I can isolate the issue and upload some code to > reproduce it. > > Best regards, > Ola > > > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ola at silentwings.no Thu Oct 26 21:03:40 2017 From: ola at silentwings.no (=?UTF-8?Q?Ola_R=C3=B8er_Thorsen?=) Date: Thu, 26 Oct 2017 21:03:40 +0200 Subject: [Qbs] Detecting changes in files inside .qrc-files automatically? In-Reply-To: References: <31187AD5-CC67-415A-BA6F-E6C8E934FF2F@qt.io> Message-ID: 2017-10-26 20:48 GMT+02:00 Lars Ivar Igesund : > At least one alternative is to drop the qrc file altogether, put your QML > files in one or more groups with fileTags: "qt.core.resource_data", and > (optionally I think) set Qt.core.resource* properties on the product. I > found this to be much cleaner, and it made it much simpler to put generated > files into the resources. > > Thanks, that might be useful. Right now I'm still evaluating if it's the right time to leave qmake or not, so I'm creating a qbs project along with the old qmake one. I've updated the bug with my findings so far ( https://bugreports.qt.io/browse/QBS-697). I think this issue should be re-opened, it looks like some rather subtle bug. Best regards, Ola > Best regards, > Lars Ivar Igesund > > On Thu, Oct 26, 2017 at 8:36 PM Ola Røer Thorsen > wrote: > >> 2017-10-26 20:31 GMT+02:00 Jake Petroules : >> >>> This is supposed to work, but there may be a bug in the qrc scanner >>> (QBS-697). >>> >>> Can you update that issue with an exact set of steps to reproduce the >>> issue? We tried to reproduce it before but could not. >>> >>> >> Sure. I'll see if I can isolate the issue and upload some code to >> reproduce it. >> >> Best regards, >> Ola >> >> >> _______________________________________________ >> Qbs mailing list >> Qbs at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qbs >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.kandeler at qt.io Fri Oct 27 10:39:20 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Fri, 27 Oct 2017 10:39:20 +0200 Subject: [Qbs] QBS integration with QtC 'issues' and/or 'compile output' panes In-Reply-To: <18d29ace-c858-57c2-72f0-c1ed7c76c660@gmail.com> References: <18d29ace-c858-57c2-72f0-c1ed7c76c660@gmail.com> Message-ID: <20171027103920.213bbca3@ckandeler-archlinux> On Thu, 26 Oct 2017 19:33:35 +0300 Denis Shienkov wrote: > Let's imagine a situation, then we use a some custom utility to > pre-process a list of input source files (*.c, *.cpp). E.g. this utility > checks the source code on some errors (like a static analyser), and > prints out a numbers of lines, where it found some errors or warnings. > To use this utility, we in usual way add some Rule, which receives an > inputs: [ 'c', 'cpp' ], transforms it to output artifact, e.g. to some > file with results. As I said before, the utility also prints out a > results to the stdin/stderr, and I see this output inside of QtC > "Compile Output" pane. > > So, my questions are: > > 1) Is it possible to duplicate this warnings/errors to the "Issues" > windows, e.g. as it is done for compilers/linkers? This magic is done inside Qt Creator using hard-coded parsers for the different compilers. So if you are writing this tool yourself, you should be able to make that work by emulating the error output format of either GCC or MSVC. Just take a look at what their error messages look like and use the same structure. > 2) Is it possible that when I click on this 'issue' (as from "Issues" or > from "Compile Output" pane), automatically it gets to the appropriate > source file (to that line, where this issue occurred)? Same as above. Use the same way of embedding line and column information as GCC/MSVC. Note that there is nothing qbs-specific about this. Christian From chgans at gmail.com Fri Oct 27 12:52:48 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Fri, 27 Oct 2017 23:52:48 +1300 Subject: [Qbs] qbs-autoproject In-Reply-To: <0afad241-86ed-7781-2302-e6f0d4ef7409@gmail.com> References: <20171024233042.ADBE9522@centrum.cz> <0afad241-86ed-7781-2302-e6f0d4ef7409@gmail.com> Message-ID: <136e2c6a-8097-6507-c59d-895b69754b26@gmail.com> On 25/10/17 12:24, Christian Gagneraud wrote: > On 25/10/2017 10:30 AM, resurrection at centrum.cz wrote: >> Hi everyone, >> >> I would like to announce: >> >> *qbs-autoproject* >> >> "A project file to end all project files." >> >> **https://github.com/Resurr3ction/qbs-autoproject > > Wow! It looks interesting, I will definitely give it a try on our > project! I watched the QtWS video about Qbs, and discovered the "qbs-create-project" command. I tried both tools on a somehow large project, qbs-autoproject tooks something like 10 to 15 minutes (as advertised), qbs-create-project was so fast that i thought it failed immediately. The 2 projects project have quite a different approach, but i see good things for both. I am interested by these tools, as for now, i have 2 of my own - customised for my very specific case: - A shell script (yes), it can generate the perfect set of qbs file from a set of msvc projects that allows me to use QtCreator as an editor, generated qbs files are unmaintainable, it takes a minute or so to execute. - Python code (WIP) that parse an msvc solution, and generate qbs files that allow me to fully use QtC and provide clean Qbs files. The python stuff doesn't work yet as i would like. qbs-autoproject generated an interesting file structure while qbs-create-project both in flat and hierarchy mode didn't suit me (when used in QtC). qbs-autoproject goes through a dependency analysis phase which is interesting but very slow (as advertised), guess what? My code base failed the acyclic test. Thank you for letting me know! ;) Luckily it is easy to fix. At this stage, i'm not sure if qbs-autoproject refused to write the qbs files, or if it allows to generate broken qbs files, that can then be fixed manually. After trying the "full" dependency-tracked custom Qbs (Export items), i decided that i don't want that. I like it, but I cannot afford so to speak. My DAG is so wild, that qbs fight to load it and i end up with Linux's limits.conf problems. Such as command line too long (true) and too many open files (Ubuntu's mistake). It's not clear to me how i can inject my initial qbs support files into the qbs-autoproject ones, maybe i just need to edit '.qbs-autoproject/' files. I found it hard to define "where the project is", "what the project name is", and "where is my custom stuff". I don't think that Qbs has and want a cpp parser in their dependency, but maybe a project generator plugin system (importer from a Qbs user POV) could allow for optional heavy dependencies. I'm just thinking loudly, I unfortunately didn't have much time to play with qbs-autoproject and qbs-create-project tools. Who wrote qbs-create-project by the way? Chris From denis.shienkov at gmail.com Fri Oct 27 13:21:47 2017 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Fri, 27 Oct 2017 14:21:47 +0300 Subject: [Qbs] QBS integration with QtC 'issues' and/or 'compile output' panes In-Reply-To: <20171027103920.213bbca3@ckandeler-archlinux> References: <18d29ace-c858-57c2-72f0-c1ed7c76c660@gmail.com> <20171027103920.213bbca3@ckandeler-archlinux> Message-ID: Christian, Ok, many thanks. From resurrection at centrum.cz Fri Oct 27 13:59:39 2017 From: resurrection at centrum.cz (resurrection at centrum.cz) Date: Fri, 27 Oct 2017 13:59:39 +0200 Subject: [Qbs] =?utf-8?q?qbs-autoproject?= In-Reply-To: 000000001a3b0004bf8c03ca9939 References: <20171024233042.ADBE9522@centrum.cz>, <0afad241-86ed-7781-2302-e6f0d4ef7409@gmail.com> 000000001a3b0004bf8c03ca9939 Message-ID: <20171027135939.B8CD4390@centrum.cz> Thanks for trying it out Christian! I will try to answer some of your questions:   > qbs-autoproject tooks something like 10 to 15 minutes (as advertised)   Take a look at https://github.com/Resurr3ction/qbs-autoproject#performance-tips if any of those could help you there. Particularly not using the contentPattern and removing unused items should help a lot. If you just want to see the structure (like the qbs-create-project does) you may disable the dependency scanner by setting dependencyMode = DependencyMode.Disabled.   > At this stage, i'm not sure if qbs-autoproject refused to write the qbs  > files, or if it allows to generate broken qbs files, that can then be  > fixed manually.   qbs-autoproject will write out only one file that will be named as your root directory. Since you cannot edit it (because it would be overwritten) I did not see any benefit in splitting it into multiple files. It is also easier to debug when all projects/products are in single file imho.   > After trying the "full" dependency-tracked custom Qbs (Export items), i  > decided that i don't want that. I like it, but I cannot afford so to  > speak. My DAG is so wild, that qbs fight to load it and i end up with  > Linux's limits.conf problems. Such as command line too long (true) and  > too many open files (Ubuntu's mistake).   Now this is interesting. Could you tell me more about these issues? Export item vs include-directory should not be a significant difference except for the cyclic dependency problem. Have you tried NoHeaderOnly dependencyMode?   > It's not clear to me how i can inject my initial qbs support files into  > the qbs-autoproject ones, maybe i just need to edit '.qbs-autoproject/'  > files. I found it hard to define "where the project is", "what the  > project name is", and "where is my custom stuff".   All your custom stuff should be done via custom items and modules. So in your case you would edit (or remove or add more) stuff in .autoproject/imports/ and then you would link these to the qbs-autproject via the `items` property - giving them the pattern etc.   ______________________________________________________________ > Od: Christian Gagneraud > Komu: qbs at qt-project.org > Datum: 27.10.2017 12:52 > Předmět: Re: [Qbs] qbs-autoproject > On 25/10/17 12:24, Christian Gagneraud wrote: > On 25/10/2017 10:30 AM, resurrection at centrum.cz wrote: >> Hi everyone, >> >> I would like to announce: >> >> *qbs-autoproject* >> >> "A project file to end all project files." >> >> **https://github.com/Resurr3ction/qbs-autoproject > > Wow! It looks interesting, I will definitely give it a try on our > project! I watched the QtWS video about Qbs, and discovered the "qbs-create-project" command. I tried both tools on a somehow large project, qbs-autoproject tooks something like 10 to 15 minutes (as advertised), qbs-create-project was so fast that i thought it failed immediately. The 2 projects project have quite a different approach, but i see good things for both. I am interested by these tools, as for now, i have 2 of my own - customised for my very specific case:  - A shell script (yes), it can generate the perfect set of qbs file from a set of msvc projects that allows me to use QtCreator as an editor, generated qbs files are unmaintainable, it takes a minute or so to execute.  - Python code (WIP) that parse an msvc solution, and generate qbs files that allow me to fully use QtC and provide clean Qbs files. The python stuff doesn't work yet as i would like. qbs-autoproject generated an interesting file structure while qbs-create-project both in flat and hierarchy mode didn't suit me (when used in QtC). qbs-autoproject goes through a dependency analysis phase which is interesting but very slow (as advertised), guess what? My code base failed the acyclic test. Thank you for letting me know! ;) Luckily it is easy to fix. At this stage, i'm not sure if qbs-autoproject refused to write the qbs files, or if it allows to generate broken qbs files, that can then be fixed manually. After trying the "full" dependency-tracked custom Qbs (Export items), i decided that i don't want that. I like it, but I cannot afford so to speak. My DAG is so wild, that qbs fight to load it and i end up with Linux's limits.conf problems. Such as command line too long (true) and too many open files (Ubuntu's mistake). It's not clear to me how i can inject my initial qbs support files into the qbs-autoproject ones, maybe i just need to edit '.qbs-autoproject/' files. I found it hard to define "where the project is", "what the project name is", and "where is my custom stuff". I don't think that Qbs has and want a cpp parser in their dependency, but maybe a project generator plugin system (importer from a Qbs user POV) could allow for optional heavy dependencies. I'm just thinking loudly, I unfortunately didn't have much time to play with qbs-autoproject and qbs-create-project tools. Who wrote qbs-create-project by the way? Chris _______________________________________________ Qbs mailing list Qbs at qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs -------------- next part -------------- An HTML attachment was scrubbed... URL: From chgans at gmail.com Sat Oct 28 02:33:43 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Sat, 28 Oct 2017 13:33:43 +1300 Subject: [Qbs] qbs-autoproject In-Reply-To: <20171027135939.B8CD4390@centrum.cz> References: <20171024233042.ADBE9522@centrum.cz> <0afad241-86ed-7781-2302-e6f0d4ef7409@gmail.com> <20171027135939.B8CD4390@centrum.cz> Message-ID: On 28/10/17 00:59, resurrection at centrum.cz wrote: > Thanks for trying it out Christian! I will try to answer some of your > questions: > > > qbs-autoproject tookssomething like 10 to 15 minutes (as advertised) > > Take a look > at https://github.com/Resurr3ction/qbs-autoproject#performance-tips if > any of those could help you there. Particularly not using the > contentPattern and removing unused items should help a lot. If you just > want to see the structure (like the qbs-create-project does) you may > disable the dependency scanner by setting dependencyMode = > DependencyMode.Disabled. I now have disabled the dependency, i will sort out that later. I have as well adjusted ignorePattern so that qbs-autoproject only see the "easy" sub directories, mainly static libraries > >> At this stage, i'm not sure if qbs-autoproject refused to write the qbs >> files, or if it allows to generate broken qbs files, that can then be >> fixed manually. > > qbs-autoproject will write out only one file that will be named as your > root directory. Since you cannot edit it (because it would be > overwritten) I did not see any benefit in splitting it into multiple > files. It is also easier to debug when all projects/products are in > single file imho. I'm fine with that. However, qbs-autoproject fails to write the final qbs file: $ qbs build No build graph exists yet for this configuration. Resolving project for configuration default Nos @ Sat Oct 28 2017 12:38:16 GMT+1300 (NZDT) -------------------------------------- Running steps... [1/11] Parsing configuration... Project root: /home/krys/Projects/nos-build-ng Output path: /home/krys/Projects/nos-build-ng/.autoproject Install path: /home/krys/Projects/nos-build-ng/default/install-root/linux,unix-undefined-gcc Output format: Tree Dependency mode: Disabled Items: AutoprojectApp AutoprojectDynamicLib AutoprojectPlugin AutoprojectStaticLib AutoprojectInclude AutoprojectDoc Modules: Qt [1/11] Done (0ms) [2/11] Scanning modules... Qt [2/11] Done (1ms) [3/11] Creating projects... <...> <- 1 project per subdir, recursively, starting with root [3/11] Done (715ms) [4/11] Creating products... <...> <- 1 static lib per subdir, recursively [4/11] Done (2390ms) [5/11] Merging products... [5/11] Done (173ms) [6/11] Consolidating products... <...> <- Wrong association are made here [6/11] Done (43859ms) [7/11] Cleaning projects... <...> <- Removes lot of empty project, including root :( [7/11] Done (1949ms) [8/11] Scanning dependencies... Dependencies disabled --- skipping [8/11] Done (0ms) [9/11] Finding includes... Dependencies disabled --- skipping [9/11] Done (0ms) [10/11] Setting dependencies... Dependencies disabled --- skipping [10/11] Done (0ms) [11/11] Writing project... ERROR: TypeError: Result of expression 'proj' [undefined] is not an object. I'm suspecting a completely empty top project. I think the problem comes from the consolidation phase: Imagine you start with only 2 top level folders, that are 2 libraries: - Feature - Topic If Topic contains a Feature sub-folder (which is not a library on it's own, it's just source code organisation), the the consolidation phase will merge Feature with Topic/Feature A simple use case: $ tree . . ├── project.qbs ├── Core │   ├── core.cpp │   ├── core.qbs │   └── Web │   ├── web.cpp │   └── web.h ├── Gui │   ├── gui.cpp │   ├── gui.qbs │   └── Web │   ├── web.cpp │   └── web.h └── Web ├── web.cpp ├── web.h └── web.qbs In this case the consolidator will merge Core/Web, Gui/Web with Web/ instead of simplifying to Core, Gui and Web as top libraries. >> After trying the "full" dependency-tracked custom Qbs (Export items), i >> decided that i don't want that. I like it, but I cannot afford so to >> speak. My DAG is so wild, that qbs fight to load it and i end up with >> Linux's limits.conf problems. Such as command line too long (true) and >> too many open files (Ubuntu's mistake). > > Now this is interesting. Could you tell me more about these issues? > Export item vs include-directory should not be a significant difference > except for the cyclic dependency problem. Have you tried NoHeaderOnly > dependencyMode? Let me clarify, this has nothing to do with qbs-autoproject, I have used my scripts as initial generator, and then manually polished the generated files. I have something like 150 products (apps and libs), the libraries have a complex inter-dependency. If I try to use the Export Item on each of these, i end up with an app build command that has lot of duplicated include search path (-I), a lot of duplicated library search path (-L) and a lot of duplicated link objects (-lfoo, -lbar, ...) This is where i hit the Linux limits.conf, I am not sure if I do it wrong thought. I as well hit the "too many open files" with qbs-autoproject, I have the feeling that it keeps all the source files open while scanning. JS File objects not garbage collected? >> It's not clear to me how i can inject my initial qbs support files into >> the qbs-autoproject ones, maybe i just need to edit '.qbs-autoproject/' >> files. I found it hard to define "where the project is", "what the >> project name is", and "where is my custom stuff". > > All your custom stuff should be done via custom items and modules. So in > your case you would edit (or remove or add more) stuff in > .autoproject/imports/ and then you would link these to the > qbs-autproject via the `items` property - giving them the pattern etc. Thanks, I get it now, this is pretty cool and very similar to how my python scripts work. What about the 'modules' property, why there is a 'Qt' module there with an hard coded include path? Is it just an example? I think i will want to use this feature, as i have a couple of special ThirdParty libraries. Thanks, Chris From chgans at gmail.com Sat Oct 28 07:02:57 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Sat, 28 Oct 2017 18:02:57 +1300 Subject: [Qbs] qbs-autoproject In-Reply-To: References: <20171024233042.ADBE9522@centrum.cz> <0afad241-86ed-7781-2302-e6f0d4ef7409@gmail.com> <20171027135939.B8CD4390@centrum.cz> Message-ID: <91d5a2f5-ee9a-f762-59ba-f3bfc20b6ca4@gmail.com> On 28/10/17 13:33, Christian Gagneraud wrote: > ERROR: TypeError: Result of expression 'proj' [undefined] is not an object. OK, got it now, first i had to set additionalDirectoriesPattern to .*, then bypass the consolidator (see my previous mail), and finally fix a bug when dependencies are disabled (the rootProject is not set to the output of the previous step, trivial fix, I'll do a pull request if you want). This look quite good now, But still have an error, i have one duplicated project... weird! To fix this i have to re-enable the consolidator, it seems it does good and bad things. Another problem in the generated qbs file, is that I still have subprojects for library having 'deep' subdirectory, eg /Foo/Bar/Baz. Libraries that have only one-level subdirectories are fine. Basically I have something like: . ├── Core │   ├── core.cpp │   ├── core.qbs │   └── Web │   ├── web.cpp │   └── web.h ├── Data │   ├── data.cpp │   ├── data.h │   ├── data.qbs │   └── foo │   ├── bar │   │   ├── bar.cpp │   │   ├── bar.h │   │   └── baz │   │   ├── baz.cpp │   │   └── baz.h │   ├── foo.cpp │   └── foo.h ├── Gui │   ├── gui.cpp │   ├── gui.qbs │   └── Web │   ├── web.cpp │   └── web.h ├── project.qbs └── Web ├── web.cpp ├── web.h └── web.qbs The above is one project with 4 libraries (Core, Data, Gui and Web) Which yield 2 problems: - Core/Web, Gui/Web are merged into /Web - Data/foo/bar and Data/foo/bar/baz are not merged into Data, but Data/foo is. Chris From resurrection at centrum.cz Sat Oct 28 09:02:38 2017 From: resurrection at centrum.cz (resurrection at centrum.cz) Date: Sat, 28 Oct 2017 09:02:38 +0200 Subject: [Qbs] =?utf-8?q?qbs-autoproject?= In-Reply-To: 000000001a3e0004c52403ca98d7 References: <20171024233042.ADBE9522@centrum.cz>, <0afad241-86ed-7781-2302-e6f0d4ef7409@gmail.com>, <20171027135939.B8CD4390@centrum.cz> 000000001a3e0004c52403ca98d7 Message-ID: <20171028090238.A0EF84A5@centrum.cz> We have discussed some configuration issues via separate e-mail but few things worth pointing out here: - I should likely call close() explicitly after reading a file. One gets spoiled from QFile's destructor. :-) That might alleviate the too many open files issue. I reckon it ultimately hits the OS limit on open file handles otherwise. - modules are for external dependencies like Qt or your custom made modules. The path is the one I use for Qt, you should put your path or remove it altogether if your project is not using Qt. - As mentioned the other issues are to do with configuration of the patterns as the described project is fairly standard. - I have tried it on legacy code base of 400+ products without optimizing or ignoring any patterns and while it took long the results seemed reasonable especially considering how messy it is. I will look into the performance issue for sure. And the readme should really be turned into the wiki. ______________________________________________________________ > Od: Christian Gagneraud > Komu: resurrection at centrum.cz, qbs at qt-project.org > Datum: 28.10.2017 02:33 > Předmět: Re: [Qbs] qbs-autoproject > On 28/10/17 00:59, resurrection at centrum.cz wrote: > Thanks for trying it out Christian! I will try to answer some of your > questions: > >  > qbs-autoproject tookssomething like 10 to 15 minutes (as advertised) > > Take a look > at https://github.com/Resurr3ction/qbs-autoproject#performance-tips if > any of those could help you there. Particularly not using the > contentPattern and removing unused items should help a lot. If you just > want to see the structure (like the qbs-create-project does) you may > disable the dependency scanner by setting dependencyMode = > DependencyMode.Disabled. I now have disabled the dependency, i will sort out that later. I have as well adjusted ignorePattern so that qbs-autoproject only see the "easy" sub directories, mainly static libraries > >> At this stage, i'm not sure if qbs-autoproject refused to write the qbs >> files, or if it allows to generate broken qbs files, that can then be >> fixed manually. > > qbs-autoproject will write out only one file that will be named as your > root directory. Since you cannot edit it (because it would be > overwritten) I did not see any benefit in splitting it into multiple > files. It is also easier to debug when all projects/products are in > single file imho. I'm fine with that. However, qbs-autoproject fails to write the final qbs file: $ qbs build No build graph exists yet for this configuration. Resolving project for configuration default Nos @ Sat Oct 28 2017 12:38:16 GMT+1300 (NZDT) -------------------------------------- Running steps... [1/11] Parsing configuration...     Project root: /home/krys/Projects/nos-build-ng     Output path: /home/krys/Projects/nos-build-ng/.autoproject     Install path: /home/krys/Projects/nos-build-ng/default/install-root/linux,unix-undefined-gcc     Output format: Tree     Dependency mode: Disabled     Items:         AutoprojectApp         AutoprojectDynamicLib         AutoprojectPlugin         AutoprojectStaticLib         AutoprojectInclude         AutoprojectDoc     Modules:         Qt [1/11] Done (0ms) [2/11] Scanning modules...     Qt [2/11] Done (1ms) [3/11] Creating projects... <...> <- 1 project per subdir, recursively, starting with root [3/11] Done (715ms) [4/11] Creating products... <...> <- 1 static lib per subdir, recursively [4/11] Done (2390ms) [5/11] Merging products... [5/11] Done (173ms) [6/11] Consolidating products... <...> <- Wrong association are made here [6/11] Done (43859ms) [7/11] Cleaning projects... <...> <- Removes lot of empty project, including root :( [7/11] Done (1949ms) [8/11] Scanning dependencies... Dependencies disabled --- skipping [8/11] Done (0ms) [9/11] Finding includes... Dependencies disabled --- skipping [9/11] Done (0ms) [10/11] Setting dependencies... Dependencies disabled --- skipping [10/11] Done (0ms) [11/11] Writing project... ERROR: TypeError: Result of expression 'proj' [undefined] is not an object. I'm suspecting a completely empty top project. I think the problem comes from the consolidation phase: Imagine you start with only 2 top level folders, that are 2 libraries: - Feature - Topic If Topic contains a Feature sub-folder (which is not a library on it's own, it's just source code organisation), the the consolidation phase will merge Feature with Topic/Feature A simple use case: $ tree . . ├── project.qbs ├── Core │   ├── core.cpp │   ├── core.qbs │   └── Web │       ├── web.cpp │       └── web.h ├── Gui │   ├── gui.cpp │   ├── gui.qbs │   └── Web │       ├── web.cpp │       └── web.h └── Web     ├── web.cpp     ├── web.h     └── web.qbs In this case the consolidator will merge Core/Web, Gui/Web with Web/ instead of simplifying to Core, Gui and Web as top libraries. >> After trying the "full" dependency-tracked custom Qbs (Export items), i >> decided that i don't want that. I like it, but I cannot afford so to >> speak. My DAG is so wild, that qbs fight to load it and i end up with >> Linux's limits.conf problems. Such as command line too long (true) and >> too many open files (Ubuntu's mistake). > > Now this is interesting. Could you tell me more about these issues? > Export item vs include-directory should not be a significant difference > except for the cyclic dependency problem. Have you tried NoHeaderOnly > dependencyMode? Let me clarify, this has nothing to do with qbs-autoproject, I have used my scripts as initial generator, and then manually polished the generated files. I have something like 150 products (apps and libs), the libraries have a complex inter-dependency. If I try to use the Export Item on each of these, i end up with an app build command that has lot of duplicated include search path (-I), a lot of duplicated library search path (-L) and a lot of duplicated link objects (-lfoo, -lbar, ...) This is where i hit the Linux limits.conf, I am not sure if I do it wrong thought. I as well hit the "too many open files" with qbs-autoproject, I have the feeling that it keeps all the source files open while scanning. JS File objects not garbage collected? >> It's not clear to me how i can inject my initial qbs support files into >> the qbs-autoproject ones, maybe i just need to edit '.qbs-autoproject/' >> files. I found it hard to define "where the project is", "what the >> project name is", and "where is my custom stuff". > > All your custom stuff should be done via custom items and modules. So in > your case you would edit (or remove or add more) stuff in > .autoproject/imports/ and then you would link these to the > qbs-autproject via the `items` property - giving them the pattern etc. Thanks, I get it now, this is pretty cool and very similar to how my python scripts work. What about the 'modules' property, why there is a 'Qt' module there with an hard coded include path? Is it just an example? I think i will want to use this feature, as i have a couple of special ThirdParty libraries. Thanks, Chris From chgans at gmail.com Sat Oct 28 15:19:02 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Sun, 29 Oct 2017 02:19:02 +1300 Subject: [Qbs] qbs-autoproject In-Reply-To: <20171028090238.A0EF84A5@centrum.cz> References: <20171024233042.ADBE9522@centrum.cz> <0afad241-86ed-7781-2302-e6f0d4ef7409@gmail.com> <20171027135939.B8CD4390@centrum.cz> <20171028090238.A0EF84A5@centrum.cz> Message-ID: On 28/10/17 20:02, resurrection at centrum.cz wrote: > We have discussed some configuration issues via separate e-mail but > few things worth pointing out here: > > - I should likely call close() explicitly after reading a file. One > gets spoiled from QFile's destructor. :-) That might alleviate the > too many open files issue. I reckon it ultimately hits the OS limit > on open file handles otherwise. Yes, Ubuntu has tight limits, but so far it has always pointed me to a defect of some sort. From an operating-system point of view, qbs-autoproject is consuming too many file descriptors. And this usually means 'leaks'. I might open an issue on that one. I'll try to remove the contentPattern in the 'items' property too, hopefully there won't be any needs to open all the files anymore. I only need Library, Application and UnitTest items that i can match by names. I do have other items, but i would like to ignore them for the moment. A desirable feature here would be to be able to control the order in witch the match are done, this way one could, for example, put specific patterns at the top, and catch-all at the bottom. In my case, i would like to match ignored first, then tests, then apps, everything else becomes library. It's not clear to me which stage of the pipeline is affected by the configuration probe and how a given stage (successive probes) is affected. > - modules are for external dependencies like Qt or your custom made > modules. The path is the one I use for Qt, you should put your path > or remove it altogether if your project is not using Qt. I got it, but why would you need to provide a path to Qt? Are you bypassing qbs-setup-qt and qmake? If it's just an example, I think using 'Qt' is misleading. > - As mentioned the other issues are to do with configuration of the > patterns as the described project is fairly standard. > > - I have tried it on legacy code base of 400+ products without > optimizing or ignoring any patterns and while it took long the > results seemed reasonable especially considering how messy it is. Glad to hear it worked on a legacy code base, I have a similar situation. > > I will look into the performance issue for sure. And the readme > should really be turned into the wiki. And a test framework? Ah, yeah, a JS library as well! ;) I'm just teasing, your project is great, I like very much the 'pipeline' approach, and the use of Qbs to boostrap a Qbs project is like the cherry on the cake! What if each stage of the pipeline had it's own configuration? Including an option to simply pass through. Or even crasier, a JSON or QML file in '.qbs-autoproject/' that defines the pipeline itself. Anyway, in my case, I have two choices: - parse msvs solution and project files, digest, generate - scan the filesystem, digest, generate The msvs is moving to "property files" (MS crap that make you feel you're solving problems), so i would like to implement a real XML parser, ideally in Qt/C++, but python will do in the first place. It's a vast subject, with very long meanders... The filesystem approach is interesting too, but it will pick up zombie cpp units and headers, I think i have black lists somewhere! ;) Which lead me to the use of 'path' for the user's item input files, I would prefer to use the explicit 'files' property. This could be solved with a filterOut at the writer stage, but this should actually be done earlier, b/c it does impact the dependency analysis. It would be great too to make the acyclic test failure a warning or an error. One might be interested to know if the test fails or not while using an 'internal' safety dependency-tracking mechanism. I do not know how you implemented the dependency tracking, thinking that you did it in JS simply blows my mind (I'm not a JS guy). Having said that, dependency tracking is more than C pre-processor stuff. Chris From resurrection at centrum.cz Sat Oct 28 17:43:48 2017 From: resurrection at centrum.cz (resurrection at centrum.cz) Date: Sat, 28 Oct 2017 17:43:48 +0200 Subject: [Qbs] =?utf-8?q?qbs-autoproject?= In-Reply-To: 000000001a410004cb2803ca98d5 References: <20171024233042.ADBE9522@centrum.cz>, <0afad241-86ed-7781-2302-e6f0d4ef7409@gmail.com>, <20171027135939.B8CD4390@centrum.cz>, <20171028090238.A0EF84A5@centrum.cz> 000000001a410004cb2803ca98d5 Message-ID: <20171028174348.6334A514@centrum.cz> > A desirable feature here would be to be able to control the order in > witch the match are done, this way one could, for example, put specific > patterns at the top, and catch-all at the bottom. The items are prioritized in order of their definition. I believe I do mention that somewhere in the Readme but it is way too long. If you look at the default patterns you will notice that static lib item indeed catches all that was not matched by any previous. So this is the feature already. > I might open an issue on that one. Yes please open the issue about the open files. > I got it, but why would you need to provide a path to Qt? Are you bypassing qbs-setup-qt and qmake? > If it's just an example, I think using 'Qt' is misleading. Path to Qt is part of Qt.core module that is only available in Product items. It is not accessible from Project. How do I know? I asked here and was told so. :-) So unfortunately it needs to be like this. > And a test framework? Ah, yeah, a JS library as well! ;) Trust me, I would in a heart beat. But the idea was to use self contained single file that does not rely on anything outside that file or QBs itself. > Which lead me to the use of 'path' for the user's item input files, I > would prefer to use the explicit 'files' property. This could be solved > with a filterOut at the writer stage, but this should actually be done > earlier, b/c it does impact the dependency analysis. You can very easily change it yourself (list of files is in project.product.files). However the whole point of the paths and wildcards is that you do not need to rescan the whole project when adding/removing files - only when changing whole projects or in need to update dependencies. But using list of specific files is certainly more traditional. I might add it as option. ______________________________________________________________ > Od: Christian Gagneraud > Komu: resurrection at centrum.cz, qbs at qt-project.org > Datum: 28.10.2017 15:19 > Předmět: Re: [Qbs] qbs-autoproject > On 28/10/17 20:02, resurrection at centrum.cz wrote: > We have discussed some configuration issues via separate e-mail but > few things worth pointing out here: > > - I should likely call close() explicitly after reading a file. One > gets spoiled from QFile's destructor. :-) That might alleviate the > too many open files issue. I reckon it ultimately hits the OS limit > on open file handles otherwise. Yes, Ubuntu has tight limits, but so far it has always pointed me to a defect of some sort. From an operating-system point of view, qbs-autoproject is consuming too many file descriptors. And this usually means 'leaks'. I might open an issue on that one. I'll try to remove the contentPattern in the 'items' property too, hopefully there won't be any needs to open all the files anymore. I only need Library, Application and UnitTest items that i can match by names. I do have other items, but i would like to ignore them for the moment. A desirable feature here would be to be able to control the order in witch the match are done, this way one could, for example, put specific patterns at the top, and catch-all at the bottom. In my case, i would like to match ignored first, then tests, then apps, everything else becomes library. It's not clear to me which stage of the pipeline is affected by the configuration probe and how a given stage (successive probes) is affected. > - modules are for external dependencies like Qt or your custom made > modules. The path is the one I use for Qt, you should put your path > or remove it altogether if your project is not using Qt. I got it, but why would you need to provide a path to Qt? Are you bypassing qbs-setup-qt and qmake? If it's just an example, I think using 'Qt' is misleading. > - As mentioned the other issues are to do with configuration of the > patterns as the described project is fairly standard. > > - I have tried it on legacy code base of 400+ products without > optimizing or ignoring any patterns and while it took long the > results seemed reasonable especially considering how messy it is. Glad to hear it worked on a legacy code base, I have a similar situation. > > I will look into the performance issue for sure. And the readme > should really be turned into the wiki. And a test framework? Ah, yeah, a JS library as well! ;) I'm just teasing, your project is great, I like very much the 'pipeline' approach, and the use of Qbs to boostrap a Qbs project is like the cherry on the cake! What if each stage of the pipeline had it's own configuration? Including an option to simply pass through. Or even crasier, a JSON or QML file in '.qbs-autoproject/' that defines the pipeline itself. Anyway, in my case, I have two choices: - parse msvs solution and project files, digest, generate - scan the filesystem, digest, generate The msvs is moving to "property files" (MS crap that make you feel you're solving problems), so i would like to implement a real XML parser, ideally in Qt/C++, but python will do in the first place. It's a vast subject, with very long meanders... The filesystem approach is interesting too, but it will pick up zombie cpp units and headers, I think i have black lists somewhere! ;) Which lead me to the use of 'path' for the user's item input files, I would prefer to use the explicit 'files' property. This could be solved with a filterOut at the writer stage, but this should actually be done earlier, b/c it does impact the dependency analysis. It would be great too to make the acyclic test failure a warning or an error. One might be interested to know if the test fails or not while using an 'internal' safety dependency-tracking mechanism. I do not know how you implemented the dependency tracking, thinking that you did it in JS simply blows my mind (I'm not a JS guy). Having said that, dependency tracking is more than C pre-processor stuff. Chris From Marc.Hueskens at aucos.de Sun Oct 29 15:59:49 2017 From: Marc.Hueskens at aucos.de (=?utf-8?Q?Marc_H=C3=BCskens?=) Date: Sun, 29 Oct 2017 15:59:49 +0100 Subject: [Qbs] How to run executable from install-root on osx? References: <009e01d34e67$6f41d620$4dc58260$@aucos.de> Message-ID: (I am sending this again to the mailing list, because the first time I wasn’t registered and I guess this is necessary.) > Hi everyone, > > we are having a bit of a problem here with osx. > > Building and installing our project to the default location works fine and as defined in the build step. > But when we try to start the executable with QtCreator, the creator starts the executable from the build directory, and not from the install-root (/bin). This results in a crash, because we are depending on shared libraries, config-files and others stuff. > On Windows and Linux the QtCreator runs the executables located in the install-root directory. Why is this different? > > Best regards, > Marc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jake.Petroules at qt.io Sun Oct 29 19:45:34 2017 From: Jake.Petroules at qt.io (Jake Petroules) Date: Sun, 29 Oct 2017 18:45:34 +0000 Subject: [Qbs] How to run executable from install-root on osx? In-Reply-To: References: <009e01d34e67$6f41d620$4dc58260$@aucos.de> Message-ID: Probably because you did not install your app bundle correctly. Group { fileTagsFilter: ["bundle.content"] qbs.install: true qbs.installSourceBase: product.buildDirectory } > On Oct 29, 2017, at 7:59 AM, Marc Hüskens wrote: > > (I am sending this again to the mailing list, because the first time I wasn’t registered and I guess this is necessary.) > > >> Hi everyone, >> >> we are having a bit of a problem here with osx. >> >> Building and installing our project to the default location works fine and as defined in the build step. >> But when we try to start the executable with QtCreator, the creator starts the executable from the build directory, and not from the install-root (/bin). This results in a crash, because we are depending on shared libraries, config-files and others stuff. >> On Windows and Linux the QtCreator runs the executables located in the install-root directory. Why is this different? >> >> Best regards, >> Marc >> > _______________________________________________ > Qbs mailing list > Qbs at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petroules at qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io From stephan.gatzka at gmail.com Mon Oct 30 11:49:38 2017 From: stephan.gatzka at gmail.com (Stephan Gatzka) Date: Mon, 30 Oct 2017 11:49:38 +0100 Subject: [Qbs] Build static and dynamic libraries Message-ID: <048f4a4b-fe62-0251-f8af-aa70de12651d@gmail.com> Hi all! I need to build form a single code basis both a static and a dynamic library. Because both are distinct products, I'm wondering howto write a qbs file without repeating the files section in both products: Project { Product { name: "p1" files: "f1.c" } Product { name: "p2" files: "f1.c" } } Any thoughts? Regards, Stephan -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5595 bytes Desc: S/MIME Cryptographic Signature URL: From christian.kandeler at qt.io Mon Oct 30 12:00:10 2017 From: christian.kandeler at qt.io (Christian Kandeler) Date: Mon, 30 Oct 2017 12:00:10 +0100 Subject: [Qbs] Build static and dynamic libraries In-Reply-To: <048f4a4b-fe62-0251-f8af-aa70de12651d@gmail.com> References: <048f4a4b-fe62-0251-f8af-aa70de12651d@gmail.com> Message-ID: <20171030120010.776f4d85@ckandeler-archlinux> On Mon, 30 Oct 2017 11:49:38 +0100 Stephan Gatzka wrote: > I need to build form a single code basis both a static and a dynamic > library. > > Because both are distinct products, I'm wondering howto write a qbs file > without repeating the files section in both products: > > Project { > Product { > name: "p1" > files: "f1.c" > } > > Product { > name: "p2" > files: "f1.c" > } > } One possible approach: --- MyFiles.qbs --- Group { files: "f1.c" } --- MyProject.qbs --- import "MyFiles.qbs" as MyFiles Project { Product { name: "p1" MyFiles { } } Product { name: "p2" MyFiles { } } } Christian From stephan.gatzka at gmail.com Mon Oct 30 18:35:49 2017 From: stephan.gatzka at gmail.com (Stephan Gatzka) Date: Mon, 30 Oct 2017 18:35:49 +0100 Subject: [Qbs] Build static and dynamic libraries In-Reply-To: <20171030120010.776f4d85@ckandeler-archlinux> References: <048f4a4b-fe62-0251-f8af-aa70de12651d@gmail.com> <20171030120010.776f4d85@ckandeler-archlinux> Message-ID: > One possible approach: > > --- MyFiles.qbs --- > Group { > files: "f1.c" > } > > --- MyProject.qbs --- > import "MyFiles.qbs" as MyFiles > > Project { > Product { > name: "p1" > MyFiles { } > } > > Product { > name: "p2" > MyFiles { } > } > } Thanks, that helped. Regards, Stephan -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5595 bytes Desc: S/MIME Cryptographic Signature URL: From chgans at gmail.com Tue Oct 31 00:42:33 2017 From: chgans at gmail.com (Christian Gagneraud) Date: Tue, 31 Oct 2017 12:42:33 +1300 Subject: [Qbs] build graph and dependency visualisation Message-ID: <4210d509-e3ab-0f7a-5674-e9b1a678bb7d@gmail.com> Hi, Is it possible to dump the build graph (eg for graphviz), and the products build dependencies. If not, are there any plan? Chris From b.terrier at gmail.com Tue Oct 31 15:59:47 2017 From: b.terrier at gmail.com (Benjamin TERRIER) Date: Tue, 31 Oct 2017 15:59:47 +0100 Subject: [Qbs] Passing unescaped flags to the linker Message-ID: Hi, I am experimenting with qbs and a gcc toolchain for an embedded arm device. Is there a way to pass unescaped flags to g++ when invoking the linker ? For instance I need to pass "--specs=nano.specs" to g++. If I put it in cpp.linkerFlags it does not work as qbs will escape it with "-Wl". I can put it in cpp.driverFlags, but then it get passed to every call to g++ which is useless and generates warning when using Clang Static Analyzer: clang.exe: warning: argument unused during compilation: '--specs=nano.specs' Thanks BR Benjamin Terrier From babun2000 at mail.ru Thu Oct 26 18:58:14 2017 From: babun2000 at mail.ru (=?UTF-8?B?0KHQtdGA0LPQtdC5?=) Date: Thu, 26 Oct 2017 16:58:14 -0000 Subject: [Qbs] =?utf-8?q?_qbs_adds_flags=2C_that_interrupt_building_in_cas?= =?utf-8?q?e_of_conflicting_flags?= Message-ID: <1509036770.164263866@f464.i.mail.ru> So i compile for ios and add this -fembed-bitcode flag to the linker. It is incompatible with -undefined, which is added unconditionally by qbs on darwin platforms. Bitcode is a requirement from apple store. Also -headerpad-max-install-names pproduces a warning when used with bitcode flag. Any thoughts? -------------- next part -------------- An HTML attachment was scrubbed... URL: