Marbledata for out of tree builds

Anton Lundin glance at acc.umu.se
Tue Mar 18 10:58:29 PDT 2014


On 18 March, 2014 - Lubomir I. Ivanov wrote:

> On 18 March 2014 18:29, Anton Lundin <glance at acc.umu.se> wrote:
> > On 18 March, 2014 - Lubomir I. Ivanov wrote:
> >
> >> On 18 March 2014 18:17, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> >> > On 18 March 2014 17:51, Anton Lundin <glance at acc.umu.se> wrote:
> >> >> Nowadays when i testbuild things for Qt4 and Qt5 ive started to build
> >> >> out of tree to make it easy to compare results.
> >> >>
> >> >> I'm not sure if creating a symlink is the best option, but it works for
> >> >> our main build environments so I'm sending this one out. If someone have
> >> >> a better idea how to solve it in a windows compatible way...
> >> >>
> >> >
> >> > on windows when i build a have marbledata copied in ./debug/ where the
> >> > binary goes and it runs fine without a symlink.
> >> > also when you, for example, create a desktop shortcut to
> >> > subsurface.exe, marble will still look for marbledata relative to the
> >> > location of subsurface.exe, so this works fine as well.
> >> >
> >> > while 'ln' is supposed to work from msys, i would suggest a:
> >> >
> >> > !win32 {
> >> > +marbledata.commands += $(CHK_DIR_EXISTS) $$OUT_PWD/marbledata || ln
> >> > -s $$PWD/marbledata $$OUT_PWD/marbledata
> >> > +all.depends += marbledata
> >> > +QMAKE_EXTRA_TARGETS += marbledata
> >> > +
> >> > }
> >>
> >> same applies to XSLT, i manually copy ./xslt to ./debug/xslt
> >> i guess this can be looked into at some point - e.g. copy marbledata
> >> and xslt to where the .exe is built...
> >>
> >
> > xslt's are built in as resources nowadays, so they get read from whats
> > inside the binary, but marbledata needs to be read by marble from a
> > file, so thats why i symlink it there.
> >
> 
> ok, forgot about the xslt's in the resource.
> 
> > This is so you won't need to copy anything around, you can just run the
> > binary from where its generated in the build directory, and it can look
> > in that directory and finds its marbledata.
> >
> 
> apparently msys's ln is buggy and does not support symbolic links to
> directories, while hardlinks require admin permissions.
> again the !win32 case seems legit.

Feels like we can just use a $(COPY_DIR) instead then. Thats supposed to
work across all platforms.

It won't catch any changes to the marbledata then, you would get your
data. Someone with a fetish for qmake could probably wip up some magic
dependency rules.

//Anton - Rerolling patch

-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list