Re: [Qbs] Access "bundle.content" tag files
Copying directories is not a good idea because it can introduce undefined behavior to the build process, since the build system itself does not know which files were copied. Perhaps if you explain your use case in a wider context we can better understand the issue you're trying to solve. > On Jun 16, 2017, at 1:03 AM, Dorian Jicquel> wrote: > > Hi, > > > Thank you both for your answer, so if i want to copy every item from the > bundle, i have to check every file name and rebuild bundle directory from > scratch ? Old solution was better since i only had to copy the app directory > like this : File.copy(inputs.bundle[0]...) but anyway it's working so thank > you ! > > > Regards, > > > Dorian. > > > Le 15/06/2017 à 16:56, Jake Petroules a écrit : >> Also note that the old "bundle" tag was only assigned to the bundle >> *directory*, whereas bundle.content is assigned to all of the files which >> constitute the bundle (which is what you want). >> >>> On Jun 15, 2017, at 2:46 AM, Christian Kandeler >>> wrote: >>> >>> On Thu, 15 Jun 2017 11:04:31 +0200 >>> Dorian Jicquel wrote: >>> Before the update i used inputs.bundle[index] ( with "bundle" tag input ) to access every file from the tag but now i can't use inputs.bundle.content[index] ( "bundle.content" tag ? ) since i think the dot is used to access other objects in this case. >>> If the tag name is not a valid JavaScript identifier, you have to use the >>> alternative syntax: inputs["bundle.content"][index]. >>> >>> >>> Christian >>> ___ >>> Qbs mailing list >>> Qbs@qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/qbs > > ___ > Qbs mailing list > Qbs@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petrou...@qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io ___ Qbs mailing list Qbs@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [Qbs] Access "bundle.content" tag files
Hi, Thank you both for your answer, so if i want to copy every item from the bundle, i have to check every file name and rebuild bundle directory from scratch ? Old solution was better since i only had to copy the app directory like this : File.copy(inputs.bundle[0]...) but anyway it's working so thank you ! Regards, Dorian. Le 15/06/2017 à 16:56, Jake Petroules a écrit : Also note that the old "bundle" tag was only assigned to the bundle *directory*, whereas bundle.content is assigned to all of the files which constitute the bundle (which is what you want). On Jun 15, 2017, at 2:46 AM, Christian Kandelerwrote: On Thu, 15 Jun 2017 11:04:31 +0200 Dorian Jicquel wrote: Before the update i used inputs.bundle[index] ( with "bundle" tag input ) to access every file from the tag but now i can't use inputs.bundle.content[index] ( "bundle.content" tag ? ) since i think the dot is used to access other objects in this case. If the tag name is not a valid JavaScript identifier, you have to use the alternative syntax: inputs["bundle.content"][index]. Christian ___ Qbs mailing list Qbs@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs ___ Qbs mailing list Qbs@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [Qbs] Access "bundle.content" tag files
Also note that the old "bundle" tag was only assigned to the bundle *directory*, whereas bundle.content is assigned to all of the files which constitute the bundle (which is what you want). > On Jun 15, 2017, at 2:46 AM, Christian Kandeler> wrote: > > On Thu, 15 Jun 2017 11:04:31 +0200 > Dorian Jicquel wrote: > >> Before the update i used inputs.bundle[index] ( with "bundle" tag input >> ) to access every file from the tag but now i can't use >> inputs.bundle.content[index] ( "bundle.content" tag ? ) since i think >> the dot is used to access other objects in this case. > > If the tag name is not a valid JavaScript identifier, you have to use the > alternative syntax: inputs["bundle.content"][index]. > > > Christian > ___ > Qbs mailing list > Qbs@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qbs -- Jake Petroules - jake.petrou...@qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io ___ Qbs mailing list Qbs@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [Qbs] Access "bundle.content" tag files
On Thu, 15 Jun 2017 11:04:31 +0200 Dorian Jicquelwrote: > Before the update i used inputs.bundle[index] ( with "bundle" tag input > ) to access every file from the tag but now i can't use > inputs.bundle.content[index] ( "bundle.content" tag ? ) since i think > the dot is used to access other objects in this case. If the tag name is not a valid JavaScript identifier, you have to use the alternative syntax: inputs["bundle.content"][index]. Christian ___ Qbs mailing list Qbs@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs