qtquickvcp / MachinekitSDK

Qt Creator extension for creating Machinekit applications
GNU Lesser General Public License v2.1
3 stars 6 forks source link

MachinekitSDK needs rework to work with Qt Creator 3.4 :-) #2

Closed the-snowwhite closed 9 years ago

the-snowwhite commented 9 years ago

Having commited change sets that get the sdk to compile out of the box with qc 3.3x the qtquick_install.sh script is broken once again within the same 24 hours. As it now installs qt 5.4.1 (ok) (but now)including qt 3.4 as default. Hmmm ...

(I just ran a quick test to confirm my suspision and compilation of mksdk failed with a:)
(/home/mib/tmpII/MachinekitSDK/qtcreator/plugins/bbioconfig/bbioconfigplugin.cpp:11:37: fatal error: coreplugin/mimedatabase.h: No such file or directory #include <coreplugin/mimedatabase.h>)

(No supprise at all as the functionality of file handling has been upgraded in the new incloded qbs v1.4.0 .. see below)

running the maintanance script in upgrade mode will also now install qc 3.4.0 instead of the 3.3.2 (MkSdk compatible) bugfix version. This seems mostly due to an update of qbs to v.1.4.0 which brings changes that can be highly benificial for the forward momentum towards the stated vision of mksdk. Here: I have further down made a post trying to expand on what i'm optimistic about after having spent the last 10 days digging into mksdk and qt's quirks here:


Except: About the abiblity to add files to qbs projects: qbs changeset here:

qt creator changeset here:


Now the recommended way to make a plugin in qt's doc's is to copy a template into a new location and then expand upon it. So maybe it would be easier to start from fresh than trying to mold all the v3.1x based code into a v3.4x form ?


BTW: the .json based wizards introduced open up easy possibilities of selecting different config files for a project. qbs 1.4 also makes it possible to fx: add new files (hal, python etc) directly to their own category instead of only to the other files category in the project.qbs file.

machinekoder commented 9 years ago

qbs 1.4 should also fix the problem that when adding a folder to a qbs project it is shown as file in Qt Creator

There where some problems back then when I started the project that seem to be resolved now. Also Python may become sooner or later the default HAL configuration langage which will bring better support in Qt Creator too.

My main focus is at the moment not at the SDK, but if there is still interest I think we should be able to revive it. Maybe there is a way to integrate it in the Buildbot as well.

the-snowwhite commented 9 years ago

Yes that was what I ment qbs 1.4 adds support for recognising mime file type info.


(* red: ... warning straying a bil off topic here) I had quite alot problems (I finally fixed by downgrading protoc to the stock 2.5.0 on ubuntu 14.04). compiling MkSdk (correction: I think it is QtQuickVcp I mean) protoc 3.0.0 or 2.6.1 would for qtquickvcp projects lead to red lines in machinekit includes, disabling use of designer ui totally with misleading error messages. trying to compile the project gave this initially cryptic error message:

Starting /home/mib/Documents/QT_Projects/Tests/build-untitled8-Desktop_Qt_5_3_GCC_64bit-Debug/untitled8...
QML debugging is enabled. Only use this in a safe environment.
QQmlApplicationEngine failed to load component
qrc:///main.qml:24 plugin cannot be loaded for module "Machinekit.Application": Cannot load library /home/mib/bin2/Qt5.3.2/5.3/gcc_64/qml/Machinekit/Application/libmachinekitapplicationplugin.so: (/home/mib/bin2/Qt5.3.2/5.3/gcc_64/lib/libmachinetalk-protobuf.so.1: undefined symbol: _ZN6google8protobuf8internal13empty_string_E)

Yes protoc relates to qtquickvcp noe mksdk sorry for the confusion: /QtQuickVcp/3rdparty/machinetalk-protobuf-qt/libmachinetalk-protobuf.so.1.0.0


Note: my first quick-fix was sparked from a recent mail on the machinekit list I nailed down to copying 1 file: from the machinekit client linux x64 binaries

machinekit-client/lib/libmachinetalk-protobuf.so.1.0.0    

into

/home/mib/bin/Qt/5.3/gcc_64/lib

overwriting my compiled version


All finally leading me to have success downgrading protoc to lower than 2.6.1

i wonder which version of protoc are used for compiling the machinekit client binaries ?

I noticed a PR from 23-apr-2015 from you including:

fixes to make mkwrapper work with protobuf 2.6.1

https://github.com/machinekit/machinekit/pull/579

Can/does this pr also solve the

/QtQuickVcp/3rdparty/machinetalk-protobuf-qt/libmachinetalk-protobuf.so.1.0.0

problem ? (* red: maybe I should move this to the QtQuickVcp repo ?)


Getting back on topic: Out of the box machinekitSDK user experience is with your merge of this PR reestablished with the current prerequisites:

Development install: 
Qt:
Qt Creator:  3.3.1 based on QT 5.4.1 
Google Protocol buffers:  ( ! Important: Do not install v2.6.1 !)
$ protoc --version   
libprotoc 2.5.0 (Ubuntu 14.04)
libprotoc 2.4.1 (Debian Wheezy)

written on the google group:

I think the install script gist https://gist.github.com/strahlex/e4b9137710e23723ab7a (line 23)

lynx -dump -listonly http://download.qt.io/official_releases/online_installers/ | grep "\<http:.*$HOST.*online.run\>" -oh | tail -n 1 | xargs wget
chmod +x qt*$HOST*run
notify-send "Install Qt SDK to ~/bin/Qt"
./qt*$HOST*run
rm qt*$HOST*run

can be easiely edited to download the offline installer from this folder:

http://download.qt.io/official_releases/qt/5.4/5.4.1/

    lynx -dump -listonly http://download.qt.io/official_releases/qt/5.4/5.4.1/ | grep "\<http:.*$HOST.*online.run\>" -oh | tail -n 1 | xargs wget

instead of using the online installer until the MkSDK uprade to Qc 3.4 (qbs 1.4.x)

the qt creator source download part of the script should automatically download the right source package I think....

I would be great to get this minor step in place to get the install script working again right Out of the Box :-)

the-snowwhite commented 9 years ago

OK Success !! :-) I have now implemented the (hmmm ... not so easy) script mod and run a full test install, created and run a machinekit project + a qtquickvcp project all with default values: I forked your gist and commited the edit but cannot create a pr ? here:


machinekit@bbb1:~$ projects/untitled/run.py
stopping realtime... done
cleaning up leftover session... done
starting configserver... done
starting halrun... msgd:0 stopped
rtapi:0 stopped
done
untitled.hal:7: Component 'haltalk' ready
untitled.hal:7: Program 'haltalk' started
untitled.hal:9: Realtime module 'threads' loaded
untitled.hal:15: Realtime threads started
halcmd: show pin
Component Pins:
Comp   Inst Type  Dir         Value  Name                             Epsilon         Flags
77        bit   OUT         FALSE  default.button                                   0

halcmd: show pin
Component Pins:
Comp   Inst Type  Dir         Value  Name                             Epsilon         Flags
77        bit   OUT          TRUE  default.button                                   0

halcmd: exit
<commandline>:0: Realtime threads stopped
<commandline>:0: Realtime module 'threads' unloaded
stopping configserver... done

Notes: the user has to select hal highligher folder if prompted:

~/bin/Qt/Tools/QtCreator/share/qtcreator/generic-highlighter

the kill command seems unnecessary