Last Comment Bug 703434 - Add support for Qt resource files (qrc) which possible to pre-compile with rcc compiler
: Add support for Qt resource files (qrc) which possible to pre-compile with rc...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: ---
Assigned To: Oleg Romashin (:romaxa)
:
Mentors:
http://doc.qt.nokia.com/latest/rcc.html
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-17 16:06 PST by Oleg Romashin (:romaxa)
Modified: 2011-12-27 09:03 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Add QRC rcc resource compiler support for Qt port (6.42 KB, patch)
2011-11-17 16:09 PST, Oleg Romashin (:romaxa)
ted: review-
Details | Diff | Splinter Review
Add QRC rcc resource compiler support for Qt port (6.31 KB, patch)
2011-12-09 11:07 PST, Oleg Romashin (:romaxa)
mh+mozilla: review+
Details | Diff | Splinter Review
Report build back (1.14 KB, patch)
2011-12-27 09:03 PST, Oleg Romashin (:romaxa)
no flags Details | Diff | Splinter Review

Description Oleg Romashin (:romaxa) 2011-11-17 16:06:04 PST
The rcc tool is used to embed resources into a Qt application during the build process. It works by generating a C++ source file containing data specified in a Qt resource (.qrc) file.
Comment 1 Oleg Romashin (:romaxa) 2011-11-17 16:09:49 PST
Created attachment 575326 [details] [diff] [review]
Add QRC rcc resource compiler support for Qt port

I'm trying to hook-up simple test Qt example which is QML based, using qrc files and running gecko in child process.
Comment 2 Ted Mielczarek [:ted.mielczarek] 2011-11-22 06:55:03 PST
Comment on attachment 575326 [details] [diff] [review]
Add QRC rcc resource compiler support for Qt port

Review of attachment 575326 [details] [diff] [review]:
-----------------------------------------------------------------

::: config/autoconf.mk.in
@@ +175,5 @@
>  MOZ_PDF_PRINTING = @MOZ_PDF_PRINTING@
>  MOZ_CRASHREPORTER = @MOZ_CRASHREPORTER@
>  MOZ_HELP_VIEWER = @MOZ_HELP_VIEWER@
>  MOC= @MOC@
> +RCC= @RCC@

Please put spaces on either side of the =. (You can fix the MOC line above while you're here.)

::: config/rules.mk
@@ +1170,5 @@
>  # DEFINES and ACDEFINES are needed here to enable conditional compilation of Q_OBJECTs:
>  # 'moc' only knows about #defines it gets on the command line (-D...), not in
>  # included headers like mozilla-config.h
>  moc_%.cpp: %.h $(GLOBAL_DEPS)
> +	$(REPORT_BUILD)

REPORT_BUILD just got removed in bug 703456, so leave it out of here.

@@ +1179,5 @@
>  	$(ELOG) $(MOC) $(DEFINES) $(ACDEFINES) $(_VPATH_SRCS:.cc=.h) $(OUTOPTION)$@
>  
> +qrc_%.cpp: %.qrc $(GLOBAL_DEPS)
> +	$(REPORT_BUILD)
> +	$(ELOG) $(RCC) -name $(shell echo $@ | sed -e "s|qrc_||" -e "s|\.cpp||") $< $(OUTOPTION)$@

This is a bit ugly. I think you probably want to use $* here instead. (If you're building qrc_abc.cpp, then $* would be abc.)
Comment 3 Oleg Romashin (:romaxa) 2011-12-09 11:07:31 PST
Created attachment 580475 [details] [diff] [review]
Add QRC rcc resource compiler support for Qt port

Fixed comments
Comment 4 Mike Hommey [:glandium] 2011-12-25 23:38:51 PST
Comment on attachment 580475 [details] [diff] [review]
Add QRC rcc resource compiler support for Qt port

Review of attachment 580475 [details] [diff] [review]:
-----------------------------------------------------------------

Apart from the fact that the patch does more than advertized, looks good to me.
Comment 5 Oleg Romashin (:romaxa) 2011-12-26 20:50:44 PST
https://hg.mozilla.org/mozilla-central/rev/6f4f2e53694b
Comment 6 Ed Morley [:emorley] 2011-12-27 04:28:04 PST
Comment on attachment 580475 [details] [diff] [review]
Add QRC rcc resource compiler support for Qt port

Review of attachment 580475 [details] [diff] [review]:
-----------------------------------------------------------------

::: config/rules.mk
@@ -1187,3 @@
>  
>  moc_%.cc: %.cc $(GLOBAL_DEPS)
> -	$(REPORT_BUILD)

Bug 705332 restored REPORT_BUILD in all the other places from which it had been removed, so I think this needs to go back now as well.
Comment 7 Oleg Romashin (:romaxa) 2011-12-27 09:03:21 PST
Created attachment 584446 [details] [diff] [review]
Report build back

err... do I need new bug?

Note You need to log in before you can comment on or make changes to this bug.