-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live Reload not working in version 2.18 #1
Comments
Hi, after you build and run the project with the Live Client Module, your application starts with Live Client features. You can press "Connect" to connect it to the Live Server, and use it just like the default Live Client. It sounds as if you have mistaken your application as the new server instead of the new client after building. Cheers, |
Thanks I update the Forum page:
Update: After getting this email from V-Play: after you build and run
the project with the Live Client Module, your application stars with
Live Client features. You can press "Connect" to connect it to the Live
Server, and use it just like the default Live Client. It sounds as if
you have mistaken your application as the new server instead of the new
client after building. Cheers, AlexI was able to figure out that Live
must first be present but not started, then you hit run->debug; the
first time this will ask you to accept or deny the request to Live
Client; after that it will connect; but you must click on Connect the
first time; that was what tripped me up.Thanks works great.
Also: to make life easier for Programmers
To make it easier for the Programmer; it would be nice to setup all
your .pro files like this:
# uncomment this line for Publishing#DEFINES += VPlayPUBLISHING#
Comment below DEFINES and CONFIG to turn off V-Play Live# uncomment
these two lines for Live Client Module and use live reloading with
custom C++ codeDEFINES += VPlayLiveCONFIG += v-play-live
Then in the main.cpp
At the top:
#ifdef VPlayLive // This line adds the Live Client Module and use
live reloading with your custom C++ code #include
<VPLiveClient>#endif
Replace the existing code with this:
#ifndef VPlayLive // use this during development #ifndef
VPlayPUBLISHING vplay.setMainQmlFileName(QStringLiteral("qml/Mai
n.qml")); // for PUBLISHING, use the entry point
below #else // use this instead of the above call to avoid
deployment of the qml files, // and compile them into the binary
with qt's resource system qrc // this is the preferred
deployment option for publishing games to the app stores, //
because then your qml files and js files are protected to avoid
deployment of your qml files and images, // also comment the
DEPLOYMENTFOLDERS command in the .pro file // also see the .pro
file for more
details vplay.setMainQmlFileName(QStringLiteral("qrc:/qml/Main.q
ml")); #endif engine.load(QUrl(vplay.mainQmlFileName()));#else
// to start your project as Live Client, comment (remove) the lines
"vplay.setMainQmlFileName ..." & "engine.load ...", // and uncomment
the line below VPlayLiveClient liveClient(&engine);#endif
Now you have defines for Publishing, and V-Play-Live, and only need to
edit your .pro file, and do not have to figure out what to comment and
un-comment, making for less mistakes.
I have made these changes to my projects and it works great; just have
to rebuild after making the changes in the .pro file.
Thanks
…On Sun, 2018-10-14 at 00:03 -0700, Alex Huber wrote:
Hi,
after you build and run the project with the Live Client Module, your
application stars with Live Client features. You can press "Connect"
to connect it to the Live Server, and use it just like the default
Live Client. It sounds as if you have mistaken your application as
the new server instead of the new client after building.
Cheers,
Alex
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c5
5493e4bb","name":"GitHub"},"entity":{"external_key":"github/V-
Play/VPlayCppQML-Example","title":"V-Play/VPlayCppQML-
Example","subtitle":"GitHub repository","main_image_url":"
https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open
in GitHub","url":"
***@***.***
in #1: Hi,\r\n\r\nafter you build and run the project with the Live
Client Module, your application stars with Live Client features. You
can press \"Connect\" to connect it to the Live Server, and use it
just like the default Live Client. It sounds as if you have mistaken
your application as the new server instead of the new client after
building.\r\n\r\nCheers,\r\nAlex"}],"action":{"name":"View
Issue","url":"
#1 (comment)
"}}}
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "
#1 (comment)
",
"url": "
#1 (comment)
",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
***@***.***": "MessageCard",
***@***.***": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [V-Play/VPlayCppQML-Example] Live Reload not working in
version 2.18 (#1)",
"sections": [
{
"text": "",
"activityTitle": "**Alex Huber**",
"activityImage": "
https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": ***@***.***",
"facts": [
]
}
],
"potentialAction": [
{
"name": "Add a comment",
***@***.***": "ActionCard",
"inputs": [
{
"isMultiLine": true,
***@***.***": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
***@***.***": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\":
\"IssueComment\",\n\"repositoryFullName\": \"V-Play/VPlayCppQML-
Example\",\n\"issueId\": 1,\n\"IssueComment\":
\"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
***@***.***": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\":
\"V-Play/VPlayCppQML-Example\",\n\"issueId\": 1\n}"
},
{
"targets": [
{
"os": "default",
"uri": "
#1 (comment)
"
}
],
***@***.***": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
***@***.***": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\":
392801483\n}"
}
],
"themeColor": "26292E"
}
]
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To reproduce:
Following this article: https://v-play.net/updates/release-2-16-1-live-code-reloading-with-custom-c-and-native-code-for-qt
I am using 2.18 on Arch Linux Manjaro so it should apply to this release.
Using this Project: https://github.com/V-Play/VPlayCppQML-Example
Making the changes that are commented out:
In Main:
in pro file:
Not sure what they mean by disabling auto start; does that mean you do not use this Live Popup; and instead just hit run debug?
If I hit run->Debug; it comes up with a Connecting box that does not connect, not even to a remote device.
I get the error that com.yourcompany.xyz is not defined; but it complies fine. If I remove the code by toggling the comments and hit run debug; it works fine; so its not the app; but the Live emulator.
I searched for this issue; only found pre 2.16 issues.
This is a very important feature; please help me to resolve this issue.
The text was updated successfully, but these errors were encountered: