rs26src.zip from torry.net

This commit is contained in:
2020-09-21 23:06:13 +00:00
commit fa01ec3931
79 changed files with 13525 additions and 0 deletions

204
Archiver Demo2/Main.dfm Normal file
View File

@@ -0,0 +1,204 @@
object MainForm: TMainForm
Left = 261
Top = 106
BorderStyle = bsDialog
Caption = 'reSource Demo 2'
ClientHeight = 394
ClientWidth = 443
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 8
Width = 335
Height = 13
Caption =
'This demo shows the use of CompressToFile and DecompressFromFile' +
'.'
end
object Label2: TLabel
Left = 8
Top = 24
Width = 312
Height = 13
Caption =
'These procedures compress one file to it'#39's corresponding archiv' +
'e.'
end
object Label3: TLabel
Left = 29
Top = 59
Width = 44
Height = 13
Caption = 'File Path:'
FocusControl = SourceFileEdit
end
object Label4: TLabel
Left = 8
Top = 81
Width = 64
Height = 13
Caption = 'Archive Path:'
FocusControl = ArchiveFileEdit
end
object Label5: TLabel
Left = 148
Top = 374
Width = 131
Height = 18
Caption = 'reSource Demo 2'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Arial'
Font.Style = [fsBold, fsItalic]
ParentFont = False
end
object Bevel1: TBevel
Left = 0
Top = 155
Width = 441
Height = 9
Shape = bsBottomLine
end
object Label6: TLabel
Left = 8
Top = 218
Width = 64
Height = 13
Caption = 'Archive Path:'
FocusControl = DecompressArchiveEdit
end
object Label7: TLabel
Left = 8
Top = 179
Width = 106
Height = 13
Caption = 'Name of file to extract:'
end
object Label8: TLabel
Left = 264
Top = 172
Width = 157
Height = 13
Caption = '(The file must exist in the archive)'
end
object Label9: TLabel
Left = 8
Top = 245
Width = 72
Height = 13
Caption = 'Destination Dir:'
end
object Label10: TLabel
Left = 264
Top = 188
Width = 143
Height = 13
Caption = 'Leave blank to extract all files.'
end
object CompressBtn: TButton
Left = 56
Top = 120
Width = 345
Height = 33
Caption = 'Compress File to Archive'
TabOrder = 4
OnClick = CompressBtnClick
end
object DecompressBtn: TButton
Left = 56
Top = 337
Width = 345
Height = 33
Caption = 'Decompress File From Archive'
TabOrder = 9
OnClick = DecompressBtnClick
end
object SourceFileEdit: TEdit
Left = 80
Top = 54
Width = 321
Height = 21
TabOrder = 0
end
object ArchiveFileEdit: TEdit
Left = 80
Top = 78
Width = 321
Height = 21
TabOrder = 2
end
object BrowseSourceBtn: TButton
Left = 408
Top = 55
Width = 25
Height = 21
Caption = '...'
TabOrder = 1
OnClick = BrowseSourceBtnClick
end
object BrowseArchiveBtn: TButton
Left = 408
Top = 79
Width = 25
Height = 21
Caption = '...'
TabOrder = 3
OnClick = BrowseArchiveBtnClick
end
object DecompressArchiveEdit: TEdit
Left = 88
Top = 215
Width = 313
Height = 21
TabOrder = 6
end
object BrowseBtn2: TButton
Left = 408
Top = 216
Width = 25
Height = 21
Caption = '...'
TabOrder = 7
OnClick = BrowseBtn2Click
end
object ExtractFileNameEdit: TEdit
Left = 124
Top = 175
Width = 133
Height = 21
TabOrder = 5
end
object DirListBox: TDirectoryListBox
Left = 89
Top = 245
Width = 169
Height = 81
ItemHeight = 16
TabOrder = 8
end
object SaveDialog1: TSaveDialog
Filter = 'reSource Archive (*.rs)|*.rs'
Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing]
Title = 'The File To Compress'
Left = 408
Top = 104
end
object OpenDialog1: TOpenDialog
Title = 'Select Archive File. Type a new name to Create a new Archive.'
Left = 400
Top = 24
end
object Resource1: TResource
Left = 8
Top = 104
end
end

