Building from cmd line with space in compiler variable
Posted: Fri Jun 26, 2009 7:00 am
I have a project which I want to build from the command line. This project has a number of compiler variables that I want to set using the normal VARIABLE=VALUE method on the command line. In some cases I want to use spaces in these variables but I haven't been able to make that work properly.
The scenario is the following, I normally build using something similar to this:
miabuild myproject.mpr PRODUCTNAME=MySoftware
This works fine. However, when I want to build something like this:
miabuild myproject.mpr PRODUCTNAME=MySoftware Special Edition
it doesn't work. I've tried putting whole variable expression inside quotes ("PRODUCTNAME=MySoftware Special Edition") as well as just the string (PRODUCTNAME="MySoftware Special Edition") but without luck.
What happens is that I get an installer package that mostly looks right but when running it I get an error during the installation phase. It says:
A portion of the folder path" is invalid. It is either empty or exceeds the length allowed by the system.
This variable is used all over the place, including the title field and some create shortcut commands but I haven't been able to pinpoint which command it fails on.
If I use the project properties dialog to edit the compiler variable it works fine using the spaces. Does anyone know how I should do this?
I have a log file from the installation if there is any interest in seeing it but it contains a bunch of names and stuff so I'd rather not post it in its entirety. If you would like to see it I can email it or if there is any particular section of interest I could put it up here. I've attached an image of the error as well.
Thanks in advance.
File Attached:
iaerror.jpg
The scenario is the following, I normally build using something similar to this:
miabuild myproject.mpr PRODUCTNAME=MySoftware
This works fine. However, when I want to build something like this:
miabuild myproject.mpr PRODUCTNAME=MySoftware Special Edition
it doesn't work. I've tried putting whole variable expression inside quotes ("PRODUCTNAME=MySoftware Special Edition") as well as just the string (PRODUCTNAME="MySoftware Special Edition") but without luck.
What happens is that I get an installer package that mostly looks right but when running it I get an error during the installation phase. It says:
A portion of the folder path" is invalid. It is either empty or exceeds the length allowed by the system.
This variable is used all over the place, including the title field and some create shortcut commands but I haven't been able to pinpoint which command it fails on.
If I use the project properties dialog to edit the compiler variable it works fine using the spaces. Does anyone know how I should do this?
I have a log file from the installation if there is any interest in seeing it but it contains a bunch of names and stuff so I'd rather not post it in its entirety. If you would like to see it I can email it or if there is any particular section of interest I could put it up here. I've attached an image of the error as well.
Thanks in advance.
File Attached:
iaerror.jpg