[sword-cvs] sword/apps/windoze/CBuilder5/InstallMgr InstallManager.bpg,NONE,1.1 InstallManager.bpr,NONE,1.1 InstallManager.cpp,NONE,1.1 InstallManager.res,NONE,1.1 MainFrm.cpp,1.17,1.18 libcurl.bpr,1.7,1.8 InstallMgr.bpg,1.8,NONE InstallMgr.bpr,1.28,NONE InstallMgr.cpp,1.8,NONE InstallMgr.res,1.9,NONE
sword@www.crosswire.org
sword@www.crosswire.org
Thu, 26 Jun 2003 13:06:00 -0700
Update of /usr/local/cvsroot/sword/apps/windoze/CBuilder5/InstallMgr
In directory www:/tmp/cvs-serv6754/apps/windoze/CBuilder5/InstallMgr
Modified Files:
MainFrm.cpp libcurl.bpr
Added Files:
InstallManager.bpg InstallManager.bpr InstallManager.cpp
InstallManager.res
Removed Files:
InstallMgr.bpg InstallMgr.bpr InstallMgr.cpp InstallMgr.res
Log Message:
no message
--- NEW FILE: InstallManager.bpg ---
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = libsword.lib libcurl.lib InstallManager.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
libcurl.lib: libcurl.bpr
$(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
libsword.lib: ..\..\..\..\lib\bcppmake\libsword.bpr
$(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
InstallManager.exe: InstallManager.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
--- NEW FILE: InstallManager.bpr ---
<?xml version='1.0' encoding='utf-8' ?>
<!-- C++Builder XML Project -->
<PROJECT>
<MACROS>
<VERSION value="BCB.05.03"/>
<PROJECT value="InstallManager.exe"/>
<OBJFILES value="InstallManager.obj MainFrm.obj StatusFrm.obj RemoteMntFrm.obj InfoFrm.obj
cipherfrm.obj UninstallFrm.obj ..\..\swwinlog.obj
..\..\..\..\src\mgr\installmgr.obj"/>
<RESFILES value="InstallManager.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) MainFrm.dfm StatusFrm.dfm RemoteMntFrm.dfm InfoFrm.dfm
cipherfrm.dfm UninstallFrm.dfm"/>
<LIBFILES value="libcurl.lib curl\lib\ws2_32.lib
..\..\..\..\..\icu-sword\as_is\borland\icui18n.lib
..\..\..\..\..\icu-sword\as_is\borland\icudatab.lib
..\..\..\..\..\icu-sword\as_is\borland\icucommon.lib
..\..\..\..\lib\libsword.lib"/>
<LIBRARIES value="NMFast50.lib vclx50.lib vcl50.lib"/>
<SPARELIBS value="vcl50.lib vclx50.lib NMFast50.lib"/>
<PACKAGES value="vcl50.bpi vclx50.bpi vcljpg50.bpi bcbsmp50.bpi qrpt50.bpi vcldb50.bpi
vclbde50.bpi ibsmp50.bpi vcldbx50.bpi teeui50.bpi teedb50.bpi tee50.bpi
nmfast50.bpi dclocx50.bpi"/>
<PATHCPP value=".;..\..;..\..\..\..\src\mgr"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="ilink32"/>
<USERDEFINES value="VCL;_ICU_;_ICUSWORD_;CURLAVAILABLE;USBINARY;_DEBUG"/>
<SYSDEFINES value="NO_STRICT"/>
<MAINSOURCE value="InstallManager.cpp"/>
<INCLUDEPATH value="..\..\..\..\src\mgr;..\..;curl\include;..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include"/>
<LIBPATH value="..\..\..\..\src\mgr;..\..;..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\lib\obj;$(BCB)\lib"/>
<WARNINGS value="-w-par -w-8027 -w-8026"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<IDLCFLAGS value="-I..\.. -Icurl\include -I..\BibleCS
-I..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr
-I$(BCB)\include -I$(BCB)\include\vcl -I..\..\..\..\include -src_suffix
cpp -DVCL -boa"/>
<CFLAG1 value="-Od -H=c:\PROGRA~1\borland\CBUILD~2\lib\vcl50.csm -Hc -Vx -Ve -RT- -X- -r-
-a8 -b- -k -y -v -vi- -c -tW -tWM"/>
<PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
<RFLAGS value=""/>
<AFLAGS value="/mx /w2 /zi"/>
<LFLAGS value="-D"" -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
</LINKER>
<IDEOPTIONS>
[Version Info]
IncludeVerInfo=1
AutoIncBuild=0
MajorVer=1
MinorVer=5
Release=4
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1033
CodePage=1252
[Version Info Keys]
CompanyName=CrossWire Bible Society
FileDescription=SWORD Installation Manager
FileVersion=1.5.4.0
InternalName=InstallMgr
LegalCopyright=Copyright 2002 by CrossWire Bible Society
LegalTrademarks=
OriginalFilename=
ProductName=The SWORD Project
ProductVersion=1.5.4a
Comments=Seek Jesus who exchanges temporary for eternal
[HistoryLists\hlIncludePath]
Count=7
Item0=..\..;curl\include;..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include
Item1=curl\include;..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include
Item2=..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include
Item3=..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include
Item4=..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include
Item5=..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include
Item6=..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include
[HistoryLists\hlLibraryPath]
Count=6
Item0=..\..;..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\lib\obj;$(BCB)\lib
Item1=..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\lib\obj;$(BCB)\lib
Item2=..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\lib\obj;$(BCB)\lib
Item3=..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\lib\obj;$(BCB)\lib
Item4=..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\lib\obj;$(BCB)\lib
Item5=..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\lib\obj;$(BCB)\lib
[HistoryLists\hlDebugSourcePath]
Count=1
Item0=$(BCB)\source\vcl
[HistoryLists\hlConditionals]
Count=11
Item0=VCL;_ICU_;_ICUSWORD_;CURLAVAILABLE;USBINARY;_DEBUG
Item1=VCL;_ICU_;_ICUSWORD_;USBINARY;_DEBUG
Item2=VCL;_ICU_;_ICUSWORD_;USBINARY
Item3=VCL
Item4=VCL;_DEBUG
Item5=VCL;__STDC__ true
Item6=VCL;__STDC__
Item7=VCL;_MSC_VER
Item8=VCL __STDC__
Item9=_DEBUG;VCL
Item10=_DEBUG
[HistoryLists\hlRunParameters]
Count=1
Item0=-uninstall
[Debugging]
DebugSourceDirs=$(BCB)\source\vcl
[Parameters]
RunParams=
HostApplication=
RemoteHost=
RemotePath=
RemoteDebug=0
[Compiler]
ShowInfoMsgs=0
LinkDebugVcl=0
LinkCGLIB=0
[Language]
ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
</PROJECT>
--- NEW FILE: InstallManager.cpp ---
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
USERES("InstallManager.res");
USEFORM("MainFrm.cpp", MainForm);
USEFORM("StatusFrm.cpp", StatusForm);
USEFORM("RemoteMntFrm.cpp", RemoteMntForm);
USEFORM("InfoFrm.cpp", InfoForm);
USEFORM("cipherfrm.cpp", CipherForm);
USEFORM("UninstallFrm.cpp", UninstallForm);
USELIB("libcurl.lib");
USELIB("curl\lib\ws2_32.lib");
USELIB("..\..\..\..\..\icu-sword\as_is\borland\icui18n.lib");
USELIB("..\..\..\..\..\icu-sword\as_is\borland\icudatab.lib");
USELIB("..\..\..\..\..\icu-sword\as_is\borland\icucommon.lib");
USELIB("..\..\..\..\lib\libsword.lib");
USEUNIT("..\..\swwinlog.cpp");
USEUNIT("..\..\..\..\src\mgr\installmgr.cpp");
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->Title = "Install Manager";
Application->CreateForm(__classid(TMainForm), &MainForm);
Application->CreateForm(__classid(TStatusForm), &StatusForm);
Application->CreateForm(__classid(TRemoteMntForm), &RemoteMntForm);
Application->CreateForm(__classid(TInfoForm), &InfoForm);
Application->CreateForm(__classid(TCipherForm), &CipherForm);
Application->CreateForm(__classid(TUninstallForm), &UninstallForm);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
return 0;
}
//---------------------------------------------------------------------------
--- NEW FILE: InstallManager.res ---
(This appears to be a binary file; contents omitted.)
Index: MainFrm.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/InstallMgr/MainFrm.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** MainFrm.cpp 7 Oct 2002 00:14:43 -0000 1.17
--- MainFrm.cpp 26 Jun 2003 20:05:52 -0000 1.18
***************
*** 25,28 ****
--- 25,29 ----
#include <dir.h>
#include <FileCtrl.hpp>
+ #include <installmgr.h>
TMainForm *MainForm;
***************
*** 469,556 ****
int TMainForm::removeModule(const char *modName)
{
! SectionMap::iterator module;
! ConfigEntMap::iterator fileBegin;
! ConfigEntMap::iterator fileEnd, entry;
!
! module = manager->config->Sections.find(modName);
!
! if (module != manager->config->Sections.end()) {
! entry = module->second.find("CipherKey");
! if (entry != module->second.end())
! CipherForm->cipherEdit->Text = entry->second.c_str();
!
! fileBegin = module->second.lower_bound("File");
! fileEnd = module->second.upper_bound("File");
!
! if (fileBegin != fileEnd) { // remove each file
! while (fileBegin != fileEnd) {
! //remove file
! remove(fileBegin->second.c_str());
! fileBegin++;
! }
! }
! else { //remove all files in DataPath directory
!
! DIR *dir;
! struct dirent *ent;
! ConfigEntMap::iterator entry;
! string modDir;
! string modFile;
!
! entry = module->second.find("DataPath");
! if (entry != module->second.end()) {
! modDir = entry->second.c_str();
! entry = module->second.find("ModDrv");
! if (entry != module->second.end()) {
! if (!strcmp(entry->second.c_str(), "RawLD") || !strcmp(entry->second.c_str(), "RawLD4") || !strcmp(entry->second.c_str(), "zLD") || !strcmp(entry->second.c_str(), "RawGenBook") || !strcmp(entry->second.c_str(), "zGenBook")) {
! char *buf = new char [ strlen(modDir.c_str()) + 1 ];
!
! strcpy(buf, modDir.c_str());
! int end = strlen(buf) - 1;
! while (end) {
! if (buf[end] == '/')
! break;
! end--;
! }
! buf[end] = 0;
! modDir = buf;
! delete [] buf;
! }
! }
!
! if (dir = opendir(modDir.c_str())) {
! rewinddir(dir);
! while ((ent = readdir(dir))) {
! if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) {
! modFile = modDir;
! modFile += "/";
! modFile += ent->d_name;
! remove(modFile.c_str());
! }
! }
! closedir(dir);
! }
! if (dir = opendir(manager->configPath)) { // find and remove .conf file
! rewinddir(dir);
! while ((ent = readdir(dir))) {
! if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) {
! modFile = manager->configPath;
! modFile += "/";
! modFile += ent->d_name;
! SWConfig *config = new SWConfig(modFile.c_str());
! if (config->Sections.find(modName) != config->Sections.end()) {
! delete config;
! remove(modFile.c_str());
! }
! else delete config;
! }
! }
! closedir(dir);
! }
! }
! }
! return 0;
! }
! return 1;
}
--- 470,474 ----
int TMainForm::removeModule(const char *modName)
{
! return sword::removeModule(manager, modName);
}
Index: libcurl.bpr
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/InstallMgr/libcurl.bpr,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** libcurl.bpr 8 Oct 2002 00:36:00 -0000 1.7
--- libcurl.bpr 26 Jun 2003 20:05:52 -0000 1.8
***************
*** 28,32 ****
<PATHASM value=".;"/>
<LINKER value="TLib"/>
! <USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT"/>
<MAINSOURCE value="libcurl.bpf"/>
--- 28,32 ----
<PATHASM value=".;"/>
<LINKER value="TLib"/>
! <USERDEFINES value="_DEBUG"/>
<SYSDEFINES value="_RTLDLL;NO_STRICT"/>
<MAINSOURCE value="libcurl.bpf"/>
***************
*** 37,43 ****
</MACROS>
<OPTIONS>
! <CFLAG1 value="-O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -b- -k- -vi -c -tW -tWM"/>
! <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
! <AFLAGS value="/mx /w2 /zn"/>
<LFLAGS value=""/>
</OPTIONS>
--- 37,44 ----
</MACROS>
<OPTIONS>
! <CFLAG1 value="-Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c
! -tW -tWM"/>
! <PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
! <AFLAGS value="/mx /w2 /zi"/>
<LFLAGS value=""/>
</OPTIONS>
--- InstallMgr.bpg DELETED ---
--- InstallMgr.bpr DELETED ---
--- InstallMgr.cpp DELETED ---
--- InstallMgr.res DELETED ---