[sword-svn] r500 - in branches/BCB5: apps/InstallMgr clucene

scribe at crosswire.org scribe at crosswire.org
Wed Apr 22 02:29:33 MST 2009


Author: scribe
Date: 2009-04-22 02:29:33 -0700 (Wed, 22 Apr 2009)
New Revision: 500

Modified:
   branches/BCB5/apps/InstallMgr/InfoFrm.cpp
   branches/BCB5/apps/InstallMgr/InfoFrm.dfm
   branches/BCB5/apps/InstallMgr/InfoFrm.h
   branches/BCB5/apps/InstallMgr/InstallManager.bpr
   branches/BCB5/apps/InstallMgr/InstallManager.res
   branches/BCB5/apps/InstallMgr/MainFrm.cpp
   branches/BCB5/apps/InstallMgr/MainFrm.h
   branches/BCB5/apps/InstallMgr/RemoteMntFrm.cpp
   branches/BCB5/apps/InstallMgr/RemoteMntFrm.dfm
   branches/BCB5/apps/InstallMgr/RemoteMntFrm.h
   branches/BCB5/apps/InstallMgr/libcurl.bpr
   branches/BCB5/clucene/clucene.bpr
Log:
Added 1.6.x functionality to apps/InstallMgr

Modified: branches/BCB5/apps/InstallMgr/InfoFrm.cpp
===================================================================
--- branches/BCB5/apps/InstallMgr/InfoFrm.cpp	2009-04-21 12:15:33 UTC (rev 499)
+++ branches/BCB5/apps/InstallMgr/InfoFrm.cpp	2009-04-22 09:29:33 UTC (rev 500)
@@ -28,6 +28,7 @@
 //---------------------------------------------------------------------------
 void __fastcall TInfoForm::SpeedButton1Click(TObject *Sender)
 {
-	ModalResult = mrOk;	
+	ModalResult = (yesEdit->Text.UpperCase() == "YES") ? mrOk:mrCancel;	
 }
 //---------------------------------------------------------------------------
+

Modified: branches/BCB5/apps/InstallMgr/InfoFrm.dfm
===================================================================
(Binary files differ)

Modified: branches/BCB5/apps/InstallMgr/InfoFrm.h
===================================================================
--- branches/BCB5/apps/InstallMgr/InfoFrm.h	2009-04-21 12:15:33 UTC (rev 499)
+++ branches/BCB5/apps/InstallMgr/InfoFrm.h	2009-04-22 09:29:33 UTC (rev 500)
@@ -19,6 +19,7 @@
 	TPanel *Panel2;
 	TRichEdit *InfoText;
 	TSpeedButton *SpeedButton1;
+	TEdit *yesEdit;
 	void __fastcall FormShow(TObject *Sender);
 	void __fastcall SpeedButton1Click(TObject *Sender);
 private:	// User declarations

Modified: branches/BCB5/apps/InstallMgr/InstallManager.bpr
===================================================================
--- branches/BCB5/apps/InstallMgr/InstallManager.bpr	2009-04-21 12:15:33 UTC (rev 499)
+++ branches/BCB5/apps/InstallMgr/InstallManager.bpr	2009-04-22 09:29:33 UTC (rev 500)
@@ -59,9 +59,9 @@
 IncludeVerInfo=1
 AutoIncBuild=1
 MajorVer=1
-MinorVer=5
-Release=11
-Build=5
+MinorVer=6
+Release=0
+Build=0
 Debug=0
 PreRelease=0
 Special=0
@@ -73,13 +73,13 @@
 [Version Info Keys]
 CompanyName=CrossWire Bible Society
 FileDescription=SWORD Installation Manager
-FileVersion=1.5.11.5
+FileVersion=1.6.0.0
 InternalName=InstallMgr
-LegalCopyright=Copyright 1990-2008 by CrossWire Bible Society
+LegalCopyright=Copyright 1990-2009 by CrossWire Bible Society
 LegalTrademarks=
 OriginalFilename=
 ProductName=The SWORD Project
-ProductVersion=1.5.11
+ProductVersion=1.6.0RC2
 Comments=Seek Jesus who exchanges temporary for eternal
 
 [HistoryLists\hlIncludePath]

Modified: branches/BCB5/apps/InstallMgr/InstallManager.res
===================================================================
(Binary files differ)

