[QBS] 'qbs run' working directory

Jake Petroules jake.petroules at petroules.com
Thu Aug 28 11:23:36 CEST 2014


This is what the installation functionality is for. In fact, `qbs run` automatically invokes `qbs install` beforehand. In your applications you should have:

Group {
	fileTagsFilter: product.type
	qbs.install: true
	qbs.installDir: "bin"
}

and in libraries:

Group {
	fileTagsFilter: product.type
	qbs.install: true
	qbs.installDir: "lib"
}

Of course, account for platform differences.

Never rely on file paths in the build directory, only rely on the install root. We consider the former to be a black box. I remember there was even a suggestion for making build directory names randomly generated to prevent people from relying on it. :)

See the following links for more info: http://qt-project.org/doc/qbs-1.3/installing-files.html & http://qt-project.org/doc/qbs-1.3/running-applications.html
-- 
Jake Petroules - jake.petroules at petroules.com
Chief Technology Officer - Petroules Corporation

On 2014-08-26, at 10:30 AM, Millian Poquet <millian.poquet at gmail.com> wrote:

> Hi,
> 
> I updated my qbs installation today from version 1.2.2 to version 1.3 (I am on Arch Linux).
> 
> Previously, when calling 'qbs run release' in the root directory R of my project, the executable working directory was R in version 1.2.2. However, it seems that in version 1.3 the working directory is now inside the build directory ([buildDir]/[profile]-release/[app].[profile]).
> 
> Since I'm using relative paths to load files, it causes me some bugs.
> I really liked the simplicity of just calling 'qbs run release' and I would like to avoid chaining commands like 'qbs release && [buildDir]/[profile]-release/[app].[profile]/[app]'.
> 
> I thought that the 'run' command was there to simplify this kind of issues and I wonder why the working directory had been changed.
> 
> Is there any way to tell qbs that I would like applications to be run in the root directory of their project (or just in the directory from where qbs had been called) ?
> 
> Regards,
> Millian
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs




More information about the Qbs mailing list