Add support for Qt resource files (qrc) which possible to pre-compile with rcc compiler

RESOLVED FIXED

Status

()

Core
Build Config
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

6 years ago
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.
(Assignee)

Comment 1

6 years ago
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.
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #575326 - Flags: review?(ted.mielczarek)
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.)
Attachment #575326 - Flags: review?(ted.mielczarek) → review-
(Assignee)

Comment 3

6 years ago
Created attachment 580475 [details] [diff] [review]
Add QRC rcc resource compiler support for Qt port

Fixed comments
Attachment #575326 - Attachment is obsolete: true
Attachment #580475 - Flags: review?(ted.mielczarek)
(Assignee)

Updated

5 years ago
Attachment #580475 - Flags: review?(mh+mozilla)
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.
Attachment #580475 - Flags: review?(mh+mozilla) → review+
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/6f4f2e53694b
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Updated

5 years ago
Attachment #580475 - Flags: review?(ted.mielczarek)
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.
(Assignee)

Comment 7

5 years ago
Created attachment 584446 [details] [diff] [review]
Report build back

err... do I need new bug?
You need to log in before you can comment on or make changes to this bug.