I want to allow my app to expose functions to the dbus. I generated the following xml for my class:
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="local.ConnectionController">
<method name="onSetConnection">
<arg name="keyname" type="s" direction="in"/>
<arg name="connected" type="b" direction="in"/>
</method>
</interface>
</node>
How ever when I try to run the xml2cpp generator I get no error message no output, nothing the process does not even exit.
qdbusxml2cpp -a controller.xml
When using the verbose option I get no output either.
I am using qdbusxml2cpp version 0.8.
Why does the tool not do anything?
The problem is that the .xml must be before the "-a" option and put the file name after "-a":
qdbusxml2cpp controller.xml -a name_of_file
Related
When running the network map using Java (as described here: https://gitlab.com/cordite/network-map-service#using-java) on Windows, I get the following error:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-antrun-plugin:1.8:run (build-website)
on project network network-map-service: An Ant BuildException has
occured: Execute failed: java.io.IOException: Cannot run program
"npm": CreateProcess error-2, The system cannot find the file
specified around Ant part ...... # 4:45 in
C:\Users\x.x\network-map-service\target\antrun\build-main.xml
What is the cause of this error?
You are encountering this issue because the build file is as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<project name="maven-antrun-" default="main" >
<target name="main">
<exec failonerror="true" executable="npm">
<arg value="install"/>
<arg value="-g"/>
<arg value="brunch"/>
</exec>
<exec failonerror="true" dir="website" executable="npm">
<arg value="install"/>
</exec>
<exec failonerror="true" dir="website" executable="brunch">
<arg value="build"/>
</exec>
</target>
</project>
But Windows requires the executable names to be npm.bat and brunch.bat instead.
If you change the executable names in the build file, it will work correctly.
When I run the closure compiler, I get a bunch of warnings like this:
[exec] jquery/3.2.1/dist/jquery.js:733: WARNING - Suspicious code. The result of the 'getprop' operator is not being used.
[exec] arr[ preferredDoc.childNodes.length ].nodeType;
[exec] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I end up with about 30 warnings in my build, all from jquery and bootstrap.js
I'm handling my build using an Ant script. The call to the Closure Compiler looks like this:
<target name="build_scripts" description="Compile frontend scripts">
<exec executable="${java.exec}" failonerror="true">
<arg line="-client -d64 -jar ${closure.jar}"/>
<arg line="--js ${src.dir}/assets/js/*.js"/>
<arg line="--js ${src.dir}/assets/js/**/*.js"/>
<arg line="--js ${weblib.dir}/jquery/3.2.1/dist/jquery.js"/>
<arg line="--js ${weblib.dir}/bootstrap-sass/3.3.7/assets/javascripts/bootstrap.js"/>
<arg line="--externs ${build.dir}/jquery-3.2.externs.js"/>
<arg line="--dependency_mode=STRICT"/>
<arg line="--entry_point ${src.dir}/assets/js/main.js"/>
<arg line="--js_output_file ${out.js.dir}/main.js"/>
<env key="JAVA_HOME" path="${java_home}"/>
</exec>
</target>
I thought the point of the externs file was to get rid of warnings like this? The answers to this question seem to suggest I'd need to manually change it in the external libraries.
I don't want to silence all warnings; just these from external libraries. Is that possible?
The --hide_warnings_for='path/segment' flag should do what you need.
I am trying to create programs that take advantage of the D-Bus. I’ve studied the examples supplied with Qt about the same. In one of them called “D-Bus remote controlled car example” there is a file named “car.xml” with following content:
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/com/trollech/examples/car">
<interface name="org.example.Examples.CarInterface">
<method name="accelerate"/>
<method name="decelerate"/>
<method name="turnLeft"/>
<method name="turnRight"/>
<signal name="crashed"/>
</interface>
</node>
If I’m not mistaken, one is supposed to generate this file using a tool named “qdbuscpp2xml”. when i generate an xml using this command:
$ qdbuscpp2xml -A car.h -o car2.xml
i get the following content in the generated XML file:
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="local.Car">
<signal name="crashed">
</signal>
<method name="accelerate">
</method>
<method name="decelerate">
</method>
<method name="turnLeft">
</method>
<method name="turnRight">
</method>
</interface>
</node>
which differs from the car.xml in following lines:
<node name="/com/trollech/examples/car">
<interface name="org.example.Examples.CarInterface">
why am I getting a different file? was the included file (car.xml) with the example created manually?
I have figured it out myself. The tool namely qdbuscpp2xml, does not assign a name attribute to the <node> as of now. If one wishes to assign a name attribute to it, she has to type it in by herself but for the <interface> node, it's possible to have the above mentioned tool do it automatically by putting the macro Q_CLASSINFO inside the class one wishes to expose.
I need NAnt to kick off a long running console app on the local machine during a Bamboo build. It does this correctly but without the console UI. Rather than try to show all that, I have worked it down to a trivial example that also does not show the UI.
When I type the following:
C:\PSExecPath\psexec -d -i ping localhost
or
C:\PSExecPath\psexec \\localmachinename -d -i ping localhost
I get exactly the results one would expect including the UI.
But when this same command is kicked off from NAnt there is no UI. For example when the following build file is run by NAnt after being started with Bamboo:
<?xml version="1.0"?>
<project default="all">
<target name="all">
<exec program="C:\PSExecPath\psexec.exe" spawn="true">
<arg value="\\localmachinename" />
<arg value="-d" />
<arg value="-i" />
<arg value="ping" />
<arg value="localhost" />
</exec>
</target>
</project>
Just to make sure it is stated, NAnt is being executed in the same profile.
Bamboo was running as a Service. I changed it to run as a Console and everything started running as expected.
I am trying to use the flex ant task to build my Flex project.
Before using ant, I ran the mxmlc command like this:
mxmlc -load-config mxmlc_conf.xml src\project.mxml -output bin-debug +libs=<absolute_path_to>3rdparty\libs +<other_token>=<absoulte_path_to_value>
The thing is now I am supposed to use flex ant tasks and it looks like they disabled (or forgot about) the custom tokens like += as I haven't found a way to pass those to the mxmlc task.
I have tried using:
< mxmlc ...>< arg token value="..." />< /mxmlc>
but that doesn't work.
What I am trying to accomplish is to get rid of hard-coded paths in the mxmlc config-file (mxmlc_conf.xml) and at first I used the custom tokens in mxmlc but now I don't know how to pass paths as variables to the config file.
I can accept suggestions.
Thanks a lot in advance.
I'm trying to do the exact same thing (replace hard-coded paths in the config file) and I'm looking for the same solution.
It seems we might have to abandon the mxmlc task and simply use mxmlc from the command line:
<exec searchpath="true" executable="amxmlc"
dir="${project.build.outputDirectory}">
<env key="PATH"
path="${env.PATH}:/Applications/Adobe\ Flash\ Builder\ 4.5/sdks/4.5.1/bin" />
<arg value="-load-config" />
<arg value="../src/main/resources/dumpConfig.xml" />
<arg value="+libs=/absolute/path/to/3rd/party/libs" />
<arg value="-output" />
<arg
value="${project.build.outputDirectory}/${application.name}.swf" />
<arg value="../src/main/flex/${application.name}.mxml" />
</exec>
Something like this should work. I'm just hoping there's a better way (that is, a way we can actually use the mxml ant target!)
I hope that helps someone...
Try this
<target>
<replace file="mxmlc_conf.xml" token="$${libs}" value="absolute/path/to/3rdparty/libs"/>
<mxmlc ...>
<load-config filename="mxmlc_conf.xml" />
</mxmlc>
<replace file="mxmlc_conf.xml" token="absolute/path/to/3rdparty/libs" value="$${libs}"/>
</target>