* [Buildroot] [PATCH 1/1] qt5/qt5webchannel: add qwebchannel.js installation choice
@ 2015-12-23 12:12 Julien Corjon
2015-12-23 16:02 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Julien Corjon @ 2015-12-23 12:12 UTC (permalink / raw)
To: buildroot
To use webchannel in an application qwebchannel.js is needed but this file is not
installed. Add an option to fix that and let the user choose the location.
Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
---
package/qt5/qt5webchannel/Config.in | 12 ++++++++++++
package/qt5/qt5webchannel/qt5webchannel.mk | 7 +++++++
2 files changed, 19 insertions(+)
diff --git a/package/qt5/qt5webchannel/Config.in b/package/qt5/qt5webchannel/Config.in
index 218629a..3e6bb4e 100644
--- a/package/qt5/qt5webchannel/Config.in
+++ b/package/qt5/qt5webchannel/Config.in
@@ -9,3 +9,15 @@ config BR2_PACKAGE_QT5WEBCHANNEL
This package corresponds to the qt5webchannel module.
http://qt.io
+
+if BR2_PACKAGE_QT5WEBCHANNEL
+
+config BR2_PACKAGE_QT5WEBCHANNEL_JAVASCRIPT_FILE
+ string "qwebchannel.js installation path"
+ help
+ It might be useful for your application to install
+ qwebchannel.js file in a specific location on the target.
+
+ Leave path empty to cancel qwebchannel.js installation.
+
+endif
diff --git a/package/qt5/qt5webchannel/qt5webchannel.mk b/package/qt5/qt5webchannel/qt5webchannel.mk
index cfb6da9..6901764 100644
--- a/package/qt5/qt5webchannel/qt5webchannel.mk
+++ b/package/qt5/qt5webchannel/qt5webchannel.mk
@@ -35,6 +35,12 @@ define QT5WEBCHANNEL_INSTALL_STAGING_CMDS
$(QT5_LA_PRL_FILES_FIXUP)
endef
+ifneq ($(BR2_PACKAGE_QT5WEBCHANNEL_JAVASCRIPT_FILE),"")
+define QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT
+ $(INSTALL) -m 0644 -D $(@D)/src/webchannel/qwebchannel.js $(TARGET_DIR)$(BR2_PACKAGE_QT5WEBCHANNEL_JAVASCRIPT_FILE)/qwebchannel.js
+endef
+endif
+
ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
define QT5WEBCHANNEL_INSTALL_TARGET_QMLS
cp -dpfr $(STAGING_DIR)/usr/qml/QtWebChannel $(TARGET_DIR)/usr/qml/
@@ -56,6 +62,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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] qt5/qt5webchannel: add qwebchannel.js installation choice
2015-12-23 12:12 [Buildroot] [PATCH 1/1] qt5/qt5webchannel: add qwebchannel.js installation choice Julien Corjon
@ 2015-12-23 16:02 ` Thomas Petazzoni
2015-12-23 16:24 ` Julien CORJON
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-12-23 16:02 UTC (permalink / raw)
To: buildroot
Dear Julien Corjon,
On Wed, 23 Dec 2015 13:12:48 +0100, Julien Corjon wrote:
> To use webchannel in an application qwebchannel.js is needed but this file is not
> installed. Add an option to fix that and let the user choose the location.
>
> Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
It is not very usual to be able to customize the path where packages
install stuff. Can we fine a default sane location to install this
qwebchannel.js, and just install it there?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] qt5/qt5webchannel: add qwebchannel.js installation choice
2015-12-23 16:02 ` Thomas Petazzoni
@ 2015-12-23 16:24 ` Julien CORJON
2015-12-23 16:28 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Julien CORJON @ 2015-12-23 16:24 UTC (permalink / raw)
To: buildroot
Thomas, All,
Le 23/12/2015 17:02, Thomas Petazzoni a ?crit :
> Dear Julien Corjon,
>
> On Wed, 23 Dec 2015 13:12:48 +0100, Julien Corjon wrote:
>> To use webchannel in an application qwebchannel.js is needed but this file is not
>> installed. Add an option to fix that and let the user choose the location.
>>
>> Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
>
> It is not very usual to be able to customize the path where packages
> install stuff. Can we fine a default sane location to install this
> qwebchannel.js, and just install it there?
I should be agree with this, but in that case the javascript file should
be installed in a website hosting path. For my application this one is
in /usr/local/myApp/www for others it can be in an apache, lighttpd,
monkey, etc directory.
I'm not a web hosting expert, so if there is an generic path for that we
can remove that customisation and let the specific applications make a
symbolic link if they don't comply with the generic path.
Regards,
Julien
>
> Thanks,
>
> Thomas
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] qt5/qt5webchannel: add qwebchannel.js installation choice
2015-12-23 16:24 ` Julien CORJON
@ 2015-12-23 16:28 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-12-23 16:28 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 23 Dec 2015 16:24:20 +0000, Julien CORJON wrote:
> I should be agree with this, but in that case the javascript file should
> be installed in a website hosting path. For my application this one is
> in /usr/local/myApp/www for others it can be in an apache, lighttpd,
> monkey, etc directory.
>
> I'm not a web hosting expert, so if there is an generic path for that we
> can remove that customisation and let the specific applications make a
> symbolic link if they don't comply with the generic path.
Do like we do for all other Javascript packages (see jquery* packages):
define JQUERY_INSTALL_TARGET_CMDS
$(INSTALL) -m 0644 -D $(@D)/$(JQUERY_SOURCE) \
$(TARGET_DIR)/var/www/jquery.js
endef
define JQUERY_VALIDATION_INSTALL_TARGET_CMDS
$(INSTALL) -m 0644 -D $(@D)/dist/jquery.validate.min.js \
$(TARGET_DIR)/var/www/jquery.validate.js
endef
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-23 16:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23 12:12 [Buildroot] [PATCH 1/1] qt5/qt5webchannel: add qwebchannel.js installation choice Julien Corjon
2015-12-23 16:02 ` Thomas Petazzoni
2015-12-23 16:24 ` Julien CORJON
2015-12-23 16:28 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.