How to automatically install my plugin to "plugins" directory after build? - qt

Now it building successfully, but I need to copy it in destination directory by hand. I want to automate this process, but not so familiar with qmake (prefer cmake instead).

Try to use Custom Targets feature.
This post also can help you.

Related

Proper way to remove Gruntjs, package.json and other files from release branch

I am developing a wordpress theme. I am new to using Grunt and composer for packages.
I have also integrated git flows. At the moment I am developing on develop branch and then merge to master once I am satisfied with the code.
The problem I am facing is that my master branch has Gruntfile.js as well as package.json in it. Similarly there are sass files in css folders. I want a clean release branch, in which there are only required theme files and no gruntjs, pacakge.json and sass files.
These all files are being tracked in master, how can I create a clean release branch.
I have followed the Woocommerce repository for making my development environment.
I could not find a build process in it also. Am I missing any proper step?
P.S : I don't know if I should be sharing any code samples here, but if you want anything I can share it here.
As far as I'm aware you can't do what you're trying to do and I don't believe git is meant to work that way. Having your grunt & SASS files in the master branch is the correct way of doing this, those files are also in the Woocommerce repository you've linked to.
I'm guessing what you're trying to do is create a release of a theme that doesn't have any of the 'development only files', for lack of a better term, to give to the the end user installing the theme? If so that release would be a separate 'thing' to git as git is mainly for developer version control. What I think you're after is just creating a stand-alone downloadable zip file by the sounds of things?
For example if you were to submit your theme to WordPrss.org they take it as a zip file rather than a link to a git repository.

Qt way to get libraries path

I have several QPlugins (shared objects) that I install {CMAKE_PREFIX}/lib/<appname>, how can I find out this path at runtime to load the plugins? Note that the CMAKE_PREFIX user user settable.
If these plugins are part of your application project and you are looking for a build time answer, you can generate a config.h file containing that path.
You can use CMake's configure_file command for that.

How to fully remove a GRUNT project

So I understand that every Grunt project lives in it's folder, but does deleting the folder fully delete the project? I don't think so.
Let's say I have NODE and Grunt CLI installed, and I use grunt-init to create a project based on a template (say "jquery"), how do I delete the project?
Yes removing the project folder will remove everything that was installed by your grunt-init.
It will NOT remove anything installed globally (like node or grunt CLI).
I think 'grunt-remove' does exactly that: https://www.npmjs.com/package/grunt-remove

create setup for an existent exe file

I want to create a setup for an existent .exe file. This file needs some .ocx and .dll files to run correctly. So this mentioned setup should paste these all files in a specified path and then run the .exe file.
I have tried with installshield 2010 basic and InstallScript projects but i could not create some of dialogs in the format that i wanted.
Is there any way to create this setup? Or any one may help me to work with installshield?
You might find working with another setup program easier, try the NSIS (Nullsoft Scriptable Install System). It has a RegDLL function:
RegDLL "$WINDIR\OCX\vbalGrid6.ocx"
if you need that also.

Why Qt plugins compiled as .so don't work when deployed in a MacOSX bundle?

I have a CMake project for a Qt based application using plugins.
The standard way to create a plugin is CMake (on all platforms) is with:
ADD_LIBRARY(${PROJECT_NAME} MODULE ...)
This creates a libxxx.so plugin (instead of a libxxx.dylib, if SHARED is used instead of MODULE above).
Now, when running inside an IDE like Xcode or QtCreator, the application works fine, the plugin is loaded and works.
But if I create the .app bundle, the application does not start, saying "libxxx.so is not a valid Qt plugin"! How could be that possible? Maybe some library dependency is not found, but how can i check that? I have used tool -L and I think all the libraries are ok.
You may need a "qt.conf" file in your bundle to tell Qt where the plugins are.
You should read up on CMake's BundleUtilities fixup_bundle function and let it do all that "otool -L" and "install_name_tool" stuff for you.
See this recent related stackoverflow question and answer:
CMake: Copy Frameworks into App Bundle

Resources