summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/webchannel/exampleassets.pri14
-rw-r--r--examples/webchannel/shared/qwebchannel.js (renamed from src/webchannel/qwebchannel.js)0
-rw-r--r--src/webchannel/resources.qrc2
3 files changed, 6 insertions, 10 deletions
diff --git a/examples/webchannel/exampleassets.pri b/examples/webchannel/exampleassets.pri
index bbdf656..094d4d8 100644
--- a/examples/webchannel/exampleassets.pri
+++ b/examples/webchannel/exampleassets.pri
@@ -1,12 +1,5 @@
# This adds the qwebchannel js library to an example, creating a self-contained bundle
-QTDIR_build {
- # Build from within Qt. Copy and install the reference lib.
- jslib = $$dirname(_QMAKE_CONF_)/src/webchannel/qwebchannel.js
- assetcopy.files = $$jslib
-} else {
- # This is what an actual 3rd party project would do.
- jslib = qwebchannel.js
-}
+jslib = $$PWD/shared/qwebchannel.js
# This installs all assets including qwebchannel.js, regardless of the source.
exampleassets.files += $$jslib
@@ -16,7 +9,10 @@ INSTALLS += exampleassets
!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
# Shadow build, copy all example assets.
- assetcopy.files = $$exampleassets.files
+ assetcopy.files += $$exampleassets.files
+} else {
+ # Just copy jslib - other assets are already in place.
+ assetcopy.files = $$jslib
}
assetcopy.path = $$OUT_PWD
diff --git a/src/webchannel/qwebchannel.js b/examples/webchannel/shared/qwebchannel.js
index 5b047c2..5b047c2 100644
--- a/src/webchannel/qwebchannel.js
+++ b/examples/webchannel/shared/qwebchannel.js
diff --git a/src/webchannel/resources.qrc b/src/webchannel/resources.qrc
index 319c07a..3e6476b 100644
--- a/src/webchannel/resources.qrc
+++ b/src/webchannel/resources.qrc
@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/qtwebchannel/">
- <file>qwebchannel.js</file>
+ <file alias="qwebchannel.js">../../examples/webchannel/shared/qwebchannel.js</file>
</qresource>
</RCC>