# To maintain source files easily, we uses bash + xqilla to generate internal project files for Visual Studio. We don't modify the project file manually.
# This file includes some instructions about how to generate Berkeley DB internal project files for Visual Studio.
== How to add a new Visual Studio project? ==
1. Add the new project name in dist/win_projects/db.projects
2. Add your project to dist/win_projects/projects.template.xml. Please use the following template:
-- Add your project type here.
-- If you want to create a library(.lib or .dll), the project type should be "library".
-- If you want to create a application(.exe), the project type should be "application".
library
-- Add this line if you want to create an application or a dynamic linked library(dll) for this project
-- Add this line if you want to create static linked library for this project, only available when type is library
Static
-- Add your depended library(which will appear to "Additional Library" list) here, if any.
-- The depended library should appear in some element in projects.template.xml, otherwise you need to create one.
library_name
-- Add your project dependencies here, if any.
-- This is only available for VS2010 because VS2005 stores project dependency info in solution file.
depended_project_name
-- Add project specified configuration here
/FIXED:NO
-- Add your configurations specified preprocess here; Configname should be one of these:
-- Debug, Release, Static Debug, Static Release, dll(means both Debug and Release), all.
xxxxxx
-- Add head files if you need
-- Add source files if you need
3. cd dist, run ./s_window_dsp to generate the project. You will get two projects: your_project_name.vcproj for VS2005 and your_project_name.vcxproj for vs2010.
4. Add your project file into related solution (Berkeley_DB.sln or Berkeley_DB_examples.sln for VS2005, Berkeley_DB_vs2010.sln or Berkeley_DB_examples_vs2010.sln for VS2010).
== How to add a file to exist project files? ==
1. Open dist/win_projects/projects.template.xml
2. Add the file to element of the project by alphabeta order.
3. If you want to add the file to more than one project, add the file for every project.
4. cd dist, run s_windows_dsp to regenerate the projects.
== How to add user defined compile flag for all projects? ==
1. Open dist/win_projects/projects.template.xml
2. Add the flag to related preprosessor element at the begining of the file:
WIN32;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE This is for all configurations of all projects
_DEBUG;DIAGNOSTIC --This is for Debug and Static Debug configurations of all projects
NDEBUG -- This is for Release and Static Release configurations of all projects
_USRDLL --This is for Release and Debug configurations of all library projects
_CONSOLE --This is for Release and Debug configurations of all application projects
_LIB; This is for Static Debug and Static Release configurations of all library projects
Reserved, no used currently
3. cd dist, run s_windows_dsp to regenerate the projects.
== How to add user defined compile flag for a specified project? ==
1. Open dist/win_projects/projects.template.xml
2. Add the flag to related preprosessor element of specified project
xxx This is for all configurations of this project
xxx --This is for Debug and Static Debug configurations of this project
xxx -- This is for Release and Static Release configurations of all project
3. cd dist, run s_windows_dsp to regenerate the project.
== Notes ==
1. Xqilla is necessary for running s_windows
2. To generate project for Wince platform, you need to modify db_wince.projects and projects_wince.template.xml instead of db.projects and projects.template.xml