PDA

View Full Version : Macro to convert Strings


DrGonzo
06-06-2006, 09:01 AM
Hi all,

since it is the 1st time I'm working with macros in VBScript I have some initial problems. Searching the web didn't bring about the desired information.

This is the path where the program to be build is stored:

$/1400/PC_KUNDE/KKH/PROG/WIPS/C32/WIPS0830

Now I need a macro, that is on the one hand able to fetch this String out of the edit field in the dialogue, and on the other hand is able to convert every '/' into a '\', so that the source folders in unix and windows are identical.

Another important question occured few minutes ago:
Is the build process done by my development environment( Visual Studio .NET 2003) and if yes, does Visual Build Pro know all paths that are defined within the development environment, because I'm facing with the issue, that some external header files can not be found during the build process in Visual Build Pro. These header files are available if I compile the same project with Visual Studio.

Thanks for Your help!

kinook
06-06-2006, 03:14 PM
Originally posted by DrGonzo
This is the path where the program to be build is stored:

$/1400/PC_KUNDE/KKH/PROG/WIPS/C32/WIPS0830

Now I need a macro, that is on the one hand able to fetch this String out of the edit field in the dialogue, and on the other hand is able to convert every '/' into a '\', so that the source folders in unix and windows are identical.
Given a macro ABC containing the string above, using this script expression within a field or macro value would achieve that:

[Replace("%ABC%", "/", "\")]

Another important question occured few minutes ago:
Is the build process done by my development environment( Visual Studio .NET 2003) and if yes, does Visual Build Pro know all paths that are defined within the development environment, because I'm facing with the issue, that some external header files can not be found during the build process in Visual Build Pro. These header files are available if I compile the same project with Visual Studio.
For the Make VS.NET action, it's actually VS.NET itself (the command-line compiler devenv.com) that performs a build of VS 2003 projects. You can verify this by checking the 'Display command-line...' checkbox on the Options tab, rebuilding the step, then copying and pasting the msbuild/devenv command-line from the build output to a Command Prompt and running it from there. If the behavior occurs outside of VBP, you'll need to open a support incident with MS. Otherwise, we'll need a reproducible case to investigate further, including:
1) The info from Help | About | Install Info
2) The .bld file used to build
3) A build log file
4) A .sln file and project files (no source code files)

DrGonzo
06-07-2006, 10:58 AM
Ok thank You. I finally succeeded in checking out and compiling the designatet program. But after the succesful compilation process Visual Build starts to compile again and I can not comprehend why. Here is an extract of the compiling process output window:


07.06.2006 18:00:23: Building project step 'Build Process'...
Pre-processing...

Rebuilding configuration 'Debug'...
...
not relevant
...
Linking...

Build log was saved at "file://d:\1400\Pc_kunde\Kkh\Prog\Wips\C32\Wips0830\Debug\ BuildLog.htm"
WIPS0830 - 0 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 1 succeeded, 0 failed, 0 skipped



Building configuration 'Release'...

Microsoft (R) Development Environment Version 7.10.3077.
Copyright (C) Microsoft Corp 1984-2001. All rights reserved.
------ Build started: Project: WIPS0830, Configuration: Release Win32 ------

Compiling...
StdAfx.cpp
----------------- DPCLASS2 BUILD_ID 0x02024 ----------------------------------
d:\1400\PC_KUNDE\KKH\PROG\WIPS\C32\WIPS0830\StdAfx .h(30) : fatal error C1083: Cannot open include file: 'ntglbdef.h': No such file or directory

Build log was saved at "file://d:\1400\Pc_kunde\Kkh\Prog\Wips\C32\Wips0830\Releas e\BuildLog.htm"
WIPS0830 - 1 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped



As You can see the compilation was already successfully completed, but nevertheless Visial Build starts Building configuration 'Release'...

Could You plz explain to me why the second process is started? Is it possible to suppress this action?

Eclosed a Screenshot of my Make VS .NET build process.

Thank You for Your patience :)



Yours, DrGonzo

Im aware of the fact, that I still have to merit my doctoral level!!

kinook
06-07-2006, 11:23 AM
Your step is configured to build all configurations, so I'm guessing (since you didn't provide .sln/.bld files) that your solution has multiple solution configurations, and the action is building each configuration it finds.

http://www.visualbuild.com/Manual/vsnetprojectsolutiontab.htm

"Configuration: Specifies the project or solution configuration to build. Choose All to build all configurations, enter a valid configuration name or select one from the list, or enter a regular expression to match one or more configurations (i.e., Debug.* to match all configurations beginning with Debug)."