Modified: branches/BCB5/apps/InstallMgr/MainFrm.cpp
===================================================================
--- branches/BCB5/apps/InstallMgr/MainFrm.cpp	2009-04-21 12:15:33 UTC (rev 499)
+++ branches/BCB5/apps/InstallMgr/MainFrm.cpp	2009-04-22 09:29:33 UTC (rev 500)
@@ -41,6 +41,41 @@
 	else	return 0;
 }
 
+bool InstallMgrWin::isUserDisclaimerConfirmed() const {
+	static bool confirmed = false;
+        if (!confirmed) {
+		InfoForm->Caption = "W A R N I N G";
+		InfoForm->info = "\\qc {\\b \\fs20 -=+* WARNING *+=- -=+* WARNING *+=-}\\par\\par\\pard ";
+		InfoForm->info +=
+			"Although Install Manager provides a convenient way for installing "
+			"and upgrading SWORD components, it also uses a systematic method "
+			"for accessing sites which gives packet sniffers a target to lock "
+			"into for singling out users."
+		        " \\par\\par ";
+		InfoForm->info += "\\qc {\\b \\fs20 "
+			"IF YOU LIVE IN A PERSECUTED COUNTRY AND DO NOT WISH TO RISK DETECTION, "
+			"YOU SHOULD *NOT* USE INSTALL MANAGER'S REMOTE SOURCE FEATURES."
+			"} \\par\\par\\pard ";
+		InfoForm->info +=
+			"Also, Remote Sources other than CrossWire may contain less than "
+			"quality modules, modules with unorthodox content, or even modules "
+			"which are not legitimately distributable.  Many repositories "
+			"contain wonderfully useful content.  These repositories simply "
+			"are not reviewed or maintained by CrossWire and CrossWire "
+			"cannot be held responsible for their content. CAVEAT EMPTOR."
+			" \\par\\par ";
+		InfoForm->info += "{\\b "
+			"If you understand this and are willing to enable remote source features "
+			"then type yes in the box below. "
+			" \\par\\par }";
+		InfoForm->info +=
+			"Enable? [no] ";
+		confirmed = (InfoForm->ShowModal() == mrOk);
+        }
+        return confirmed;
+}
+
+
 void WinStatusReporter::preStatus(long totalBytes, long completedBytes, const char *message) {
 	StatusForm->totalBytes = totalBytes;
 	StatusForm->completedBytes = completedBytes;
@@ -58,7 +93,7 @@
 	StatusForm->statusBar->Caption = ::IntToStr((long)dlnow) + " bytes out of " + ::IntToStr((long)dltotal) + " transferred (file: " + IntToStr(filePercent) + "% / total: " + IntToStr(totalPercent) + "%)";
 	StatusForm->fileProgress->Position = filePercent;
 	StatusForm->totalProgress->Position = totalPercent;
-	
+
 	StatusForm->statusBar->Repaint();
 	Application->ProcessMessages();
 }
@@ -408,7 +443,7 @@
 	TTreeNode *node;
 	TTreeNode *node2;
 	int retCount = 0;
