From: Jens F. <jfu...@us...> - 2005-01-30 10:26:52
|
Update of /cvsroot/jvcl/dev/JVCL3/examples/JvProgramVersionCheck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5407/JVCL3/examples/JvProgramVersionCheck Added Files: Main.dfm Main.pas Project1.dof Project1.dpr Project1.res Log Message: Sample Project for TJvProgramVersionCheck --- NEW FILE: Project1.dpr --- program Project1; {%File 'ModelSupport\Main\Main.txvpck'} {%File 'ModelSupport\Vorgabe.txvpck'} uses Forms, Main in 'Main.pas' {Form1}; {$R *.res} begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end. --- NEW FILE: Project1.res --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Main.pas --- unit Main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, JvProgramVersionCheck, JvComponent, JvAppStorage, JvAppIniStorage, StdCtrls, JvUrlListGrabber, JvUrlGrabbers, ImgList, JvPropertyStore, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdFTP, IdHTTP, FtpCli, HttpProt; type TForm1 = class(TForm) JvAppIniFileStorageVersionCheck: TJvAppIniFileStorage; JvProgramVersionDatabaseLocation1: TJvProgramVersionDatabaseLocation; JvProgramVersionFTPLocation1: TJvProgramVersionFTPLocation; JvProgramVersionHTTPLocation1: TJvProgramVersionHTTPLocation; JvProgramVersionHTTPLocationIndy1: TJvProgramVersionHTTPLocationIndy; JvProgramVersionNetworkLocation1: TJvProgramVersionNetworkLocation; Label1: TLabel; Label2: TLabel; ProgramVersionCheck: TJvProgramVersionCheck; JvProgramVersionHTTPLocationICS1: TJvProgramVersionHTTPLocationICS; procedure FormShow(Sender: TObject); function JvProgramVersionFTPLocation1LoadFileFromRemote( iProgramVersionLocation: TJvProgramVersionFTPLocation; const iRemotePath, iRemoteFileName, iLocalPath, iLocalFileName: string): string; function JvProgramVersionHTTPLocation1LoadFileFromRemote( iProgramVersionLocation: TJvProgramVersionHTTPLocation; const iRemotePath, iRemoteFileName, iLocalPath, iLocalFileName: string): string; public procedure VersionCheck; end; var Form1: TForm1; implementation {$R *.dfm} Uses JclFileUtils, JvTypes; procedure TForm1.FormShow(Sender: TObject); begin VersionCheck; end; function TForm1.JvProgramVersionFTPLocation1LoadFileFromRemote( iProgramVersionLocation: TJvProgramVersionFTPLocation; const iRemotePath, iRemoteFileName, iLocalPath, iLocalFileName: string): string; begin With JvFtpUrlGrabber do begin FileName := PathAppend(iLocalPath, iLocalFileName); url := iRemotePath + iRemoteFilename; OutputMode := omFile; Mode := hmBinary; Start; while Status <> gsStopped do Application.HandleMessage; Result := FileName; end; end; function TForm1.JvProgramVersionHTTPLocation1LoadFileFromRemote( iProgramVersionLocation: TJvProgramVersionHTTPLocation; const iRemotePath, iRemoteFileName, iLocalPath, iLocalFileName: string): string; begin With JvHttpUrlGrabber do begin FileName := PathAppend(iLocalPath, iLocalFileName); url := iRemotePath + iRemoteFilename; OutputMode := omFile; Start; sleep (1000); while Status <> gsStopped do Application.HandleMessage; Result := FileName; end; end; procedure TForm1.VersionCheck; begin with ProgramVersionCheck do begin Execute ; end; end; end. --- NEW FILE: Main.dfm --- object Form1: TForm1 Left = 357 Top = 242 Width = 476 Height = 413 Caption = 'Form1' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False OnShow = FormShow PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel Left = 80 Top = 85 Width = 305 Height = 29 Caption = 'JVCL Program Version Check' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -24 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False end object Label2: TLabel Left = 120 Top = 120 Width = 198 Height = 29 Caption = 'Sample Application' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -24 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False end object JvAppIniFileStorageVersionCheck: TJvAppIniFileStorage StorageOptions.BooleanStringTrueValues = 'TRUE, YES, Y' StorageOptions.BooleanStringFalseValues = 'FALSE, NO, N' StorageOptions.SetAsString = True StorageOptions.FloatAsString = True StorageOptions.DefaultIfReadConvertError = True StorageOptions.ReplaceCRLF = True AutoFlush = True AutoReload = True FileName = 'versioninfolocal.ini' SubStorages = <> Left = 80 Top = 15 end object ProgramVersionCheck: TJvProgramVersionCheck AllowedReleaseType = prtBeta AppStorage = JvAppIniFileStorageVersionCheck AppStoragePath = 'Local' CheckFrequency = 0 LocalDirectory = 'Version Check\a\b\c' LocalVersionInfoFileName = 'ProgramVersionCheckLocal.Ini' LocationDatabase = JvProgramVersionDatabaseLocation1 LocationFTP = JvProgramVersionFTPLocation1 LocationHTTP = JvProgramVersionHTTPLocationICS1 LocationNetwork = JvProgramVersionNetworkLocation1 LocationType = pvltHTTP UserOptions = [uoCheckFrequency, uoAllowedReleaseType, uoLocationNetwork, uoLocationHTTP, uoLocationFTP, uoLocationDatabase] Left = 355 Top = 205 end object JvProgramVersionNetworkLocation1: TJvProgramVersionNetworkLocation VersionInfoLocationPathList.Strings = ( 'Version Check\Remote') VersionInfoFilename = 'ProjektVersions.ini' Left = 105 Top = 200 end object JvProgramVersionHTTPLocation1: TJvProgramVersionHTTPLocation VersionInfoFilename = 'ProjektVersions_http.ini' OnLoadFileFromRemote = JvProgramVersionHTTPLocation1LoadFileFromRemote Left = 105 Top = 240 end object JvProgramVersionFTPLocation1: TJvProgramVersionFTPLocation OnLoadFileFromRemote = JvProgramVersionFTPLocation1LoadFileFromRemote Left = 105 Top = 280 end object JvProgramVersionDatabaseLocation1: TJvProgramVersionDatabaseLocation Left = 105 Top = 320 end object JvProgramVersionHTTPLocationIndy1: TJvProgramVersionHTTPLocationIndy VersionInfoLocationPathList.Strings = ( 'htasdasd' 'http://www.oratool.de/test/') VersionInfoFilename = 'ProjektVersions_http.ini' Left = 300 Top = 320 end object JvProgramVersionHTTPLocationICS1: TJvProgramVersionHTTPLocationICS VersionInfoLocationPathList.Strings = ( 'asdas' 'ftp://www.oratool.de/test/') VersionInfoFilename = 'ProjektVersions_http.ini' Left = 300 Top = 270 end end --- NEW FILE: Project1.dof --- [FileVersion] Version=7.0 [Compiler] A=8 B=0 C=1 D=1 E=0 F=0 G=1 H=1 I=1 J=0 K=0 L=1 M=0 N=1 O=1 P=1 Q=0 R=0 S=0 T=0 U=0 V=1 W=0 X=1 Y=1 Z=1 ShowHints=1 ShowWarnings=1 UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; NamespacePrefix= SymbolDeprecated=1 SymbolLibrary=1 SymbolPlatform=1 UnitLibrary=1 UnitPlatform=1 UnitDeprecated=1 HResultCompat=1 HidingMember=1 HiddenVirtual=1 Garbage=1 BoundsError=1 ZeroNilCompat=1 StringConstTruncated=1 ForLoopVarVarPar=1 TypedConstVarPar=1 AsgToTypedConst=1 CaseLabelRange=1 ForVariable=1 ConstructingAbstract=1 ComparisonFalse=1 ComparisonTrue=1 ComparingSignedUnsigned=1 CombiningSignedUnsigned=1 UnsupportedConstruct=1 FileOpen=1 FileOpenUnitSrc=1 BadGlobalSymbol=1 DuplicateConstructorDestructor=1 InvalidDirective=1 PackageNoLink=1 PackageThreadVar=1 ImplicitImport=1 HPPEMITIgnored=1 NoRetVal=1 UseBeforeDef=1 ForLoopVarUndef=1 UnitNameMismatch=1 NoCFGFileFound=1 MessageDirective=1 ImplicitVariants=1 UnicodeToLocale=1 LocaleToUnicode=1 ImagebaseMultiple=1 SuspiciousTypecast=1 PrivatePropAccessor=1 UnsafeType=0 UnsafeCode=0 UnsafeCast=0 [Linker] MapFile=0 OutputObjs=0 ConsoleApp=1 DebugInfo=0 RemoteSymbols=0 MinStackSize=16384 MaxStackSize=1048576 ImageBase=4194304 ExeDescription= [Directories] OutputDir= UnitOutputDir= PackageDLLOutputDir= PackageDCPOutputDir= SearchPath= Packages=vcl;rtl;vclx;indy;vclie;dbrtl;VclSmp;vcldb;bdertl;vcldbx;adortl;teeui;teedb;tee;ibxpress;vclactnband;vclshlctrls;madBasic_;madDisAsm_;DJcl;JvStdCtrlsD7R;JvAppFrmD7R;JvCoreD7R;JvBandsD7R;JvCmpD7R;JvCryptD7R;JvCtrlsD7R;JvCustomD7R;JvDBD7R;JvDlgsD7R;JvDockingD7R;JvDotNetCtrlsD7R;JvEDID7R;qrpt;JvGlobusD7R;JvHMID7R;JvInspectorD7R;JvInterpreterD7R;JvJansD7R;JvManagedThreadsD7R;JvMMD7R;JvNetD7R;JvPageCompsD7R;JvPluginD7R;JvPrintPreviewD7R;JvSystemD7R;JvTimeFrameworkD7R;JvUIBD7R;JvValidatorsD7R;JvWizardD7R;JvXPCtrlsD7R;cxLibraryVCLD7;dxBarD7;dxComnD7;dxBarDBNavD7;dxBarExtDBItemsD7;dxBarExtItemsD7;dxDockingD7;dxsbD7;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxDataD7;cxExtEditorsVCLD7;cxGridVCLD7;cxTreeListVCLD7;cxVerticalGridVCLD7;dxNavBarD7;dxmdsD7;dxPSCoreD7;dxPSTeeChartD7;dxPsPrVwAdvD7;dxPSLnksD7;dxPSDBTeeChartD7;dxPScxCommonD7;dxPScxTLLnkD7;dxPScxPCProdD7;dxPScxGridLnkD7;dxPScxExtCommonD7;dxPScxVGridLnkD7;SyntEdit7;DreamEditorAction_D7;doqb40pkg7;SMExportD7;SMImportD7;GridcpkrD7;xSqlGridPkg7;JvBDED7R;inet;xmlrtl;inetdbbde;inetdbxpress Conditionals= DebugSourceDirs= UsePackages=0 [Parameters] RunParams= HostApplication= Launcher= UseLauncher=0 DebugCWD= [Language] ActiveLang= ProjectLang= RootDir= [Version Info] IncludeVerInfo=1 AutoIncBuild=0 MajorVer=0 MinorVer=6 Release=1 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1031 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=0.6.1.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName=JVCL Product Version Check ProductVersion=1.0.0.0 Comments= [Excluded Packages] d:\programme\entwicklung\borland\delphi7\Bin\dclite70.bpl=Borland ITE (Integrated Translation Environment) d:\programme\entwicklung\borland\delphi7\Bin\dclsoap70.bpl=Borland SOAP-Komponenten d:\programme\entwicklung\borland\delphi7\Bin\dclocx70.bpl=Borland Importierte Beipspiel-ActiveX-Steuerelemente d:\programme\entwicklung\borland\delphi7\Bin\dcldbx70.bpl=Borland dbExpress-Komponenten d:\programme\entwicklung\borland\delphi7\Bin\dcldbxcds70.bpl=Borland SimpleDataset-Komponente (DBX) D:\Programme\Entwicklung\Borland\Delphi7\Bin\dclmid70.bpl=Borland MyBase-Datenzugriffskomponenten d:\programme\entwicklung\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Package für Web-Experten d:\programme\entwicklung\borland\delphi7\Bin\dclie70.bpl=Internet Explorer-Komponenten d:\programme\entwicklung\borland\delphi7\Bin\applet70.bpl=Borland Package für Systemsteuerungs-Applets d:\programme\entwicklung\borland\delphi7\Bin\dclclxdb70.bpl=Borland CLX-Datenbankkomponenten D:\Programme\Entwicklung\Borland\Delphi7\Bin\dclclxstd70.bpl=Borland CLX-Standardkomponenten C:\WINDOWS\system32\ibevnt70.bpl=Borland Interbase-Event Alerter-Komponente d:\programme\entwicklung\borland\delphi7\Bin\dclshlctrls70.bpl=Eigenschafts- und Komponenteneditoren für Shell-Steurelemente d:\programme\entwicklung\borland\delphi7\Bin\dclIntraweb_50_70.bpl=Intraweb 5.0 Design-Package für Delphi 7 d:\programme\entwicklung\borland\delphi7\bin\dclRave70.bpl=Rave Reports BE 5.0-Package d:\programme\entwicklung\borland\delphi7\Bin\dclofficexp70.bpl=Microsoft Office XP Beispiel Wrapper-Komponenten für Automationsserver [HistoryLists\hlConditionals] Count=2 Item0=DEBUG_OUTPUT Item1=NOFORMS [HistoryLists\hlUnitAliases] Count=1 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |