how to call devenv to build some .vcproj with specific building macro in a solution (containing many .vcproj)? - rebuild

all!
There are many vc projects in my solution. i can call devenv.exe xxx.sln to build/rebuild all these projects together. Also i can right-click some specific project and rebuild it.
My question: how to do the same thing of "right-click and rebuild" when i use devenv.exe ?
I want to rebuild the same project with different building macro --- setting "PreprocessorDefinitions" in .vcproj
another question: is there a simple way to replace the value of PreprocessorDefinitions in the .vcproj? im now using the python to do this.

devenv has the command line option /command to run a command on start up: could this be used?
Devenv Command Line Switches

Related

MSDeploy Auto Generated deploy.cmd path issue?

I've been working on trying to figure out why our auto-generated deploy.cmdscripts will not work when installed to C:\Program Files (x86)\OurProgram. I finally narrowed down the issue to the closing parenthesis in (x86) as the script would terminate with "Files was unexpected at this time". One possible solution was to manually create another batch file to set _DeploySetParametersFile to a Windows path ( C:\Program^ Files^ (x86^)\OurProgram\Program.Parameters.xml). This isn't a valid solution for me, so I dug into the auto generated file and found the issue to be 2 variables:
RootPath
_DeploySetParametersFile
Both of which were referenced using %'s(i.e. %RootPath%), however as soon as they were changed to !'s(i.e. !RootPath!), no 2nd script was needed and I can run the cmd script from Program Files (x86) just fine. The issue of course with this is, the deploy.cmd file is auto-generated on each build, thus I have to change it for each build I do. My question is this: Is there a way to edit the template Visual Studio uses to generate the deploy.cmd file? If so, where? It seems so ridiculous that Microsoft would have this be an issue in their web deployment.

Trying to set up a deployment package for silent uninstall of Notepad++ and installation of a new version

All of the below on Windows 7 Machines and regarding Notepad++ installation / uninstallation:
Uninstaller
When I try to uninstall using the command
if exist "C:\Program Files (x86)\Notepad++\uninstall.exe" "C:\Program Files (x86)\Notepad++\uninstall.exe" /S
there are some files left in the Notepad++ file afterward. Notepad++'s uninstaller, when run manually, prompts halfway through the uninstall asking "Do you want to keep your custom settings" and I'm thinking that the command may be choosing to answer this "Yes" by default. I'm wondering if there's an easy way to have it choose "No" here instead. If not, I can probably just delete the folder.
Installer
I'm running the installation using the 32 bit default .exe file from Notepad++ in a deployment package compiled in Lansweeper. What I'm noticing is that presently, the package executed the CMD uninstall command, but stops short of installing the new version. For reference, I've been using an installed 7.3.2 and the installer for 7.3.3 to test, so that it should uninstall the 7.3.2 and install 7.3.3 by the end of the package.
I'm wondering if the fact that there are a number of options in the Notepad++ installer could be the culprit here. If it is better to install via command line or to include some sort of configuration file I'm fine with either option, just not especially well-versed in doing them.
Notepad++ Installer requests the following during installation:
Select a language - should choose English
Choose Components - want to be able to customize selection of localization / auto complete / themes / context menu / plugins / auto update according to our requirements
Choose Components - Don't use Appdata, Allow Plugins to be loaded from Appdata, and Create Shortcut on Desktop should all remain unchecked
Run Notepad ++ - should be unchecked (checked by default)
All the other components that I can see are straightforward Next / I Agree buttons.
I'm hoping someone may be able to make helpful suggestions here as I've not had any experience with configuring silent installs with specific parameters. Notepad++ doesn't seem to have its own MSI and I won't use a third party one so some sort of batch or configuration file or flagging options in cmd if possible are the preferable options.
Please let me know if there's any additional information I can provide that may be helpful.
Thank you in advance.
If you just need to update to the latest version. It is quite simple. Run the newest installer again and it will automatically update older versions.
See
Silent Install Notepad++
I'm using the command:
start /wait npp.7.2.Installer.x64.exe /S
Didn't show any interface during silent installation.
Notepad kicks a secondary process that doesn't finish until success is evaluated.
try:
"%ProgramFiles(x86)%\Notepad++\uninstall.exe" /S
timeout 5

Can the IAR command line tool "iarbuild" do a build all?

