Message ID | 1450872768-27153-1-git-send-email-corjon.j@ecagroup.com |
---|---|
State | Superseded |
Headers | show |
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, 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 >
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
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))
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(+)