473,465 Members | 1,489 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Any Custom Appwizard experts out there?

tcr
Hi,
Not sure if this is the correct group so let me know. I am attempting to
create a new custom app wizard that will output one solution that contains
two projects. One is an MFC project and the other is a console. In the
OnFinish function of the default.js file, I create the one solution and then
cycle through the code twice to create the projects. Here is the code:

var strProjectPath = wizard.FindSymbol('PROJECT_PATH');
var strProjectName = wizard.FindSymbol('PROJECT_NAME');
var strMFCProjectName = strProjectName + "MFC";
var strConsoleProjectName = strProjectName + "Console";
var strResFolder = strProjectPath + "\\res";
var Solution;

Solution = CreateSolution(strProjectName,strProjectPath);

//Create MFC project
//wizard.RemoveSymbol('CON_PRJ');
selProj = CreateCustomProject(strMFCProjectName, strProjectPath, Solution);
AddConfig(selProj, strMFCProjectName);
AddFilters(selProj);
var oFSO = new ActiveXObject("Scripting.FileSystemObject");
if(!oFSO.FolderExists(strResFolder))
oFSO.CreateFolder(strResFolder);
var InfFile = CreateCustomInfFile();
AddFilesToCustomProj(selProj, strMFCProjectName, strProjectPath, InfFile);
PchSettings(selProj);
InfFile.Delete();
selProj.Object.Save();

wizard.AddSymbol("CON_PRJ",1,1);
var strSymbol = "The symbol CON_PRJ is equal to " +
wizard.FindSymbol("CON_PRJ");
wizard.OkCancelAlert(strSymbol);

//Create Console project
selProj = CreateCustomProject(strConsoleProjectName, strProjectPath,
Solution);
AddConfig(selProj, strConsoleProjectName);
AddFilters(selProj);

InfFile = CreateCustomInfFile();
AddFilesToCustomProj(selProj, strConsoleProjectName, strProjectPath,
InfFile);
PchSettings(selProj);
InfFile.Delete();

selProj.Object.Save();
I'm trying to use the symbol 'CON_PRJ' in the Templates.inf file so that
it will add the appropriate. Here is the contents of that file:

TestClass.h
TestClass.cpp
stdafx.h
stdafx.cpp
[!if CON_PRJ == 1]
rootConsole.cpp
[!else]
rootmfc.h
rootmfc.cpp
resource.h
rootmfc.rc
res\\rootmfc.rc2
res\\rootmfc.ico
[!endif]

You will notice that I add the symbol before creating the console
project and then output its value for debugging purposes. The problem is
that if I define it after a call to RenderTemplate in the CreateCustomInfFile
function it indicates that the symbol is undefined. If I define it before,
it remains defined. This means that the projects are created from two
template files that are exactly the same. I can't update the symbol table
after the first call to CreateCustomInfFile. Anyone have any suggestions?
Thanks,
tcr
Nov 22 '05 #1
0 788

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Lt | last post by:
Hello, I'm gonna write my first 3D multiplayer game using DirectPlay, VC++ ..NET 2002. I've done tutorials supplied along with DXSDK Then I wanted to use the DirectX AppWizard but it produced over...
0
by: tcr | last post by:
Hi, Not sure if this is the correct group so let me know. I am attempting to create a new custom app wizard that will output one solution that contains two projects. One is an MFC project and...
2
by: Jiho Han | last post by:
I've written some before but never ran into this. I happened to write a simple custom ConfigurationSectionHandler implementation in my single .exe file. Thinking since it's in the executing...
1
by: znmaster | last post by:
I've downloaded WTL7.0 from http://msdn.microsoft.com, and installed it according to the instructions. But I can't see the WTL Appwizard in VC++.net. I use Windows2000. Can WTL7.0 only be used...
5
by: pswulius | last post by:
Hey everyone, for reasons I can't explain quickly, I'm developing a completely custom OK/OK_CANCEL dialog, though I think many people would benifit from this knowledge. I basically need to...
0
by: tcr | last post by:
Hi, Not sure if this is the correct group so let me know. I am attempting to create a new custom app wizard that will output one solution that contains two projects. One is an MFC project and...
1
by: John Gabriel | last post by:
I have set up a website and am testing ASPs. I have created a very simple ActiveX component with two interfaces: AboutBox() - displays About details calcpi() - returns 3.14159 Here is my...
1
by: finalyvn | last post by:
I read some books in school and I found out that all these books taught only one thing APPWIZARD and it wrote MFC code. But if I use this function , Wizard raised more file (more complicated)....
11
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I have worked with application settings in VS2005 and C# for awhile, but usually with standard types. I have been trying to store a custom container/class/type in an application setting and I have...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.