Modify

Ticket #7576 (closed Feature Requests: fixed)

Opened 18 months ago

Last modified 17 months ago

bjam/qt4: Allow extra flags for rcc

Reported by: frank.richter@… Owned by: jhunold
Milestone: Boost 1.53.0 Component: build
Version: Boost 1.52.0 Severity: Optimization
Keywords: Cc:

Description

The Qt4 rcc utility supports some useful command line options (e.g. compression) that unfortunately cannot be set when bjam's .qrc support is used.

The attached patch adds a feature “<rccflags>” that allows custom command line options to be passed to the Qt4 rcc utility.

Attachments

qt4-jam-rccflags.diff Download (654 bytes) - added by frank.richter@… 18 months ago.
<rccflags> feature to pass command line options to Qt4's rcc

Change History

Changed 18 months ago by frank.richter@…

<rccflags> feature to pass command line options to Qt4's rcc

comment:1 Changed 17 months ago by jhunold

I would like to add this to qt4.jam, but I'm missing:

  • some documentation
  • a short example
  • a test in v2/test/qt4 if possible.

If I get documentation and example I can derive a test myself, but that would take longer.

comment:2 Changed 17 months ago by frank.richter@…

Example, easy:

project my-qt-project :
                requirements
                <rccflags>"-compress 9 -threshold 10"
            ;

...enables more aggressive resource compression.

Documentation: what about:

--- qt4.jam.org	2012-10-26 10:43:46.602132564 +0200
+++ qt4.jam	2012-11-21 11:43:14.794037086 +0100
@@ -35,6 +35,21 @@
 #
 # This is consistent with Qt guidelines:
 # http://doc.trolltech.com/4.0/moc.html
+#
+# The .qrc processing utility supports various command line option (see
+# http://qt-project.org/doc/qt-4.8/rcc.html for a complete list). The
+# module provides default arguments for the "output file" and
+# "initialization function name" options. Other options can be set through
+# the <rccflags> build property. E.g. if you wish the compression settings
+# to be more aggressive than the defaults, you can apply them too all .qrc
+# files like this:
+#
+#   project my-qt-project :
+#               requirements
+#               <rccflags>"-compress 9 -threshold 10"
+#           ;
+#
+# Of course, this property can also be specified on individual targets.
 
 import modules ;
 import feature ;

Tests: can do (probably) — just didn't really write any test at all for bjam yet.

Looking back at the change, it might be better to put $(OPTIONS) _after_ -name $(>:B), as that would allow the user to override the default initialization function name – useful in case multiple .qrc files with the same name occur in a project. Or perhaps only if tastes differ. (Note the documentation snippet above is does not consider this alteration.)

comment:3 Changed 17 months ago by jhunold

  • Owner changed from vladimir_prus to jhunold
  • Status changed from new to assigned

comment:4 Changed 17 months ago by jhunold

  • Version changed from Boost 1.51.0 to Boost 1.52.0
  • Milestone changed from To Be Determined to Boost 1.53.0

comment:5 Changed 17 months ago by jhunold

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [81689]) Add <rccflags> to qt4.jam. Fixes #7576

Thanks to Frank Richter for the initial patch and documentation.

comment:6 Changed 17 months ago by jhunold

(In [81702]) Merge 81687,81688,81689 from /trunk

------------------------------------------------------------------------ r81687 | jhunold | 2012-12-03 09:27:30 +0100 (Mo, 03 Dez 2012) | 1 line

Disambiguate rcc calls in preparation for qt5 toolset ------------------------------------------------------------------------ r81688 | jhunold | 2012-12-03 09:27:44 +0100 (Mo, 03 Dez 2012) | 1 line

Adjust external link to qt-project.org ------------------------------------------------------------------------ r81689 | jhunold | 2012-12-03 09:28:09 +0100 (Mo, 03 Dez 2012) | 3 lines

Add <rccflags> to qt4.jam. Fixes #7576

Thanks to Frank Richter for the initial patch and documentation. ------------------------------------------------------------------------

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.