-	
+
 	for (node = tree->Items->GetFirstNode(); node; node = node->getNextSibling()) {
 		for (node2 = node->getFirstChild(); node2; node2 = node2->getNextSibling()) {
 			if (node2->ImageIndex != 5) {
@@ -547,16 +582,12 @@
 
 
 void __fastcall TMainForm::SpeedButton1Click(TObject *Sender) {
-	InfoForm->Caption = "W A R N I N G";
-	InfoForm->info = "\\qc {\\b \\fs20 -=+* WARNING *+=- -=+* WARNING *+=-}\\par\\par\\pard ";
-	InfoForm->info += "Although Install Manager provides a convenient way for installing and upgrading SWORD components, it also uses a systematic method for accessing sites which gives packet sniffers a target to lock into for singling out users. \\par\\par ";
-	InfoForm->info += "\\b\\qc IF YOU LIVE IN A PERSECUTED COUNTRY AND DO NOT WISH TO RISK DETECTION, YOU SHOULD *NOT* USE INSTALL MANAGER'S REMOTE SOURCE FEATURES.";
-	InfoForm->ShowModal();
-	if (RemoteMntForm->ShowModal() == mrOk) {
+	if (installMgr->isUserDisclaimerConfirmed()) {
+		RemoteMntForm->ShowModal();
 		delete installMgr;
 		installMgr = new InstallMgrWin("./installMgr");
 		refreshPageControl();
-	}
+        }
 }
 
 

Modified: branches/BCB5/apps/InstallMgr/MainFrm.h
===================================================================
--- branches/BCB5/apps/InstallMgr/MainFrm.h	2009-04-21 12:15:33 UTC (rev 499)
+++ branches/BCB5/apps/InstallMgr/MainFrm.h	2009-04-22 09:29:33 UTC (rev 500)
@@ -47,6 +47,7 @@
 	InstallMgrWin(const char *privatePath = "./", StatusReporter *statusReporter = 0) : InstallMgr(privatePath, statusReporter) {}
 	virtual int ftpCopy(InstallSource *is, const char *src, const char *dest, bool dirTransfer = false, const char *suffix = "");
 	virtual bool getCipherCode(const char *modName, SWConfig *config);
+	virtual bool isUserDisclaimerConfirmed() const;
 };
 
 //---------------------------------------------------------------------------

Modified: branches/BCB5/apps/InstallMgr/RemoteMntFrm.cpp
===================================================================
--- branches/BCB5/apps/InstallMgr/RemoteMntFrm.cpp	2009-04-21 12:15:33 UTC (rev 499)
+++ branches/BCB5/apps/InstallMgr/RemoteMntFrm.cpp	2009-04-22 09:29:33 UTC (rev 500)
@@ -3,6 +3,7 @@
 #pragma hdrstop
 #include <time.h>
 #include "RemoteMntFrm.h"
+#include "MainFrm.h"
 #include <installmgr.h>
 
 using namespace std;
@@ -26,12 +27,14 @@
 __fastcall TRemoteMntForm::TRemoteMntForm(TComponent* Owner)
 	: TForm(Owner)
 {
+	config = 0;
 }
 //---------------------------------------------------------------------------
 void __fastcall TRemoteMntForm::FormShow(TObject *Sender)
 {
 	ConfigEntMap::iterator loop, end;
-	config = new SWConfig("./installMgr/InstallMgr.conf");	
+        delete config;	// for reloads
+	config = new SWConfig("./installMgr/InstallMgr.conf");
 	ListBox1->Clear();
 	loop = config->Sections["Sources"].lower_bound("FTPSource");
 	end = config->Sections["Sources"].upper_bound("FTPSource");
@@ -59,13 +62,14 @@
 void __fastcall TRemoteMntForm::FormClose(TObject *Sender,
 	 TCloseAction &Action)
 {
-	delete config;	
+	delete config;
+        config = 0;
 }
 
 
 void __fastcall TRemoteMntForm::SpeedButton4Click(TObject *Sender)
 {
-	ModalResult = mrCancel;	
+	ModalResult = mrCancel;
 }
 
 
@@ -149,3 +153,10 @@
 }
 //---------------------------------------------------------------------------
 
+void __fastcall TRemoteMntForm::SpeedButton5Click(TObject *Sender)
+{
+	MainForm->installMgr->refreshRemoteSourceConfiguration();
+        FormShow(0);
+}
+//---------------------------------------------------------------------------
+

Modified: branches/BCB5/apps/InstallMgr/RemoteMntFrm.dfm
===================================================================
(Binary files differ)

Modified: branches/BCB5/apps/InstallMgr/RemoteMntFrm.h
===================================================================
--- branches/BCB5/apps/InstallMgr/RemoteMntFrm.h	2009-04-21 12:15:33 UTC (rev 499)
+++ branches/BCB5/apps/InstallMgr/RemoteMntFrm.h	2009-04-22 09:29:33 UTC (rev 500)
@@ -31,6 +31,8 @@
 	TLabel *Label2;
 	TLabel *Label3;
 	TCheckBox *CheckBox1;
+	TPanel *Panel5;
+	TSpeedButton *SpeedButton5;
 	void __fastcall FormShow(TObject *Sender);
 	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
 	void __fastcall NameEditChange(TObject *Sender);
@@ -41,6 +43,7 @@
 	void __fastcall SpeedButton2Click(TObject *Sender);
 	void __fastcall SpeedButton1Click(TObject *Sender);
 	void __fastcall SpeedButton3Click(TObject *Sender);
+	void __fastcall SpeedButton5Click(TObject *Sender);
 private:	// User declarations
 	SWConfig *config;
 	void checkDisabled();

Modified: branches/BCB5/apps/InstallMgr/libcurl.bpr
===================================================================
--- branches/BCB5/apps/InstallMgr/libcurl.bpr	2009-04-21 12:15:33 UTC (rev 499)
+++ branches/BCB5/apps/InstallMgr/libcurl.bpr	2009-04-22 09:29:33 UTC (rev 500)
@@ -31,7 +31,7 @@
     <PATHRC value=".;"/>
     <PATHASM value=".;"/>
     <LINKER value="TLib"/>
-    <USERDEFINES value="_DEBUG"/>
+    <USERDEFINES value=""/>
     <SYSDEFINES value="_RTLDLL;NO_STRICT"/>
     <MAINSOURCE value="libcurl.bpf"/>
     <INCLUDEPATH value="curl\curlcpp;curl\lib;curl\include;$(BCB)\include;$(BCB)\include\vcl"/>
@@ -42,10 +42,9 @@
   <OPTIONS>
     <IDLCFLAGS value="-Icurl\curlcpp -Icurl\lib -Icurl\include -I$(BCB)\include 
       -I$(BCB)\include\vcl -src_suffix cpp -boa"/>
-    <CFLAG1 value="-Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -4 -b- -k -y -v -vi- 
-      -c -tW -tWM"/>
-    <PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
-    <AFLAGS value="/mx /w2 /zi"/>
+    <CFLAG1 value="-O2 -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -a8 -4 -b- -k- -vi -c -tW -tWM"/>
+    <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+    <AFLAGS value="/mx /w2 /zn"/>
     <LFLAGS value="/P32"/>
   </OPTIONS>
   <LINKER>

Modified: branches/BCB5/clucene/clucene.bpr
===================================================================
--- branches/BCB5/clucene/clucene.bpr	2009-04-21 12:15:33 UTC (rev 499)
+++ branches/BCB5/clucene/clucene.bpr	2009-04-22 09:29:33 UTC (rev 500)
@@ -18,7 +18,7 @@
     <PATHRC value=".;"/>
     <PATHASM value=".;"/>
     <LINKER value="TLib"/>
-    <USERDEFINES value="MAX_PATH=256;UNICODE;_WIN32;_CL_DISABLE_MULTITHREADING;LUCENE_ENABLE_REFCOUNT;_DEBUG"/>
+    <USERDEFINES value="MAX_PATH=256;UNICODE;_WIN32;_CL_DISABLE_MULTITHREADING;LUCENE_ENABLE_REFCOUNT"/>
     <SYSDEFINES value="_RTLDLL;NO_STRICT"/>
     <MAINSOURCE value="clucene.bpf"/>
     <INCLUDEPATH value="src\CLucene;src;$(BCB)\include;$(BCB)\include\vcl"/>
@@ -30,9 +30,9 @@
     <IDLCFLAGS value="-Isrc\CLucene -Isrc -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp 
       -DMAX_PATH=256 -DUNICODE -D_WIN32 -D_CL_DISABLE_MULTITHREADING 
       -DLUCENE_ENABLE_REFCOUNT -boa"/>
-    <CFLAG1 value="-Od -Q -w- -Vx -VF -X- -r- -a8 -4 -b- -k -y -v -vi- -c -tW -tWM"/>
-    <PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
-    <AFLAGS value="/mx /w2 /zi"/>
+    <CFLAG1 value="-O2 -Q -w- -Vx -VF -X- -a8 -4 -b- -k- -vi -c -tW -tWM"/>
+    <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+    <AFLAGS value="/mx /w2 /zn"/>
     <LFLAGS value="/P256"/>
   </OPTIONS>
   <LINKER>
@@ -96,8 +96,8 @@
 
 [HistoryLists\hlConditionals]
 Count=17
-Item0=MAX_PATH=256;UNICODE;_WIN32;_CL_DISABLE_MULTITHREADING;LUCENE_ENABLE_REFCOUNT;_DEBUG
-Item1=MAX_PATH=256;UNICODE;_WIN32;_CL_DISABLE_MULTITHREADING;LUCENE_ENABLE_REFCOUNT
+Item0=MAX_PATH=256;UNICODE;_WIN32;_CL_DISABLE_MULTITHREADING;LUCENE_ENABLE_REFCOUNT
+Item1=MAX_PATH=256;UNICODE;_WIN32;_CL_DISABLE_MULTITHREADING;LUCENE_ENABLE_REFCOUNT;_DEBUG
 Item2=MAX_PATH=256;UNICODE;_WIN32;_CL_DISABLE_MULTITHREADING
 Item3=MAX_PATH=256;UNICODE;_WIN32;_CL_DISABLE_MULTITHREADING;_DEBUG
 Item4=UNICODE;_WIN32;_CL_DISABLE_MULTITHREADING




More information about the sword-cvs mailing list