Make custom "Build Customizations" - visual-studio-2012

I am using VS2012, and performing OpenCV programming in C++ environment.
I wish to add opencv settings in "Build Customizations" option which is obtained on right-clicking a project in VS2012. The settings is intended to include additional Include directories, and library file names for linking.
Kindly guide me. I have already tried searching over the internet for this problem, and the instructions I found online were not very clear.

Such settings would be managed via a Property Sheet (.vsprops file) nowadays. It sounds like you should write a custom OpenCV.vsprops property sheet.

Related

VC++08 make MFC apps DPI aware without updating VC++

I may not have the option to simply update to a more recent VC++ version as would be ideal - the project is big and the update could break a lot of things, plus my lead may tell me not to pursue this. I'm wondering if anybody knows of a means by which an MFC app written using VC++08 can check resolution during runtime?
Thank you, #IInspectable for providing the answer I needed. A full update is not needed. DPI awareness can be activated via the app's manifest file. The link they provided was invaluable. Should anybody else have this issue and is using vs2008, if you cannot find the manifest file in the same dir as your exe after building, chances are, vs2008 has embedded the manifest in the exe. You can change this by opening the project's properties, going to manifest tool->IO. If you want to keep the manifest embedded, you can put your additional manifest info in a separate manifest file and provide the tool with the path of this file. The manifest tool will merge your manifest files.

How to change the content of module that Android Studio's auto-generated?

I known there is a thing called template to solve this problem. The question is i want config something when creating module step by step. In other word, i want a more flexible method to generate android module. So i prepare to develop a plugin to do this. And what's more, I know the official plugin use AndroidModuleBuilder,AndroidWizardWrapper and other classes to generate module. So is there any possibilty to extend official android module function and add some other functions to wizard?
You're looking for "project template".
Open this folder in the Android Studio installation folder:
Android Studio/plugins/android/lib/templates
You'll see folders that contains some files ends with ".ftl", just edit them and create a new project again, and you'll see the effect.
To add steps during the module creation, you need to edit and compile your own "Android Support" plugin, AFAIK. Because I don't think they've provided APIs (extension point) for adding steps during module creation.
You may do something in the implementation of com.intellij.ide.util.projectWizard.ModuleWizardStep#updateDataModel (executed during the step), and com.intellij.ide.util.projectWizard.ModuleBuilder#setupRootModel (executed when you clicked "Finish" button).
You can get the project root directory by com.intellij.openapi.roots.ModifiableRootModel#getProject, while com.intellij.openapi.roots.ModifiableRootModel is the parameter of setupRootModel.

How can I create and maintain machine-specific Visual C++ solution settings?

My team has been developing a software package for a while. The code is under source version control. Until now, every developer has been setting up their own development environment manually (we use Visual C++, recently upgraded to 2012). Now that the structure of the project has grown more complicated and the build configuration is non-trivial, I decided to create a portable solution and add it to the source control system for the convenience of newcomers.
The problem is I need the developers to be able to set up the solution according to their particular needs (mostly preprocessor #define's) without disturbing the solution for everybody else.
VC++ is creating a .user file for every project that seems to be designed to hold settings on a per-user basis, but I'm not sure how to add settings so they are stored in this file (which I exclude from source control) and not in the project file or the property sheet files (which are included in source control).
How can I accomplish this? Thanks.

Programmatically specify Private Extension Gallery in Visual Studio 2012

One of the newest features in VS 2012 is the ability to create Private Extension Galleries, which allow you to build your own extension repositories and not have to publish them to the world (internal company tools, etc.). I've successfully created one as described in the MSDN blog I referenced, but I'm wondering if anyone knows of a way to programmatically set the details of the gallery - the name and URL, and then "Apply" it - so that each person who wants to access it doesn't have to manually enter in the info.
I looked in the registry to see if I could install a key, and I think it's possible but not exactly trivial. Anyone have any insight?
The registry keys to set are documented under http://msdn.microsoft.com/en-us/library/hh266735.aspx. $RootPath$ would indicate a path like HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0 on the user's machine. Minimally, you could write a little tool that just sets those registry keys.
If you want to be really fancy, you could take that .pkgdef example and stick that inside a .vsix. Then, installing that extension would register the private extension gallery. A bit meta, but that could prove useful.
I'm going to mark Jason's answer as accepted, because he pointed me in the direction of how to properly do it which was my ultimate question. However, I do want to add another solution which does work if this is all you need:
If you manually add your private gallery details to Visual Studio, your registry key will be created for you. Go to:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\ExtensionManager\Repositories\[Dynamic Guid]
and export that key to a normal .reg file. You can then either create a simple batch script to install the key for you on other computers, or just have people use the .reg file to install it themselves.

Visual Studio: Automatic COM registration with dependant DLLs outside Debug/Release dirs

I've written some unmanaged C++ COM DLLs that rely on native C++ DLLs not in the system path. When I build the associated projects without copying the DLLs into the Debug/Release directories I get the infamous PRJ0050 compiler error.
Clearly I could copy required DLLs all around the solution, but I'd like to avoid this. I know I could set project properties Linker->"Register Output" to No and then run regsvr32 directly during a post build step.
My question is if there's a better way to do this. Is there a way to use the automatic "Register Output" option with a custom path controlled at the project level? What am I missing here?
Edit: Originally I'd been thinking "Register Output" did some magic like un-registering on a clean, but that isn't the case. The only thing special it seems to do is pick out the proper way to register different types of projects.
I am not sure what you are asking - but there are post build steps you can do. For example - if these are 3rd party libraries/DLLs you can have them located in a known relative path or in a directory named by an environment variable.
This is not an unusual scenario from what I can tell of your situation.
Can you add a DLL as part of the project (wherever it is located) and as the build step for that do the registration. Or you can make the build step for that a file copy and registration
Again - I am not exactly sure what you are asking and why your 2nd paragraph is not acceptable to you if it works

Resources