I created a qt application which can be build by cmake. My application uses some ros2 service so I need to build it with ros. For that I need to put my code under ros2_ws/src/. I want to avoid this thing. I want to build by application from any folder ( without putting under ros2_wc) with ament tool. How can I do it ?
If you want to do that, you need to build ROS2 as usual, and source the following script:
. install/local_setup.bash
Then you can call your build command using ament from the directory you want.
cd <dir>
ament build --force-cmake-configure ...
For those who are using the new ros2 build tool: colcon
You can keep your own ~/ros2_ws, and put the QT application to another ~/ros2_overlay_ws.
For example, if your new QT application depends on some service or msg located in the original ~/ros2_ws, you could go to ~/ros2_ws and run colcon build.
After compile finished, please remember to import and re-index your packages by the following command: source ~/ros2_ws/install/setup.bash. This will re-index your ros2 packages at current terminal.
Now go to ~/ros2_overlay_ws/ and put your QT application to ~/ros2_overlay_ws/src and then run colcon build. colcon will find your indexed package and add them to your dependency.
Related
I have build a JavaFX application which can be executed by its jar file. However if i try to run it using the native exe bundle i am receiving two popups:
Error Invoking method
Failed to launch JVM
and the application fails to start.
The Javafx application is build with intellij ide.
The project structure looks as follows;
when launching the application following popup shows..
The config file looks as follows:-
The packaged jar file is executing properly...
the problem occurs when starting application with launching exe file.
kindly tell me what could went wrong?
UPDATE:
It seems that the build output runtime/bin directory does not contain java.exe file therefore i think the application does not launches.
the output when try to run the application is as follows:
i have build the application with intellij idea, i think there is a problem with that. Kindly look into this matter.
UPDATED:-
Run it from the command line using the runtime that was bundled for you:
If you made an executable Jar (with a proper manifest specifying the classpath and main class)
cd firecap
runtime\bin\java -jar app\libs\your-main.jar
If you don't have an executable jar use something like
cd firecap
runtime\bin\java -cp app\libs\*.* your.main.class.name
Since java.exe is a console program you should be able to see the full error output to get a better idea of what is going wrong.
You very likely have missed including a needed module in the runtime.
It is also possible you ran into a bug that I discovered recently: https://bugs.openjdk.java.net/browse/JDK-8254920
I created my runtime image with this command:
"C:\Program Files\BellSoft\LibericaJDK-15-Full\bin\jlink.exe" --no-header-files --no-man-page, --compress=1 --add-modules java.management,java.logging,javafx.controls,java.xml,java.desktop --output C:\MyProject\build\image\runtime
But yours may be different depending on what modules you need. Note also that I used a JDK from BellSoft that included the JavaFX modules to make it easier.
i have a project folder with a src and a example subfolder. In src lives a Framework.xcodeproj file, which needs to be build before the App.xcodeproj gets build.
Is there a way to tell Xcode to first build the Framework and after that, build the App? I tried to drag n drop the Framework.xcodeproj into the App.xcodeproj and add it to the Target Dependencies but this is not really working. I run into error messages and missing files.
Is a shellscript within a Run Script Phase a better way to do it?
We have started using Appveyor for CI with our Github repo and all has went fine. We have our build script working (appveyor.yml) in the repo, and it successfully builds and produces an artifact. Now on to my question
We are trying to pair our builds now with codecov.io which says it will scan it during the CI build. And it does support appveyor, it merely says to add this to the yml
after_test:
- bash <(curl -s https://codecov.io/bash)
Which we did, but nothing happens. Does this mean i need an actual test script to run, before it will send off the code to codecov? It is a C# project, and we have it compile, and generate the .exe which we then package into a zip which can be downloaded.
What are the point of these "test scripts" when we already know it compiles and produces an exe? I am a bit confused on how to use this properly..
I believe here https://github.com/codecov/example-csharp is good example of running codecov tests on C# project with working Appveyor configuration. Please look at readme.md file in that repo for greater detail.
From the Documentation
You need to add the OpenCover nuget package to your Visual Studio solution which is used to generate code coverage analysis:
PM> Install-Package OpenCover
Secondly, you need to either write a PowerShell script (if you intend to generate code coverage and upload the result interactively) or you need to add a few entries in you CI config file (if you intend to let your CI generate the coverage).
Issue: When building a UWP using the VSTS build service no .appxupload file for store submissions is created.
What I did: I created a build definition using the Universal Windows App template that contains 4 build steps. Apart from setting the repository to my external Git repository I didn't change anything.
After the build finishes I only have the _Test folder in my drop. No .appxupload file.
What I tried so far:
According to Build your Universal Windows Plattform app I have to add the UapAppxPackageBuildMode (set to CI) switch to the MSBuild arguments. I did it exactly as shown there. However, neither the .appxupload nor the _Test folder are created but the build step itself completes successfully. (Actually, the AppxPackages folder that is specified by default using the AppxPackageDir switch is missing, too)
I tried running the Create App Packages... option from within Visual Studio. This results in both, the .appxupload and _Test folder.
[Update] I found another switch to try at the MSBuild arguments which is AppxPackageIsForStore (set to true). This will generate the _Test folder but still not .appxupload package.
I could reproduce your issue. If don't use argument /p:UapAppxPackageBuildMode=CI, I could only get _Test folder. If add argument /p:UapAppxPackageBuildMode=CI, I'll get error message during Publish Artifact step:
Not found PathtoPublish: C:\a\1\b\AppxPackages
But I just tried argument /p:UapAppxPackageBuildMode=StoreUpload, it can generate both _Test folder and .appxupload file, you may have a try.
I started trying to convert a project to use CMake so that I could import the project into QtCreator to make use of the QtCreator IDE for this straight C code. This worked pretty nicely as far as giving me auto completions, code diving, etc etc.
I have had a bit of a time getting CMake to build the code as I expected, mostly because it was the first time I have been using it. I recently discovered that there is a cmake-gui that you can point at your source and it will show you the CMake variables and such. What is the proper way to actually use cmake-gui within QtCreator? When I just manually made my CMakelists.txt files within my project, it was enough to get the project in there. Should I just run Cmake-gui using locator and point it to those files? Should I keep the same build directory in cmake-gui that was created from QtCreator? Any tutorial links or guidance apprecaited - didnt find a whole lot googling.
The way I use cmake-gui with QtCreator is this:
Create a build directory and configure it with cmake-gui, like:
cmake/project$ mkdir build
cmake/project$ cd build
cmake/project/build$ cmake-gui ..
Open the CMakeLists.txt file in QtCreator, and set the build path to where you did the configuration:
Let QtCreator run the configuration by clicking "Run CMake", it will use the values you configured with cmake-gui in step 1:
You are done :)
When you need to reconfigure the CMake build, just fire up the command line, navigate to the build directory and re-run cmake-gui.