diff mbox

[v2] qt5/qt5webchannel: add qwebchannel.js installation in /var/www

Message ID 1450890245-16195-1-git-send-email-corjon.j@ecagroup.com
State Accepted
Headers show

Commit Message

Julien Corjon Dec. 23, 2015, 5:04 p.m. UTC
To use webchannel in an application qwebchannel.js is needed but this file was not
installed.

Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
---
Changes v1 -> v2:
  - Replace installation path choise with /var/www (suggested by Thomas)
---
 package/qt5/qt5webchannel/qt5webchannel.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Yann E. MORIN Dec. 23, 2015, 6:24 p.m. UTC | #1
Julien, All,

On 2015-12-23 18:04 +0100, Julien Corjon spake thusly:
> To use webchannel in an application qwebchannel.js is needed but this file was not
> installed.
> 
> Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

However, I was having a look at our current package, and there's
something really odd that struck me. If the Qt5base examples are
enabled, then we define QT5WEBCHANNEL_INSTALL_TARGET_EXAMPLES but we
never use it.

As it seems you're using qt5webchannels, would you care having a look at
this examples stuff, please?

Regards,
Yann E. MORIN.

> ---
> Changes v1 -> v2:
>   - Replace installation path choise with /var/www (suggested by Thomas)
> ---
>  package/qt5/qt5webchannel/qt5webchannel.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/package/qt5/qt5webchannel/qt5webchannel.mk b/package/qt5/qt5webchannel/qt5webchannel.mk
> index cfb6da9..bd4257f 100644
> --- a/package/qt5/qt5webchannel/qt5webchannel.mk
> +++ b/package/qt5/qt5webchannel/qt5webchannel.mk
> @@ -35,6 +35,11 @@ define QT5WEBCHANNEL_INSTALL_STAGING_CMDS
>  	$(QT5_LA_PRL_FILES_FIXUP)
>  endef
>  
> +define QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT
> +        $(INSTALL) -m 0644 -D $(@D)/src/webchannel/qwebchannel.js \
> +		$(TARGET_DIR)/var/www/qwebchannel.js
> +endef
> +
>  ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
>  define QT5WEBCHANNEL_INSTALL_TARGET_QMLS
>  	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebChannel $(TARGET_DIR)/usr/qml/
> @@ -56,6 +61,7 @@ endif
>  define QT5WEBCHANNEL_INSTALL_TARGET_CMDS
>  	$(QT5WEBCHANNEL_INSTALL_TARGET_LIBS)
>  	$(QT5WEBCHANNEL_INSTALL_TARGET_QMLS)
> +	$(QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT)
>  endef
>  
>  $(eval $(generic-package))
> -- 
> 2.5.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Julien Corjon Dec. 23, 2015, 6:34 p.m. UTC | #2
Yann,

Le 23/12/2015 19:24, Yann E. MORIN a écrit :
> Julien, All,

>

> On 2015-12-23 18:04 +0100, Julien Corjon spake thusly:

>> To use webchannel in an application qwebchannel.js is needed but this file was not

>> installed.

>>

>> Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>

>

> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

>

> However, I was having a look at our current package, and there's

> something really odd that struck me. If the Qt5base examples are

> enabled, then we define QT5WEBCHANNEL_INSTALL_TARGET_EXAMPLES but we

> never use it.


I also notice this issue yesterday but I also notice that most of the qt 
modules (except qt5base) compile examples but don't install them in 
staging and target. Only the sources files are installed.

I would like fix the examples binary install of all the Qt modules and 
in the mean time fix the qwebchannel examples installation.

>

> As it seems you're using qt5webchannels, would you care having a look at

> this examples stuff, please?

>

> Regards,

> Yann E. MORIN.


Regards,

Julien
Yann E. MORIN Dec. 23, 2015, 6:42 p.m. UTC | #3
Julien, All,

