Bugs item #1078641, was opened at 2004-12-03 13:56
Message generated for change (Comment added) made by haniatassi
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1078641&group_id=31650

Category: Tasks
Group: 0.85
Status: Open
Resolution: None
Priority: 5
Submitted By: Hani Atassi (haniatassi)
Assigned to: Nobody/Anonymous (nobody)
Summary: Solution task doesn't do COM, OCX apps built in VC++

Initial Comment:
The solution task for VC++ apps, doesn't call the MIDL 
task to compile IDL files.

In this way, you cannot build COM or OCX outputs using 
NAnt's solution task.

The output of the MIDL is needed by the resource 
compiler when compiling the resource file. Refere to (Bug 
ID 1077712) for a fix to the resource problem.

----------------------------------------------------------------------

>Comment By: Hani Atassi (haniatassi)
Date: 2004-12-08 07:05

Message:
Logged In: YES 
user_id=590187

Yes there shouldn't be an "else" there.

I just added "/out" to make sure if midl generates any other 
files, they would go to the out folder.

Also, I did a test with (outfolder) similar to this ($(SolutionDir)
\Test) and the Type library file ($(IntDir)/
$(ProjectName).tlb).. From the Visual Studio build i got the 
the tlb file inside the folder:
$(SolutionDir)\Test\Release\.tlb

So, inorder to copy the same behaviour, u need to change 
the code to something like this: (intermediateDir is using the 
outputDirectory instead of the project directory).

            string outputDirectory = fileConfig.GetToolSetting
(compilerTool, "OutputDirectory");
            if (StringUtils.IsNullOrEmpty(outputDirectory)) {
                outputDirectory = fileConfig.ProjectDir.FullName;   
            }

            midlTask.Arguments.Add(new Argument("/out"));
            midlTask.Arguments.Add(new Argument
(outputDirectory));

            string intermediateDir = Path.Combine
(outputDirectory, 
                fileConfig.IntermediateDir);

----------------------------------------------------------------------

Comment By: Gert Driesen (drieseng)
Date: 2004-12-08 00:10

Message:
Logged In: YES 
user_id=707851

In your last change, shouldn't this :

            string outputDirectory = fileConfig.GetToolSetting
(compilerTool, "OutputDirectory");
            if (StringUtils.IsNullOrEmpty(outputDirectory)) {
                outputDirectory = fileConfig.ProjectDir.FullName;   
            } else {
                midlTask.Arguments.Add(new Argument("/out"));
                midlTask.Arguments.Add(new Argument
(outputDirectory));
            }

be changed into this :

            string outputDirectory = fileConfig.GetToolSetting
(compilerTool, "OutputDirectory");
            if (StringUtils.IsNullOrEmpty(outputDirectory)) {
                outputDirectory = fileConfig.ProjectDir.FullName;   
            }

            midlTask.Arguments.Add(new Argument("/out"));
            midlTask.Arguments.Add(new Argument
(outputDirectory));
            }

Well, perhaps its not even necessary specifiy the "/out 
<directory>" argument as "we" always specifiy absolute 
filenames for the individual output files.


----------------------------------------------------------------------

Comment By: Hani Atassi (haniatassi)
Date: 2004-12-07 08:36

Message:
Logged In: YES 
user_id=590187

Found some problems with the function BuildIDLFiles 
that is included with the previous file. 

I added comments on the logic.. 

----------------------------------------------------------------------

Comment By: Hani Atassi (haniatassi)
Date: 2004-12-06 15:03

Message:
Logged In: YES 
user_id=590187

Ok... There is actually quite a bit of changes to let the 
solution task compile COM and OCX project:

1- The solution task doesn't support MIDL, so I had to 
add code to call the MIDL task from the solution task. 
2- If the output is OCX, the function IsOutputDll returns 
false, eventhough the OCX file is acually a DLL file. So, 
it should be changed to return true.
3- If the COM is built using MFC or DLL, you need to use 
the fix in bug ID 1078636.
4- Had to add a new function CreateMidlArgumentMap() 
to support mapping arguments of MIDL tool.
5- Dlldata inside MidlTask is declared as string. If it's a 
file, why it's not of type FileInfo!.
6- I added a new child for the MidlTask and called it 
Undefines.

After the previous changes, the solution task worked 
perfectly and I could compile my old OCX projects that I 
built using MFC. The only wierd thing is that, some of 
the regular output messages from the MIDL tool are 
treated as Warnings...

Attached are the changes...

Hope this helps..

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1078641&group_id=31650


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to