473,511 Members | 15,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help with Custom AppWizard

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 files. 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 17 '05 #1
0 1044

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

Similar topics

5
3056
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
1064
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...
4
7385
by: Phil | last post by:
k, here is my issue.. I have BLOB data in SQL that needs to be grabbed and made into a TIF file and placed on the client (could be in temp internet dir). The reason we need it in TIF format is...
1
2282
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...
1
1055
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)....
12
5293
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
2
1799
by: Test | last post by:
I am trying to write a simple dialog form and use the appwizard that comes with MS V C++ 6.0. Under "Resource View" tab I have layed out my form as I would like it to look. I want to be able on the...
1
4598
by: sanctus | last post by:
I have a Matlab code which works fine in windows. Now I installed Xubuntu (because this way I have admin rights(=root) which I don't have on windows) and want to use the same code. To be able to...
4
3884
by: Linda Liu[MSFT] | last post by:
Hi Moondaddy, I downloaded your sample project and run it and did see the problem on my side. There're three problems in the source code of your project. 1. You should move the following...
0
7144
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
7356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7085
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
5671
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,...
1
5069
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3227
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
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.