113
Archiver Demo2/Main.pas Normal file
View File

@@ -0,0 +1,113 @@
unit Main;
{ reSource Demo 2
Demonstrates the use of reSource to compress/decompress one file
at a time.
This behaviour is more similar to like what MS does in some of
their installation disks, where each individual file is compressed.
The main procedures are:
CompressToArchive
DecompressFromArchive
}
(**) interface (**)
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls,
// engine - include the following units in your app to access TCentralFileHeader etc.
// your search path must contain the dir the units are located in.
ResourceCompUnit,
ArchiveHeadersUnit, ErrorUnit, EDosUnit, ArchiveManagerUnit, StructsUnit,
ExtCtrls, FileCtrl;
type
TMainForm = class(TForm)
Label1: TLabel;
Label2: TLabel;
CompressBtn: TButton;
DecompressBtn: TButton;
Label3: TLabel;
Label4: TLabel;
SourceFileEdit: TEdit;
ArchiveFileEdit: TEdit;
Label5: TLabel;
BrowseSourceBtn: TButton;
BrowseArchiveBtn: TButton;
SaveDialog1: TSaveDialog;
OpenDialog1: TOpenDialog;
Resource1: TResource;
Bevel1: TBevel;
DecompressArchiveEdit: TEdit;
Label6: TLabel;
BrowseBtn2: TButton;
ExtractFileNameEdit: TEdit;
Label7: TLabel;
Label8: TLabel;
DirListBox: TDirectoryListBox;
Label9: TLabel;
Label10: TLabel;
procedure BrowseSourceBtnClick(Sender: TObject);
procedure BrowseArchiveBtnClick(Sender: TObject);
procedure CompressBtnClick(Sender: TObject);
procedure DecompressBtnClick(Sender: TObject);
procedure BrowseBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
(**) implementation (**)
{$R *.DFM}
procedure TMainForm.BrowseSourceBtnClick(Sender: TObject);
var
s: string;
begin
if OpenDialog1.Execute then
begin
s := OpenDialog1.FileName;
SourceFileEdit.Text := s;
// suggest a name for the archive file
if ArchiveFileEdit.Text = '' then
ArchiveFileEdit.Text := ChangeFileExt(s, '.rs');
end;
end;
procedure TMainForm.BrowseArchiveBtnClick(Sender: TObject);
begin
if SaveDialog1.Execute then
begin
ArchiveFileEdit.Text := SaveDialog1.FileName;
end;
end;
procedure TMainForm.CompressBtnClick(Sender: TObject);
begin
reSource1.CompressToArchive(SourceFileEdit.Text, ArchiveFileEdit.Text);
end;
procedure TMainForm.DecompressBtnClick(Sender: TObject);
begin
reSource1.DecompressFromArchive(DecompressArchiveEdit.Text, DirListBox.Directory,
ExtractFileNameEdit.Text);
end;
procedure TMainForm.BrowseBtn2Click(Sender: TObject);
begin
{Archive for decompression}
if SaveDialog1.Execute then
begin
DecompressArchiveEdit.Text := SaveDialog1.FileName;
end;
end;
end.

View File

@@ -0,0 +1,35 @@
-$A+
-$B-
-$C+
-$D+
-$E-
-$F-
-$G+
-$H+
-$I+
-$J+
-$K-
-$L+
-$M-
-$N+
-$O+
-$P+
-$Q-
-$R-
-$S-
-$T-
-$U-
-$V+
-$W-
-$X+
-$YD
-$Z1
-cg
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-H+
-W+
-M
-$M16384,1048576
-K$00400000
-LE"c:\borland\delphi5\Projects\Bpl"
-LN"c:\borland\delphi5\Projects\Bpl"

View File

