473,657 Members | 2,316 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.FindSymb ol('PROJECT_PAT H');
var strProjectName = wizard.FindSymb ol('PROJECT_NAM E');
var strMFCProjectNa me = strProjectName + "MFC";
var strConsoleProje ctName = strProjectName + "Console";
var strResFolder = strProjectPath + "\\res";
var Solution;

Solution = CreateSolution( strProjectName, strProjectPath) ;

//Create MFC project
//wizard.RemoveSy mbol('CON_PRJ') ;
selProj = CreateCustomPro ject(strMFCProj ectName, strProjectPath, Solution);
AddConfig(selPr oj, strMFCProjectNa me);
AddFilters(selP roj);
var oFSO = new ActiveXObject(" Scripting.FileS ystemObject");
if(!oFSO.Folder Exists(strResFo lder))
oFSO.CreateFold er(strResFolder );
var InfFile = CreateCustomInf File();
AddFilesToCusto mProj(selProj, strMFCProjectNa me, strProjectPath, InfFile);
PchSettings(sel Proj);
InfFile.Delete( );
selProj.Object. Save();

wizard.AddSymbo l("CON_PRJ",1,1 );
var strSymbol = "The symbol CON_PRJ is equal to " +
wizard.FindSymb ol("CON_PRJ");
wizard.OkCancel Alert(strSymbol );

//Create Console project
selProj = CreateCustomPro ject(strConsole ProjectName, strProjectPath,
Solution);
AddConfig(selPr oj, strConsoleProje ctName);
AddFilters(selP roj);

InfFile = CreateCustomInf File();
AddFilesToCusto mProj(selProj, strConsoleProje ctName, strProjectPath,
InfFile);
PchSettings(sel Proj);
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.rc 2
res\\rootmfc.ic o
[!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 CreateCustomInf File
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 CreateCustomInf File. Anyone have any suggestions?
Thanks,
tcr

Nov 17 '05 #1
0 1053

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

Similar topics

5
3060
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 2300 lines of code! It's cool to have prepared automatically all initializations but it's a little too much. That's because I can't find any documentation on details HOW IT WORKS, how I can integrate my own game code with this framework. In...
0
1069
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 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...
4
7394
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 there are multiple pages per invoice. How can I grab the data, make the TIF, place it on the client and then Open with the clients default program for veiwing TIF's (usually Microsoft Picture and Fax Viewer). Please help.
1
2291
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 under WinXP? Thanks
1
1062
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). Now,I want to do this without APPWIZARD like Win32 Programming by using empty project. Appreciate for any answer Thanks
12
5323
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 the custom employee class and have built it as a separate library (employee.dll). This employee.dll is being referenced by both the web service and the windows application. I face the following problem when I send this class to the webservice.
2
1811
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 click of a radio button to enable or disable the Edit region I have created. I do not understand how to expose that object so that other classes can have access to it. So i have two classes called CDSXGUIApp AND CDSXGUIDlg. When I go to...
1
4621
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 use the C-code you have to compile it from Matlab comand line with the comand mex myfile.c where before with mex -setup you define which compiler to use, the only choice I had was gcc (version 4.something). Now if I compile I get the following...
4
3895
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 lines of code from the GetGeometry method within the CustomPolyLine class: _points.Add(new Point(10, 10));
0
8411
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8838
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8513
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4173
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2740
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 we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.