473,788 Members | 2,848 Online
Bytes | Software Development & Data Engineering Community
+ 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.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. 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
Jul 25 '05 #1
0 1073

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

Similar topics

5
3068
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...
2
343
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 assembly I can forget the assembly name. It didn't work. I had to specify the .exe assembly in order for it to load. Can someone explain? Thanks <section name='xyz' type='MyCompany.MyApplication.MyExecutable.MyConfigurationSectionHandler'/>
1
2299
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
0
1058
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...
1
1627
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 configuration (All the most up to date versions except for Visual C++): Windows XP (Home Edition).
1
1070
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
0
804
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...
11
10153
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 seen erratic results. I am aware of one known defect where user classes do not show up in the list of types on the Property/Settings page in the visual designer and I am wondering if I am encountering some other peculiar issue, or if there are...
0
9656
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
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10364
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...
0
10172
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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,...
1
7517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
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.