@@ -0,0 +1,105 @@
[Compiler]
A=1
B=0
C=1
D=1
E=0
F=0
G=1
H=1
I=1
J=1
K=0
L=1
M=0
N=1
O=1
P=1
Q=0
R=0
S=0
T=0
U=0
V=1
W=0
X=1
Y=1
Z=1
ShowHints=1
ShowWarnings=1
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[Linker]
MapFile=0
OutputObjs=0
ConsoleApp=1
DebugInfo=0
RemoteSymbols=0
MinStackSize=16384
MaxStackSize=1048576
ImageBase=4194304
ExeDescription=
[Directories]
OutputDir=
UnitOutputDir=
PackageDLLOutputDir=
PackageDCPOutputDir=
SearchPath=
Packages=VCL50;VCLX50;VCLSMP50;VCLDB50;VCLADO50;ibevnt50;VCLBDE50;VCLDBX50;QRPT50;TEEUI50;TEEDB50;TEE50;DSS50;TEEQR50;VCLIB50;VCLMID50;VCLIE50;INETDB50;INET50;NMFAST50;WEBMID50;dclocx50;dclaxserver50;ColorPicker;preview;Icsdel50;galoled;NtfyIcon
Conditionals=
DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
HostApplication=
[Language]
ActiveLang=
ProjectLang=$00000409
RootDir=
[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\hlUnitAliases]
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[HistoryLists\hlSearchPath]
Count=2
Item0=c:\temp\rs
Item1=C:\Save\Delphi\resource\Component
[HistoryLists\hlUnitOutputDirectory]
Count=1
Item0=C:\temp\rs
[HistoryLists\hlOutputDirectorry]
Count=1
Item0=C:\temp\rs

View File

@@ -0,0 +1,14 @@
program reSourceDemo2;
uses
Forms,
Main in 'Main.pas' {MainForm};
{$R *.RES}
begin
Application.Initialize;
Application.Title := 'reSource Demo 2';
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

View File