On 2015-12-23 18:34 +0000, Julien CORJON spake thusly:
> Le 23/12/2015 19:24, Yann E. MORIN a écrit :
> > On 2015-12-23 18:04 +0100, Julien Corjon spake thusly:
> >> To use webchannel in an application qwebchannel.js is needed but this file was not
> >> installed.
> >>
> >> Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
> >
> > Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> >
> > However, I was having a look at our current package, and there's
> > something really odd that struck me. If the Qt5base examples are
> > enabled, then we define QT5WEBCHANNEL_INSTALL_TARGET_EXAMPLES but we
> > never use it.
> 
> I also notice this issue yesterday but I also notice that most of the qt 
> modules (except qt5base) compile examples but don't install them in 
> staging and target. Only the sources files are installed.
> 
> I would like fix the examples binary install of all the Qt modules and 
> in the mean time fix the qwebchannel examples installation.

OK, be my guest then! ;-)

However, before you actually work on it, I'd like our Qt5 experts chime
in and validate that something is to be fixed (may there's some
underlying reason not to install them)...

Thanks!

Regards,
Yann E. MORIN.
Julien Corjon Dec. 23, 2015, 7:46 p.m. UTC | #4
Yann,

Le 23/12/2015 19:42, Yann E. MORIN a écrit :
> Julien, All,

>

> On 2015-12-23 18:34 +0000, Julien CORJON spake thusly:

>> Le 23/12/2015 19:24, Yann E. MORIN a écrit :

>>> On 2015-12-23 18:04 +0100, Julien Corjon spake thusly:

>>>> To use webchannel in an application qwebchannel.js is needed but this file was not

>>>> installed.

>>>>

>>>> Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>

>>>

>>> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

>>>

>>> However, I was having a look at our current package, and there's

>>> something really odd that struck me. If the Qt5base examples are

>>> enabled, then we define QT5WEBCHANNEL_INSTALL_TARGET_EXAMPLES but we

>>> never use it.

>>

>> I also notice this issue yesterday but I also notice that most of the qt

>> modules (except qt5base) compile examples but don't install them in

>> staging and target. Only the sources files are installed.

>>

>> I would like fix the examples binary install of all the Qt modules and

>> in the mean time fix the qwebchannel examples installation.

>

> OK, be my guest then! ;-)

>

> However, before you actually work on it, I'd like our Qt5 experts chime

> in and validate that something is to be fixed (may there's some

> underlying reason not to install them)...


I cannot point any reason to have the source on the target (but no qmake 
and gcc to compile them) and no binaries...

If I want to try Qt examples I want to have only the binaries on the 
target and I can take a look on the sources on my host not the opposite ;)

Regards,
Julien
Thomas Petazzoni Dec. 23, 2015, 8:29 p.m. UTC | #5
Dear Julien Corjon,

On Wed, 23 Dec 2015 18:04:05 +0100, Julien Corjon wrote:
> To use webchannel in an application qwebchannel.js is needed but this file was not
> installed.
> 
> Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
> ---
> Changes v1 -> v2:
>   - Replace installation path choise with /var/www (suggested by Thomas)
> ---
>  package/qt5/qt5webchannel/qt5webchannel.mk | 6 ++++++
>  1 file changed, 6 insertions(+)

Applied, thanks.

Thomas
diff mbox

Patch

diff --git a/package/qt5/qt5webchannel/qt5webchannel.mk b/package/qt5/qt5webchannel/qt5webchannel.mk
index cfb6da9..bd4257f 100644
--- a/package/qt5/qt5webchannel/qt5webchannel.mk
+++ b/package/qt5/qt5webchannel/qt5webchannel.mk
@@ -35,6 +35,11 @@  define QT5WEBCHANNEL_INSTALL_STAGING_CMDS
 	$(QT5_LA_PRL_FILES_FIXUP)
 endef
 
+define QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT
+        $(INSTALL) -m 0644 -D $(@D)/src/webchannel/qwebchannel.js \
+		$(TARGET_DIR)/var/www/qwebchannel.js
+endef
+
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
 define QT5WEBCHANNEL_INSTALL_TARGET_QMLS
 	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebChannel $(TARGET_DIR)/usr/qml/
@@ -56,6 +61,7 @@  endif
 define QT5WEBCHANNEL_INSTALL_TARGET_CMDS
 	$(QT5WEBCHANNEL_INSTALL_TARGET_LIBS)
 	$(QT5WEBCHANNEL_INSTALL_TARGET_QMLS)
+	$(QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT)
 endef
 
 $(eval $(generic-package))