From the IAR command line, it's easy to build a particular configuration, and obviously, if I want to mimic the "build all" behavior I just run my own batch file with the configs I want.
How do I handle the case where I want to build all configs, but I don't know in advance what configurations are available?
Using Jenkins, for instance, if a developer adds a configuration in the IAR IDE, it won't be included in a build until the Jenkins scripts are manually updated. I just want Jenkins to build all the configurations without caring what they are called. In the IAR GUI for setting up batches, there is an option to rebuild all so there must be something somewhere. Thanks!
You can specify * as configuration name to build everything, like this:
c:\> iarbuild myproject.ewp -build *
One solution I've implemented years ago for this problem was to read the configuration names from the .ewp file and use them for the build.
Regards
Yves

Install Packages (for dummies)

I know there's a lot of information on here about installing python packages, but I'm quite new to python and I think I need a more "for dummies" level of help.
I was trying to install openpyxl for which as far as I can tell I need easy_install, for which, as far as I can tell, I need setuptools. I tried running the code provided here https://pypi.python.org/pypi/setuptools which is supposed to download and install setuptools (and according to some sites, easy_install aswell?) - it runs successfully, but help(modules) doesn't show setuptools or easy_install as modules, I have no idea whats installed and what isn't, or how I'm supposed to install any of it!
Essentially I'm very confused, very frustrated and really need someone to talk me through (in idiot-speak) what I'm supposed to do.
Thankyou!
We all start somewhere, I was there two weeks ago.
I'll assume you're using Python2. I believe Distribute and Pip are recommended for Python3 (which I will be using as examples). I will also assume you are on Windows.
First, python needs to be registered to Path. To check if this has been done automatically, open a command prompt (start -> programs -> accessories), and type 'python', then enter. If it returns the version number, etc, skip down a bit. If it throws an error, you need to add Python to Path.
Adding Python to Path
To add Python to Path on a Windows computer, go to:
Control Panel -> System -> Advanced Settings -> Environment Settings -> System Variables
Scroll down to select path, then click edit. Copy the entire line to a text document, and add your install directory for Python.exe (and the scripts folder) using ';' as a delimiter between different directories. Copy this back to Path and save. (Additionally close your command prompt window to reset it.)
For my Windows 7 machine, I added:
;C:\Python33;C:\Python33\scripts;
Take care when editing this file. There are many videos out there describing this in detail if you feel unsure about changing this.
Installing Modules (Such as setup_tools)
Once Python is registered in the Path file, download and unzip setup_tools to a folder within your Python install directory called 'modules'. I use ExtractNow to unzip, as it will unzip twice (as required) automatically.
Open a command prompt window again, and direct it to change directories by typing
cd [directory for module you want to install]
On my computer, this would be
cd C:\Python33\modules\distribute-0.6.40
Again, I use distribute, rather than setup_tools as it sounds like you need would for Python2. Simply use the appropriate directory. Press enter to change the directory.
Once you've entered this and it shows a changed directory, type:
python setup.py install
This indicates that you want to use the program python to use the setup.py file in the specified folder to install the module. This should be successful, and will write many lines of code.
If you want to install other modules, you would install them in a similar way. Python would automatically use setup_tools on your computer to finish each install.
Remember to import at the start of your script when using them to code:
import [module]
Happy Programming!

Cannot run program "make": The system cannot find the file specified?

This is the first time that this error has come up. I am using Cygwin with Eclipse 3.5 and my Path variable is set to: %CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Apache Ant\bin;C:\Program Files\SVN\bin;C:\Program Files\Java\jdk1.6.0_18\bin;C:\Users\Mohit\Developer\AndroidSDK\tools;C:\Program Files\QuickTime\QTSystem\;C:\cygwin\bin Notice that C:\cygwin\bin is in my Path. And make.exe is is my Cygwin bin. So I think the problem is not with my system, but maybe my project. But I can't find anything wrong with it. Any suggestions?
Use Process Explorer to take a look at the PATH environment variable inside Eclipse's process. It's possible that it's changing its PATH internally -- if that's the case, you'll need to figure out how to configure Eclipse so that its PATH is set up correctly.
If you're finding that C:\cygwin\bin isn't in Eclipse's PATH, and you recently added that to your PATH, you need to close and restart Eclipse for that change to take affect.
If you still can't figure it out, try using Process Monitor with a filter for Eclipse.exe to get a long, detailed listing of everything it's trying to do. Look for the call to CreateProcess() that's failing and see if you can learn anything more.
I had same problem and I solved that copy make.exe file in path that ecilipse given.
from link below
http://www.mediafire.com/download/e9j9g4zun2t68jn/make.exe
hope helps
I go around this issue by installing MinGW and use its GCC compiler.
Environment - OS: Windows 10, Eclipse: Oxygen

Resources