Стартовый пул
This commit is contained in:
121
Abbrevia/examples/CBuilder/Abbrexam.bpr
Normal file
121
Abbrevia/examples/CBuilder/Abbrexam.bpr
Normal file
@@ -0,0 +1,121 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = Abbrexam.exe
|
||||
OBJFILES = Abbrexam.obj UExample.obj UDemoDlg.obj
|
||||
RESFILES = Abbrexam.res
|
||||
RESDEPEN = $(RESFILES) UExample.dfm UDemoDlg.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vclx35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib B304_r35.lib
|
||||
PACKAGES = VCL35.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -DUSEPACKAGES -I$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-DUSEPACKAGES \
|
||||
-U$(BCB)\include;$(BCB)\include\vcl;$(BCB)\Lib;$(BCB)\Lib\Obj;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W -$O- -v \
|
||||
-JPHNV -M
|
||||
RFLAGS = -DUSEPACKAGES -i$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/dUSEPACKAGES /mx /w2 /zd
|
||||
LFLAGS = -L$(BCB)\include;$(BCB)\include\vcl;$(BCB)\Lib;$(BCB)\Lib\Obj;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj $(PACKAGES) sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=4
|
||||
Item0=$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
Item2=..\..\Headers\CBuildr3;$(BCB)\include;$(BCB)\include\vcl;..\..
|
||||
Item3=..\..\Headers\CBuildr3;$(BCB)\include;$(BCB)\include\vcl;D:\Abbrevia
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=7
|
||||
Item0=$(BCB)\include;$(BCB)\include\vcl;$(BCB)\Lib;$(BCB)\Lib\Obj;..\..\packages;..\..\source
|
||||
Item1=$(BCB)\include;$(BCB)\include\vcl;$(BCB)\Lib\Obj;..\..\packages;..\..\source
|
||||
Item2=$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item3=$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source;D:\SourceForge\Abbrevia\packages
|
||||
Item4=$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item5=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
Item6=..\..;$(BCB)\lib\obj;$(BCB)\lib;D:\Abbrevia
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=USEPACKAGES
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
51
Abbrevia/examples/CBuilder/Abbrexam.cpp
Normal file
51
Abbrevia/examples/CBuilder/Abbrexam.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* Abbrexam.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("UExample.cpp", Form1);
|
||||
USERES("Abbrexam.res");
|
||||
USEFORM("UDemoDlg.cpp", DemoDlg);
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->CreateForm(__classid(TDemoDlg), &DemoDlg);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
85
Abbrevia/examples/CBuilder/AllExamples.bpg
Normal file
85
Abbrevia/examples/CBuilder/AllExamples.bpg
Normal file
@@ -0,0 +1,85 @@
|
||||
#------------------------------------------------------------------------------
|
||||
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 = Abbrexam CabExt CabFind CompPad Contents ExCBrows ExFilter Finder \
|
||||
MakeCab MakeSfx selfex SelfExV SelfStub Streams StrmBmp StrmPad TPZip Unzip \
|
||||
UsingAPI Zipper ZipReg ZipView
|
||||
#------------------------------------------------------------------------------
|
||||
default: $(PROJECTS)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Abbrexam: Abbrexam.bpr
|
||||
$(MAKE)
|
||||
|
||||
CabExt: CabExt.bpr
|
||||
$(MAKE)
|
||||
|
||||
CabFind: CabFind.bpr
|
||||
$(MAKE)
|
||||
|
||||
CompPad: CompPad.bpr
|
||||
$(MAKE)
|
||||
|
||||
Contents: Contents.bpr
|
||||
$(MAKE)
|
||||
|
||||
ExCBrows: ExCBrows.bpr
|
||||
$(MAKE)
|
||||
|
||||
ExFilter: ExFilter.bpr
|
||||
$(MAKE)
|
||||
|
||||
Finder: Finder.bpr
|
||||
$(MAKE)
|
||||
|
||||
MakeCab: MakeCab.bpr
|
||||
$(MAKE)
|
||||
|
||||
MakeSfx: MakeSfx.bpr
|
||||
$(MAKE)
|
||||
|
||||
selfex: selfex.bpr
|
||||
$(MAKE)
|
||||
|
||||
SelfExV: SelfExV.bpr
|
||||
$(MAKE)
|
||||
|
||||
SelfStub: SelfStub.bpr
|
||||
$(MAKE)
|
||||
|
||||
Streams: Streams.bpr
|
||||
$(MAKE)
|
||||
|
||||
StrmBmp: StrmBmp.bpr
|
||||
$(MAKE)
|
||||
|
||||
StrmPad: StrmPad.bpr
|
||||
$(MAKE)
|
||||
|
||||
TPZip: TPZip.bpr
|
||||
$(MAKE)
|
||||
|
||||
Unzip: Unzip.bpr
|
||||
$(MAKE)
|
||||
|
||||
UsingAPI: UsingAPI.bpr
|
||||
$(MAKE)
|
||||
|
||||
Zipper: Zipper.bpr
|
||||
$(MAKE)
|
||||
|
||||
ZipReg: ZipReg.bpr
|
||||
$(MAKE)
|
||||
|
||||
ZipView: ZipView.bpr
|
||||
$(MAKE)
|
||||
|
||||
|
112
Abbrevia/examples/CBuilder/CabExt.bpr
Normal file
112
Abbrevia/examples/CBuilder/CabExt.bpr
Normal file
@@ -0,0 +1,112 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = CabExt.exe
|
||||
OBJFILES = CabExt.obj CabExt1.obj
|
||||
RESFILES = CabExt.res
|
||||
RESDEPEN = $(RESFILES) CabExt1.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vclx35.lib vcl35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib B304_r35.lib
|
||||
PACKAGES = vclx35.bpi VCL35.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W -$O- -v \
|
||||
-JPHNV -M
|
||||
RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source /mx /w2 /zd
|
||||
LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) -aa \
|
||||
-Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=4
|
||||
Item0=$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
Item2=..\..\Examples\CBuildr3;$(BCB)\include;$(BCB)\include\vcl
|
||||
Item3=..\..\Headers\CBuildr3;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=4
|
||||
Item0=$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
Item2=..\..\..\CBuildr3;..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
Item3=..\source;..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
46
Abbrevia/examples/CBuilder/CabExt.cpp
Normal file
46
Abbrevia/examples/CBuilder/CabExt.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("CabExt1.cpp", Form1);
|
||||
USERES("CabExt.res");
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
84
Abbrevia/examples/CBuilder/CabExt1.cpp
Normal file
84
Abbrevia/examples/CBuilder/CabExt1.cpp
Normal file
@@ -0,0 +1,84 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "CabExt1.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "AbCabExt"
|
||||
#pragma link "AbCBrows"
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma link "AbMeter"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
|
||||
char MainCaption[] = "Cabinet Extractor";
|
||||
bool AbortFlag;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Button1Click(TObject *Sender)
|
||||
{
|
||||
if (OpenDialog1->Execute()) {
|
||||
AbCabExtractor1->FileName = OpenDialog1->FileName;
|
||||
AbCabExtractor1->BaseDirectory = ExtractFilePath(AbCabExtractor1->FileName);
|
||||
Cursor = crHourGlass;
|
||||
AbCabExtractor1->ExtractFiles("*.*");
|
||||
Cursor = crDefault;
|
||||
}
|
||||
Caption = MainCaption;
|
||||
AbortFlag = False;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbCabExtractor1ConfirmProcessItem(TObject *Sender,
|
||||
TAbArchiveItem *Item, TAbProcessType ProcessType, bool &Confirm)
|
||||
{
|
||||
Caption = "Extracting " + Item->FileName;
|
||||
Confirm = !AbortFlag;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Button2Click(TObject *Sender)
|
||||
{
|
||||
AbortFlag = True;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
|
||||
{
|
||||
AbCabExtractor1->FileName = "";
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbCabExtractor1RequestImage(TObject *Sender,
|
||||
Integer ImageNumber, AnsiString &ImageName, bool &Abort)
|
||||
{
|
||||
Abort = InputQuery("Cab Extractor", "Next Cab name", ImageName);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/CabExt1.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/CabExt1.dfm
Normal file
Binary file not shown.
66
Abbrevia/examples/CBuilder/CabExt1.h
Normal file
66
Abbrevia/examples/CBuilder/CabExt1.h
Normal file
@@ -0,0 +1,66 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef CabExt1H
|
||||
#define CabExt1H
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\ComCtrls.hpp>
|
||||
#include <vcl\Dialogs.hpp>
|
||||
#include "AbCabExt.hpp"
|
||||
#include "AbCBrows.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
#include "AbMeter.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TLabel *Label1;
|
||||
TButton *Button1;
|
||||
TMemo *Memo1;
|
||||
TButton *Button2;
|
||||
TOpenDialog *OpenDialog1;
|
||||
TAbMeter *AbMeter1;
|
||||
TAbCabExtractor *AbCabExtractor1;
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
void __fastcall AbCabExtractor1ConfirmProcessItem(TObject *Sender,
|
||||
TAbArchiveItem *Item, TAbProcessType ProcessType, bool &Confirm);
|
||||
void __fastcall Button2Click(TObject *Sender);
|
||||
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
||||
void __fastcall AbCabExtractor1RequestImage(TObject *Sender,
|
||||
Integer ImageNumber, AnsiString &ImageName, bool &Abort);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
188
Abbrevia/examples/CBuilder/CabFind.bpr
Normal file
188
Abbrevia/examples/CBuilder/CabFind.bpr
Normal file
@@ -0,0 +1,188 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# IDE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# The following section of the project makefile is managed by the BCB IDE.
|
||||
# It is recommended to use the IDE to change any of the values in this
|
||||
# section.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = CabFind.exe
|
||||
OBJFILES = CabFind.obj CabFind1.obj
|
||||
RESFILES = CabFind.res
|
||||
DEFFILE =
|
||||
RESDEPEN = $(RESFILES) CabFind1.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vclx35.lib VCL35.lib
|
||||
SPARELIBS = VCL35.lib vclx35.lib B304_r35.lib
|
||||
PACKAGES = vclx35.bpi VCL35.bpi
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;
|
||||
PATHASM = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=3
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
Item2=..\..\CBuildr3;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=3
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..\..\abbrevia;..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
Item2=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlDebugSourcePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=_RTLDLL
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# MAKE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# This section of the project file is not used by the BCB IDE. It is for
|
||||
# the benefit of building from the command-line using the MAKE utility.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCC32)
|
||||
BCC32 = bcc32
|
||||
!endif
|
||||
|
||||
!if !$d(DCC32)
|
||||
DCC32 = dcc32
|
||||
!endif
|
||||
|
||||
!if !$d(TASM32)
|
||||
TASM32 = tasm32
|
||||
!endif
|
||||
|
||||
!if !$d(LINKER)
|
||||
LINKER = ilink32
|
||||
!endif
|
||||
|
||||
!if !$d(BRCC32)
|
||||
BRCC32 = brcc32
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
!if $d(PATHCPP)
|
||||
.PATH.CPP = $(PATHCPP)
|
||||
.PATH.C = $(PATHCPP)
|
||||
!endif
|
||||
|
||||
!if $d(PATHPAS)
|
||||
.PATH.PAS = $(PATHPAS)
|
||||
!endif
|
||||
|
||||
!if $d(PATHASM)
|
||||
.PATH.ASM = $(PATHASM)
|
||||
!endif
|
||||
|
||||
!if $d(PATHRC)
|
||||
.PATH.RC = $(PATHRC)
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
# ---------------------------------------------------------------------------
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.asm.obj:
|
||||
$(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
|
||||
# ---------------------------------------------------------------------------
|
45
Abbrevia/examples/CBuilder/CabFind.cpp
Normal file
45
Abbrevia/examples/CBuilder/CabFind.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
USERES("CabFind.res");
|
||||
USEFORM("CabFind1.cpp", Form1);
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
107
Abbrevia/examples/CBuilder/CabFind1.cpp
Normal file
107
Abbrevia/examples/CBuilder/CabFind1.cpp
Normal file
@@ -0,0 +1,107 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "CabFind1.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma link "AbCBrows"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
|
||||
bool Aborted;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
|
||||
{
|
||||
Aborted = true;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TForm1::Edit1Change(TObject *Sender)
|
||||
{
|
||||
Button1->Enabled = (Edit1->Text.Length() > 0);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TForm1::Button1Click(TObject *Sender)
|
||||
{
|
||||
Button1->Enabled = false;
|
||||
Memo1->Clear();
|
||||
try
|
||||
{
|
||||
Button2->Enabled = true;
|
||||
Aborted = false;
|
||||
// look in the file list box for the file
|
||||
for (int i=0; i<FileListBox1->Items->Count; i++)
|
||||
{
|
||||
Application->ProcessMessages();
|
||||
if (Aborted)
|
||||
break;
|
||||
if (CompareText(Edit1->Text, FileListBox1->Items->Strings[i]) == 0)
|
||||
{
|
||||
Memo1->Lines->Add("Found in " + FileListBox1->Directory);
|
||||
break;
|
||||
}
|
||||
// now add search of zip and self extracting files
|
||||
String CurFile = UpperCase(FileListBox1->Items->Strings[i]);
|
||||
if (CurFile.Pos(".CAB") > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
AbCabBrowser1->FileName = FileListBox1->Items->Strings[i];
|
||||
if (AbCabBrowser1->FindFile(Edit1->Text) >= 0)
|
||||
Memo1->Lines->Add("Found in " + FileListBox1->Items->Strings[i]);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
} //if (CurFile...
|
||||
} //for (int...
|
||||
}
|
||||
__finally
|
||||
{
|
||||
Memo1->Lines->Add("Done!");
|
||||
Edit1->Enabled = true;
|
||||
Button1->Enabled = true;
|
||||
Button2->Enabled = false;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TForm1::Button2Click(TObject *Sender)
|
||||
{
|
||||
Aborted = true;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/CabFind1.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/CabFind1.dfm
Normal file
Binary file not shown.
63
Abbrevia/examples/CBuilder/CabFind1.h
Normal file
63
Abbrevia/examples/CBuilder/CabFind1.h
Normal file
@@ -0,0 +1,63 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef CabFind1H
|
||||
#define CabFind1H
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
#include "AbCBrows.hpp"
|
||||
#include <FileCtrl.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TLabel *Label1;
|
||||
TLabel *Label2;
|
||||
TEdit *Edit1;
|
||||
TMemo *Memo1;
|
||||
TDriveComboBox *DriveComboBox1;
|
||||
TDirectoryListBox *DirectoryListBox1;
|
||||
TFileListBox *FileListBox1;
|
||||
TMemo *Memo2;
|
||||
TButton *Button1;
|
||||
TButton *Button2;
|
||||
TAbCabBrowser *AbCabBrowser1;
|
||||
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
||||
void __fastcall Edit1Change(TObject *Sender);
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
void __fastcall Button2Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
110
Abbrevia/examples/CBuilder/CompPad.bpr
Normal file
110
Abbrevia/examples/CBuilder/CompPad.bpr
Normal file
@@ -0,0 +1,110 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = CompPad.exe
|
||||
OBJFILES = ..\..\source\AbZipper.obj ..\..\source\AbZipTyp.obj ..\..\source\AbArcTyp.obj \
|
||||
..\..\source\AbSpanSt.obj ..\..\source\AbUtils.obj CompPad.obj UCompPad.obj
|
||||
RESFILES = CompPad.res
|
||||
RESDEPEN = $(RESFILES) UCompPad.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vclx35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib B304_r35.lib
|
||||
PACKAGES = VCL35.bpi
|
||||
PATHASM = .;..\..\source
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I..\..\..\abbrevia;..\..\source;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\..\source \
|
||||
-DUSEPACKAGES -H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -U..\..\..\abbrevia;..\..\source;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..\..\abbrevia;..\..\source;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\..\source \
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-DUSEPACKAGES -$Y -$W -$O- -v -JPHNV -M
|
||||
RFLAGS = -i..\..\..\abbrevia;..\..\source;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\..\source \
|
||||
-DUSEPACKAGES
|
||||
AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\..\source \
|
||||
/dUSEPACKAGES /mx /w2 /zd
|
||||
LFLAGS = -L..\..\..\abbrevia;..\..\source;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj $(PACKAGES) sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\..\source
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=1
|
||||
Item0=$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\..\source
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
54
Abbrevia/examples/CBuilder/CompPad.cpp
Normal file
54
Abbrevia/examples/CBuilder/CompPad.cpp
Normal file
@@ -0,0 +1,54 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* CompPad.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("UCompPad.cpp", Form1);
|
||||
USERES("CompPad.res");
|
||||
USEUNIT("..\..\source\AbZipper.pas");
|
||||
USEUNIT("..\..\source\AbZipTyp.pas");
|
||||
USEUNIT("..\..\source\AbArcTyp.pas");
|
||||
USEUNIT("..\..\source\AbSpanSt.pas");
|
||||
USEUNIT("..\..\source\AbUtils.pas");
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
186
Abbrevia/examples/CBuilder/Contents.bpr
Normal file
186
Abbrevia/examples/CBuilder/Contents.bpr
Normal file
@@ -0,0 +1,186 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# IDE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# The following section of the project makefile is managed by the BCB IDE.
|
||||
# It is recommended to use the IDE to change any of the values in this
|
||||
# section.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = Contents.exe
|
||||
OBJFILES = Contents.obj UContent.obj
|
||||
RESFILES = Contents.res
|
||||
DEFFILE =
|
||||
RESDEPEN = $(RESFILES) UContent.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib VCLX35.lib VCL35.lib
|
||||
SPARELIBS = VCL35.lib VCLX35.lib B304_r35.lib
|
||||
PACKAGES = vclx35.bpi VCL35.bpi
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;
|
||||
PATHASM = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlDebugSourcePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=_RTLDLL
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# MAKE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# This section of the project file is not used by the BCB IDE. It is for
|
||||
# the benefit of building from the command-line using the MAKE utility.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCC32)
|
||||
BCC32 = bcc32
|
||||
!endif
|
||||
|
||||
!if !$d(DCC32)
|
||||
DCC32 = dcc32
|
||||
!endif
|
||||
|
||||
!if !$d(TASM32)
|
||||
TASM32 = tasm32
|
||||
!endif
|
||||
|
||||
!if !$d(LINKER)
|
||||
LINKER = ilink32
|
||||
!endif
|
||||
|
||||
!if !$d(BRCC32)
|
||||
BRCC32 = brcc32
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
!if $d(PATHCPP)
|
||||
.PATH.CPP = $(PATHCPP)
|
||||
.PATH.C = $(PATHCPP)
|
||||
!endif
|
||||
|
||||
!if $d(PATHPAS)
|
||||
.PATH.PAS = $(PATHPAS)
|
||||
!endif
|
||||
|
||||
!if $d(PATHASM)
|
||||
.PATH.ASM = $(PATHASM)
|
||||
!endif
|
||||
|
||||
!if $d(PATHRC)
|
||||
.PATH.RC = $(PATHRC)
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
# ---------------------------------------------------------------------------
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.asm.obj:
|
||||
$(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
|
||||
# ---------------------------------------------------------------------------
|
45
Abbrevia/examples/CBuilder/Contents.cpp
Normal file
45
Abbrevia/examples/CBuilder/Contents.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
USERES("Contents.res");
|
||||
USEFORM("UContent.cpp", Form1);
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/Demo.cab
Normal file
BIN
Abbrevia/examples/CBuilder/Demo.cab
Normal file
Binary file not shown.
BIN
Abbrevia/examples/CBuilder/Demo.zip
Normal file
BIN
Abbrevia/examples/CBuilder/Demo.zip
Normal file
Binary file not shown.
46
Abbrevia/examples/CBuilder/DgAbout.cpp
Normal file
46
Abbrevia/examples/CBuilder/DgAbout.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* DgAbout.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "DgAbout.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
TdlgAboutBox *dlgAboutBox;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TdlgAboutBox::TdlgAboutBox(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TdlgAboutBox::FormCreate(TObject *Sender)
|
||||
{
|
||||
Version->Caption = "Version " + String(AbVersion);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/DgAbout.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/DgAbout.dfm
Normal file
Binary file not shown.
66
Abbrevia/examples/CBuilder/DgAbout.h
Normal file
66
Abbrevia/examples/CBuilder/DgAbout.h
Normal file
@@ -0,0 +1,66 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* DgAbout.h */
|
||||
/* Copyright (c) TurboPower Software Co., 1997, 1998 */
|
||||
/* All Rights Reserved */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef DgAboutH
|
||||
#define DgAboutH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include "AbConst.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TdlgAboutBox : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TPanel *Panel1;
|
||||
TLabel *Label8;
|
||||
TImage *ProgramIcon;
|
||||
TLabel *Label7;
|
||||
TLabel *Label86;
|
||||
TLabel *Label85;
|
||||
TLabel *Label84;
|
||||
TLabel *Version;
|
||||
TPanel *Panel2;
|
||||
TLabel *lnTitleShadow;
|
||||
TLabel *lblTitle;
|
||||
TLabel *Label5;
|
||||
TLabel *Label1;
|
||||
TButton *OKButton;
|
||||
void __fastcall FormCreate(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TdlgAboutBox(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TdlgAboutBox *dlgAboutBox;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
108
Abbrevia/examples/CBuilder/ExCBrow1.cpp
Normal file
108
Abbrevia/examples/CBuilder/ExCBrow1.cpp
Normal file
@@ -0,0 +1,108 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "ExCBrow1.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "AbMeter"
|
||||
#pragma link "AbCBrows"
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Button1Click(TObject *Sender)
|
||||
{
|
||||
if (OpenDialog1->Execute())
|
||||
AbCabBrowser1->FileName = OpenDialog1->FileName;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Button2Click(TObject *Sender)
|
||||
{
|
||||
AbCabBrowser1->FileName = "";
|
||||
Memo1->Clear();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbCabBrowser1Load(TObject *Sender)
|
||||
{
|
||||
Memo1->Clear();
|
||||
Memo1->Lines->Add(AbCabBrowser1->FileName);
|
||||
Memo1->Lines->Add("----------------------------------------------");
|
||||
String s = " Size: \t \t ";
|
||||
Memo1->Lines->Add(s + IntToStr(AbCabBrowser1->CabSize));
|
||||
s = " Folders: \t \t ";
|
||||
Memo1->Lines->Add(s + IntToStr(AbCabBrowser1->FolderCount));
|
||||
s = " Files: \t \t ";
|
||||
Memo1->Lines->Add(s + IntToStr(AbCabBrowser1->Count));
|
||||
s = " SetID: \t \t ";
|
||||
Memo1->Lines->Add(s + IntToStr(AbCabBrowser1->SetID));
|
||||
s = " Cab #: \t \t ";
|
||||
Memo1->Lines->Add(s + IntToStr(AbCabBrowser1->CurrentCab));
|
||||
s = " hasPrev: \t ";
|
||||
if (AbCabBrowser1->HasPrev)
|
||||
s = s + "Yes";
|
||||
else
|
||||
s = s + "No";
|
||||
Memo1->Lines->Add(s);
|
||||
s = " hasNext: \t ";
|
||||
if (AbCabBrowser1->HasNext)
|
||||
s = s + "Yes";
|
||||
else
|
||||
s = s + "No";
|
||||
Memo1->Lines->Add(s);
|
||||
Memo1->Lines->Add(" ");
|
||||
|
||||
if (AbCabBrowser1->Count > 0) {
|
||||
s = "Files: \t \t Size \t Timestamp \t Attributes \t Partial File";
|
||||
Memo1->Lines->Add(s);
|
||||
s = "------------------------------------------------------------------";
|
||||
Memo1->Lines->Add(s);
|
||||
for (int i=0; i<AbCabBrowser1->Count; i++) {
|
||||
Longint LI = AbCabBrowser1->Items[i]->LastModFileDate;
|
||||
LI = LI << 16;
|
||||
LI = LI + AbCabBrowser1->Items[i]->LastModFileTime;
|
||||
TDateTime DT = FileDateToDateTime(LI);
|
||||
s = AbCabBrowser1->Items[i]->FileName + "\t" +
|
||||
IntToStr(AbCabBrowser1->Items[i]->UncompressedSize) + "\t" +
|
||||
DateTimeToStr(DT) + "\t" +
|
||||
IntToStr(AbCabBrowser1->Items[i]->ExternalFileAttributes) + "\t";
|
||||
if (AbCabBrowser1->Items[i]->PartialFile)
|
||||
s = s + "Yes";
|
||||
else
|
||||
s = s + "No";
|
||||
Memo1->Lines->Add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/ExCBrow1.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/ExCBrow1.dfm
Normal file
Binary file not shown.
68
Abbrevia/examples/CBuilder/ExCBrow1.h
Normal file
68
Abbrevia/examples/CBuilder/ExCBrow1.h
Normal file
@@ -0,0 +1,68 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef ExCBrow1H
|
||||
#define ExCBrow1H
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include "AbMeter.hpp"
|
||||
#include <vcl\Dialogs.hpp>
|
||||
#include "AbCBrows.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TMemo *Memo1;
|
||||
TPanel *Panel1;
|
||||
TLabel *Label1;
|
||||
TButton *Button1;
|
||||
TButton *Button2;
|
||||
TPanel *Panel2;
|
||||
TAbMeter *AbMeter1;
|
||||
TAbMeter *AbMeter2;
|
||||
TLabel *Label2;
|
||||
TLabel *Label3;
|
||||
TOpenDialog *OpenDialog1;
|
||||
TAbCabBrowser *AbCabBrowser1;
|
||||
TAbVCLMeterLink *AbVCLMeterLink1;
|
||||
TAbVCLMeterLink *AbVCLMeterLink2;
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
void __fastcall Button2Click(TObject *Sender);
|
||||
void __fastcall AbCabBrowser1Load(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
110
Abbrevia/examples/CBuilder/ExCBrows.bpr
Normal file
110
Abbrevia/examples/CBuilder/ExCBrows.bpr
Normal file
@@ -0,0 +1,110 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = ExCBrows.exe
|
||||
OBJFILES = ExCBrows.obj ExCBrow1.obj
|
||||
RESFILES = ExCBrows.res
|
||||
RESDEPEN = $(RESFILES) ExCBrow1.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vclx35.lib vcl35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib B304_r35.lib
|
||||
PACKAGES = vclx35.bpi VCL35.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
46
Abbrevia/examples/CBuilder/ExCBrows.cpp
Normal file
46
Abbrevia/examples/CBuilder/ExCBrows.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("ExCBrow1.cpp", Form1);
|
||||
USERES("ExCBrows.res");
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
221
Abbrevia/examples/CBuilder/ExCf.bpr
Normal file
221
Abbrevia/examples/CBuilder/ExCf.bpr
Normal file
@@ -0,0 +1,221 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# IDE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# The following section of the project makefile is managed by the BCB IDE.
|
||||
# It is recommended to use the IDE to change any of the values in this
|
||||
# section.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = ExCf.exe
|
||||
OBJFILES = ..\..\source\AbHexVw.obj ..\..\source\AbCompnd.obj ExCf.obj uCfMain.obj \
|
||||
uCfNewDg.obj uCfGenDg.obj
|
||||
RESFILES = ExCf.res
|
||||
DEFFILE =
|
||||
MAINSOURCE = ExCf.cpp
|
||||
RESDEPEN = $(RESFILES) uCfMain.dfm uCfNewDg.dfm uCfGenDg.dfm
|
||||
LIBFILES =
|
||||
IDLFILES =
|
||||
IDLGENFILES =
|
||||
LIBRARIES = vcldbx35.lib vcldb35.lib vclx35.lib vcl35.lib
|
||||
PACKAGES =
|
||||
SPARELIBS = vcl35.lib vclx35.lib vcldb35.lib vcldbx35.lib
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHASM = .;..\..\source
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
USERDEFINES =
|
||||
SYSDEFINES = NO_STRICT
|
||||
INCLUDEPATH = "D:\Program Files\Borland\BCB\CBuilder5\Projects";"D:\Program Files\Borland\BCB\";$(BCB)\include;$(BCB)\include\vcl;..\..
|
||||
LIBPATH = "D:\Program Files\Borland\BCB\CBuilder5\Projects";"D:\Program Files\Borland\BCB\";$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\projects\lib;..\..
|
||||
WARNINGS= -w-par -w-8027 -w-8026
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Ve -r- -a8 -k -y -v -vi- -I..\..\source;$(BCB)\include;$(BCB)\include\vcl \
|
||||
-D$(SYSDEFINES);$(USERDEFINES) -Vx -b- -c -tWM -tWM
|
||||
CFLAG2 = -I..\..\source;
|
||||
CFLAG3 =
|
||||
IDLCFLAGS = -I..\..\source -I$(BCB)\include -I$(BCB)\include\vcl -src_suffixcpp -boa
|
||||
PFLAGS = -I..\..\source; \
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U..\..\source;$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\projects\lib;$(DEBUGLIBPATH) -$W \
|
||||
-$O- -$YD -v -JPHNV -M -JPHNE -JPHNE
|
||||
RFLAGS = -i..\..\source;
|
||||
AFLAGS = /mx /w2 /zd /ic:\Abbrevia /i$(BCB)\include /i$(BCB)\include\vcl
|
||||
LFLAGS = -L..\..\source;$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\projects\lib;$(DEBUGLIBPATH) -aa \
|
||||
-Tpe -x -v
|
||||
IFLAGS =
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj sysinit.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=4
|
||||
Item0=c:\Abbrevia;$(BCB)\include;$(BCB)\include\vcl
|
||||
Item1=$(BCB)\include;$(BCB)\include\vcl;c:\abbrevia
|
||||
Item2=$(BCB)\include;$(BCB)\include\vcl;..\..;c:\abbrevia
|
||||
Item3=$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=4
|
||||
Item0=c:\Abbrevia;$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\projects\lib
|
||||
Item1=$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\projects\lib;c:\abbrevia
|
||||
Item2=$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\projects\lib;..\..;c:\abbrevia
|
||||
Item3=$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\projects\lib
|
||||
|
||||
[HistoryLists\hlDebugSourcePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# MAKE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# This section of the project file is not used by the BCB IDE. It is for
|
||||
# the benefit of building from the command-line using the MAKE utility.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
!if "$(USERDEFINES)" != ""
|
||||
AUSERDEFINES = -d$(USERDEFINES:;= -d)
|
||||
!else
|
||||
AUSERDEFINES =
|
||||
!endif
|
||||
|
||||
!if !$d(BCC32)
|
||||
BCC32 = bcc32
|
||||
!endif
|
||||
|
||||
!if !$d(CPP32)
|
||||
CPP32 = cpp32
|
||||
!endif
|
||||
|
||||
!if !$d(DCC32)
|
||||
DCC32 = dcc32
|
||||
!endif
|
||||
|
||||
!if !$d(TASM32)
|
||||
TASM32 = tasm32
|
||||
!endif
|
||||
|
||||
!if !$d(LINKER)
|
||||
LINKER = ilink32
|
||||
!endif
|
||||
|
||||
!if !$d(BRCC32)
|
||||
BRCC32 = brcc32
|
||||
!endif
|
||||
|
||||
!if !$d(IDL2CPP)
|
||||
IDL2CPP = idl2cpp
|
||||
!endif
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
!if $d(PATHCPP)
|
||||
.PATH.CPP = $(PATHCPP)
|
||||
.PATH.C = $(PATHCPP)
|
||||
!endif
|
||||
|
||||
!if $d(PATHPAS)
|
||||
.PATH.PAS = $(PATHPAS)
|
||||
!endif
|
||||
|
||||
!if $d(PATHASM)
|
||||
.PATH.ASM = $(PATHASM)
|
||||
!endif
|
||||
|
||||
!if $d(PATHRC)
|
||||
.PATH.RC = $(PATHRC)
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) -L$(LIBPATH) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
# ---------------------------------------------------------------------------
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< }
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< }
|
||||
|
||||
.c.i:
|
||||
$(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< }
|
||||
|
||||
.cpp.i:
|
||||
$(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< }
|
||||
|
||||
.asm.obj:
|
||||
$(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $<
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
52
Abbrevia/examples/CBuilder/ExCf.cpp
Normal file
52
Abbrevia/examples/CBuilder/ExCf.cpp
Normal file
@@ -0,0 +1,52 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
USERES("ExCf.res");
|
||||
USEFORM("uCfMain.cpp", fmCfMain);
|
||||
USEFORM("uCfNewDg.cpp", frmCfNewDlg);
|
||||
USEFORM("uCfGenDg.cpp", frmCfGenDlg);
|
||||
USEUNIT("..\..\source\AbHexVw.pas");
|
||||
USEUNIT("..\..\source\AbCompnd.pas");
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TfmCfMain), &fmCfMain);
|
||||
Application->CreateForm(__classid(TfrmCfNewDlg), &frmCfNewDlg);
|
||||
Application->CreateForm(__classid(TfrmCfGenDlg), &frmCfGenDlg);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
110
Abbrevia/examples/CBuilder/ExFilter.bpr
Normal file
110
Abbrevia/examples/CBuilder/ExFilter.bpr
Normal file
@@ -0,0 +1,110 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = ExFilter.exe
|
||||
OBJFILES = ExFilter.obj ExFiltr1.obj
|
||||
RESFILES = ExFilter.res
|
||||
RESDEPEN = $(RESFILES) ExFiltr1.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vclx35.lib vcl35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib B304_r35.lib
|
||||
PACKAGES = vclx35.bpi VCL35.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
46
Abbrevia/examples/CBuilder/ExFilter.cpp
Normal file
46
Abbrevia/examples/CBuilder/ExFilter.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("ExFiltr1.cpp", Form1);
|
||||
USERES("ExFilter.res");
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
156
Abbrevia/examples/CBuilder/ExFiltr1.cpp
Normal file
156
Abbrevia/examples/CBuilder/ExFiltr1.cpp
Normal file
@@ -0,0 +1,156 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "ExFiltr1.h"
|
||||
//---------------------------------------------------------------------------#pragma link "AbMeter"
|
||||
#pragma link "AbZView"
|
||||
#pragma link "AbView"
|
||||
#pragma link "Grids"
|
||||
#pragma link "AbZipKit"
|
||||
#pragma link "AbZipper"
|
||||
#pragma link "AbZBrows"
|
||||
#pragma link "AbArcTyp"
|
||||
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
|
||||
char MainCaption[] = " ExFilter : Exception list example";
|
||||
char AddCaption[] = " Add files to zip archive ";
|
||||
char DeleteCaption[] = " Delete files from zip archive ";
|
||||
char ExtractCaption[] = " Extract files from zip archive ";
|
||||
|
||||
bool AbortFlag;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::OpenBtnClick(TObject *Sender)
|
||||
{
|
||||
AbZipKit1->FileName = "";
|
||||
AddBtn->Enabled = False;
|
||||
DeleteBtn->Enabled = False;
|
||||
OpenDialog1->FileName = "*.zip";
|
||||
if (OpenDialog1->Execute()) {
|
||||
AbZipKit1->FileName = OpenDialog1->FileName;
|
||||
OpenBtn->Enabled = False;
|
||||
CloseBtn->Enabled = True;
|
||||
AddBtn->Enabled = True;
|
||||
DeleteBtn->Enabled = True;
|
||||
ExtractBtn->Enabled = True;
|
||||
AbZipView1->Enabled = True;
|
||||
Caption = " " + AbZipKit1->FileName;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::CloseBtnClick(TObject *Sender)
|
||||
{
|
||||
Screen->Cursor = crHourGlass;
|
||||
Caption = "Saving " + AbZipKit1->FileName;
|
||||
AbZipKit1->CloseArchive();
|
||||
Screen->Cursor = crDefault;
|
||||
OpenBtn->Enabled = True;
|
||||
CloseBtn->Enabled = False;
|
||||
AddBtn->Enabled = False;
|
||||
DeleteBtn->Enabled = False;
|
||||
ExtractBtn->Enabled = False;
|
||||
AbZipView1->Enabled = False;
|
||||
Caption = MainCaption;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AddBtnClick(TObject *Sender)
|
||||
{
|
||||
AbortFlag = False;
|
||||
AbZipKit1->BaseDirectory = DirectoryListBox1->Directory;
|
||||
TColor SavedColor = AddGroup->Font->Color;
|
||||
AddGroup->Font->Color = clRed;
|
||||
AbZipKit1->AddFilesEx(FileMask1->Text, FilterMask1->Text, 0);
|
||||
AbZipKit1->Save();
|
||||
AddGroup->Font->Color = SavedColor;
|
||||
AddGroup->Caption = AddCaption;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::DeleteBtnClick(TObject *Sender)
|
||||
{
|
||||
AbortFlag = False;
|
||||
TColor SavedColor = DeleteGroup->Font->Color;
|
||||
DeleteGroup->Font->Color = clRed;
|
||||
AbZipKit1->DeleteFilesEx(FileMask2->Text, FilterMask2->Text);
|
||||
AbZipKit1->Save();
|
||||
DeleteGroup->Font->Color = SavedColor;
|
||||
DeleteGroup->Caption = DeleteCaption;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::ExtractBtnClick(TObject *Sender)
|
||||
{
|
||||
AbortFlag = False;
|
||||
AbZipKit1->BaseDirectory = DirectoryListBox2->Directory;
|
||||
TColor SavedColor = ExtractGroup->Font->Color;
|
||||
ExtractGroup->Font->Color = clRed;
|
||||
AbZipKit1->ExtractFilesEx(FileMask3->Text, FilterMask3->Text);
|
||||
ExtractGroup->Font->Color = SavedColor;
|
||||
ExtractGroup->Caption = ExtractCaption;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbortBtnClick(TObject *Sender)
|
||||
{
|
||||
AbortFlag = True;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::ExitBtnClick(TObject *Sender)
|
||||
{
|
||||
AbZipKit1->CloseArchive();
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::FormCreate(TObject *Sender)
|
||||
{
|
||||
Caption = MainCaption;
|
||||
AddGroup->Caption = AddCaption;
|
||||
DeleteGroup->Caption = DeleteCaption;
|
||||
ExtractGroup->Caption = ExtractCaption;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbZipKit1ConfirmProcessItem(TObject *Sender,
|
||||
TAbArchiveItem *Item, TAbProcessType ProcessType, bool &Confirm)
|
||||
{
|
||||
switch (ProcessType) {
|
||||
case ptAdd : AddGroup->Caption = " Adding " + Item->FileName + " ";
|
||||
break;
|
||||
case ptDelete : DeleteGroup->Caption = " Deleting " + Item->FileName + " ";
|
||||
break;
|
||||
case ptExtract : ExtractGroup->Caption = " Extracting " + Item->FileName + " ";
|
||||
break;
|
||||
}
|
||||
Confirm = !AbortFlag;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/ExFiltr1.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/ExFiltr1.dfm
Normal file
Binary file not shown.
102
Abbrevia/examples/CBuilder/ExFiltr1.h
Normal file
102
Abbrevia/examples/CBuilder/ExFiltr1.h
Normal file
@@ -0,0 +1,102 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef ExFiltr1H
|
||||
#define ExFiltr1H
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include "AbMeter.hpp"
|
||||
#include "AbZView.hpp"
|
||||
#include "AbView.hpp"
|
||||
#include "Grids.hpp"
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include <vcl\FileCtrl.hpp>
|
||||
#include <vcl\Dialogs.hpp>
|
||||
#include "AbZipKit.hpp"
|
||||
#include "AbZipper.hpp"
|
||||
#include "AbZBrows.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TLabel *Label4;
|
||||
TAbMeter *AbMeter1;
|
||||
TButton *OpenBtn;
|
||||
TAbZipView *AbZipView1;
|
||||
TButton *CloseBtn;
|
||||
TGroupBox *AddGroup;
|
||||
TLabel *Label1;
|
||||
TLabel *Label2;
|
||||
TLabel *Label3;
|
||||
TBevel *Bevel1;
|
||||
TEdit *FileMask1;
|
||||
TEdit *FilterMask1;
|
||||
TButton *AddBtn;
|
||||
TDirectoryListBox *DirectoryListBox1;
|
||||
TGroupBox *DeleteGroup;
|
||||
TLabel *Label5;
|
||||
TLabel *Label6;
|
||||
TBevel *Bevel2;
|
||||
TEdit *FileMask2;
|
||||
TEdit *FilterMask2;
|
||||
TButton *DeleteBtn;
|
||||
TButton *AbortBtn;
|
||||
TButton *ExitBtn;
|
||||
TGroupBox *ExtractGroup;
|
||||
TLabel *Label7;
|
||||
TLabel *Label8;
|
||||
TLabel *Label9;
|
||||
TBevel *Bevel3;
|
||||
TEdit *FileMask3;
|
||||
TEdit *FilterMask3;
|
||||
TButton *ExtractBtn;
|
||||
TDirectoryListBox *DirectoryListBox2;
|
||||
TOpenDialog *OpenDialog1;
|
||||
TAbZipKit *AbZipKit1;
|
||||
TAbVCLMeterLink *AbVCLMeterLink1;
|
||||
void __fastcall OpenBtnClick(TObject *Sender);
|
||||
void __fastcall CloseBtnClick(TObject *Sender);
|
||||
void __fastcall AddBtnClick(TObject *Sender);
|
||||
void __fastcall DeleteBtnClick(TObject *Sender);
|
||||
void __fastcall ExtractBtnClick(TObject *Sender);
|
||||
void __fastcall AbortBtnClick(TObject *Sender);
|
||||
void __fastcall ExitBtnClick(TObject *Sender);
|
||||
void __fastcall FormCreate(TObject *Sender);
|
||||
void __fastcall AbZipKit1ConfirmProcessItem(TObject *Sender,
|
||||
TAbArchiveItem *Item, TAbProcessType ProcessType, bool &Confirm);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
116
Abbrevia/examples/CBuilder/Finder.bpr
Normal file
116
Abbrevia/examples/CBuilder/Finder.bpr
Normal file
@@ -0,0 +1,116 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = Finder.exe
|
||||
OBJFILES = Finder.obj UFinder.obj
|
||||
RESFILES = Finder.res
|
||||
RESDEPEN = $(RESFILES) UFinder.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vclx35.lib vcl35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib B304_r35.lib
|
||||
PACKAGES = VCL35.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=3
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
Item2=..\..\;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=3
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
Item2=..\..;$(BCB)\lib\release;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=_RTLDLL;USEPACKAGES
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
49
Abbrevia/examples/CBuilder/Finder.cpp
Normal file
49
Abbrevia/examples/CBuilder/Finder.cpp
Normal file
@@ -0,0 +1,49 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* Finder.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("UFinder.cpp", Form1);
|
||||
USERES("Finder.res");
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
113
Abbrevia/examples/CBuilder/MakeCab.bpr
Normal file
113
Abbrevia/examples/CBuilder/MakeCab.bpr
Normal file
@@ -0,0 +1,113 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = MakeCab.exe
|
||||
OBJFILES = MakeCab.obj MakeCab1.obj
|
||||
RESFILES = MakeCab.res
|
||||
RESDEPEN = $(RESFILES) MakeCab1.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vclx35.lib vcl35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib B304_r35.lib
|
||||
PACKAGES = vclx35.bpi VCL35.bpi vcldb35.bpi vcldbx35.bpi bcbsmp35.bpi dclocx35.bpi \
|
||||
Qrpt35.bpi teeui35.bpi teedb35.bpi tee35.bpi ibsmp35.bpi dss35.bpi NMFast35.bpi \
|
||||
inetdb35.bpi inet35.bpi VclMid35.bpi S402_r35.bpi S402br35.bpi o405_r35.bpi \
|
||||
o405br35.bpi B304_r35.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
46
Abbrevia/examples/CBuilder/MakeCab.cpp
Normal file
46
Abbrevia/examples/CBuilder/MakeCab.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("MakeCab1.cpp", Form1);
|
||||
USERES("MakeCab.res");
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
106
Abbrevia/examples/CBuilder/MakeCab1.cpp
Normal file
106
Abbrevia/examples/CBuilder/MakeCab1.cpp
Normal file
@@ -0,0 +1,106 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "MakeCab1.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "AbMeter"
|
||||
#pragma link "AbCabMak"
|
||||
#pragma link "AbCBrows"
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
char MainCaption[] = "Make Cabinet archive";
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::CreateBtnClick(TObject *Sender)
|
||||
{
|
||||
OpenDialog1->FileName = "*.cab";
|
||||
OpenDialog1->Title = "Name of 1st cabinet";
|
||||
if (OpenDialog1->Execute()) {
|
||||
Panel1->Caption = "Creating " + OpenDialog1->FileName;
|
||||
AbMakeCab1->OpenArchive(OpenDialog1->FileName);
|
||||
Caption = AbMakeCab1->FileName;
|
||||
Panel1->Caption = "Idle";
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AddBtnClick(TObject *Sender)
|
||||
{
|
||||
OpenDialog1->FileName = "*.*";
|
||||
OpenDialog1->Title = "Add files to cabinet";
|
||||
if (OpenDialog1->Execute()) {
|
||||
if (OpenDialog1->Files->Count > 0) {
|
||||
TCursor SC = Cursor;
|
||||
Cursor = crHourGlass;
|
||||
for (int i=0; i<OpenDialog1->Files->Count; i++)
|
||||
AbMakeCab1->AddFiles(OpenDialog1->Files->Strings[i], 0);
|
||||
Cursor = SC;
|
||||
Panel1->Caption = "Idle";
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::CloseBtnClick(TObject *Sender)
|
||||
{
|
||||
Panel1->Caption = "Closing " + AbMakeCab1->FileName;
|
||||
AbMakeCab1->CloseArchive();
|
||||
Caption = MainCaption;
|
||||
Panel1->Caption = "Idle";
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::NewFolderBtnClick(TObject *Sender)
|
||||
{
|
||||
AbMakeCab1->StartNewFolder();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::NewCabBtnClick(TObject *Sender)
|
||||
{
|
||||
AbMakeCab1->StartNewCabinet();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbMakeCab1ArchiveItemProgress(TObject *Sender,
|
||||
TAbArchiveItem *Item, BYTE Progress, bool &Abort)
|
||||
{
|
||||
Panel1->Caption = "Adding " + ExtractFileName(Item->FileName);
|
||||
Abort = False;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbMakeCab1ConfirmProcessItem(TObject *Sender,
|
||||
TAbArchiveItem *Item, TAbProcessType ProcessType, bool &Confirm)
|
||||
{
|
||||
String s = ExtractFileExt(Item->FileName);
|
||||
Confirm = True;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/MakeCab1.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/MakeCab1.dfm
Normal file
Binary file not shown.
73
Abbrevia/examples/CBuilder/MakeCab1.h
Normal file
73
Abbrevia/examples/CBuilder/MakeCab1.h
Normal file
@@ -0,0 +1,73 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef MakeCab1H
|
||||
#define MakeCab1H
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include "AbMeter.hpp"
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include <vcl\Dialogs.hpp>
|
||||
#include "AbCabMak.hpp"
|
||||
#include "AbCBrows.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TLabel *Label1;
|
||||
TLabel *Label2;
|
||||
TAbMeter *AbMeter1;
|
||||
TButton *AddBtn;
|
||||
TButton *CreateBtn;
|
||||
TButton *CloseBtn;
|
||||
TPanel *Panel1;
|
||||
TButton *NewFolderBtn;
|
||||
TButton *NewCabBtn;
|
||||
TOpenDialog *OpenDialog1;
|
||||
TAbMakeCab *AbMakeCab1;
|
||||
TAbVCLMeterLink *AbVCLMeterLink1;
|
||||
void __fastcall CreateBtnClick(TObject *Sender);
|
||||
void __fastcall AddBtnClick(TObject *Sender);
|
||||
void __fastcall CloseBtnClick(TObject *Sender);
|
||||
void __fastcall NewFolderBtnClick(TObject *Sender);
|
||||
void __fastcall NewCabBtnClick(TObject *Sender);
|
||||
void __fastcall AbMakeCab1ArchiveItemProgress(TObject *Sender,
|
||||
TAbArchiveItem *Item, BYTE Progress, bool &Abort);
|
||||
void __fastcall AbMakeCab1ConfirmProcessItem(TObject *Sender,
|
||||
TAbArchiveItem *Item, TAbProcessType ProcessType, bool &Confirm);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
185
Abbrevia/examples/CBuilder/MakeSfx.bpr
Normal file
185
Abbrevia/examples/CBuilder/MakeSfx.bpr
Normal file
@@ -0,0 +1,185 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# IDE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# The following section of the project makefile is managed by the BCB IDE.
|
||||
# It is recommended to use the IDE to change any of the values in this
|
||||
# section.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = MakeSfx.exe
|
||||
OBJFILES = MakeSfx.obj UMakeSfx.obj
|
||||
RESFILES = MakeSfx.res
|
||||
DEFFILE =
|
||||
RESDEPEN = $(RESFILES) UMakeSfx.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib VCLX35.lib VCL35.lib
|
||||
SPARELIBS = VCL35.lib VCLX35.lib B304_r35.lib
|
||||
PACKAGES = vclx35.bpi VCL35.bpi
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;
|
||||
PATHASM = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I..\..\packages;..\..\source;$(BCB)\include;$(BCB)\include\vcl \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..\packages;..\..\source;$(BCB)\include;$(BCB)\include\vcl -$Y -$W -$O- -v \
|
||||
-JPHNV -M
|
||||
RFLAGS = -i..\..\packages;..\..\source;$(BCB)\include;$(BCB)\include\vcl
|
||||
AFLAGS = /i..\..\packages /i..\..\source /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=2
|
||||
Item0=..\..\packages;..\..\source;$(BCB)\include;$(BCB)\include\vcl
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlDebugSourcePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=_RTLDLL
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# MAKE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# This section of the project file is not used by the BCB IDE. It is for
|
||||
# the benefit of building from the command-line using the MAKE utility.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCC32)
|
||||
BCC32 = bcc32
|
||||
!endif
|
||||
|
||||
!if !$d(DCC32)
|
||||
DCC32 = dcc32
|
||||
!endif
|
||||
|
||||
!if !$d(TASM32)
|
||||
TASM32 = tasm32
|
||||
!endif
|
||||
|
||||
!if !$d(LINKER)
|
||||
LINKER = ilink32
|
||||
!endif
|
||||
|
||||
!if !$d(BRCC32)
|
||||
BRCC32 = brcc32
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
!if $d(PATHCPP)
|
||||
.PATH.CPP = $(PATHCPP)
|
||||
.PATH.C = $(PATHCPP)
|
||||
!endif
|
||||
|
||||
!if $d(PATHPAS)
|
||||
.PATH.PAS = $(PATHPAS)
|
||||
!endif
|
||||
|
||||
!if $d(PATHASM)
|
||||
.PATH.ASM = $(PATHASM)
|
||||
!endif
|
||||
|
||||
!if $d(PATHRC)
|
||||
.PATH.RC = $(PATHRC)
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
# ---------------------------------------------------------------------------
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.asm.obj:
|
||||
$(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
|
||||
# ---------------------------------------------------------------------------
|
45
Abbrevia/examples/CBuilder/MakeSfx.cpp
Normal file
45
Abbrevia/examples/CBuilder/MakeSfx.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
USERES("MakeSfx.res");
|
||||
USEFORM("UMakeSfx.cpp", Form1);
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
88
Abbrevia/examples/CBuilder/SelfEx.cpp
Normal file
88
Abbrevia/examples/CBuilder/SelfEx.cpp
Normal file
@@ -0,0 +1,88 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* selfex.cpp */
|
||||
/*********************************************************/
|
||||
|
||||
/* This program creates a ZIP stub called SELFEX.EXE. This
|
||||
stub can then be used to create self-extracting ZIP files.
|
||||
For more information on self-extracting ZIPs and ZIP stubs see
|
||||
page 112 in the Abbrevia manual. */
|
||||
|
||||
|
||||
#include <condefs.h>
|
||||
#include <stdio.h>
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbUnzPrc.hpp"
|
||||
#include "AbUtils.hpp"
|
||||
#include "AbZipTyp.hpp"
|
||||
|
||||
#pragma hdrstop
|
||||
|
||||
class THelper : public TObject {
|
||||
public:
|
||||
__fastcall THelper() {}
|
||||
void __fastcall UnzipProc(TObject* Sender,
|
||||
TAbArchiveItem* Item, AnsiString NewName);
|
||||
};
|
||||
|
||||
void __fastcall THelper::UnzipProc(TObject* Sender, TAbArchiveItem* Item, AnsiString NewName)
|
||||
{
|
||||
AbUnzip( Sender, dynamic_cast<TAbZipItem *>(Item), NewName );
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
USERES("selfex.res");
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "abutils"
|
||||
#pragma link "AbUnzPrc"
|
||||
#pragma link "AbZipTyp"
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#pragma argsused
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
TAbZipArchive* ZipArchive;
|
||||
THelper* Helper = new THelper;
|
||||
printf("Abbrevia Self Extracting Archive");
|
||||
ZipArchive = new TAbZipArchive(
|
||||
ParamStr( 0 ), fmOpenRead | fmShareDenyNone);
|
||||
SetCurrentDirectory(ExtractFilePath(ParamStr(0)).c_str());
|
||||
try {
|
||||
ZipArchive->Load();
|
||||
ZipArchive->ExtractHelper = Helper->UnzipProc;
|
||||
ZipArchive->ExtractFiles("*.*");
|
||||
}
|
||||
catch (...) {
|
||||
delete Helper;
|
||||
delete ZipArchive;
|
||||
return 0;
|
||||
}
|
||||
delete Helper;
|
||||
delete ZipArchive;
|
||||
return 0;
|
||||
}
|
||||
|
117
Abbrevia/examples/CBuilder/SelfExV.bpr
Normal file
117
Abbrevia/examples/CBuilder/SelfExV.bpr
Normal file
@@ -0,0 +1,117 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = SelfExV.exe
|
||||
OBJFILES = SelfExV.obj USelfExV.obj
|
||||
RESFILES = SelfExV.res
|
||||
RESDEPEN = $(RESFILES) USelfExV.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vclx35.lib vcl35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib B304_r35.lib
|
||||
PACKAGES = VCL35.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -DUSEPACKAGES \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-DUSEPACKAGES \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -DUSEPACKAGES \
|
||||
-i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/dUSEPACKAGES /mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=USEPACKAGES
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
49
Abbrevia/examples/CBuilder/SelfExV.cpp
Normal file
49
Abbrevia/examples/CBuilder/SelfExV.cpp
Normal file
@@ -0,0 +1,49 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* SelfExV.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("USelfExV.cpp", Form1);
|
||||
USERES("SelfExV.res");
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
117
Abbrevia/examples/CBuilder/SelfStbV.bpr
Normal file
117
Abbrevia/examples/CBuilder/SelfStbV.bpr
Normal file
@@ -0,0 +1,117 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = SelfStbV.exe
|
||||
OBJFILES = SelfStbV.obj SlfStbv1.obj
|
||||
RESFILES = SelfStbV.res
|
||||
RESDEPEN = $(RESFILES) SlfStbv1.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vclx35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib B304_r35.lib
|
||||
PACKAGES = VCL35.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -DUSEPACKAGES \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-DUSEPACKAGES \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -DUSEPACKAGES \
|
||||
-i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/dUSEPACKAGES /mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj $(PACKAGES) sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=USEPACKAGES
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
49
Abbrevia/examples/CBuilder/SelfStbV.cpp
Normal file
49
Abbrevia/examples/CBuilder/SelfStbV.cpp
Normal file
@@ -0,0 +1,49 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* SelfExV.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("SlfStbv1.cpp", Form1);
|
||||
USERES("SelfStbV.res");
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/SelfStbv.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/SelfStbv.dfm
Normal file
Binary file not shown.
58
Abbrevia/examples/CBuilder/SelfStbv.h
Normal file
58
Abbrevia/examples/CBuilder/SelfStbv.h
Normal file
@@ -0,0 +1,58 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* USelfExV.h */
|
||||
/* Copyright (c) TurboPower Software Co., 1997, 1998 */
|
||||
/* All Rights Reserved */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef SelfStbvH
|
||||
#define SelfStbvH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include "AbUnZper.hpp"
|
||||
#include "AbZBrows.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TAbUnZipper *AbUnZipper1;
|
||||
TMemo *Memo1;
|
||||
TButton *Button1;
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
176
Abbrevia/examples/CBuilder/SelfStub.bpr
Normal file
176
Abbrevia/examples/CBuilder/SelfStub.bpr
Normal file
@@ -0,0 +1,176 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# IDE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# The following section of the project makefile is managed by the BCB IDE.
|
||||
# It is recommended to use the IDE to change any of the values in this
|
||||
# section.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = SelfStub.exe
|
||||
OBJFILES = SelfStub.obj
|
||||
RESFILES = SelfStub.res
|
||||
RESDEPEN = $(RESFILES)
|
||||
LIBFILES =
|
||||
LIBRARIES = vcldb35.lib vcl35.lib
|
||||
SPARELIBS = vcl35.lib vcldb35.lib
|
||||
PACKAGES = vclx35.bpi VCL35.bpi vcldb35.bpi vcldbx35.bpi bcbsmp35.bpi dclocx35.bpi \
|
||||
Qrpt35.bpi teeui35.bpi teedb35.bpi tee35.bpi ibsmp35.bpi dss35.bpi NMFast35.bpi \
|
||||
inetdb35.bpi inet35.bpi VclMid35.bpi S402_r35.bpi S402br35.bpi o405_r35.bpi \
|
||||
o405br35.bpi B304_r35.bpi
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;
|
||||
PATHASM = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tWC
|
||||
CFLAG2 = -I$(BCB)\include;$(BCB)\include\vcl;..\..\source;..\..\packages \
|
||||
-H=$(BCB)\lib\vcl35.csm
|
||||
CFLAG3 = -Tkh30000
|
||||
PFLAGS = -U$(BCB)\lib\obj;$(BCB)\lib;..\..\source;..\..\packages;$(DEBUGLIBPATH) \
|
||||
-I$(BCB)\include;$(BCB)\include\vcl;..\..\source;..\..\packages -$Y -$W -$O- -v \
|
||||
-JPHN -M
|
||||
RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl;..\..\source;..\..\packages
|
||||
AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\source /i..\..\packages /mx /w2 /zd
|
||||
LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib;..\..\source;..\..\packages;$(DEBUGLIBPATH) -ap \
|
||||
-Tpe -x -Gn -v
|
||||
IFLAGS =
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0x32.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=Executable (Console)
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\include;$(BCB)\include\vcl;..\..\source;..\..\packages
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=1
|
||||
Item0=$(BCB)\lib\obj;$(BCB)\lib;..\..\source;..\..\packages
|
||||
|
||||
[HistoryLists\hlDebugSourcePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\source\vcl
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# MAKE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# This section of the project file is not used by the BCB IDE. It is for
|
||||
# the benefit of building from the command-line using the MAKE utility.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCC32)
|
||||
BCC32 = bcc32
|
||||
!endif
|
||||
|
||||
!if !$d(DCC32)
|
||||
DCC32 = dcc32
|
||||
!endif
|
||||
|
||||
!if !$d(TASM32)
|
||||
TASM32 = tasm32
|
||||
!endif
|
||||
|
||||
!if !$d(LINKER)
|
||||
LINKER = ilink32
|
||||
!endif
|
||||
|
||||
!if !$d(BRCC32)
|
||||
BRCC32 = brcc32
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
!if $d(PATHCPP)
|
||||
.PATH.CPP = $(PATHCPP)
|
||||
.PATH.C = $(PATHCPP)
|
||||
!endif
|
||||
|
||||
!if $d(PATHPAS)
|
||||
.PATH.PAS = $(PATHPAS)
|
||||
!endif
|
||||
|
||||
!if $d(PATHASM)
|
||||
.PATH.ASM = $(PATHASM)
|
||||
!endif
|
||||
|
||||
!if $d(PATHRC)
|
||||
.PATH.RC = $(PATHRC)
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
# ---------------------------------------------------------------------------
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.asm.obj:
|
||||
$(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
|
||||
# ---------------------------------------------------------------------------
|
85
Abbrevia/examples/CBuilder/SelfStub.cpp
Normal file
85
Abbrevia/examples/CBuilder/SelfStub.cpp
Normal file
@@ -0,0 +1,85 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* selfstub.cpp */
|
||||
/*********************************************************/
|
||||
|
||||
/* This program creates a ZIP stub called SELFEX.EXE. This
|
||||
stub can then be used to create self-extracting ZIP files.
|
||||
For more information on self-extracting ZIPs and ZIP stubs see
|
||||
page 112 in the Abbrevia manual. */
|
||||
|
||||
#include <condefs.h>
|
||||
#include <stdio.h>
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbUnzPrc.hpp"
|
||||
#include "AbUtils.hpp"
|
||||
#include "AbZipTyp.hpp"
|
||||
|
||||
#pragma hdrstop
|
||||
|
||||
class THelper : public TObject {
|
||||
public:
|
||||
__fastcall THelper() {}
|
||||
void __fastcall UnzipProc(TObject* Sender,
|
||||
TAbArchiveItem* Item, AnsiString NewName);
|
||||
};
|
||||
|
||||
void __fastcall THelper::UnzipProc(TObject* Sender, TAbArchiveItem* Item, AnsiString NewName)
|
||||
{
|
||||
AbUnzip(Sender, (TAbZipItem*)Item, NewName);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
USERES("SelfStub.res");
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "abutils"
|
||||
#pragma link "AbUnzPrc"
|
||||
#pragma link "AbZipTyp"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma argsused
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
TAbZipArchive* ZipArchive;
|
||||
THelper* Helper = new THelper;
|
||||
printf("Abbrevia Self Extracting Archive");
|
||||
ZipArchive = new TAbZipArchive(
|
||||
ParamStr( 0 ), fmOpenRead | fmShareDenyNone);
|
||||
SetCurrentDirectory(ExtractFilePath(ParamStr(0)).c_str());
|
||||
try {
|
||||
ZipArchive->Load();
|
||||
ZipArchive->ExtractHelper = Helper->UnzipProc;
|
||||
ZipArchive->ExtractFiles("*.*");
|
||||
}
|
||||
catch (...) {
|
||||
delete Helper;
|
||||
delete ZipArchive;
|
||||
return 0;
|
||||
}
|
||||
delete Helper;
|
||||
delete ZipArchive;
|
||||
return 0;
|
||||
}
|
54
Abbrevia/examples/CBuilder/SlfStbv1.cpp
Normal file
54
Abbrevia/examples/CBuilder/SlfStbv1.cpp
Normal file
@@ -0,0 +1,54 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* SelfStbV1.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "SlfStbv1.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "AbUnZper"
|
||||
#pragma link "AbZBrows"
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma link "AbUnzper"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Button1Click(TObject *Sender)
|
||||
{
|
||||
AbUnZipper1->FileName = ParamStr( 0 );
|
||||
SetCurrentDirectory( ExtractFilePath( ParamStr( 0 ) ).c_str() );
|
||||
AbUnZipper1->ExtractFiles( "*.*" );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/SlfStbv1.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/SlfStbv1.dfm
Normal file
Binary file not shown.
59
Abbrevia/examples/CBuilder/SlfStbv1.h
Normal file
59
Abbrevia/examples/CBuilder/SlfStbv1.h
Normal file
@@ -0,0 +1,59 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* USelfExV.h */
|
||||
/* Copyright (c) TurboPower Software Co., 1997, 1998 */
|
||||
/* All Rights Reserved */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef SlfStbv1H
|
||||
#define SlfStbv1H
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include "AbUnZper.hpp"
|
||||
#include "AbZBrows.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
#include "AbUnzper.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TAbUnZipper *AbUnZipper1;
|
||||
TMemo *Memo1;
|
||||
TButton *Button1;
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
186
Abbrevia/examples/CBuilder/Streams.bpr
Normal file
186
Abbrevia/examples/CBuilder/Streams.bpr
Normal file
@@ -0,0 +1,186 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# IDE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# The following section of the project makefile is managed by the BCB IDE.
|
||||
# It is recommended to use the IDE to change any of the values in this
|
||||
# section.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = Streams.exe
|
||||
OBJFILES = Streams.obj Streams1.obj
|
||||
RESFILES = Streams.res
|
||||
DEFFILE =
|
||||
RESDEPEN = $(RESFILES) Streams1.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib VCLX35.lib VCL35.lib
|
||||
SPARELIBS = VCL35.lib VCLX35.lib B304_r35.lib
|
||||
PACKAGES = vclx35.bpi VCL35.bpi
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;
|
||||
PATHASM = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlDebugSourcePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=_RTLDLL
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# MAKE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# This section of the project file is not used by the BCB IDE. It is for
|
||||
# the benefit of building from the command-line using the MAKE utility.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCC32)
|
||||
BCC32 = bcc32
|
||||
!endif
|
||||
|
||||
!if !$d(DCC32)
|
||||
DCC32 = dcc32
|
||||
!endif
|
||||
|
||||
!if !$d(TASM32)
|
||||
TASM32 = tasm32
|
||||
!endif
|
||||
|
||||
!if !$d(LINKER)
|
||||
LINKER = ilink32
|
||||
!endif
|
||||
|
||||
!if !$d(BRCC32)
|
||||
BRCC32 = brcc32
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
!if $d(PATHCPP)
|
||||
.PATH.CPP = $(PATHCPP)
|
||||
.PATH.C = $(PATHCPP)
|
||||
!endif
|
||||
|
||||
!if $d(PATHPAS)
|
||||
.PATH.PAS = $(PATHPAS)
|
||||
!endif
|
||||
|
||||
!if $d(PATHASM)
|
||||
.PATH.ASM = $(PATHASM)
|
||||
!endif
|
||||
|
||||
!if $d(PATHRC)
|
||||
.PATH.RC = $(PATHRC)
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
# ---------------------------------------------------------------------------
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.asm.obj:
|
||||
$(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
|
||||
# ---------------------------------------------------------------------------
|
45
Abbrevia/examples/CBuilder/Streams.cpp
Normal file
45
Abbrevia/examples/CBuilder/Streams.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
USERES("Streams.res");
|
||||
USEFORM("Streams1.cpp", Form1);
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
105
Abbrevia/examples/CBuilder/Streams1.cpp
Normal file
105
Abbrevia/examples/CBuilder/Streams1.cpp
Normal file
@@ -0,0 +1,105 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "Streams1.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "AbView"
|
||||
#pragma link "AbZBrows"
|
||||
#pragma link "AbZipKit"
|
||||
#pragma link "AbZipper"
|
||||
#pragma link "AbZView"
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
|
||||
char MainCaption[] = " Extract to (or Add from) stream";
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Open1Click(TObject *Sender)
|
||||
{
|
||||
OpenDialog1->FileName = "*.zip";
|
||||
if (OpenDialog1->Execute())
|
||||
AbZipKit1->FileName = OpenDialog1->FileName;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Extract1Click(TObject *Sender)
|
||||
{
|
||||
TMemoryStream* ToStream;
|
||||
Memo1->Clear();
|
||||
ToStream = new TMemoryStream;
|
||||
TAbArchiveItem* Item = AbZipView1->Items[AbZipView1->ActiveRow];
|
||||
Caption = Item->FileName;
|
||||
AbZipKit1->ExtractToStream(Item->FileName, ToStream);
|
||||
ToStream->Position = 0;
|
||||
Memo1->Lines->LoadFromStream(ToStream);
|
||||
delete(ToStream);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Close1Click(TObject *Sender)
|
||||
{
|
||||
AbZipKit1->FileName = "";
|
||||
Caption = MainCaption;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Exit1Click(TObject *Sender)
|
||||
{
|
||||
Close1Click(0);
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbZipView1DblClick(TObject *Sender)
|
||||
{
|
||||
Extract1Click(0);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Clearmemo1Click(TObject *Sender)
|
||||
{
|
||||
Memo1->Clear();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Add1Click(TObject *Sender)
|
||||
{
|
||||
TMemoryStream* FromStream;
|
||||
AnsiString FN;
|
||||
FromStream = new TMemoryStream;
|
||||
Memo1->Lines->SaveToStream(FromStream);
|
||||
if (InputQuery("Streams", "Give it a filename", FN)) {
|
||||
Caption = FN;
|
||||
AbZipKit1->AddFromStream(FN, FromStream);
|
||||
}
|
||||
delete(FromStream);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/Streams1.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/Streams1.dfm
Normal file
Binary file not shown.
76
Abbrevia/examples/CBuilder/Streams1.h
Normal file
76
Abbrevia/examples/CBuilder/Streams1.h
Normal file
@@ -0,0 +1,76 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef Streams1H
|
||||
#define Streams1H
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbView.hpp"
|
||||
#include "AbZBrows.hpp"
|
||||
#include "AbZipKit.hpp"
|
||||
#include "AbZipper.hpp"
|
||||
#include "AbZView.hpp"
|
||||
#include <Dialogs.hpp>
|
||||
#include <Grids.hpp>
|
||||
#include <Menus.hpp>
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TAbZipView *AbZipView1;
|
||||
TMemo *Memo1;
|
||||
TMainMenu *MainMenu1;
|
||||
TMenuItem *File1;
|
||||
TMenuItem *Open1;
|
||||
TMenuItem *Close1;
|
||||
TMenuItem *N1;
|
||||
TMenuItem *Exit1;
|
||||
TMenuItem *Action1;
|
||||
TMenuItem *Extract1;
|
||||
TMenuItem *Add1;
|
||||
TMenuItem *Clearmemo1;
|
||||
TOpenDialog *OpenDialog1;
|
||||
TAbZipKit *AbZipKit1;
|
||||
void __fastcall Open1Click(TObject *Sender);
|
||||
void __fastcall Extract1Click(TObject *Sender);
|
||||
void __fastcall Close1Click(TObject *Sender);
|
||||
void __fastcall Exit1Click(TObject *Sender);
|
||||
void __fastcall AbZipView1DblClick(TObject *Sender);
|
||||
void __fastcall Clearmemo1Click(TObject *Sender);
|
||||
void __fastcall Add1Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
190
Abbrevia/examples/CBuilder/StrmBmp.bpr
Normal file
190
Abbrevia/examples/CBuilder/StrmBmp.bpr
Normal file
@@ -0,0 +1,190 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# IDE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# The following section of the project makefile is managed by the BCB IDE.
|
||||
# It is recommended to use the IDE to change any of the values in this
|
||||
# section.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = StrmBmp.exe
|
||||
OBJFILES = StrmBmp.obj StrmBmpU.obj
|
||||
RESFILES = StrmBmp.res
|
||||
DEFFILE =
|
||||
RESDEPEN = $(RESFILES) StrmBmpU.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib VCLX35.lib VCL35.lib
|
||||
SPARELIBS = VCL35.lib VCLX35.lib B304_r35.lib
|
||||
PACKAGES = vclx35.bpi VCL35.bpi
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;
|
||||
PATHASM = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=4
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
Item2=..\..\;$(BCB)\include;$(BCB)\include\vcl
|
||||
Item3=d:\abbrevia;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=4
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
Item2=..\..\;$(BCB)\lib\obj;$(BCB)\lib
|
||||
Item3=d:\abbrevia;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlDebugSourcePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=_RTLDLL;USEPACKAGES
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# MAKE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# This section of the project file is not used by the BCB IDE. It is for
|
||||
# the benefit of building from the command-line using the MAKE utility.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCC32)
|
||||
BCC32 = bcc32
|
||||
!endif
|
||||
|
||||
!if !$d(DCC32)
|
||||
DCC32 = dcc32
|
||||
!endif
|
||||
|
||||
!if !$d(TASM32)
|
||||
TASM32 = tasm32
|
||||
!endif
|
||||
|
||||
!if !$d(LINKER)
|
||||
LINKER = ilink32
|
||||
!endif
|
||||
|
||||
!if !$d(BRCC32)
|
||||
BRCC32 = brcc32
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
!if $d(PATHCPP)
|
||||
.PATH.CPP = $(PATHCPP)
|
||||
.PATH.C = $(PATHCPP)
|
||||
!endif
|
||||
|
||||
!if $d(PATHPAS)
|
||||
.PATH.PAS = $(PATHPAS)
|
||||
!endif
|
||||
|
||||
!if $d(PATHASM)
|
||||
.PATH.ASM = $(PATHASM)
|
||||
!endif
|
||||
|
||||
!if $d(PATHRC)
|
||||
.PATH.RC = $(PATHRC)
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
# ---------------------------------------------------------------------------
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
|
||||
|
||||
.asm.obj:
|
||||
$(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
|
||||
# ---------------------------------------------------------------------------
|
45
Abbrevia/examples/CBuilder/StrmBmp.cpp
Normal file
45
Abbrevia/examples/CBuilder/StrmBmp.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
USERES("StrmBmp.res");
|
||||
USEFORM("StrmBmpU.cpp", Form1);
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
92
Abbrevia/examples/CBuilder/StrmBmpU.cpp
Normal file
92
Abbrevia/examples/CBuilder/StrmBmpU.cpp
Normal file
@@ -0,0 +1,92 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "StrmBmpU.h"
|
||||
|
||||
#include "AbUnzPrc.hpp"
|
||||
#include "AbZipPrc.hpp"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TForm1::Button1Click(TObject *Sender)
|
||||
{
|
||||
// Create the compressed stream and the uncompressed stream.
|
||||
TMemoryStream* UStrm = new TMemoryStream;
|
||||
TMemoryStream* CStrm = new TMemoryStream;
|
||||
|
||||
// Copy the bitmap image to the memory stream.
|
||||
Image1->Picture->Bitmap->SaveToStream(UStrm);
|
||||
|
||||
// Set the stream position to the beginning.
|
||||
UStrm->Position = 0;
|
||||
|
||||
// Compress the stream.
|
||||
DeflateStream(UStrm, CStrm);
|
||||
|
||||
// Remove all data from the uncompressed stream.
|
||||
UStrm->Clear();
|
||||
|
||||
// Reset the compressed stream back to the beginning.
|
||||
CStrm->Position = 0;
|
||||
|
||||
// Decompress the stream back to the original uncompressed
|
||||
// stream and then reset the stream position back to 0.
|
||||
InflateStream(CStrm, UStrm);
|
||||
UStrm->Position = 0;
|
||||
|
||||
// Now create a new TImage. Make it the same size as the
|
||||
// original image but move it down and to the left.
|
||||
TImage* Image2 = new TImage(this);
|
||||
Image2->Top = Image1->Top + 20;
|
||||
Image2->Left = Image1->Left + 20;
|
||||
Image2->Width = Image1->Width;
|
||||
Image2->Height = Image1->Height;
|
||||
Image2->Parent = this;
|
||||
|
||||
// Delete the original TImage.
|
||||
delete Image1;
|
||||
|
||||
// Load the new bitmap with the data from the stream
|
||||
// that contains the decompressed image.
|
||||
Image2->Picture->Bitmap->LoadFromStream(UStrm);
|
||||
|
||||
// Free the memory streams.
|
||||
delete UStrm;
|
||||
delete CStrm;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
BIN
Abbrevia/examples/CBuilder/StrmBmpU.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/StrmBmpU.dfm
Normal file
Binary file not shown.
50
Abbrevia/examples/CBuilder/StrmBmpU.h
Normal file
50
Abbrevia/examples/CBuilder/StrmBmpU.h
Normal file
@@ -0,0 +1,50 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef StrmBmpUH
|
||||
#define StrmBmpUH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TButton *Button1;
|
||||
TImage *Image1;
|
||||
TMemo *Memo1;
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
120
Abbrevia/examples/CBuilder/StrmPad.bpr
Normal file
120
Abbrevia/examples/CBuilder/StrmPad.bpr
Normal file
@@ -0,0 +1,120 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = StrmPad.exe
|
||||
OBJFILES = StrmPad.obj UStrPad.obj
|
||||
RESFILES = StrmPad.res
|
||||
RESDEPEN = $(RESFILES) UStrPad.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vcldbx35.lib vcldb35.lib vclx35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib vcldb35.lib vcldbx35.lib B304_r35.lib
|
||||
PACKAGES = VCL35.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -DUSEPACKAGES \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-DUSEPACKAGES \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -DUSEPACKAGES \
|
||||
-i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/dUSEPACKAGES /mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj $(PACKAGES) sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=3
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
Item2=..\..\;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=3
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
Item2=..\..\;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=2
|
||||
Item0=USEPACKAGES
|
||||
Item1=_RTLDLL;USEPACKAGES
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
51
Abbrevia/examples/CBuilder/StrmPad.cpp
Normal file
51
Abbrevia/examples/CBuilder/StrmPad.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* StrmPad.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("UStrPad.cpp", Form1);
|
||||
USERES("StrmPad.res");
|
||||
USEOBJ("\Abbrevia\AbZipPrc.OBJ");
|
||||
USEOBJ("\Abbrevia\AbUnzPrc.OBJ");
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/TPZIP31.hlp
Normal file
BIN
Abbrevia/examples/CBuilder/TPZIP31.hlp
Normal file
Binary file not shown.
27
Abbrevia/examples/CBuilder/TPZip.INI
Normal file
27
Abbrevia/examples/CBuilder/TPZip.INI
Normal file
@@ -0,0 +1,27 @@
|
||||
[General]
|
||||
Exists=1
|
||||
[View]
|
||||
CSize=1
|
||||
CMethod=1
|
||||
CRatio=0
|
||||
CRC=0
|
||||
EFA=0
|
||||
IFA=1
|
||||
Encryption=0
|
||||
TimeStamp=0
|
||||
USize=0
|
||||
MadeBy=0
|
||||
Needed=0
|
||||
Comment=0
|
||||
Hierarchy=1
|
||||
OutlineStyle=5
|
||||
[Preferences]
|
||||
BaseDirectory=C:\Abbrevia\EXAMPLES\CBuilder
|
||||
Confirmations=0
|
||||
CompressionMethodToUse=2
|
||||
DeflationOption=1
|
||||
CreateDirs=1
|
||||
RestorePath=0
|
||||
StripPath=0
|
||||
RemoveDots=1
|
||||
Recurse=0
|
117
Abbrevia/examples/CBuilder/TPZip.bpr
Normal file
117
Abbrevia/examples/CBuilder/TPZip.bpr
Normal file
@@ -0,0 +1,117 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = TPZip.exe
|
||||
OBJFILES = TPZip.obj UMain.obj DgAbout.obj UBaseDlg.obj UDemoDlg.obj usplash.obj
|
||||
RESFILES = TPZip.res
|
||||
RESDEPEN = $(RESFILES) UMain.dfm DgAbout.dfm UBaseDlg.dfm UDemoDlg.dfm usplash.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = B304_r35.lib vcldbx35.lib vcldb35.lib vclx35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib vcldb35.lib vcldbx35.lib B304_r35.lib
|
||||
PACKAGES = VCL35.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -DUSEPACKAGES \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source \
|
||||
-H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 =
|
||||
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-DUSEPACKAGES \
|
||||
-U..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-I..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source -$Y -$W \
|
||||
-$O- -v -JPHNV -M
|
||||
RFLAGS = -DUSEPACKAGES \
|
||||
-i..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
AFLAGS = /i..\.. /i$(BCB)\include /i$(BCB)\include\vcl /i..\..\packages /i..\..\source \
|
||||
/dUSEPACKAGES /mx /w2 /zd
|
||||
LFLAGS = -L..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj $(PACKAGES) sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\include;$(BCB)\include\vcl;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=2
|
||||
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib;..\..\packages;..\..\source
|
||||
Item1=..\..;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=USEPACKAGES
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
60
Abbrevia/examples/CBuilder/TPZip.cpp
Normal file
60
Abbrevia/examples/CBuilder/TPZip.cpp
Normal file
@@ -0,0 +1,60 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* TPZip.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "usplash.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("UMain.cpp", Form1);
|
||||
USERES("TPZip.res");
|
||||
USEFORM("DgAbout.cpp", dlgAboutBox);
|
||||
USEFORM("UBaseDlg.cpp", BaseDirDlg);
|
||||
USEFORM("UDemoDlg.cpp", DemoDlg);
|
||||
USEFORM("usplash.cpp", Splash);
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->HelpFile = "Tpzip31.hlp";
|
||||
Splash = new TSplash(Application);
|
||||
Splash->Show();
|
||||
Splash->Refresh();
|
||||
Application->CreateForm(__classid(TForm1), &Form1);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
60
Abbrevia/examples/CBuilder/UBaseDlg.cpp
Normal file
60
Abbrevia/examples/CBuilder/UBaseDlg.cpp
Normal file
@@ -0,0 +1,60 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UBaseDlg.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "UBaseDlg.h"
|
||||
#include "UDemoDlg.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
TBaseDirDlg *BaseDirDlg;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TBaseDirDlg::TBaseDirDlg(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TBaseDirDlg::Button3Click(TObject *Sender)
|
||||
{
|
||||
TDemoDlg* dlg = new TDemoDlg(this);
|
||||
try {
|
||||
dlg->Caption = "Create Subdirectory";
|
||||
dlg->Edit1->Text = "";
|
||||
dlg->ShowModal();
|
||||
if (dlg->ModalResult == mrOk && dlg->Edit1->Text != "" )
|
||||
AbCreateDirectory(DLB->Directory + "\\" + dlg->Edit1->Text);
|
||||
DLB->Update();
|
||||
}
|
||||
catch (...) {
|
||||
delete dlg;
|
||||
return;
|
||||
}
|
||||
delete dlg;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/UBaseDlg.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/UBaseDlg.dfm
Normal file
Binary file not shown.
62
Abbrevia/examples/CBuilder/UBaseDlg.h
Normal file
62
Abbrevia/examples/CBuilder/UBaseDlg.h
Normal file
@@ -0,0 +1,62 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UBaseDlg.h */
|
||||
/* Copyright (c) TurboPower Software Co., 1997, 1998 */
|
||||
/* All Rights Reserved */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef UBaseDlgH
|
||||
#define UBaseDlgH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\FileCtrl.hpp>
|
||||
#include <AbUtils.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TBaseDirDlg : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TLabel *DirLabel;
|
||||
TLabel *ActionLabel;
|
||||
TButton *Button1;
|
||||
TButton *Button2;
|
||||
TEdit *Edit1;
|
||||
TDriveComboBox *DriveComboBox1;
|
||||
TDirectoryListBox *DLB;
|
||||
TCheckBox *CheckBox2;
|
||||
TCheckBox *CheckBox1;
|
||||
TButton *Button3;
|
||||
void __fastcall Button3Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TBaseDirDlg(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TBaseDirDlg *BaseDirDlg;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
72
Abbrevia/examples/CBuilder/UCompPad.cpp
Normal file
72
Abbrevia/examples/CBuilder/UCompPad.cpp
Normal file
@@ -0,0 +1,72 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UCompPad.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "UCompPad.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "AbZipKit"
|
||||
#pragma link "AbZipper"
|
||||
#pragma link "AbZBrows"
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::FormCreate(TObject *Sender)
|
||||
{
|
||||
ZnfName = ChangeFileExt(Application->ExeName, ".zip");
|
||||
TxtName = ExtractFileName( ChangeFileExt(Application->ExeName, ".txt") );
|
||||
AbZipKit1->BaseDirectory = ExtractFilePath( Application->ExeName );
|
||||
SetCurrentDirectory( AbZipKit1->BaseDirectory.c_str() );
|
||||
AbZipKit1->FileName = ZnfName;
|
||||
if (AbZipKit1->Count > 0) {
|
||||
AbZipKit1->ExtractFiles( TxtName );
|
||||
Memo1->Lines->LoadFromFile( TxtName );
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::FormDestroy(TObject *Sender)
|
||||
{
|
||||
Memo1->Lines->SaveToFile( TxtName );
|
||||
if (AbZipKit1->Count == 0)
|
||||
AbZipKit1->AddFiles( TxtName, 0 );
|
||||
else
|
||||
AbZipKit1->FreshenFiles( TxtName );
|
||||
AbZipKit1->Save();
|
||||
DeleteFile( TxtName.c_str() );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
BIN
Abbrevia/examples/CBuilder/UCompPad.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/UCompPad.dfm
Normal file
Binary file not shown.
68
Abbrevia/examples/CBuilder/UCompPad.h
Normal file
68
Abbrevia/examples/CBuilder/UCompPad.h
Normal file
@@ -0,0 +1,68 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UCompPad.h */
|
||||
/* Copyright (c) TurboPower Software Co., 1997, 1998 */
|
||||
/* All Rights Reserved */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef UCompPadH
|
||||
#define UCompPadH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include "AbZipKit.hpp"
|
||||
#include "AbZipper.hpp"
|
||||
#include "AbZBrows.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include <ExtCtrls.hpp>
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
static String ZnfName;
|
||||
static String TxtName;
|
||||
|
||||
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TMemo *Memo1;
|
||||
TAbZipKit *AbZipKit1;
|
||||
TPanel *Panel1;
|
||||
TMemo *Memo2;
|
||||
void __fastcall FormCreate(TObject *Sender);
|
||||
void __fastcall FormDestroy(TObject *Sender);
|
||||
private: // User declarations
|
||||
// String ZnfName;
|
||||
// String TxtName;
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
63
Abbrevia/examples/CBuilder/UContent.cpp
Normal file
63
Abbrevia/examples/CBuilder/UContent.cpp
Normal file
@@ -0,0 +1,63 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "UContent.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma link "AbZBrows"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TForm1::Button1Click(TObject *Sender)
|
||||
{
|
||||
ListBox1->Clear();
|
||||
if (OpenDialog1->Execute())
|
||||
{
|
||||
try
|
||||
{
|
||||
AbZipBrowser1->FileName = OpenDialog1->FileName;
|
||||
if (AbZipBrowser1->Count > 0)
|
||||
for (int i= 0; i<AbZipBrowser1->Count; i++)
|
||||
ListBox1->Items->Add(AbZipBrowser1->Items[i]->FileName);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ListBox1->Items->Add(OpenDialog1->FileName + " is not a valid archive.");
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
BIN
Abbrevia/examples/CBuilder/UContent.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/UContent.dfm
Normal file
Binary file not shown.
54
Abbrevia/examples/CBuilder/UContent.h
Normal file
54
Abbrevia/examples/CBuilder/UContent.h
Normal file
@@ -0,0 +1,54 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef UContentH
|
||||
#define UContentH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
#include "AbZBrows.hpp"
|
||||
#include <Dialogs.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TLabel *Label1;
|
||||
TListBox *ListBox1;
|
||||
TButton *Button1;
|
||||
TOpenDialog *OpenDialog1;
|
||||
TAbZipBrowser *AbZipBrowser1;
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
41
Abbrevia/examples/CBuilder/UDemoDlg.cpp
Normal file
41
Abbrevia/examples/CBuilder/UDemoDlg.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UDemoDlg.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "UDemoDlg.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
TDemoDlg *DemoDlg;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TDemoDlg::TDemoDlg(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/UDemoDlg.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/UDemoDlg.dfm
Normal file
Binary file not shown.
52
Abbrevia/examples/CBuilder/UDemoDlg.h
Normal file
52
Abbrevia/examples/CBuilder/UDemoDlg.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UDemoDlg.h */
|
||||
/* Copyright (c) TurboPower Software Co., 1997, 1998 */
|
||||
/* All Rights Reserved */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef UDemoDlgH
|
||||
#define UDemoDlgH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TDemoDlg : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TButton *Button1;
|
||||
TButton *Button2;
|
||||
TEdit *Edit1;
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TDemoDlg(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TDemoDlg *DemoDlg;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
146
Abbrevia/examples/CBuilder/UExample.cpp
Normal file
146
Abbrevia/examples/CBuilder/UExample.cpp
Normal file
@@ -0,0 +1,146 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UExample.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "UExample.h"
|
||||
#include "UDemoDlg.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "AbZipOut"
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbMeter"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Open1Click(TObject *Sender)
|
||||
{
|
||||
if (OpenDialog1->Execute()) {
|
||||
AbZipOutline1->FileName = OpenDialog1->FileName;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Exit1Click(TObject *Sender)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbZipOutline1Load(TObject *Sender)
|
||||
{
|
||||
TopStatus->Caption = " " + AbZipOutline1->FileName;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbZipOutline1MouseDown(TObject *Sender,
|
||||
TMouseButton Button, TShiftState Shift, int X, int Y)
|
||||
{
|
||||
if (Button == mbRight) {
|
||||
// prepare popup menu
|
||||
if (AbZipOutline1->Count > 0) {
|
||||
// there are items in the outline - select the item under the mouse
|
||||
// int i = AbZipOutline1->GetOutlineItem( X, Y );
|
||||
// if (i != -1)
|
||||
// AbZipOutline1->SelectedItem = i;
|
||||
}
|
||||
if (AbZipOutline1->FileName != "")
|
||||
Add1->Enabled = true;
|
||||
else
|
||||
// archive has to be initialized before we can add to it
|
||||
Add1->Enabled = false;
|
||||
if (AbZipOutline1->SelectedZipItem) {
|
||||
// pointing at a file - allow file operations
|
||||
Delete1->Enabled = true;
|
||||
Extract1->Enabled = true;
|
||||
Freshen1->Enabled = true;
|
||||
Move1->Enabled = true;
|
||||
}
|
||||
else {
|
||||
// pointing at a directory - don"t allow file operations
|
||||
Delete1->Enabled = false;
|
||||
Extract1->Enabled = false;
|
||||
Freshen1->Enabled = false;
|
||||
Move1->Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Delete1Click(TObject *Sender)
|
||||
{
|
||||
AbZipOutline1->DeleteFiles( AbZipOutline1->SelectedZipItem->FileName );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Extract1Click(TObject *Sender)
|
||||
{
|
||||
AbZipOutline1->ExtractFiles( AbZipOutline1->SelectedZipItem->FileName );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Freshen1Click(TObject *Sender)
|
||||
{
|
||||
AbZipOutline1->FreshenFiles( AbZipOutline1->SelectedZipItem->FileName );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Add1Click(TObject *Sender)
|
||||
{
|
||||
DemoDlg->Caption = "Add Files with FileMask";
|
||||
DemoDlg->Edit1->Text = "*.*";
|
||||
DemoDlg->ShowModal();
|
||||
if (DemoDlg->ModalResult == mrOk)
|
||||
AbZipOutline1->AddFiles( DemoDlg->Edit1->Text, 0 );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Move1Click(TObject *Sender)
|
||||
{
|
||||
DemoDlg->Caption = "Move File to New Name";
|
||||
DemoDlg->Edit1->Text = AbZipOutline1->SelectedZipItem->FileName;
|
||||
DemoDlg->ShowModal();
|
||||
if (DemoDlg->ModalResult == mrOk)
|
||||
AbZipOutline1->Move( AbZipOutline1->SelectedZipItem, DemoDlg->Edit1->Text );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbZipOutline1ProcessItemFailure(TObject *Sender,
|
||||
TAbArchiveItem *Item, const TAbProcessType ProcessType,
|
||||
TAbErrorClass ErrorClass, int ErrorCode)
|
||||
{
|
||||
switch (ProcessType) {
|
||||
case ptAdd : ShowMessage( "Failed to add " + Item->FileName ); break;
|
||||
case ptMove : ShowMessage( "Failed to move " + Item->FileName ); break;
|
||||
case ptExtract : ShowMessage( "Failed to extract " + Item->FileName ); break;
|
||||
case ptFreshen : ShowMessage( "Failed to freshen " + Item->FileName ); break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::FormCreate(TObject *Sender)
|
||||
{
|
||||
AbZipOutline1->BaseDirectory = ExtractFilePath( Application->ExeName );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/UExample.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/UExample.dfm
Normal file
Binary file not shown.
92
Abbrevia/examples/CBuilder/UExample.h
Normal file
92
Abbrevia/examples/CBuilder/UExample.h
Normal file
@@ -0,0 +1,92 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UExample.h */
|
||||
/* Copyright (c) TurboPower Software Co., 1997, 1998 */
|
||||
/* All Rights Reserved */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef UExampleH
|
||||
#define UExampleH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include "AbZipOut.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include <vcl\Menus.hpp>
|
||||
#include <vcl\Dialogs.hpp>
|
||||
#include <vcl\ComCtrls.hpp>
|
||||
#include "AbBase.hpp"
|
||||
#include "AbMeter.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TPanel *BottomStatus;
|
||||
TPanel *TopStatus;
|
||||
TMainMenu *MainMenu1;
|
||||
TMenuItem *File1;
|
||||
TMenuItem *Open1;
|
||||
TMenuItem *N1;
|
||||
TMenuItem *Exit1;
|
||||
TOpenDialog *OpenDialog1;
|
||||
TPopupMenu *PopupMenu1;
|
||||
TMenuItem *Add1;
|
||||
TMenuItem *Delete1;
|
||||
TMenuItem *Extract1;
|
||||
TMenuItem *Freshen1;
|
||||
TMenuItem *Move1;
|
||||
TPanel *Panel1;
|
||||
TMemo *Memo1;
|
||||
TAbMeter *AbMeter1;
|
||||
TAbMeter *AbMeter2;
|
||||
TLabel *Label1;
|
||||
TLabel *Label2;
|
||||
TAbZipOutline *AbZipOutline1;
|
||||
void __fastcall Open1Click(TObject *Sender);
|
||||
void __fastcall Exit1Click(TObject *Sender);
|
||||
void __fastcall AbZipOutline1Load(TObject *Sender);
|
||||
void __fastcall AbZipOutline1MouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall Delete1Click(TObject *Sender);
|
||||
void __fastcall Extract1Click(TObject *Sender);
|
||||
void __fastcall Freshen1Click(TObject *Sender);
|
||||
void __fastcall Add1Click(TObject *Sender);
|
||||
void __fastcall Move1Click(TObject *Sender);
|
||||
void __fastcall AbZipOutline1ProcessItemFailure(TObject *Sender,
|
||||
TAbArchiveItem *Item, const TAbProcessType ProcessType,
|
||||
TAbErrorClass ErrorClass, int ErrorCode);
|
||||
void __fastcall FormCreate(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
106
Abbrevia/examples/CBuilder/UFinder.cpp
Normal file
106
Abbrevia/examples/CBuilder/UFinder.cpp
Normal file
@@ -0,0 +1,106 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UFinder.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "UFinder.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "AbZBrows"
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
|
||||
{
|
||||
Aborted = true;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Edit1Change(TObject *Sender)
|
||||
{
|
||||
Button1->Enabled = Edit1->Text.Length() > 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Button1Click(TObject *Sender)
|
||||
{
|
||||
Button1->Enabled = false;
|
||||
Memo1->Clear();
|
||||
try {
|
||||
Button2->Enabled = true;
|
||||
Aborted = false;
|
||||
// look in the file list box for the file
|
||||
for (int i=0;i<FileListBox1->Items->Count;i++) {
|
||||
Application->ProcessMessages();
|
||||
if (Aborted) break;
|
||||
if (CompareText( Edit1->Text, FileListBox1->Items->Strings[i] ) == 0) {
|
||||
Memo1->Lines->Add( "Found in " + FileListBox1->Directory );
|
||||
break;
|
||||
}
|
||||
// now add search of zip and self extracting files
|
||||
String CurFile = UpperCase( FileListBox1->Items->Strings[i] );
|
||||
if (( CurFile.Pos( ".ZIP" ) > 0 ) ||
|
||||
( CurFile.Pos( ".EXE" ) > 0 )) {
|
||||
try {
|
||||
AbZipBrowser1->FileName = FileListBox1->Items->Strings[i];
|
||||
}
|
||||
catch(...) {
|
||||
}
|
||||
if (AbZipBrowser1->Count > 0) {
|
||||
for (int j=0;j<AbZipBrowser1->Count;j++) {
|
||||
if (Aborted) break;
|
||||
if (AbZipBrowser1->Items[j]->MatchesStoredName(Edit1->Text)) {
|
||||
Memo1->Lines->Add( "Found in " + FileListBox1->Items->Strings[i] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
Memo1->Lines->Add( "Done!" );
|
||||
Edit1->Enabled = true;
|
||||
Button1->Enabled = true;
|
||||
Button2->Enabled = false;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TForm1::Button2Click(TObject *Sender)
|
||||
{
|
||||
Aborted = true;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
BIN
Abbrevia/examples/CBuilder/UFinder.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/UFinder.dfm
Normal file
Binary file not shown.
71
Abbrevia/examples/CBuilder/UFinder.h
Normal file
71
Abbrevia/examples/CBuilder/UFinder.h
Normal file
@@ -0,0 +1,71 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UFinder.h */
|
||||
/* Copyright (c) TurboPower Software Co., 1997, 1998 */
|
||||
/* All Rights Reserved */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef UFinderH
|
||||
#define UFinderH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\FileCtrl.hpp>
|
||||
#include "AbZBrows.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TLabel *Label1;
|
||||
TLabel *Label2;
|
||||
TEdit *Edit1;
|
||||
TMemo *Memo1;
|
||||
TDriveComboBox *DriveComboBox1;
|
||||
TDirectoryListBox *DirectoryListBox1;
|
||||
TFileListBox *FileListBox1;
|
||||
TMemo *Memo2;
|
||||
TAbZipBrowser *AbZipBrowser1;
|
||||
TButton *Button1;
|
||||
TButton *Button2;
|
||||
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
||||
void __fastcall Edit1Change(TObject *Sender);
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
void __fastcall Button2Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
bool Aborted;
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
1228
Abbrevia/examples/CBuilder/UMain.cpp
Normal file
1228
Abbrevia/examples/CBuilder/UMain.cpp
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Abbrevia/examples/CBuilder/UMain.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/UMain.dfm
Normal file
Binary file not shown.
262
Abbrevia/examples/CBuilder/UMain.h
Normal file
262
Abbrevia/examples/CBuilder/UMain.h
Normal file
@@ -0,0 +1,262 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UMain.h */
|
||||
/* Copyright (c) TurboPower Software Co., 1997, 1998 */
|
||||
/* All Rights Reserved */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef UMainH
|
||||
#define UMainH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include "AbZipOut.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbZBrows.hpp"
|
||||
#include "AbDlgPwd.hpp"
|
||||
#include <vcl\FileCtrl.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\Menus.hpp>
|
||||
#include <vcl\Dialogs.hpp>
|
||||
#include <vcl\IniFiles.hpp>
|
||||
#include <shellapi.h>
|
||||
#include <vcl\ComCtrls.hpp>
|
||||
#include "AbBase.hpp"
|
||||
#include "AbMeter.hpp"
|
||||
#include <Graphics.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TPanel *Panel1;
|
||||
TLabel *Label1;
|
||||
TLabel *Label2;
|
||||
TPanel *Panel2;
|
||||
TPanel *Panel3;
|
||||
TPanel *Panel4;
|
||||
TLabel *Label3;
|
||||
TDriveComboBox *DriveComboBox1;
|
||||
TFilterComboBox *FilterComboBox1;
|
||||
TEdit *Edit1;
|
||||
TDirectoryListBox *DirectoryListBox1;
|
||||
TFileListBox *FileListBox1;
|
||||
TPanel *Panel6;
|
||||
TLabel *ArchiveLabel;
|
||||
TPanel *Panel8;
|
||||
TSpeedButton *SpeedButton1;
|
||||
TSpeedButton *SpeedButton2;
|
||||
TSpeedButton *SpeedButton3;
|
||||
TSpeedButton *SpeedButton4;
|
||||
TSpeedButton *SpeedButton5;
|
||||
TSpeedButton *SpeedButton7;
|
||||
TSpeedButton *SpeedButton8;
|
||||
TSpeedButton *SpeedButton9;
|
||||
TSpeedButton *SpeedButton10;
|
||||
TSpeedButton *SpeedButton11;
|
||||
TSpeedButton *SpeedButton12;
|
||||
TSpeedButton *SpeedButton13;
|
||||
TSpeedButton *SpeedButton14;
|
||||
TImage *Image1;
|
||||
TSpeedButton *sbNone;
|
||||
TSpeedButton *sbAll;
|
||||
TSpeedButton *sbDef;
|
||||
TMainMenu *MainMenu1;
|
||||
TMenuItem *File1;
|
||||
TMenuItem *Open1;
|
||||
TMenuItem *Save1;
|
||||
TMenuItem *Close1;
|
||||
TMenuItem *N4;
|
||||
TMenuItem *Convert1;
|
||||
TMenuItem *N1;
|
||||
TMenuItem *Exit1;
|
||||
TMenuItem *Preferences1;
|
||||
TMenuItem *Confirmations1;
|
||||
TMenuItem *CompressionMethodToUse1;
|
||||
TMenuItem *Store1;
|
||||
TMenuItem *Deflate1;
|
||||
TMenuItem *Best1;
|
||||
TMenuItem *DeflationOption1;
|
||||
TMenuItem *Normal1;
|
||||
TMenuItem *Maximum1;
|
||||
TMenuItem *Fast1;
|
||||
TMenuItem *SuperFast1;
|
||||
TMenuItem *ExtractOptions1;
|
||||
TMenuItem *CreateDirs1;
|
||||
TMenuItem *RestorePath1;
|
||||
TMenuItem *Password1;
|
||||
TMenuItem *StoreOptions1;
|
||||
TMenuItem *RecurseTree1;
|
||||
TMenuItem *RemoveDots1;
|
||||
TMenuItem *StripPath1;
|
||||
TMenuItem *View1;
|
||||
TMenuItem *Attributes1;
|
||||
TMenuItem *za0;
|
||||
TMenuItem *za1;
|
||||
TMenuItem *za2;
|
||||
TMenuItem *za3;
|
||||
TMenuItem *za4;
|
||||
TMenuItem *za5;
|
||||
TMenuItem *za6;
|
||||
TMenuItem *za7;
|
||||
TMenuItem *za8;
|
||||
TMenuItem *za9;
|
||||
TMenuItem *za10;
|
||||
TMenuItem *FileComment1;
|
||||
TMenuItem *N3;
|
||||
TMenuItem *None1;
|
||||
TMenuItem *All1;
|
||||
TMenuItem *Default1;
|
||||
TMenuItem *Font1;
|
||||
TMenuItem *Style1;
|
||||
TMenuItem *Hierarchy1;
|
||||
TMenuItem *N5;
|
||||
TMenuItem *OS1;
|
||||
TMenuItem *OS2;
|
||||
TMenuItem *OS3;
|
||||
TMenuItem *OS4;
|
||||
TMenuItem *OS5;
|
||||
TMenuItem *OS6;
|
||||
TMenuItem *Items1;
|
||||
TMenuItem *AddFiles1;
|
||||
TMenuItem *DeleteFiles1;
|
||||
TMenuItem *ExtractFiles1;
|
||||
TMenuItem *FreshenFiles1;
|
||||
TMenuItem *Help1;
|
||||
TMenuItem *Contents1;
|
||||
TMenuItem *N2;
|
||||
TMenuItem *About1;
|
||||
TFontDialog *FontDialog1;
|
||||
TOpenDialog *OpenDialog1;
|
||||
TPopupMenu *PopupMenu1;
|
||||
TMenuItem *Delete1;
|
||||
TMenuItem *Extract1;
|
||||
TMenuItem *Freshen1;
|
||||
TMenuItem *Move1;
|
||||
TMenuItem *Run1;
|
||||
TPanel *Panel5;
|
||||
TMenuItem *TurboPowerontheWeb1;
|
||||
TMenuItem *SendmailtoTurboPower1;
|
||||
TMenuItem *AbbreviaontheWeb1;
|
||||
TAbMeter *AbMeter1;
|
||||
TAbMeter *AbMeter2;
|
||||
TAbZipOutline *AbZipOutline1;
|
||||
void __fastcall All1Click(TObject *Sender);
|
||||
void __fastcall Exit1Click(TObject *Sender);
|
||||
void __fastcall FormCreate(TObject *Sender);
|
||||
void __fastcall Hierarchy1Click(TObject *Sender);
|
||||
void __fastcall None1Click(TObject *Sender);
|
||||
void __fastcall Save1Click(TObject *Sender);
|
||||
void __fastcall za10Click(TObject *Sender);
|
||||
void __fastcall Font1Click(TObject *Sender);
|
||||
void __fastcall Open1Click(TObject *Sender);
|
||||
void __fastcall AbZipOutline1DragOver(TObject *Sender, TObject *Source, int X,
|
||||
int Y, TDragState State, bool &Accept);
|
||||
void __fastcall AbZipOutline1DragDrop(TObject *Sender, TObject *Source, int X,
|
||||
int Y);
|
||||
void __fastcall AbZipOutline1DblClick(TObject *Sender);
|
||||
void __fastcall AbZipOutline1MouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall FileListBox1DragOver(TObject *Sender, TObject *Source, int X,
|
||||
int Y, TDragState State, bool &Accept);
|
||||
void __fastcall FileListBox1DragDrop(TObject *Sender, TObject *Source, int X,
|
||||
int Y);
|
||||
void __fastcall AbZipOutline1WindowsDrop(TObject *Sender, AnsiString FileName);
|
||||
void __fastcall Best1Click(TObject *Sender);
|
||||
void __fastcall SuperFast1Click(TObject *Sender);
|
||||
void __fastcall CreateDirs1Click(TObject *Sender);
|
||||
void __fastcall RestorePath1Click(TObject *Sender);
|
||||
void __fastcall StripPath1Click(TObject *Sender);
|
||||
void __fastcall AbZipOutline1Change(TObject *Sender);
|
||||
void __fastcall Confirmations1Click(TObject *Sender);
|
||||
void __fastcall AbZipOutline1ConfirmSave(TObject *Sender, bool &Confirm);
|
||||
void __fastcall Delete1Click(TObject *Sender);
|
||||
void __fastcall Extract1Click(TObject *Sender);
|
||||
void __fastcall Freshen1Click(TObject *Sender);
|
||||
void __fastcall Move1Click(TObject *Sender);
|
||||
void __fastcall Password1Click(TObject *Sender);
|
||||
void __fastcall AddFiles1Click(TObject *Sender);
|
||||
void __fastcall FreshenFiles1Click(TObject *Sender);
|
||||
void __fastcall AbZipOutline1ArchiveItemProgress(TObject *Sender,
|
||||
TAbArchiveItem *Item, BYTE Progress, bool &Abort);
|
||||
void __fastcall AbZipOutline1NeedPassword(TObject *Sender,
|
||||
AnsiString &NewPassword);
|
||||
void __fastcall DeleteFiles1Click(TObject *Sender);
|
||||
void __fastcall ExtractFiles1Click(TObject *Sender);
|
||||
void __fastcall FormDestroy(TObject *Sender);
|
||||
void __fastcall Close1Click(TObject *Sender);
|
||||
void __fastcall AbZipOutline1Load(TObject *Sender);
|
||||
void __fastcall Convert1Click(TObject *Sender);
|
||||
void __fastcall AbZipOutline1ConfirmOverwrite(AnsiString &Name, bool &Confirm);
|
||||
void __fastcall Default1Click(TObject *Sender);
|
||||
void __fastcall Contents1Click(TObject *Sender);
|
||||
void __fastcall About1Click(TObject *Sender);
|
||||
void __fastcall FileListBox1DblClick(TObject *Sender);
|
||||
void __fastcall AbZipOutline1EndDrag(TObject *Sender, TObject *Target, int X,
|
||||
int Y);
|
||||
void __fastcall FileListBox1MouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall FileListBox1MouseMove(TObject *Sender, TShiftState Shift,
|
||||
int X, int Y);
|
||||
void __fastcall AbZipOutline1MouseMove(TObject *Sender, TShiftState Shift,
|
||||
int X, int Y);
|
||||
void __fastcall Edit1Exit(TObject *Sender);
|
||||
void __fastcall FormKeyPress(TObject *Sender, char &Key);
|
||||
void __fastcall OS5Click(TObject *Sender);
|
||||
void __fastcall AbZipOutline1ConfirmProcessItem(TObject *Sender,
|
||||
TAbArchiveItem *Item, TAbProcessType ProcessType, bool &Confirm);
|
||||
void __fastcall AbZipOutline1ProcessItemFailure(TObject *Sender,
|
||||
TAbArchiveItem *Item, const TAbProcessType ProcessType,
|
||||
TAbErrorClass ErrorClass, int ErrorCode);
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall TurboPowerontheWeb1Click(TObject *Sender);
|
||||
void __fastcall AbbreviaontheWeb1Click(TObject *Sender);
|
||||
void __fastcall SendmailtoTurboPower1Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
int OutlineX, OutlineY, FileX, FileY;
|
||||
String StubName;
|
||||
void ReadIniSettings();
|
||||
void SaveIniSettings();
|
||||
void SetCaption();
|
||||
void UpdateMenu();
|
||||
void __fastcall DoConfirm(TObject* Sender, TAbArchiveItem* Item,
|
||||
bool& Confirm, String Caption);
|
||||
void __fastcall GetMinMaxInfo(TWMGetMinMaxInfo& Msg);
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
BEGIN_MESSAGE_MAP
|
||||
MESSAGE_HANDLER(WM_GETMINMAXINFO, TWMGetMinMaxInfo, GetMinMaxInfo)
|
||||
END_MESSAGE_MAP(TForm);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
71
Abbrevia/examples/CBuilder/UMakeSfx.cpp
Normal file
71
Abbrevia/examples/CBuilder/UMakeSfx.cpp
Normal file
@@ -0,0 +1,71 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "UMakeSfx.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbSelfEx"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TForm1::Button1Click(TObject *Sender)
|
||||
{
|
||||
if (AbMakeSelfExe1->Execute())
|
||||
ShowMessage(AbMakeSelfExe1->SelfExe + " has been created");
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TForm1::AbMakeSelfExe1GetStubExe(TObject *Sender,
|
||||
AnsiString &aFilename, bool &Abort)
|
||||
{
|
||||
OpenDialog1->Title = "Select executable stub";
|
||||
OpenDialog1->FileName = "";
|
||||
OpenDialog1->Filter = "Exe files|*.exe";
|
||||
Abort = !OpenDialog1->Execute();
|
||||
if (!Abort)
|
||||
aFilename = OpenDialog1->FileName;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::AbMakeSelfExe1GetZipFile(TObject *Sender,
|
||||
AnsiString &aFilename, bool &Abort)
|
||||
{
|
||||
OpenDialog1->Title = "Select executable stub";
|
||||
OpenDialog1->FileName = "";
|
||||
OpenDialog1->Filter = "Exe files|*.exe";
|
||||
Abort = !OpenDialog1->Execute();
|
||||
if (!Abort)
|
||||
aFilename = OpenDialog1->FileName;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/UMakeSfx.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/UMakeSfx.dfm
Normal file
Binary file not shown.
56
Abbrevia/examples/CBuilder/UMakeSfx.h
Normal file
56
Abbrevia/examples/CBuilder/UMakeSfx.h
Normal file
@@ -0,0 +1,56 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef UMakeSfxH
|
||||
#define UMakeSfxH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include "AbBase.hpp"
|
||||
#include "AbSelfEx.hpp"
|
||||
#include <Dialogs.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TMemo *Memo1;
|
||||
TButton *Button1;
|
||||
TAbMakeSelfExe *AbMakeSelfExe1;
|
||||
TOpenDialog *OpenDialog1;
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
void __fastcall AbMakeSelfExe1GetStubExe(TObject *Sender,
|
||||
AnsiString &aFilename, bool &Abort);
|
||||
void __fastcall AbMakeSelfExe1GetZipFile(TObject *Sender,
|
||||
AnsiString &aFilename, bool &Abort);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
54
Abbrevia/examples/CBuilder/USelfExV.cpp
Normal file
54
Abbrevia/examples/CBuilder/USelfExV.cpp
Normal file
@@ -0,0 +1,54 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* USelfExV.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "USelfExV.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "AbUnZper"
|
||||
#pragma link "AbZBrows"
|
||||
#pragma link "AbArcTyp"
|
||||
#pragma link "AbBase"
|
||||
#pragma link "AbBrowse"
|
||||
#pragma link "AbUnzper"
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::Button1Click(TObject *Sender)
|
||||
{
|
||||
AbUnZipper1->FileName = ParamStr( 0 );
|
||||
SetCurrentDirectory( ExtractFilePath( ParamStr( 0 ) ).c_str() );
|
||||
AbUnZipper1->ExtractFiles( "*.*" );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/USelfExV.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/USelfExV.dfm
Normal file
Binary file not shown.
59
Abbrevia/examples/CBuilder/USelfExV.h
Normal file
59
Abbrevia/examples/CBuilder/USelfExV.h
Normal file
@@ -0,0 +1,59 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* USelfExV.h */
|
||||
/* Copyright (c) TurboPower Software Co., 1997, 1998 */
|
||||
/* All Rights Reserved */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef USelfExVH
|
||||
#define USelfExVH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include "AbUnZper.hpp"
|
||||
#include "AbZBrows.hpp"
|
||||
#include "AbArcTyp.hpp"
|
||||
#include "AbBase.hpp"
|
||||
#include "AbBrowse.hpp"
|
||||
#include "AbUnzper.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TAbUnZipper *AbUnZipper1;
|
||||
TMemo *Memo1;
|
||||
TButton *Button1;
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
95
Abbrevia/examples/CBuilder/UStrPad.cpp
Normal file
95
Abbrevia/examples/CBuilder/UStrPad.cpp
Normal file
@@ -0,0 +1,95 @@
|
||||
// ***** BEGIN LICENSE BLOCK *****
|
||||
// * Version: MPL 1.1
|
||||
// *
|
||||
// * The contents of this file are subject to the Mozilla Public License Version
|
||||
// * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
// * the License. You may obtain a copy of the License at
|
||||
// * http://www.mozilla.org/MPL/
|
||||
// *
|
||||
// * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
// * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
// * for the specific language governing rights and limitations under the
|
||||
// * License.
|
||||
// *
|
||||
// * The Original Code is TurboPower Abbrevia
|
||||
// *
|
||||
// * The Initial Developer of the Original Code is
|
||||
// * TurboPower Software
|
||||
// *
|
||||
// * Portions created by the Initial Developer are Copyright (C) 1997-2002
|
||||
// * the Initial Developer. All Rights Reserved.
|
||||
// *
|
||||
// * Contributor(s):
|
||||
// *
|
||||
// * ***** END LICENSE BLOCK *****
|
||||
/*********************************************************/
|
||||
/* UStrPad.cpp */
|
||||
/*********************************************************/
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "UStrPad.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::FormCreate(TObject *Sender)
|
||||
{
|
||||
ZnfName = ChangeFileExt(Application->ExeName, ".zst");
|
||||
TxtName = ExtractFileName( ChangeFileExt(Application->ExeName, ".pad") );
|
||||
SetCurrentDirectory( ExtractFilePath( Application->ExeName ).c_str() );
|
||||
if (FileExists( ZnfName )) {
|
||||
TxtStream = new TMemoryStream;
|
||||
try {
|
||||
ZnfStream = new TFileStream( ZnfName, fmOpenRead | fmShareExclusive );
|
||||
try {
|
||||
InflateStream( ZnfStream, TxtStream );
|
||||
}
|
||||
catch (...) {
|
||||
delete ZnfStream;
|
||||
ZnfStream = 0;
|
||||
}
|
||||
delete ZnfStream;
|
||||
TxtStream->Position = 0;
|
||||
Memo1->Lines->LoadFromStream( TxtStream );
|
||||
}
|
||||
catch (...) {
|
||||
delete TxtStream;
|
||||
return;
|
||||
}
|
||||
delete TxtStream;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TForm1::FormDestroy(TObject *Sender)
|
||||
{
|
||||
TxtStream = new TMemoryStream;
|
||||
try {
|
||||
Memo1->Lines->SaveToStream( TxtStream );
|
||||
TxtStream->Position = 0;
|
||||
if (FileExists( ZnfName ))
|
||||
ZnfStream = new TFileStream( ZnfName, fmOpenWrite | fmShareExclusive );
|
||||
else
|
||||
ZnfStream = new TFileStream( ZnfName, fmCreate | fmShareExclusive );
|
||||
try {
|
||||
DeflateStream( TxtStream, ZnfStream );
|
||||
}
|
||||
catch (...) {
|
||||
delete ZnfStream;
|
||||
ZnfStream = 0;
|
||||
}
|
||||
delete ZnfStream;
|
||||
}
|
||||
catch (...) {
|
||||
delete TxtStream;
|
||||
return;
|
||||
}
|
||||
delete TxtStream;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
Abbrevia/examples/CBuilder/UStrPad.dfm
Normal file
BIN
Abbrevia/examples/CBuilder/UStrPad.dfm
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user