I need some advice with creating custom component QML libraries - visual-studio-2010

I have written some QML components which I would like to reuse in many projects.
Currently, what I do, is create the components using QtCreator (test it, etc).
If I want to use these component from several applications (using VS2010) what I do is to embed them in a QRC file. But I need to copy every QML needed file for each new VS2010 solution/project ... I would like to distribute them as plugins or libraries and not having to create new QRCs, etc.
What should I do?

One options is to create a QML Extension plugin: http://doc.qt.io/qt-5/qqmlextensionplugin.html

Related

React Native - multiple targets

I'm creating a RN app that is meant to be some kind of wrapper. It should have multiple targets (like in Xcode) and all its content (images, text, etc.) should be target dependent. Unfortunately, I cannot find any useful informations about how to achieve this without opening Xcode or Android Studio project and create those targets manually (like here). Is there any other solutions for this?
I was still struggling with described problem but I finally found a solution. It's not easy, needs writing a bit of boilerplate code and looks more like a workaround but I hope it will help someone in the future. What I did is I have completed my wrapper app with the resources for one of my targets so I can have visual effect. In the project's root directory I've created a folder with subfolders for each target. Inside each I have put files (images, source code files, other assets) that are target-dependent. Then I've created bash script that takes one argument - target's name. Based on it, it replaces all the target-dependent files from target's subfolder to the original file's destination in the project structure. In this proces all meta-data informations are also replaced so after firing .sh file I can build the app and upload it to both stores. It's really time consuming to create all these apps separately and publish them and it's maybe not the best solution, but at least it works!
On android, you can edit build.gradle files, java or properties, without having to launch Android Studio (which simply uses Gradle)
You can build different type flavours by only changing app/build.gradle
On iOS, that's another story. Project file (.pbxproj) is a mess,and other Workspace/Scheme files are not easy to read or script. So XCode is the way to Go.
I tried to have dynamic target & Info.plist, there are tools to script that like PlistBuddy
in the end, I saw there are many ways to launch a React Native app for developpers. Some prefer the command line, and only VSCode.
Others want to play with native IDE.
By the way, native IDEs are VERY useful.
e.g. : you want to fine-tune your application performance, using XCode view hierarchy debugger or android Studio Layout Inspector (and be sure you don't use to many views), or use any other performance tools these IDEs offer...
In the end, I used react-native-config along with multiple almost similar configs (Info.plist < target < Scheme for each), here's a post giving an overview of the setup.

Add Helper Classes to Project By Default

Is there a way to have visual studio add my helper classes (preferably with the correct namespace) anytime I create a new project. For example all of the extension methods, conversions etc. Its a pain to add them every time I start a new project.
Thanks
I'm in VS2012
There are 2 ways:
create a project template
create a set of library
My preferred way is to create a set of library I reuse in all of my project.
I dividet it with different scope for different kind of projects:
MyLib.Core, MyLib.Web, MyLib.Winforms, MyLib.Nhibernate etc etc
I distribute them with nuget so I can easily handle update and versioning

Automatically specify build configuration settings for multiple generic QtCreator projects

I would like to automatically generate *.creator, *.files, *.includes, and *.config files for each of several hundred projects in a large workspace. I would like each project to build using an external tool via a custom build kit and set of build configurations. From what I've read about QtCreator, it seems to me that the only way to do this would be either to generate the *.creator.user file for each project in advance and include the necessary build configurations, or to open each project, allow QtCreator to generate the *.creator.user file for that project, and then insert the build configuration information into the file. Rather than generating or retroactively editing an entire *.creator.user file, I'd like to generate something like a *.pro.shared file (http://doc.qt.digia.com/qtcreator-2.4/creator-sharing-project-settings.html) that could be identical for every project and wouldn't require messing with all the other user settings. Unfortunately, it doesn't appear that there is any analogous *.creator.shared file that can be used by QtCreator to incorporate shared settings. Is there a better way to approach this problem?
The build settings are basically the reason why you can not share a .user file: They contain references to data that is specific to one Qt Creator instance. These are mostly ids for Qt versions, tool chains and kits.
You can create .user files, there should be no problem with that, provided you insert the ids that are used in your creator instance. If you do it wrong, then creator will just throw away those settings and then regenerate them using default values.
Make sure to include ProjectExplorer.Project.Updater.FileVersion or creator will update your configuration using a series of transformation steps, which will most likely break everything (provided you did not start out with data compatible with Qt Creator version 1.3:-).

Importing an Xcode project into another one

I am trying to integrate one application into another and I thought that a simple way of doing this may be to add the one application into another. (Simply going to File->Add Files to "Project")
However, when I do this and try to use files that are in that other project, it says that the files can not be found. Am I doing something wrong, or is doing this even the correct way of going about this?
Depending on what you're trying to do, you could either just import the source files (not the project file itself), or you could make the part of the original project you want to use into a framework (library). Then you import the entire framework in one step.
You just add the project (project A) and configure it as a dependency of the app (project B).
If it's iOS, you likely want to deal with this shared program using a library.
If OS X, then you still need to link to what symbols you reference (e.g. create a library). If you just want to bundle a helper app or executable with your app, add it as a dependency, then you'll probably want to copy the product (project A.app) as a resource to your bundle of project B.app. If you only want to build or test, then a simple dependency will do.
If you're really sharing sources, look into using a library (static, dynamic, framework) rather than copying your sources or their references.

Visual Studio - How to use an existing vsproj's project settings as a template for new project?

There is some software I want to write a plugin for. The software includes some sample plugins. I want to create a new fresh project but I want to use one of the sample plugin vsproj's project settings as a template.
It doesn't seem very clear on how to do this. If I do "New Project From Existing Code" that only imports the cpp, h, etc files into the new project.
Right now the only way I can see to copy a sample projects settings is to open two instances of VS2005 next to each other and simply mimic the settings... Surely there is a built in method of doing this?
You could copy the project file and remove all the source files from it.
Then add your new source to that.
Doesn't the software provide a template? When I worked on toolkit that allowed developers to write their own plugins we provided these.

Resources