|
Walnut
>
Documentation
>
Nutshell ground build-up
>
nutshell-ground-buildup.txt
nutshell-ground-buildup.txt
$Id: nutshell-ground-buildup.txt,v 1.1 2002/07/11 12:56:10 maryniak Exp $
Build up Nutshell Project from the ground (ie. source files) up.
Copyright (C) 2000-2002 University of Amsterdam
Authors: Robert Berg <rjberg@xs4all.nl>
Eric Maryniak <e.maryniak@pobox.com>
The NeuroMod Group on the Web:
http://static/
Note 1:
Please read QuickStart.txt first for general information on the
Nutshell project and how to install the Nutshell project more quickly,
ie. by using the workspace files (*.dsw) and thus not building it from
the ground up as described in this document.
Note 2:
Drive "X:" is your harddisk (eg. "C:") or network drive (eg. "U:")
on which you store your local MSVC++ project and source files.
1. Start MSVC++ 6.0.
o File|New menu
- Projects tab
- Win32 Application
- Project name: Nutshell
- Location: X:\Walnut\Nutshell
- Important: verify that you type this path exactly as showed!
- (o) Create new workspace
- Platforms: [X] Win32
OK.
2. What kind of windows application would you like to create?
- (o) An empty project
Finish, OK.
3. Populate Project Directory (X:\Walnut\Nutshell).
Use the Explorer to do this.
o Put the two Splash files ("version.html" and "walnut.gif") in a
'Splash' subdirectory (X:\Walnut\Nutshell\Splash).
o Put the files necessary for building the release (setup), ie:
setup.bmp,
i-shield-license.txt, i-shield-infolist-readme.txt,
winzip-sfx-about.txt, winzip-sfx-dialog.txt
and these Microsoft Windows system files
mfc42.dll, msvcp60.dll, msvcrt.dll
in a 'setup' subdirectory (X:\Walnut\Nutshell\setup).
o Put all resources in a 'res' subdirectory (X:\Walnut\Nutshell\res):
*.bmp, *.cur and *.ico files (bitmapped images, cursors and icons)
o Put "Nutshell.odl", "Nutshell.rc" and "resource.h" in the main
project directory (X:\Walnut\Nutshell)
o Put all (other) source files (*.h, *.c and *.cpp) in a 'source'
subdirectory (X:\Walnut\Nutshell\source)
o Put the help file directory 'hlp' and all of its subdirectories under
X:\Walnut\Nutshell
4. Add resource, source and help files to the project and install the
CodeJock library (CJLibrary - these are MFC extensions).
Add resource files.
o FileView tab
= Right-mouse click on 'Nutshell files'
- Add Files to Project..., Files of type: All Files (*.*)
- Select Nutshell.odl, Nutshell.rc and resource.h (left-control click)
OK.
Files Nutshell.odl and Nutshell.rc will be distributed under
"Source Files" and file resource.h under "Header Files" automatically.
= Right-mouse click on Nutshell.odl (from "Source Files")
- Settings...
- MIDL tab
- Settings For: Win32 Release
- Output file name: \Walnut\Release\Nutshell.tlb
- Settings For: Win32 Debug
- Output file name: \Walnut\Debug\Nutshell.tlb
OK.
o FileView tab
= Right-mouse click on 'Nutshell files'
- Add Files to Project..., Files of type: All Files (*.*)
- Browse to the 'res' subdir,
click on 1 file and control-a (= select all files)
OK.
The resource files will be distributed under "Resource Files"
automatically.
Add source files.
o FileView tab
= Right-mouse click on 'Nutshell files'
- Add Files to Project...
- Browse to the 'source' subdir,
click on 1 file and control-a (= select all .h, .c and .cpp files)
OK.
The header and source files will be distributed under
"Header Files" and "Source Files" automatically.
Add Help and HTMLHelp files, and Excel examples.
o FileView tab
= Right-mouse click on 'Nutshell files'
- New Folder...
- Name of the new folder: Help Files
- File extensions: hhp
OK.
= Right-mouse click on 'Nutshell files'
- Add Files to Project..., Files of type: All Files (*.*)
- Browse to the 'hlp' subdir, select nutshell.hhp
OK.
= Right-mouse click on nutshell.hhp (from "Help Files")
- Settings...
- Custom Build tab
- Settings For: All Configurations
- Add the following two lines to Commands (including quotes!):
"C:\Program Files\HTML Help Workshop\hhc.exe" $(InputPath)
copy $(InputDir)\$(InputName).chm $(TargetDir)
Change the drive and/or location of the HTML Help Workshop
appropiately for your system setup, if it is not the default
drive (C:).
- Add the following line to Outputs (including quotes!):
"$(TargetDir)\Nutshell.chm"
OK.
o Put files traveling.xls and XOR.xls in both these two folders:
X:\Walnut\Debug\Examples
X:\Walnut\Release\Examples
Use the Explorer to do this.
o Create directory:
X:\Walnut\Nutshell\HTMLHelp
and copy the 'include' and 'lib' subdirectory of HTML Help Workshop
(C:\Program Files\HTML Help Workshop) to X:\Walnut\Nutshell\HTMLHelp.
Change the drive and/or location of the HTML Help Workshop appropiately
for your system setup, if it is not the default drive (C:).
Use the Explorer to do this, too.
Install CJLibrary.
This library is needed by Nutshell for the implementation of the
user interface.
Description of the CodeJock library (CJLibrary) from the CodeJock web
site, http://www.codejock.com/, on 2000-06-08:
" The CJLibrary offers Microsoft (R) Foundation Class developers a
complete library of MFC extension classes that implement Authentic
Looking GUIs like those seen in Microsoft Outlook (R), Developer
Studio (R) and Internet Explorer (TM). "
The CJLibrary version currently used by Nutshell is: 6.09
Use the Explorer to install CJLibrary and perhaps Internet Explorer,
Netscape or another web browser to download it.
o Copy CJLibSetup609.exe to X:\Walnut\Nutshell
Use the Explorer to do this.
o Start CJLibSetup609.exe
- Setup button
- Next and Yes (accept agreement) button
- Browse button
- Path: X:\Walnut\Nutshell\CJLibrary
OK. Yes.
- Next button (Destination folder is X:\Walnut\Nutshell\CJLibrary)
- (o) Typical. Next button.
- Next button (ie. accept proposed default Program Folder)
- Finish button
o Start _another_ MSVC++ 6.0 session
Do _not_ use the current MSVC++ Nutshell session (but do keep it open).
This new MSVC++ session will be used to build the CJ libraries.
- File|Open Workspace menu
- Browse to:
X:\Walnut\Nutshell\CJLibrary\CJLibrary\CJLibrary.dsw
and open. Select Yes (convert the project).
- Build|Batch Build menu
- Deselect all project configurations _but_:
- [X] CJLibrary - Win32 Release
- [X] CJLibrary - Win32 Debug
Build.
You may get a Linker warning:
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to
/INCREMENTAL:NO specification
When building has finished, close this MSVC++ session:
- File|Exit menu
Finally copy the generated dynamic link libraries to the Walnut
Release and Debug directory:
- Copy file X:\Walnut\Nutshell\CJLibrary\Lib\CJLib609.dll to
X:\Walnut\Release
- Copy file X:\Walnut\Nutshell\CJLibrary\Lib\CJLib609d.dll to
X:\Walnut\Debug
Use the Explorer to do this.
5. Project settings for Nutshell.
o Project|Settings menu
= The top level item 'Nutshell' in the fileview must always be
selected.
= General tab
- Settings For: All Configurations
- Microsoft Foundation Class: Use MFC in a Shared DLL
= C/C++ tab
- Settings For: All Configurations
- Category: Precompiled Headers
- (o) Automatic use of precompiled headers
Through header: stdafx.h
Important note on precompiled headers and memory problems:
If you are using Windows 95/98/Me and experience strange
compilation errors (e.g. "internal compiler errors"), then
do not use precompiled headers and use this setting:
- (o) Not using precompiled headers
Strangely enough, MSVC++ erases the "Through header" field
(stdafx.h) in this case _for all projects_! However, this is
not a problem, because all modules #include stdafx.h themselves.
Compilation will be much longer, though.
- Category: Preprocessor
- Additional include directories:
[Note: names are _comma_ separated and must be on one (1) line!]
\Walnut\Paradigms\Base\source,\Walnut\Components\Base\source,
\Walnut\WalnutCore\source,\Walnut\Nutshell\HTMLHelp\include,
\Walnut\Nutshell\CJLibrary\Include
- Settings For: Win32 Release
- Category: Code Generation
- Use run-time library: Multithreaded DLL
- Settings For: Win32 Debug
- Category: Code Generation
- Use run-time library: Debug Multithreaded DLL
= Link tab
- Settings For: Win32 Release
- Category: General
- Output file name: \Walnut\Release\Nutshell.exe
- Category: Input
- Object/library modules:
[Note: names are _space_ separated and must be on one (1) line!]
Paradigms.lib Components.lib WalnutCore.lib
CJ609Lib.lib htmlhelp.lib
- Additional Library path:
[Note: names are _comma_ separated and must be on one (1) line!]
\Walnut\Paradigms\Base\Release,\Walnut\Components\Base\Release,
\Walnut\WalnutCore\Release,
\Walnut\Nutshell\CJLibrary\Lib,\Walnut\Nutshell\HTMLHelp\lib
- Settings For: Win32 Debug
- Category: General
- Output file name: \Walnut\Debug\Nutshell.exe
- Category: Input
- Object/library modules:
[Note: names are _space_ separated and must be on one (1) line!]
Paradigms.lib Components.lib WalnutCore.lib
CJ609Libd.lib htmlhelp.lib
- Additional Library path:
[Note: names are _comma_ separated and must be on one (1) line!]
\Walnut\Paradigms\Base\Debug,\Walnut\Components\Base\Debug,
\Walnut\WalnutCore\Debug,
\Walnut\Nutshell\CJLibrary\Lib,\Walnut\Nutshell\HTMLHelp\lib
= Resources tab
- Settings For: All Configurations
- Language: Language Neutral
= MIDL tab
- Settings For: All Configurations
Select the file nutshell.odl from the Source Files (in left window).
- Output header file name: \Walnut\Nutshell\source\nutshell_i.h
OK.
6. Insert WalnutCore, Components and Paradigms into workspace.
o Project|Insert Projects into Workspace menu
- Select WalnutCore.dsp from X:\Walnut\WalnutCore
o Project|Insert Projects into Workspace menu
- Select Components.dsp from X:\Walnut\Components\Base
o Project|Insert Projects into Workspace menu
- Select Paradigms.dsp from X:\Walnut\Paradigms\Base
o Project|Dependencies menu
- Select project to modify: Nutshell
- [X] Components
- [X] Paradigms
- [X] WalnutCore
OK.
o Project|Dependencies menu
- Select project to modify: Components
- [X] WalnutCore
OK.
o Project|Dependencies menu
- Select project to modify: Paradigms
- [X] Components
- [X] WalnutCore
OK.
7. Create MakeFile.
o Project|Export Makefile
- [X] Nutshell (.\Nutshell.mak)
- [X] WalnutCore (\Walnut\WalnutCore\WalnutCore.mak)
- [X] Components (\Walnut\Components\Base\Components.mak)
- [X] Paradigms (\Walnut\Paradigms\Base\Paradigms.mak)
----------------------------------------------------
- [X] Write dependencies when writing makefiles.
OK.
8. Save workspace.
o File|Save Workspace menu
9. Build Nutshell project and projects WalnutCore, Components and Paradigms.
At this point we are finally ready to build the main Nutshell application.
Compiling Nutshell implies a build of WalnutCore, Components and
Paradigms first, because the Nutshell project depends on those three
projects.
Use a batch build to ensure this.
Perhaps you have already built WalnutCore, Components and Paradigms
previously: this is ok, as all dependencies are always checked
automatically.
o Build|Batch Build menu
- [X] Nutshell - Win32 Release
- [X] Nutshell - Win32 Debug
- [X] WalnutCore - Win32 Release
- [X] WalnutCore - Win32 Debug
- [X] Components - Win32 Release
- [X] Components - Win32 Debug
- [X] Paradigms - Win32 Release
- [X] Paradigms - Win32 Debug
Build.
After a successful build, the Nutshell executable (Nutshell.exe),
the necessary library files (*.dll, *.lib, *.exp) and (compiled)
html help file (nutshell.chm) is present in:
\Walnut\Debug (debug version)
\Walnut\Release (release version)
You can start Nutshell.exe by simply double clicking on it (Explorer).
Refer to the various Nutshell manuals for more information on how to
configure, use and program Nutshell.
Appendix
o Registry
Nutshell creates a few Registry keys:
In \HKEY_CLASSES_ROOT:
\HKEY_CLASSES_ROOT\.np,.nw
\HKEY_CLASSES_ROOT\AppID\{B9B867C1-12BF-11D3-B661-00E018903DAE}
\HKEY_CLASSES_ROOT\AppID\Nutshell.EXE
Nutshell.Workspace:
\HKEY_CLASSES_ROOT\CLSID\{6EB0ACC0-8F12-11D0-9636-444553540000}
Nutshell.Workspaces:
\HKEY_CLASSES_ROOT\CLSID\{76CB5F21-5885-11D2-B661-00E018903DAE}
Nutshell.Application:
\HKEY_CLASSES_ROOT\CLSID\{A01AC317-259C-11D2-9636-444553540000}
\HKEY_CLASSES_ROOT\Nutshell.Application
\HKEY_CLASSES_ROOT\Nutshell.NNML
\HKEY_CLASSES_ROOT\Nutshell.Paradigm
\HKEY_CLASSES_ROOT\Nutshell.Workspace
\HKEY_CLASSES_ROOT\Nutshell.Workspaces
Nutshell:
\HKEY_CLASSES_ROOT\TypeLib\{9086AF60-8FDB-11D0-9636-444553540000}\1.0
And in \HKEY_LOCAL_MACHINE:
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.np,.nw
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\
{B9B867C1-12BF-11D3-B661-00E018903DAE}
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\
{6EB0ACC0-8F12-11D0-9636-444553540000}
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\
{76CB5F21-5885-11D2-B661-00E018903DAE}
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\
{A01AC317-259C-11D2-9636-444553540000}
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Nutshell.Application
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Nutshell.NNML
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Nutshell.Paradigm
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Nutshell.Workspace
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Nutshell.Workspaces
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\
{9086AF60-8FDB-11D0-9636-444553540000}\1.0
$Source: /home/cvsroot/Walnut/C++/Doc/internal/nutshell-ground-buildup.txt,v $
Other relevant documents:
|