@@ -0,0 +1,283 @@
[Closed Files]
File_0=SourceModule,'C:\Save\Delphi\resource\Archiver Demo2\Main.pas',0,1,14,3,23,0,0
File_1=SourceModule,'C:\Save\Delphi\resource\Component\BWTExpandUnit.pas',0,1,226,35,234,0,0
File_2=SourceModule,'C:\Save\Delphi\resource\Component\ResourceCompUnit.pas',0,1,268,2,274,0,0
File_3=SourceModule,'C:\Save\Delphi\resource\Component\ArchiveManagerUnit.pas',0,1,479,30,479,0,0
File_4=SourceModule,'C:\Save\Delphi\resource\Component\BWTBaseUnit.pas',0,1,1,1,1,0,0
File_5=SourceModule,'C:\Save\Delphi\resource\Component\BWTCompressUnit.pas',0,1,1,1,1,0,0
File_6=SourceModule,'C:\Save\Delphi\resource\Archiver Demo\main.pas',0,1,1956,14,1959,1,0
File_7=SourceModule,'C:\Save\Delphi\newr2\Component\StructsUnit.pas',0,1,1,1,7,0,0
File_8=SourceModule,'C:\Save\Delphi\newr2\Component\StrucAriEncoderUnit.pas',0,1,1,1,9,0,0
File_9=SourceModule,'C:\Save\Delphi\newr2\Component\StrucAriDecoderUnit.pas',0,1,1,1,9,0,0
[Modules]
Module0=C:\Save\Delphi\resource\Archiver Demo2\reSourceDemo2.dpr
Count=1
EditWindowCount=1
[C:\Save\Delphi\resource\Archiver Demo2\reSourceDemo2.dpr]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[C:\Save\Delphi\resource\Archiver Demo2\ProjectGroup1.bpg]
FormState=0
FormOnTop=0
[EditWindow0]
ViewCount=1
CurrentView=0
View0=0
CodeExplorer=CodeExplorer@EditWindow0
MessageView=MessageView@EditWindow0
Create=1
Visible=1
State=2
Left=229
Top=232
Width=564
Height=334
MaxLeft=-4
MaxTop=100
MaxWidth=808
MaxHeight=476
ClientWidth=800
ClientHeight=449
LeftPanelSize=0
LeftPanelClients=CodeExplorer@EditWindow0
LeftPanelData=00000400010000000C000000436F64654578706C6F7265720000000000000000000000000000000000FFFFFFFF
RightPanelSize=0
BottomPanelSize=0
BottomPanelClients=CallStackWindow,WatchWindow,MessageView@EditWindow0
BottomPanelData=00000400030000000F00000043616C6C537461636B57696E646F770B000000576174636857696E646F770B0000004D657373616765566965772003000000000000004D00000000000000FFFFFFFF
[View0]
Module=C:\Save\Delphi\resource\Archiver Demo2\reSourceDemo2.dpr
CursorX=52
CursorY=10
TopLine=1
LeftCol=1
[Watches]
Count=2
Watch0='CFH.FileName',256,0,18,1,0
Watch1='FileName',256,0,18,1,0
[Breakpoints]
Count=0
[AddressBreakpoints]
Count=0
[Main Window]
Create=1
Visible=1
State=2
Left=0
Top=28
Width=777
Height=105
MaxLeft=-1
MaxTop=-1
MaxWidth=808
MaxHeight=105
ClientWidth=800
ClientHeight=78
[ProjectManager]
Create=1
Visible=0
State=0
Left=155
Top=124
Width=448
Height=413
MaxLeft=-1
MaxTop=-1
ClientWidth=440
ClientHeight=391
TBDockHeight=303
LRDockWidth=510
Dockable=1
[CPUWindow]
Create=1
Visible=0
State=0
Left=10
Top=108
Width=732
Height=433
MaxLeft=-1
MaxTop=-1
ClientWidth=724
ClientHeight=406
DumpPane=79
DisassemblyPane=349
RegisterPane=231
FlagPane=64
[AlignmentPalette]
Create=1
Visible=0
State=0
Left=50
Top=119
Width=156
Height=80
MaxLeft=-1
MaxTop=-1
ClientWidth=150
ClientHeight=60
[PropertyInspector]
Create=1
Visible=1
State=0
Left=304
Top=200
Width=236
Height=303
MaxLeft=-1
MaxTop=-1
ClientWidth=226
ClientHeight=279
TBDockHeight=494
LRDockWidth=164
Dockable=0
SplitPos=108
ArrangeBy=Name
SelectedItem=
ExpandedItems=BorderIcons,Brush,Dragtypes,Font.Style,Options,Pen
HiddenCategories=Legacy
ShowStatusBar=1
[WatchWindow]
Create=1
Visible=0
State=0
Left=12
Top=0
Width=788
Height=77
MaxLeft=-1
MaxTop=-1
ClientWidth=788
ClientHeight=77
TBDockHeight=77
LRDockWidth=421
Dockable=1
[BreakpointWindow]
Create=1
Visible=0
State=0
Left=181
Top=255
Width=453
Height=197
MaxLeft=-1
MaxTop=-1
ClientWidth=445
ClientHeight=175
TBDockHeight=197
LRDockWidth=453
Dockable=1
Column0Width=100
Column1Width=75
Column2Width=225
Column3Width=40
Column4Width=75
Column5Width=75
[CallStackWindow]
Create=1
Visible=0
State=0
Left=412
Top=0
Width=388
Height=77
MaxLeft=-1
MaxTop=-1
ClientWidth=388
ClientHeight=77
TBDockHeight=77
LRDockWidth=379
Dockable=1
[LocalVarsWindow]
Create=1
Visible=0
State=0
Left=273
Top=197
Width=421
Height=192
MaxLeft=-1
MaxTop=-1
ClientWidth=413
ClientHeight=170
TBDockHeight=192
LRDockWidth=421
Dockable=1
[ToDo List]
Create=1
Visible=0
State=0
Left=154
Top=175
Width=470
Height=250
MaxLeft=-1
MaxTop=-1
ClientWidth=462
ClientHeight=228
TBDockHeight=250
LRDockWidth=470
Dockable=1
Column0Width=260
Column1Width=30
Column2Width=100
Column3Width=70
Column4Width=70
SortOrder=4
ShowHints=1
ShowChecked=1
[CodeExplorer@EditWindow0]
Create=1
Visible=0
State=0
Left=0
Top=12
Width=200
Height=348
MaxLeft=-1
MaxTop=-1
ClientWidth=200
ClientHeight=348
TBDockHeight=305
LRDockWidth=200
Dockable=1
[MessageView@EditWindow0]
Create=1
Visible=0
State=0
Left=12
Top=0
Width=788
Height=77
MaxLeft=-1
MaxTop=-1
ClientWidth=788
ClientHeight=77
TBDockHeight=77
LRDockWidth=443
Dockable=1
[DockHosts]
DockHostCount=0

Binary file not shown.