we don't use the GUI and its source code is available from tibed.net
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5627 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
a8047d3c7c
commit
6939c33782
16 changed files with 0 additions and 2792 deletions
Binary file not shown.
|
@ -1,31 +0,0 @@
|
||||||
unit AboutForm;
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
|
|
||||||
Buttons, ExtCtrls;
|
|
||||||
|
|
||||||
type
|
|
||||||
TfrmAbout = class(TForm)
|
|
||||||
Panel1: TPanel;
|
|
||||||
ProgramIcon: TImage;
|
|
||||||
ProductName: TLabel;
|
|
||||||
Version: TLabel;
|
|
||||||
Copyright: TLabel;
|
|
||||||
Comments: TLabel;
|
|
||||||
OKButton: TButton;
|
|
||||||
private
|
|
||||||
{ Private declarations }
|
|
||||||
public
|
|
||||||
{ Public declarations }
|
|
||||||
end;
|
|
||||||
|
|
||||||
var
|
|
||||||
frmAbout: TfrmAbout;
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
{$R *.dfm}
|
|
||||||
|
|
||||||
end.
|
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
unit DLLWrapper;
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
uses Classes, SysUtils;
|
|
||||||
|
|
||||||
function DoGenerate(const Source, Target: String; Stream: TStream; Config: String): Integer; forward;
|
|
||||||
|
|
||||||
var
|
|
||||||
WaitAfterGenerate: Boolean = False;
|
|
||||||
OptimalPatches: Boolean = False;
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
uses
|
|
||||||
OSUtil, Forms;
|
|
||||||
|
|
||||||
function DoGenerate(const Source, Target: String; Stream: TStream; Config: String): Integer;
|
|
||||||
var
|
|
||||||
F: TextFile;
|
|
||||||
Temp, BatchFile: String;
|
|
||||||
fs: TFileStream;
|
|
||||||
begin
|
|
||||||
BatchFile:=ExcludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName)) + PathDelim +'~generate_patch.bat';
|
|
||||||
AssignFile(F,BatchFile);
|
|
||||||
Rewrite(F);
|
|
||||||
Temp:=GetTempFile;
|
|
||||||
WriteLn(F,'@cls');
|
|
||||||
WriteLn(F,'@echo Generating '+ExtractFileName(Source)+' to '+ExtractFileName(Target)+'...');
|
|
||||||
Write(F,'genpat.exe "', Source, '" "', Target, '" "', Temp, '" /b='+Config);
|
|
||||||
if OptimalPatches then begin
|
|
||||||
Write(F,' /o');
|
|
||||||
end;
|
|
||||||
WriteLn(F,'');
|
|
||||||
if WaitAfterGenerate then begin
|
|
||||||
WriteLn(F,'@echo.');
|
|
||||||
WriteLn(F,'@pause');
|
|
||||||
end;
|
|
||||||
CloseFile(F);
|
|
||||||
|
|
||||||
ExecWaitBatchFile(ExtractFilePath(BatchFile),BatchFile);
|
|
||||||
|
|
||||||
fs:=TFileStream.Create(Temp,fmOpenRead);
|
|
||||||
Stream.CopyFrom(fs,fs.Size);
|
|
||||||
Result:=fs.Size;
|
|
||||||
fs.Free;
|
|
||||||
DeleteFile(Temp);
|
|
||||||
DeleteFile(BatchFile);
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
|
|
@ -1,992 +0,0 @@
|
||||||
object frmMain: TfrmMain
|
|
||||||
Left = 195
|
|
||||||
Top = 93
|
|
||||||
BorderIcons = [biSystemMenu, biMinimize]
|
|
||||||
BorderStyle = bsSingle
|
|
||||||
Caption = 'VG - VPatch GUI'
|
|
||||||
ClientHeight = 385
|
|
||||||
ClientWidth = 689
|
|
||||||
Color = clBtnFace
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'MS Sans Serif'
|
|
||||||
Font.Style = []
|
|
||||||
Icon.Data = {
|
|
||||||
000001000200101000000100080068050000260000002020000001000800A808
|
|
||||||
00008E0500002800000010000000200000000100080000000000000100000000
|
|
||||||
0000000000000001000000010000000000000000800000800000008080008000
|
|
||||||
00008000800080800000C0C0C000C0DCC000F0CAA60000003E0000005D000000
|
|
||||||
7C0000009B000000BA000000D9000000F0002424FF004848FF006C6CFF009090
|
|
||||||
FF00B4B4FF0000143E00001E5D0000287C0000329B00003CBA000046D9000055
|
|
||||||
F000246DFF004885FF006C9DFF0090B5FF00B4CDFF00002A3E00003F5D000054
|
|
||||||
7C0000699B00007EBA000093D90000AAF00024B6FF0048C2FF006CCEFF0090DA
|
|
||||||
FF00B4E6FF00003E3E00005D5D00007C7C00009B9B0000BABA0000D9D90000F0
|
|
||||||
F00024FFFF0048FFFF006CFFFF0090FFFF00B4FFFF00003E2A00005D3F00007C
|
|
||||||
5400009B690000BA7E0000D9930000F0AA0024FFB60048FFC2006CFFCE0090FF
|
|
||||||
DA00B4FFE600003E1400005D1E00007C2800009B320000BA3C0000D9460000F0
|
|
||||||
550024FF6D0048FF85006CFF9D0090FFB500B4FFCD00003E0000005D0000007C
|
|
||||||
0000009B000000BA000000D9000000F0000024FF240048FF48006CFF6C0090FF
|
|
||||||
9000B4FFB400143E00001E5D0000287C0000329B00003CBA000046D9000055F0
|
|
||||||
00006DFF240085FF48009DFF6C00B5FF9000CDFFB4002A3E00003F5D0000547C
|
|
||||||
0000699B00007EBA000093D90000AAF00000B6FF2400C2FF4800CEFF6C00DAFF
|
|
||||||
9000E6FFB4003E3E00005D5D00007C7C00009B9B0000BABA0000D9D90000F0F0
|
|
||||||
0000FFFF2400FFFF4800FFFF6C00FFFF9000FFFFB4003E2A00005D3F00007C54
|
|
||||||
00009B690000BA7E0000D9930000F0AA0000FFB62400FFC24800FFCE6C00FFDA
|
|
||||||
9000FFE6B4003E1400005D1E00007C2800009B320000BA3C0000D9460000F055
|
|
||||||
0000FF6D2400FF854800FF9D6C00FFB59000FFCDB4003E0000005D0000007C00
|
|
||||||
00009B000000BA000000D9000000F0000000FF242400FF484800FF6C6C00FF90
|
|
||||||
9000FFB4B4003E0014005D001E007C0028009B003200BA003C00D9004600F000
|
|
||||||
5500FF246D00FF488500FF6C9D00FF90B500FFB4CD003E002A005D003F007C00
|
|
||||||
54009B006900BA007E00D9009300F000AA00FF24B600FF48C200FF6CCE00FF90
|
|
||||||
DA00FFB4E6003E003E005D005D007C007C009B009B00BA00BA00D900D900F000
|
|
||||||
F000FF24FF00FF48FF00FF6CFF00FF90FF00FFB4FF002A003E003F005D005400
|
|
||||||
7C0069009B007E00BA009300D900AA00F000B624FF00C248FF00CE6CFF00DA90
|
|
||||||
FF00E6B4FF0014003E001E005D0028007C0032009B003C00BA004600D9005500
|
|
||||||
F0006D24FF008548FF009D6CFF00B590FF00CDB4FF0006060600121212001F1F
|
|
||||||
1F002C2C2C003939390045454500525252005F5F5F006C6C6C00787878008585
|
|
||||||
8500929292009F9F9F00ABABAB00B8B8B800C5C5C500D2D2D200DEDEDE00EBEB
|
|
||||||
EB00F8F8F800F0FBFF00A4A0A000808080000000FF0000FF000000FFFF00FF00
|
|
||||||
0000FF00FF00FFFF0000FFFFFF00000000000000000000000000000000000000
|
|
||||||
EAE7858586868796ECEBEA00000000919185858686868787888B8DF8000000E9
|
|
||||||
99858586868687878B8B8C8A000000F8FF968686878787878D8B8B97000000EB
|
|
||||||
F4F48B8A888887879809870000000000EFFF8B8A8888878A9796850000000000
|
|
||||||
EDF48D8B8A8A8A09099800000000000000F7F4EFF2F2F2F20700000000000000
|
|
||||||
00EDF3F0F0F0079800000000000000000000EBF307F0F7970000000000000000
|
|
||||||
0000EAF5FFF4F78600000000000000000000F8F4FFF4F7960000000000000000
|
|
||||||
0000EAF3F4F379F80000000000000000008D868585858585EA00000000000000
|
|
||||||
009996EF07F19896980000000000FFFF0000C007000080030000800300008003
|
|
||||||
000080070000C0070000C00F0000E01F0000E03F0000F03F0000F03F0000F03F
|
|
||||||
0000F03F0000E01F0000E01F0000280000002000000040000000010008000000
|
|
||||||
0000000400000000000000000000000100000001000000000000000080000080
|
|
||||||
000000808000800000008000800080800000C0C0C000C0DCC000F0CAA6000000
|
|
||||||
3E0000005D0000007C0000009B000000BA000000D9000000F0002424FF004848
|
|
||||||
FF006C6CFF009090FF00B4B4FF0000143E00001E5D0000287C0000329B00003C
|
|
||||||
BA000046D9000055F000246DFF004885FF006C9DFF0090B5FF00B4CDFF00002A
|
|
||||||
3E00003F5D0000547C0000699B00007EBA000093D90000AAF00024B6FF0048C2
|
|
||||||
FF006CCEFF0090DAFF00B4E6FF00003E3E00005D5D00007C7C00009B9B0000BA
|
|
||||||
BA0000D9D90000F0F00024FFFF0048FFFF006CFFFF0090FFFF00B4FFFF00003E
|
|
||||||
2A00005D3F00007C5400009B690000BA7E0000D9930000F0AA0024FFB60048FF
|
|
||||||
C2006CFFCE0090FFDA00B4FFE600003E1400005D1E00007C2800009B320000BA
|
|
||||||
3C0000D9460000F0550024FF6D0048FF85006CFF9D0090FFB500B4FFCD00003E
|
|
||||||
0000005D0000007C0000009B000000BA000000D9000000F0000024FF240048FF
|
|
||||||
48006CFF6C0090FF9000B4FFB400143E00001E5D0000287C0000329B00003CBA
|
|
||||||
000046D9000055F000006DFF240085FF48009DFF6C00B5FF9000CDFFB4002A3E
|
|
||||||
00003F5D0000547C0000699B00007EBA000093D90000AAF00000B6FF2400C2FF
|
|
||||||
4800CEFF6C00DAFF9000E6FFB4003E3E00005D5D00007C7C00009B9B0000BABA
|
|
||||||
0000D9D90000F0F00000FFFF2400FFFF4800FFFF6C00FFFF9000FFFFB4003E2A
|
|
||||||
00005D3F00007C5400009B690000BA7E0000D9930000F0AA0000FFB62400FFC2
|
|
||||||
4800FFCE6C00FFDA9000FFE6B4003E1400005D1E00007C2800009B320000BA3C
|
|
||||||
0000D9460000F0550000FF6D2400FF854800FF9D6C00FFB59000FFCDB4003E00
|
|
||||||
00005D0000007C0000009B000000BA000000D9000000F0000000FF242400FF48
|
|
||||||
4800FF6C6C00FF909000FFB4B4003E0014005D001E007C0028009B003200BA00
|
|
||||||
3C00D9004600F0005500FF246D00FF488500FF6C9D00FF90B500FFB4CD003E00
|
|
||||||
2A005D003F007C0054009B006900BA007E00D9009300F000AA00FF24B600FF48
|
|
||||||
C200FF6CCE00FF90DA00FFB4E6003E003E005D005D007C007C009B009B00BA00
|
|
||||||
BA00D900D900F000F000FF24FF00FF48FF00FF6CFF00FF90FF00FFB4FF002A00
|
|
||||||
3E003F005D0054007C0069009B007E00BA009300D900AA00F000B624FF00C248
|
|
||||||
FF00CE6CFF00DA90FF00E6B4FF0014003E001E005D0028007C0032009B003C00
|
|
||||||
BA004600D9005500F0006D24FF008548FF009D6CFF00B590FF00CDB4FF000606
|
|
||||||
0600121212001F1F1F002C2C2C003939390045454500525252005F5F5F006C6C
|
|
||||||
6C007878780085858500929292009F9F9F00ABABAB00B8B8B800C5C5C500D2D2
|
|
||||||
D200DEDEDE00EBEBEB00F8F8F800F0FBFF00A4A0A000808080000000FF0000FF
|
|
||||||
000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0000000000000000000000
|
|
||||||
00000000000000000000000000000000000000000000000000000000000000ED
|
|
||||||
EBEBEAEAEAEAEAEAEAEBF8ED000000000000000000000000000000ECE9E7E791
|
|
||||||
85858586868686868585E7E7E8EAEBED000000000000000000EAE79191918585
|
|
||||||
8686868687878788898A8B8C98A3E8E8EA00000000000000E791919185858585
|
|
||||||
8586868686868787878787898C8DF409E9E90000000000E99191918585858585
|
|
||||||
8686868686868787878788888A8B8BF5F484EB00000000919191989785858585
|
|
||||||
868686868687878787878A8B8C8B898A8A8AEA00000000919109FFF485858585
|
|
||||||
868686868687878787878B8C88F5FF8D8A8AF800000000EA91F3FFFF97858585
|
|
||||||
868686868687878787888AFF888DF58B8C96EF00000000009198FFFF99858586
|
|
||||||
868787878787878787878C8D88F58B898AEA000000000000EA85F4FFFF098B8B
|
|
||||||
8A898888888887878786F58A8A8D898A85F0000000000000009109FFFF8D8B8B
|
|
||||||
8A89888888888787878AF4868D968686EB0000000000000000F8A4F5FFF58B8B
|
|
||||||
8A8988888888878787090996F38585E700000000000000000000918DFFFF8C8B
|
|
||||||
8A89888888888787878D86098686EAED00000000000000000000F8EDF4FFF48B
|
|
||||||
8A89888888888787878D8AF3EFF7EC00000000000000000000000091F1FFFFF0
|
|
||||||
0709098B8B98090909F1F307F0EB00000000000000000000000000F8EBF4FFF2
|
|
||||||
F707F2F2F2F2F2F20807F3F0EDEB00000000000000000000000000009107FFF5
|
|
||||||
EEF0F1F2F2F2F2F109F107EFE9000000000000000000000000000000F7EAF3FF
|
|
||||||
F0F707F1F1F1F109F009EFEAEC0000000000000000000000000000000091F7F5
|
|
||||||
F3EDF7EFEFEFEF8B989886E80000000000000000000000000000000000F7E909
|
|
||||||
FFED79797979798B979791ED00000000000000000000000000000000000091F8
|
|
||||||
FFF2FFFFFFF379979785E900000000000000000000000000000000000000EA85
|
|
||||||
FFFFFFFFFFF379979791EB00000000000000000000000000000000000000EAEA
|
|
||||||
FFF4FFFFFFF379979791ED00000000000000000000000000000000000000EDEA
|
|
||||||
FFF3FFFFFFF379979791EE00000000000000000000000000000000000000ED85
|
|
||||||
FFF3FFFFFFF379979785EF00000000000000000000000000000000000000ED85
|
|
||||||
F3F3FFFFFFF379979785F700000000000000000000000000000000000000EC85
|
|
||||||
F3F2F3F3F20906797985EB00000000000000000000000000000000000000EB85
|
|
||||||
86858585858585858585E8F800000000000000000000000000000000008A8786
|
|
||||||
858585F8EC868585858585EB00000000000000000000000000000000008685F7
|
|
||||||
EF07F1F1F1F1F107EF8686EF0000000000000000000000000000000000F29797
|
|
||||||
97979809090997979796090000000000000000000000FFFFFFFFFF8003FFF800
|
|
||||||
003FE000001FC000000F80000007800000078000000780000007C000000FC000
|
|
||||||
000FE000001FE000003FF000003FF000007FF80000FFF80000FFFC0001FFFC00
|
|
||||||
01FFFE0003FFFE0003FFFF0007FFFF0007FFFF0007FFFF0007FFFF0007FFFF00
|
|
||||||
07FFFF0007FFFF0003FFFE0003FFFE0003FFFE0007FF}
|
|
||||||
Menu = MainMenu
|
|
||||||
OldCreateOrder = False
|
|
||||||
Position = poScreenCenter
|
|
||||||
ShowHint = True
|
|
||||||
OnCreate = FormCreate
|
|
||||||
OnDestroy = FormDestroy
|
|
||||||
PixelsPerInch = 96
|
|
||||||
TextHeight = 13
|
|
||||||
object Label1: TLabel
|
|
||||||
Left = 8
|
|
||||||
Top = 32
|
|
||||||
Width = 77
|
|
||||||
Height = 13
|
|
||||||
Caption = 'New versions'
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'MS Sans Serif'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
end
|
|
||||||
object butAdd: TSpeedButton
|
|
||||||
Left = 24
|
|
||||||
Top = 328
|
|
||||||
Width = 193
|
|
||||||
Height = 25
|
|
||||||
Caption = 'Add &new version'
|
|
||||||
Glyph.Data = {
|
|
||||||
36050000424D3605000000000000360400002800000010000000100000000100
|
|
||||||
08000000000000010000000000000000000000010000000100004A004A006200
|
|
||||||
6200780178009F019F00BC01BC00D301D300E200E200EF00EF00F700F700FB00
|
|
||||||
FB00FD00FD00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00
|
|
||||||
FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00
|
|
||||||
FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00
|
|
||||||
FE00FE00FE00FE00FE00FD00FD00FC00FC00FA00FA00F701F700F202F200EC03
|
|
||||||
EC00E305E300D708D700C60BC600AF11AF008F188F007E1D7E006C226C006125
|
|
||||||
6100572857004C2C4C0040304000353535003636360037373700383838003939
|
|
||||||
39003A3A3A003B3B3B003C3C3C003D3D3D003E3E3E003F3F3F00404040004141
|
|
||||||
4100424242004343430044444400454545004646460047474700484848004949
|
|
||||||
49004A4A4A004B4B4B004C4C4C004D4D4D004E4E4E004F4F4F00505050005151
|
|
||||||
5100525252005353530054545400555555005656560057575700585858005959
|
|
||||||
59005A5A5A005B5B5B005C5C5C005D5D5D005E5E5E005F5F5F00606060006161
|
|
||||||
6100626262006363630064646400656565006666660067676700686868006969
|
|
||||||
69006A6A6A006B6B6B006C6C6C006D6D6D006E6E6E006F6F6F00707070007171
|
|
||||||
7100727272007373730074747400757575007676760077777700787878007979
|
|
||||||
79007A7A7A007B7B7B007C7C7C007D7D7D007E7E7E007F7F7F00808080008181
|
|
||||||
8100828282008383830084848400858585008686860087878700888888008989
|
|
||||||
89008A8A8A008B8B8B008C8C8C008D8D8D008E8E8E008F8F8F00909090009191
|
|
||||||
9100929292009393930094949400959595009696960097979700989898009999
|
|
||||||
99009A9A9A009B9B9B009C9C9C009D9D9D009E9E9E009F9F9F00A0A0A000A1A1
|
|
||||||
A100A2A2A200A3A3A300A4A4A400A5A5A500A6A6A600A7A7A700A8A8A800A9A9
|
|
||||||
A900AAAAAA00ABABAB00ACACAC00ADADAD00AEAEAE00B3B3B300BFC1BF00C8CC
|
|
||||||
C900D0D5D200D7DDD900DEE6E100E6EDE800ECF3EE00F1F7F300F5FAF600F7FB
|
|
||||||
F900F9FCFA00FBFDFB00FBFDFC00FBFDFC00F9FDFA00F6FCF800F4FBF600F0FA
|
|
||||||
F300ECFAF100E9F9EF00E6F8ED00E2F7EA00DDF6E700D7F4E300D3F3E000D0F2
|
|
||||||
DD00CEF1DB00CCF1D900C9EFD600C0EDCF00B9EBC900ADE7C000A3E4B80098E0
|
|
||||||
AF008DDDA50085DAA0007DD89A0075D694006DD38F0067D18B0060CF84005BCE
|
|
||||||
800055CC7B004DCA780047C8750042C672003DC46E0039C36B0036C2680033C0
|
|
||||||
640030BE61002EBC5C002CBA590029B9550027B8510027B74E0025B5490023B5
|
|
||||||
440023B3420022B13D0020B03B001EB1360019B2310016B32D0012B327000EB4
|
|
||||||
21000BB41D000AB41B0009B31A0009B0190009AD19000AA318000A9717000A8C
|
|
||||||
1700097D14000872120007680E0006640D0006650D0007690F001515151515FD
|
|
||||||
FDFFFFFDFD1515151515151515FDFDF9F5F4F4F5F8FCFC1515151515FFFAF2F4
|
|
||||||
F4F5F4F4F4F4FAFD151515FFF9EFF0F2F5F5F5F5F5F4F4FAFE1515FFE8E9EFF2
|
|
||||||
EDC6C2D9F5F5F4F4FE15FBECE3E9F1F3F1D1BCBFDAF5F5F4F8FDFBE4E1E7F1F4
|
|
||||||
F2F5D2BCBFDAF5F4F6FDFADFDFCACCCCCCCDCDBEBCC1D6F4F4FEF9D9DCBCBCBC
|
|
||||||
BCBCBCBCBCBCCEF3F4FFF9D6D7D6D5D5D5D7D2BBBCD0E7F0F5FDF9D8D0DEE0DE
|
|
||||||
DED5C4BCD1E8EBF0F7FD15ECCDD3E1E0DAB9BCD1E8E9EEEFF91515ECD6C8D3DF
|
|
||||||
DECDCFE1E5E7E9EEF9151515ECD3C6CFD6DADCDBDBDFE8FA1515151515ECECCF
|
|
||||||
C9CDCFD1D6E4E41515151515151515E7ECECECECEA1515151515}
|
|
||||||
OnClick = butAddClick
|
|
||||||
end
|
|
||||||
object grpConfig: TGroupBox
|
|
||||||
Left = 232
|
|
||||||
Top = 51
|
|
||||||
Width = 441
|
|
||||||
Height = 270
|
|
||||||
Enabled = False
|
|
||||||
TabOrder = 0
|
|
||||||
object Label2: TLabel
|
|
||||||
Left = 16
|
|
||||||
Top = 24
|
|
||||||
Width = 71
|
|
||||||
Height = 13
|
|
||||||
Caption = 'New version'
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'MS Sans Serif'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
end
|
|
||||||
object Label3: TLabel
|
|
||||||
Left = 16
|
|
||||||
Top = 80
|
|
||||||
Width = 71
|
|
||||||
Height = 13
|
|
||||||
Caption = 'Old versions'
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'MS Sans Serif'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
end
|
|
||||||
object butOldAdd: TSpeedButton
|
|
||||||
Left = 368
|
|
||||||
Top = 96
|
|
||||||
Width = 49
|
|
||||||
Height = 25
|
|
||||||
Caption = '&Add'
|
|
||||||
Flat = True
|
|
||||||
OnClick = butOldAddClick
|
|
||||||
end
|
|
||||||
object butOldRemove: TSpeedButton
|
|
||||||
Left = 368
|
|
||||||
Top = 160
|
|
||||||
Width = 49
|
|
||||||
Height = 25
|
|
||||||
Caption = '&Remove'
|
|
||||||
Flat = True
|
|
||||||
OnClick = butOldRemoveClick
|
|
||||||
end
|
|
||||||
object butNewEdit: TSpeedButton
|
|
||||||
Left = 368
|
|
||||||
Top = 40
|
|
||||||
Width = 49
|
|
||||||
Height = 25
|
|
||||||
Caption = '&Edit'
|
|
||||||
Flat = True
|
|
||||||
OnClick = butNewEditClick
|
|
||||||
end
|
|
||||||
object Label4: TLabel
|
|
||||||
Left = 16
|
|
||||||
Top = 200
|
|
||||||
Width = 176
|
|
||||||
Height = 13
|
|
||||||
Caption = 'Patch generation configuration'
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'MS Sans Serif'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
end
|
|
||||||
object Label5: TLabel
|
|
||||||
Left = 32
|
|
||||||
Top = 224
|
|
||||||
Width = 48
|
|
||||||
Height = 13
|
|
||||||
Hint = 'Smaller gives smaller patch files, but decreased speed'
|
|
||||||
Caption = 'Block size'
|
|
||||||
end
|
|
||||||
object Label7: TLabel
|
|
||||||
Left = 232
|
|
||||||
Top = 224
|
|
||||||
Width = 61
|
|
||||||
Height = 13
|
|
||||||
Caption = 'Block divider'
|
|
||||||
Visible = False
|
|
||||||
end
|
|
||||||
object txtStartBlockSize: TLabel
|
|
||||||
Left = 136
|
|
||||||
Top = 224
|
|
||||||
Width = 65
|
|
||||||
Height = 17
|
|
||||||
Alignment = taCenter
|
|
||||||
AutoSize = False
|
|
||||||
end
|
|
||||||
object txtNew: TEdit
|
|
||||||
Left = 32
|
|
||||||
Top = 42
|
|
||||||
Width = 321
|
|
||||||
Height = 21
|
|
||||||
ReadOnly = True
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object lstOld: TListBox
|
|
||||||
Left = 32
|
|
||||||
Top = 96
|
|
||||||
Width = 321
|
|
||||||
Height = 89
|
|
||||||
ItemHeight = 13
|
|
||||||
TabOrder = 1
|
|
||||||
end
|
|
||||||
object tbBlockSize: TTrackBar
|
|
||||||
Left = 200
|
|
||||||
Top = 224
|
|
||||||
Width = 161
|
|
||||||
Height = 25
|
|
||||||
Max = 12
|
|
||||||
Min = 4
|
|
||||||
Position = 6
|
|
||||||
TabOrder = 2
|
|
||||||
OnChange = tbBlockSizeChange
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object lstNew: TVirtualStringTree
|
|
||||||
Left = 24
|
|
||||||
Top = 56
|
|
||||||
Width = 193
|
|
||||||
Height = 265
|
|
||||||
Header.AutoSizeIndex = 0
|
|
||||||
Header.Font.Charset = DEFAULT_CHARSET
|
|
||||||
Header.Font.Color = clWindowText
|
|
||||||
Header.Font.Height = -11
|
|
||||||
Header.Font.Name = 'MS Sans Serif'
|
|
||||||
Header.Font.Style = []
|
|
||||||
Header.MainColumn = -1
|
|
||||||
Header.Options = [hoColumnResize, hoDrag]
|
|
||||||
HintAnimation = hatNone
|
|
||||||
Indent = 0
|
|
||||||
TabOrder = 1
|
|
||||||
TreeOptions.PaintOptions = [toHotTrack, toShowBackground, toShowButtons, toShowDropmark, toShowRoot, toThemeAware, toUseBlendedImages]
|
|
||||||
TreeOptions.SelectionOptions = [toFullRowSelect]
|
|
||||||
OnChange = lstNewChange
|
|
||||||
OnGetText = lstNewGetText
|
|
||||||
Columns = <>
|
|
||||||
end
|
|
||||||
object barCool: TCoolBar
|
|
||||||
Left = 0
|
|
||||||
Top = 0
|
|
||||||
Width = 689
|
|
||||||
Height = 44
|
|
||||||
AutoSize = True
|
|
||||||
Bands = <
|
|
||||||
item
|
|
||||||
BorderStyle = bsSingle
|
|
||||||
Control = barTool
|
|
||||||
ImageIndex = -1
|
|
||||||
MinHeight = 36
|
|
||||||
Width = 689
|
|
||||||
end>
|
|
||||||
EdgeBorders = [ebTop, ebBottom]
|
|
||||||
object barTool: TToolBar
|
|
||||||
Left = 9
|
|
||||||
Top = 2
|
|
||||||
Width = 676
|
|
||||||
Height = 36
|
|
||||||
AutoSize = True
|
|
||||||
ButtonHeight = 36
|
|
||||||
ButtonWidth = 90
|
|
||||||
Caption = 'barTool'
|
|
||||||
EdgeBorders = []
|
|
||||||
Flat = True
|
|
||||||
Images = IL
|
|
||||||
ShowCaptions = True
|
|
||||||
TabOrder = 0
|
|
||||||
object toolNew: TToolButton
|
|
||||||
Left = 0
|
|
||||||
Top = 0
|
|
||||||
Caption = '&New'
|
|
||||||
ImageIndex = 0
|
|
||||||
MenuItem = mnuNew
|
|
||||||
end
|
|
||||||
object toolOpen: TToolButton
|
|
||||||
Left = 90
|
|
||||||
Top = 0
|
|
||||||
Caption = '&Open'
|
|
||||||
ImageIndex = 1
|
|
||||||
MenuItem = mnuOpen
|
|
||||||
end
|
|
||||||
object toolSave: TToolButton
|
|
||||||
Left = 180
|
|
||||||
Top = 0
|
|
||||||
Caption = '&Save'
|
|
||||||
ImageIndex = 2
|
|
||||||
MenuItem = mnuSave
|
|
||||||
end
|
|
||||||
object ToolButton1: TToolButton
|
|
||||||
Left = 270
|
|
||||||
Top = 0
|
|
||||||
Width = 8
|
|
||||||
Caption = 'ToolButton1'
|
|
||||||
ImageIndex = 7
|
|
||||||
Style = tbsSeparator
|
|
||||||
end
|
|
||||||
object toolGenGo: TToolButton
|
|
||||||
Left = 278
|
|
||||||
Top = 0
|
|
||||||
Caption = '&Generate'
|
|
||||||
ImageIndex = 3
|
|
||||||
MenuItem = mnuGenGo
|
|
||||||
end
|
|
||||||
object toolCreateEXE: TToolButton
|
|
||||||
Left = 368
|
|
||||||
Top = 0
|
|
||||||
Caption = 'Create &EXE'
|
|
||||||
ImageIndex = 5
|
|
||||||
MenuItem = mnuCreateEXE
|
|
||||||
end
|
|
||||||
object toolCreateDLL: TToolButton
|
|
||||||
Left = 458
|
|
||||||
Top = 0
|
|
||||||
Caption = 'Create &DLL'
|
|
||||||
ImageIndex = 6
|
|
||||||
MenuItem = mnuCreateDLL
|
|
||||||
end
|
|
||||||
object toolCreatePAT: TToolButton
|
|
||||||
Left = 548
|
|
||||||
Top = 0
|
|
||||||
Caption = 'Create &patch file'
|
|
||||||
ImageIndex = 7
|
|
||||||
MenuItem = mnuCreatePAT
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object chkOutputWait: TCheckBox
|
|
||||||
Left = 232
|
|
||||||
Top = 336
|
|
||||||
Width = 305
|
|
||||||
Height = 17
|
|
||||||
Caption = 'Leave console window open after generating patches'
|
|
||||||
TabOrder = 3
|
|
||||||
OnClick = chkOutputWaitClick
|
|
||||||
end
|
|
||||||
object chkOptimal: TCheckBox
|
|
||||||
Left = 232
|
|
||||||
Top = 360
|
|
||||||
Width = 441
|
|
||||||
Height = 17
|
|
||||||
Caption =
|
|
||||||
'"Optimal" patch generation (can be very slow when generating pat' +
|
|
||||||
'ches for big files)'
|
|
||||||
TabOrder = 4
|
|
||||||
OnClick = chkOptimalClick
|
|
||||||
end
|
|
||||||
object MainMenu: TMainMenu
|
|
||||||
Images = IL
|
|
||||||
Left = 160
|
|
||||||
Top = 328
|
|
||||||
object mnuFile: TMenuItem
|
|
||||||
Caption = '&File'
|
|
||||||
object mnuNew: TMenuItem
|
|
||||||
Caption = '&New'
|
|
||||||
ImageIndex = 0
|
|
||||||
ShortCut = 16462
|
|
||||||
OnClick = mnuNewClick
|
|
||||||
end
|
|
||||||
object mnuOpen: TMenuItem
|
|
||||||
Caption = '&Open'
|
|
||||||
ImageIndex = 1
|
|
||||||
ShortCut = 16463
|
|
||||||
OnClick = mnuOpenClick
|
|
||||||
end
|
|
||||||
object mnuSave: TMenuItem
|
|
||||||
Caption = '&Save'
|
|
||||||
ImageIndex = 2
|
|
||||||
ShortCut = 16467
|
|
||||||
OnClick = mnuSaveClick
|
|
||||||
end
|
|
||||||
object mnuSaveas: TMenuItem
|
|
||||||
Caption = 'Save &as...'
|
|
||||||
OnClick = mnuSaveasClick
|
|
||||||
end
|
|
||||||
object N1: TMenuItem
|
|
||||||
Caption = '-'
|
|
||||||
end
|
|
||||||
object mnuExit: TMenuItem
|
|
||||||
Caption = 'E&xit'
|
|
||||||
OnClick = mnuExitClick
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object mnuAction: TMenuItem
|
|
||||||
Caption = '&Action'
|
|
||||||
object mnuClearcachedpatches: TMenuItem
|
|
||||||
Caption = 'Empty &cache'
|
|
||||||
ImageIndex = 4
|
|
||||||
OnClick = mnuClearcachedpatchesClick
|
|
||||||
end
|
|
||||||
object mnuGenGo: TMenuItem
|
|
||||||
Caption = '&Generate'
|
|
||||||
ImageIndex = 3
|
|
||||||
OnClick = mnuGenGoClick
|
|
||||||
end
|
|
||||||
object mnuCreateEXE: TMenuItem
|
|
||||||
Caption = 'Create &EXE'
|
|
||||||
ImageIndex = 5
|
|
||||||
OnClick = mnuCreateEXEClick
|
|
||||||
end
|
|
||||||
object mnuCreateDLL: TMenuItem
|
|
||||||
Caption = 'Create &DLL'
|
|
||||||
ImageIndex = 6
|
|
||||||
OnClick = mnuCreateDLLClick
|
|
||||||
end
|
|
||||||
object mnuCreatePAT: TMenuItem
|
|
||||||
Caption = 'Create &patch file'
|
|
||||||
ImageIndex = 7
|
|
||||||
OnClick = mnuCreatePATClick
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object mnuHelp: TMenuItem
|
|
||||||
Caption = '&Help'
|
|
||||||
object mnuWebsite: TMenuItem
|
|
||||||
Caption = '&Website'
|
|
||||||
OnClick = mnuWebsiteClick
|
|
||||||
end
|
|
||||||
object Readme1: TMenuItem
|
|
||||||
Caption = '&Readme'
|
|
||||||
OnClick = Readme1Click
|
|
||||||
end
|
|
||||||
object ReadmeincludedwithNSIS1: TMenuItem
|
|
||||||
Caption = 'Readme included with NSIS'
|
|
||||||
OnClick = ReadmeincludedwithNSIS1Click
|
|
||||||
end
|
|
||||||
object N2: TMenuItem
|
|
||||||
Caption = '-'
|
|
||||||
end
|
|
||||||
object mnuAbout: TMenuItem
|
|
||||||
Caption = '&About'
|
|
||||||
OnClick = mnuAboutClick
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object OD: TOpenDialog
|
|
||||||
Filter = 'All files (*.*)|*.*'
|
|
||||||
Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofDontAddToRecent]
|
|
||||||
Left = 128
|
|
||||||
Top = 328
|
|
||||||
end
|
|
||||||
object dlgOpen: TOpenDialog
|
|
||||||
DefaultExt = '.vpj'
|
|
||||||
Filter = 'VPatch ProJects (*.vpj)|*.vpj|All files (*.*)|*.*'
|
|
||||||
Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
|
||||||
Left = 104
|
|
||||||
Top = 24
|
|
||||||
end
|
|
||||||
object dlgSave: TSaveDialog
|
|
||||||
DefaultExt = '.vpj'
|
|
||||||
Filter = 'VPatch ProJects (*.vpj)|*.vpj|All files (*.*)|*.*'
|
|
||||||
Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing]
|
|
||||||
Left = 136
|
|
||||||
Top = 24
|
|
||||||
end
|
|
||||||
object IL: TImageList
|
|
||||||
Left = 168
|
|
||||||
Top = 24
|
|
||||||
Bitmap = {
|
|
||||||
494C010108000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
|
||||||
0000000000003600000028000000400000003000000001002000000000000030
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000000000FF
|
|
||||||
FF00000000000000000000000000000000000000000000000000000000000000
|
|
||||||
000000FFFF000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
000000000000000000000000000000000000000000000000000000FFFF0000FF
|
|
||||||
FF0000FFFF0000000000000000000000000000000000000000000000000000FF
|
|
||||||
FF0000FFFF0000FFFF0000000000000000000000000000000000FF000000FF00
|
|
||||||
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
|
|
||||||
0000FF000000FF000000FF00000000000000000000000000FF000000FF000000
|
|
||||||
FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
|
|
||||||
FF000000FF000000FF000000FF00000000000000000000000000008000000080
|
|
||||||
0000008000000080000000800000008000000080000000800000008000000080
|
|
||||||
00000080000000800000008000000000000000000000007F7F0000FFFF0000FF
|
|
||||||
FF0000FFFF0000FFFF000000000000000000000000000000000000FFFF0000FF
|
|
||||||
FF0000FFFF0000FFFF00007F7F00000000000000000000000000FF000000FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FF00000000000000000000000000FF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF000000FF000000FF00FFFFFF00FFFFFF00FFFFFF000000FF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF000000FF0000000000000000000000000000800000FFFF
|
|
||||||
FF00008000000080000000800000FFFFFF0000800000FFFFFF00008000000080
|
|
||||||
0000FFFFFF000080000000800000000000000000000000FFFF0000FFFF0000FF
|
|
||||||
FF0000FFFF0000FFFF00007F7F000000000000000000007F7F0000FFFF0000FF
|
|
||||||
FF0000FFFF0000FFFF0000FFFF00000000000000000000000000FF000000FFFF
|
|
||||||
FF00FF000000FF000000FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
|
|
||||||
FF00FF000000FF000000FF00000000000000000000000000FF00FFFFFF000000
|
|
||||||
FF000000FF00FFFFFF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
|
|
||||||
FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
|
|
||||||
FF00008000000080000000800000FFFFFF0000800000FFFFFF00008000000080
|
|
||||||
0000FFFFFF000080000000800000000000000000000000FFFF0000FFFF0000FF
|
|
||||||
FF0000FFFF0000FFFF0000FFFF00000000000000000000FFFF0000FFFF0000FF
|
|
||||||
FF0000FFFF0000FFFF0000FFFF00000000000000000000000000FF000000FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FF000000FF000000FFFFFF00FF000000FF000000FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FF00000000000000000000000000FF00FFFFFF000000
|
|
||||||
FF000000FF00FFFFFF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
|
|
||||||
FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
|
|
||||||
FF00FFFFFF00FFFFFF0000800000FFFFFF00FFFFFF00FFFFFF00008000000080
|
|
||||||
0000FFFFFF000080000000800000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000FF000000FFFF
|
|
||||||
FF00FF000000FF000000FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
|
|
||||||
FF00FF000000FF000000FF00000000000000000000000000FF00FFFFFF000000
|
|
||||||
FF000000FF00FFFFFF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
|
|
||||||
FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
|
|
||||||
FF0000800000FFFFFF0000800000FFFFFF0000800000FFFFFF00008000000080
|
|
||||||
0000FFFFFF000080000000800000000000000000000000000000000000000000
|
|
||||||
000000000000000000000000000000FFFF0000FFFF0000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000FF000000FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FF00000000000000000000000000FF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF000000FF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
|
|
||||||
FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
|
|
||||||
FF00FFFFFF00FFFFFF0000800000FFFFFF00FFFFFF00FFFFFF0000800000FFFF
|
|
||||||
FF00FFFFFF00FFFFFF0000800000000000000000000000000000000000000000
|
|
||||||
000000000000000000000000000000FFFF0000FFFF0000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000FF000000FF00
|
|
||||||
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
|
|
||||||
0000FF000000FF000000FF00000000000000000000000000FF000000FF000000
|
|
||||||
FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
|
|
||||||
FF000000FF000000FF000000FF00000000000000000000000000008000000080
|
|
||||||
0000008000000080000000800000008000000080000000800000008000000080
|
|
||||||
0000008000000080000000800000000000000000000000000000000000000000
|
|
||||||
00000000000000000000007F7F0000FFFF0000FFFF00007F7F00000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000FFFF0000FFFF0000FFFF0000FFFF00000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
|
|
||||||
00000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF000000000000000000000000000000000000000000000000000000
|
|
||||||
000000000000007F7F0000FFFF0000FFFF0000FFFF0000FFFF00007F7F000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF0000000000C0C0C000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF0000000000C0C0C000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF0000000000C0C0C000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000008080000080
|
|
||||||
8000000000000000000000000000000000000000000000000000C0C0C000C0C0
|
|
||||||
C000000000000080800000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF000000000000000000000000000000000000000000008080000080
|
|
||||||
8000008080000080800000808000008080000080800000808000008080000000
|
|
||||||
0000000000000000000000000000000000000000000000000000008080000080
|
|
||||||
8000000000000000000000000000000000000000000000000000C0C0C000C0C0
|
|
||||||
C000000000000080800000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF000000000000000000000000000000000000FFFF00000000000080
|
|
||||||
8000008080000080800000808000008080000080800000808000008080000080
|
|
||||||
8000000000000000000000000000000000000000000000000000008080000080
|
|
||||||
8000000000000000000000000000000000000000000000000000C0C0C000C0C0
|
|
||||||
C000000000000080800000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF000000
|
|
||||||
0000008080000080800000808000008080000080800000808000008080000080
|
|
||||||
8000008080000000000000000000000000000000000000000000008080000080
|
|
||||||
8000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000080800000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF
|
|
||||||
FF00000000000080800000808000008080000080800000808000008080000080
|
|
||||||
8000008080000080800000000000000000000000000000000000008080000080
|
|
||||||
8000008080000080800000808000008080000080800000808000008080000080
|
|
||||||
8000008080000080800000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF00FFFF
|
|
||||||
FF0000FFFF000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000008080000080
|
|
||||||
8000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000008080000080800000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF
|
|
||||||
FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000008080000000
|
|
||||||
0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
|
|
||||||
C000000000000080800000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF00FFFF
|
|
||||||
FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000008080000000
|
|
||||||
0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
|
|
||||||
C000000000000080800000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF
|
|
||||||
FF00000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000008080000000
|
|
||||||
0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
|
|
||||||
C000000000000080800000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000008080000000
|
|
||||||
0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
|
|
||||||
C000000000000080800000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF
|
|
||||||
FF00000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000008080000000
|
|
||||||
0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
|
|
||||||
C000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000008080000000
|
|
||||||
0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
|
|
||||||
C00000000000C0C0C00000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
000000000000000000000000000000000000424D3E000000000000003E000000
|
|
||||||
2800000040000000300000000100010000000000800100000000000000000000
|
|
||||||
000000000000000000000000FFFFFF0000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
|
||||||
00000000000000000000000000000000F81FE000E000E000E007E000E000E000
|
|
||||||
C003E000E000E000800180000000800080018000000080000000800000008000
|
|
||||||
0000800000008000000080000000800000008000000080000000800000008000
|
|
||||||
000080000000800080018000000080008001E000E000E000C003E000E000E000
|
|
||||||
E007E001E001E001F81FE003E003E003FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF
|
|
||||||
E003001F8001FFFFE003000F8001FFFFE00300078001FDFFE00300038001FCFF
|
|
||||||
E00300018001FC7FE00300008001FC3FE003001F8001FC1FE003001F8001FC3F
|
|
||||||
E003001F8001FC7FE0038FF18001FCFFE007FFF98001FDFFE00FFF758001FFFF
|
|
||||||
E01FFF8F8001FFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
|
|
||||||
000000000000}
|
|
||||||
end
|
|
||||||
object dlgSaveExe: TSaveDialog
|
|
||||||
DefaultExt = '.exe'
|
|
||||||
Filter = 'Executable files (*.exe)|*.exe|All files (*.*)|*.*'
|
|
||||||
Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing, ofDontAddToRecent]
|
|
||||||
Left = 384
|
|
||||||
Top = 56
|
|
||||||
end
|
|
||||||
object dlgSaveDLL: TSaveDialog
|
|
||||||
DefaultExt = '.dll'
|
|
||||||
Filter = 'DLL files (*.dll)|*.dll|All files (*.*)|*.*'
|
|
||||||
Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing, ofDontAddToRecent]
|
|
||||||
Left = 416
|
|
||||||
Top = 56
|
|
||||||
end
|
|
||||||
object dlgSavePAT: TSaveDialog
|
|
||||||
DefaultExt = '.pat'
|
|
||||||
Filter = 'Patch files (*.pat)|*.pat|All files (*.*)|*.*'
|
|
||||||
Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing, ofDontAddToRecent]
|
|
||||||
Left = 448
|
|
||||||
Top = 56
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,539 +0,0 @@
|
||||||
unit MainForm;
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
uses
|
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
||||||
Dialogs, Buttons, StdCtrls, Menus, PatchClasses, VirtualTrees, VDSP_CRC,
|
|
||||||
ToolWin, ComCtrls, ImgList, ExtCtrls, Math, OSUtil;
|
|
||||||
|
|
||||||
const
|
|
||||||
UntitledFile='Untitled.vpj';
|
|
||||||
|
|
||||||
type
|
|
||||||
TfrmMain = class(TForm)
|
|
||||||
MainMenu: TMainMenu;
|
|
||||||
mnuFile: TMenuItem;
|
|
||||||
mnuNew: TMenuItem;
|
|
||||||
mnuOpen: TMenuItem;
|
|
||||||
mnuSave: TMenuItem;
|
|
||||||
mnuSaveas: TMenuItem;
|
|
||||||
N1: TMenuItem;
|
|
||||||
mnuExit: TMenuItem;
|
|
||||||
Label1: TLabel;
|
|
||||||
grpConfig: TGroupBox;
|
|
||||||
butAdd: TSpeedButton;
|
|
||||||
OD: TOpenDialog;
|
|
||||||
Label2: TLabel;
|
|
||||||
txtNew: TEdit;
|
|
||||||
Label3: TLabel;
|
|
||||||
mnuHelp: TMenuItem;
|
|
||||||
mnuAbout: TMenuItem;
|
|
||||||
lstOld: TListBox;
|
|
||||||
butOldAdd: TSpeedButton;
|
|
||||||
butOldRemove: TSpeedButton;
|
|
||||||
butNewEdit: TSpeedButton;
|
|
||||||
Label4: TLabel;
|
|
||||||
lstNew: TVirtualStringTree;
|
|
||||||
dlgOpen: TOpenDialog;
|
|
||||||
dlgSave: TSaveDialog;
|
|
||||||
IL: TImageList;
|
|
||||||
mnuAction: TMenuItem;
|
|
||||||
mnuGenGo: TMenuItem;
|
|
||||||
barTool: TToolBar;
|
|
||||||
toolNew: TToolButton;
|
|
||||||
toolOpen: TToolButton;
|
|
||||||
toolSave: TToolButton;
|
|
||||||
toolGenGo: TToolButton;
|
|
||||||
mnuCreateEXE: TMenuItem;
|
|
||||||
dlgSaveExe: TSaveDialog;
|
|
||||||
toolCreateEXE: TToolButton;
|
|
||||||
barCool: TCoolBar;
|
|
||||||
Label5: TLabel;
|
|
||||||
Label7: TLabel;
|
|
||||||
tbBlockSize: TTrackBar;
|
|
||||||
txtStartBlockSize: TLabel;
|
|
||||||
mnuClearcachedpatches: TMenuItem;
|
|
||||||
mnuCreateDLL: TMenuItem;
|
|
||||||
mnuCreatePAT: TMenuItem;
|
|
||||||
toolCreateDLL: TToolButton;
|
|
||||||
ToolButton1: TToolButton;
|
|
||||||
toolCreatePAT: TToolButton;
|
|
||||||
dlgSaveDLL: TSaveDialog;
|
|
||||||
dlgSavePAT: TSaveDialog;
|
|
||||||
chkOutputWait: TCheckBox;
|
|
||||||
mnuWebsite: TMenuItem;
|
|
||||||
Readme1: TMenuItem;
|
|
||||||
N2: TMenuItem;
|
|
||||||
ReadmeincludedwithNSIS1: TMenuItem;
|
|
||||||
chkOptimal: TCheckBox;
|
|
||||||
procedure butAddClick(Sender: TObject);
|
|
||||||
procedure FormCreate(Sender: TObject);
|
|
||||||
procedure FormDestroy(Sender: TObject);
|
|
||||||
procedure mnuExitClick(Sender: TObject);
|
|
||||||
procedure UpdateStates;
|
|
||||||
procedure ReloadNewTree;
|
|
||||||
procedure SelectInNewTree(PatchIndex: Integer);
|
|
||||||
procedure butNewEditClick(Sender: TObject);
|
|
||||||
procedure lstNewChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
|
||||||
procedure butOldAddClick(Sender: TObject);
|
|
||||||
procedure butOldRemoveClick(Sender: TObject);
|
|
||||||
procedure mnuNewClick(Sender: TObject);
|
|
||||||
procedure mnuOpenClick(Sender: TObject);
|
|
||||||
procedure mnuSaveClick(Sender: TObject);
|
|
||||||
procedure mnuSaveasClick(Sender: TObject);
|
|
||||||
procedure mnuGenGoClick(Sender: TObject);
|
|
||||||
procedure mnuAboutClick(Sender: TObject);
|
|
||||||
procedure mnuCreateEXEClick(Sender: TObject);
|
|
||||||
procedure lstNewGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
|
||||||
Column: TColumnIndex; TextType: TVSTTextType;
|
|
||||||
var CellText: WideString);
|
|
||||||
procedure txtStartBlockSizeChange(Sender: TObject);
|
|
||||||
procedure txtMinimumBlockSizeChange(Sender: TObject);
|
|
||||||
procedure txtBlockDividerChange(Sender: TObject);
|
|
||||||
procedure txtStepSizeChange(Sender: TObject);
|
|
||||||
procedure tbBlockSizeChange(Sender: TObject);
|
|
||||||
procedure mnuClearcachedpatchesClick(Sender: TObject);
|
|
||||||
procedure mnuCreateDLLClick(Sender: TObject);
|
|
||||||
procedure mnuCreatePATClick(Sender: TObject);
|
|
||||||
procedure chkOutputWaitClick(Sender: TObject);
|
|
||||||
procedure mnuWebsiteClick(Sender: TObject);
|
|
||||||
procedure Readme1Click(Sender: TObject);
|
|
||||||
procedure ReadmeincludedwithNSIS1Click(Sender: TObject);
|
|
||||||
procedure chkOptimalClick(Sender: TObject);
|
|
||||||
private
|
|
||||||
{ Private declarations }
|
|
||||||
// MS: TModeSelector;
|
|
||||||
dskName: String;
|
|
||||||
function DoSave(const FileName: String; const Prompt: Boolean): String;
|
|
||||||
procedure OpenAFile(FileName: String; AskSave: Boolean=True; PromptNew: Boolean=False);
|
|
||||||
function CollectConfig: String;
|
|
||||||
procedure SetConfigTextBoxes(Config: String);
|
|
||||||
public
|
|
||||||
{ Public declarations }
|
|
||||||
end;
|
|
||||||
|
|
||||||
var
|
|
||||||
frmMain: TfrmMain;
|
|
||||||
PP: TPatchProject = nil;
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
uses AboutForm, DLLWrapper;
|
|
||||||
|
|
||||||
{$R *.dfm}
|
|
||||||
|
|
||||||
procedure TfrmMain.butAddClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
OD.Options:=OD.Options-[ofAllowMultiSelect];
|
|
||||||
OD.Title:='Open the latest (new) version of a file...';
|
|
||||||
OD.FileName:='';
|
|
||||||
if OD.Execute then begin
|
|
||||||
PP.AddNewVersion(OD.FileName);
|
|
||||||
ReloadNewTree;
|
|
||||||
SelectInNewTree(PP.PatchFile(OD.FileName).Index);
|
|
||||||
butOldAdd.Click;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.FormCreate(Sender: TObject);
|
|
||||||
begin
|
|
||||||
grpConfig.Tag:=-1;
|
|
||||||
dskName:=UntitledFile;
|
|
||||||
lstNew.NodeDataSize:=SizeOf(Integer);
|
|
||||||
OpenAFile('',False,False); //don't prompt for New! that'll bug things
|
|
||||||
ReloadNewTree;
|
|
||||||
UpdateStates;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.FormDestroy(Sender: TObject);
|
|
||||||
begin
|
|
||||||
PP.Free;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuExitClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
Close;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.UpdateStates;
|
|
||||||
begin
|
|
||||||
Self.Caption:='VG - VPatch GUI - '+dskName;
|
|
||||||
// grpConfig.Enabled:=not (lstNew.Tag=-1);
|
|
||||||
// if not grpConfig.Enabled then grpConfig.Caption:='Select a file first';
|
|
||||||
grpConfig.Enabled:=(lstNew.SelectedCount>0);
|
|
||||||
if grpConfig.Tag=-1 then begin
|
|
||||||
txtNew.Enabled:=False;
|
|
||||||
butNewEdit.Enabled:=False;
|
|
||||||
butNewEdit.Font.Color:=clInactiveCaption;
|
|
||||||
butOldAdd.Enabled:=False;
|
|
||||||
butOldAdd.Font.Color:=clInactiveCaption;
|
|
||||||
butOldRemove.Enabled:=False;
|
|
||||||
butOldRemove.Font.Color:=clInactiveCaption;
|
|
||||||
end else begin
|
|
||||||
txtNew.Enabled:=True;
|
|
||||||
butNewEdit.Enabled:=True;
|
|
||||||
butNewEdit.Font.Color:=clWindowText;
|
|
||||||
butOldAdd.Enabled:=True;
|
|
||||||
butOldAdd.Font.Color:=clWindowText;
|
|
||||||
// butOldEdit.Enabled:=True;
|
|
||||||
butOldRemove.Enabled:=True;
|
|
||||||
butOldRemove.Font.Color:=clWindowText;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.ReloadNewTree;
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
Node: PVirtualNode;
|
|
||||||
begin
|
|
||||||
lstNew.BeginUpdate;
|
|
||||||
lstNew.Clear;
|
|
||||||
for i:=0 to PP.GetPatchCount - 1 do begin
|
|
||||||
Node:=lstNew.AddChild(nil);
|
|
||||||
PInteger(lstNew.GetNodeData(Node))^:=i;
|
|
||||||
end;
|
|
||||||
lstNew.EndUpdate;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.butNewEditClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
OD.Options:=OD.Options-[ofAllowMultiSelect];
|
|
||||||
OD.Title:='Select new version of file...';
|
|
||||||
OD.FileName:=txtNew.Text;
|
|
||||||
if OD.Execute then begin
|
|
||||||
i:=grpConfig.Tag;
|
|
||||||
PP.PatchFile(i).NewVersion:=OD.FileName;
|
|
||||||
ReloadNewTree;
|
|
||||||
lstNew.Selected[lstNew.GetFirstVisible]:=True;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.lstNewChange(Sender: TBaseVirtualTree;
|
|
||||||
Node: PVirtualNode);
|
|
||||||
var
|
|
||||||
i,j: Integer;
|
|
||||||
begin
|
|
||||||
case lstNew.SelectedCount of
|
|
||||||
0: Exit;
|
|
||||||
1: begin
|
|
||||||
if lstNew.Selected[Node] then begin
|
|
||||||
i:=PInteger(lstNew.GetNodeData(Node))^;
|
|
||||||
grpConfig.Caption:=ExtractFileName(PP.PatchFile(i).NewVersion);
|
|
||||||
grpConfig.Tag:=i;
|
|
||||||
txtNew.Text:=PP.PatchFile(i).NewVersion;
|
|
||||||
lstOld.Clear;
|
|
||||||
for j:=0 to PP.PatchFile(i).OldVersionCount - 1 do begin
|
|
||||||
lstOld.Items.Add(PP.PatchFile(i).OldVersions[j]);
|
|
||||||
end;
|
|
||||||
SetConfigTextBoxes(PP.PatchFile(i).Config);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
else begin
|
|
||||||
grpConfig.Tag:=-1; //multiple files selected - only allow config changes
|
|
||||||
txtNew.Text:='(multiple files selected)';
|
|
||||||
lstOld.Clear;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
UpdateStates;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.butOldAddClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
i,j: Integer;
|
|
||||||
begin
|
|
||||||
OD.Options:=OD.Options+[ofAllowMultiSelect];
|
|
||||||
OD.Title:='Select old versions of '+grpConfig.Caption+'...';
|
|
||||||
OD.FileName:='';
|
|
||||||
if OD.Execute then begin
|
|
||||||
i:=grpConfig.Tag;
|
|
||||||
for j:=0 to OD.Files.Count - 1 do begin
|
|
||||||
PP.PatchFile(i).AddOldVersion(OD.Files[j]);
|
|
||||||
lstOld.Items.Add(OD.Files.Strings[j]);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.SelectInNewTree(PatchIndex: Integer);
|
|
||||||
var
|
|
||||||
Node: PVirtualNode;
|
|
||||||
begin
|
|
||||||
Node:=lstNew.GetFirstSelected;
|
|
||||||
while Node<>nil do begin
|
|
||||||
lstNew.Selected[Node]:=False;
|
|
||||||
Node:=lstNew.GetNextSelected(Node);
|
|
||||||
end;
|
|
||||||
Node:=lstNew.GetFirst;
|
|
||||||
while Node<>nil do begin
|
|
||||||
if PInteger(lstNew.GetNodeData(Node))^=PatchIndex then begin
|
|
||||||
lstNew.Selected[Node]:=True;
|
|
||||||
lstNewChange(lstNew,Node);
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
Node:=lstNew.GetNext(Node);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.butOldRemoveClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if lstOld.ItemIndex>=0 then begin
|
|
||||||
PP.PatchFile(grpConfig.Tag).RemoveOldVersion(lstOld.ItemIndex);
|
|
||||||
lstOld.Items.Delete(lstOld.ItemIndex);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.OpenAFile(FileName: String; AskSave: Boolean=True; PromptNew: Boolean=False);
|
|
||||||
var
|
|
||||||
fs: TFileStream;
|
|
||||||
begin
|
|
||||||
PP.Free; //confirm saving first?
|
|
||||||
PP:=TPatchProject.Create;
|
|
||||||
ReloadNewTree;
|
|
||||||
if FileName<>'' then begin
|
|
||||||
fs:=TFileStream.Create(FileName,fmOpenRead);
|
|
||||||
try
|
|
||||||
PP.LoadFromStream(fs);
|
|
||||||
except
|
|
||||||
on E: Exception do ShowMessage(E.Message);
|
|
||||||
end;
|
|
||||||
dskName:=FileName;
|
|
||||||
ReloadNewTree;
|
|
||||||
fs.Free;
|
|
||||||
end else begin
|
|
||||||
dskName:=UntitledFile;
|
|
||||||
if PromptNew then butAddClick(Self);
|
|
||||||
end;
|
|
||||||
|
|
||||||
UpdateStates;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuNewClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
OpenAFile('',True,True);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuOpenClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if dlgOpen.Execute then begin
|
|
||||||
OpenAFile(dlgOpen.FileName,True);
|
|
||||||
if lstNew.GetFirst <> nil then
|
|
||||||
lstNew.Selected[lstNew.GetFirst]:=True;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuSaveClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
dskName:=DoSave(dskName,False);
|
|
||||||
UpdateStates;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuSaveasClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
dskName:=DoSave(dskName,True);
|
|
||||||
UpdateStates;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TfrmMain.DoSave(const FileName: String; const Prompt: Boolean): String;
|
|
||||||
var
|
|
||||||
FN: String;
|
|
||||||
fs: TFileStream;
|
|
||||||
begin
|
|
||||||
DoSave:='';
|
|
||||||
FN:=FileName;
|
|
||||||
if Prompt or (CompareText(FileName,UntitledFile)=0) then begin
|
|
||||||
if dlgSave.Execute then begin
|
|
||||||
FN:=dlgSave.FileName;
|
|
||||||
if ExtractFileExt(FN)='' then
|
|
||||||
FN:=FN+'.vpj';
|
|
||||||
end else begin
|
|
||||||
DoSave:=FileName;
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
//do actual saving to this file...
|
|
||||||
fs:=TFileStream.Create(FN,fmCreate);
|
|
||||||
PP.SaveToStream(fs);
|
|
||||||
fs.Free;
|
|
||||||
DoSave:=FN;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuGenGoClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
Self.Visible:=False;
|
|
||||||
Cursor:=crHourGlass;
|
|
||||||
PP.Generate;
|
|
||||||
Cursor:=crDefault;
|
|
||||||
Self.Visible:=True;
|
|
||||||
SelectInNewTree(0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuAboutClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
frmAbout: TfrmAbout;
|
|
||||||
begin
|
|
||||||
frmAbout:=TfrmAbout.Create(Self);
|
|
||||||
frmAbout.ShowModal;
|
|
||||||
frmAbout.Free;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuCreateEXEClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
fs: TFileStream;
|
|
||||||
fr: TFileStream;
|
|
||||||
begin
|
|
||||||
//first, select it on disk (where should the exe go?)
|
|
||||||
if dlgSaveExe.FileName='' then dlgSaveExe.FileName:='VPatch.exe';
|
|
||||||
if dlgSaveExe.Execute then begin
|
|
||||||
fs:=nil;
|
|
||||||
try
|
|
||||||
fs:=TFileStream.Create(dlgSaveExe.FileName,fmCreate);
|
|
||||||
fr:=nil;
|
|
||||||
try
|
|
||||||
fr:=TFileStream.Create(ExtractFilePath(Application.ExeName)+'vpatch.bin',fmOpenRead);
|
|
||||||
fs.CopyFrom(fr,fr.Size);
|
|
||||||
finally
|
|
||||||
fr.Free;
|
|
||||||
end;
|
|
||||||
PP.WritePatches(fs);
|
|
||||||
finally
|
|
||||||
fs.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuCreateDLLClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
fs: TFileStream;
|
|
||||||
fr: TFileStream;
|
|
||||||
begin
|
|
||||||
//first, select it on disk (where should the exe go?)
|
|
||||||
if dlgSaveDLL.FileName='' then dlgSaveDLL.FileName:='VPatch.DLL';
|
|
||||||
if dlgSaveDLL.Execute then begin
|
|
||||||
fs:=nil;
|
|
||||||
try
|
|
||||||
fs:=TFileStream.Create(dlgSaveDLL.FileName,fmCreate);
|
|
||||||
fr:=nil;
|
|
||||||
try
|
|
||||||
fr:=TFileStream.Create(ExtractFilePath(Application.ExeName)+'vpatchdll.bin',fmOpenRead);
|
|
||||||
fs.CopyFrom(fr,fr.Size);
|
|
||||||
finally
|
|
||||||
fr.Free;
|
|
||||||
end;
|
|
||||||
PP.WritePatches(fs);
|
|
||||||
finally
|
|
||||||
fs.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuCreatePATClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
fs: TFileStream;
|
|
||||||
begin
|
|
||||||
//first, select it on disk (where should the exe go?)
|
|
||||||
if dlgSavePAT.FileName='' then dlgSavePAT.FileName:='PatchData.pat';
|
|
||||||
if dlgSavePAT.Execute then begin
|
|
||||||
fs:=nil;
|
|
||||||
try
|
|
||||||
fs:=TFileStream.Create(dlgSavePAT.FileName,fmCreate);
|
|
||||||
PP.WritePatches(fs);
|
|
||||||
finally
|
|
||||||
fs.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.lstNewGetText(Sender: TBaseVirtualTree;
|
|
||||||
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
|
|
||||||
var CellText: WideString);
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
i:=PInteger(lstNew.GetNodeData(Node))^;
|
|
||||||
CellText:=ExtractFileName(PP.PatchFile(i).NewVersion);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.txtStartBlockSizeChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TfrmMain.CollectConfig: String;
|
|
||||||
begin
|
|
||||||
Result:=txtStartBlockSize.Caption;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.txtMinimumBlockSizeChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.txtBlockDividerChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.txtStepSizeChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.SetConfigTextBoxes(Config: String);
|
|
||||||
var
|
|
||||||
a,i: Integer;
|
|
||||||
begin
|
|
||||||
a:=Pos(',',Config);
|
|
||||||
if(a=0) then a:=Length(Config)+1;
|
|
||||||
txtStartBlockSize.Caption:=Copy(Config,1,a-1);
|
|
||||||
Config:=Copy(Config,a+1,Length(Config));
|
|
||||||
|
|
||||||
a:=StrToInt(txtStartBlockSize.Caption);
|
|
||||||
i:=-1;
|
|
||||||
while not (a=0) do begin
|
|
||||||
a:=a shr 1;
|
|
||||||
Inc(i);
|
|
||||||
end;
|
|
||||||
tbBlockSize.Position := i;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.tbBlockSizeChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
txtStartBlockSize.Caption:=IntToStr(1 shl tbBlockSize.Position);
|
|
||||||
PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuClearcachedpatchesClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
PP.ResetCache;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.chkOutputWaitClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
WaitAfterGenerate:=chkOutputWait.Checked;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.mnuWebsiteClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
OpenLink('http://www.tibed.net/vpatch');
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.Readme1Click(Sender: TObject);
|
|
||||||
begin
|
|
||||||
OpenLink('VPatch.htm');
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.ReadmeincludedwithNSIS1Click(Sender: TObject);
|
|
||||||
begin
|
|
||||||
OpenLink('Readme.html');
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.chkOptimalClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
OptimalPatches:=chkOptimal.Checked;
|
|
||||||
end;
|
|
||||||
|
|
||||||
initialization
|
|
||||||
PP:=TPatchProject.Create;
|
|
||||||
end.
|
|
|
@ -1,114 +0,0 @@
|
||||||
unit OSUtil;
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
procedure OpenLink(ALink: String); forward;
|
|
||||||
function GetTempDir: String; forward;
|
|
||||||
function GetTempFile: String; forward;
|
|
||||||
procedure ExecProgram(GameFolder: String; S: String; JustEXE: String; AWaitUntilFinish: Boolean); forward;
|
|
||||||
procedure ExecWaitBatchFile(AFolder: String; AName: String); forward;
|
|
||||||
procedure OSMoveFile(ASource,ADest: String); forward;
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
uses
|
|
||||||
Windows, SysUtils, ShellAPI, Forms, Dialogs;
|
|
||||||
|
|
||||||
// does not support command-line arguments right now
|
|
||||||
procedure ExecWaitBatchFile(AFolder: String; AName: String);
|
|
||||||
var
|
|
||||||
S, JustEXE: String;
|
|
||||||
StartUp: STARTUPINFO;
|
|
||||||
ProcInfo: PROCESS_INFORMATION;
|
|
||||||
begin
|
|
||||||
S:='"'+AName+'"';
|
|
||||||
JustExe:=AName;
|
|
||||||
StartUp.lpReserved:=nil;
|
|
||||||
StartUp.lpDesktop:=nil;
|
|
||||||
StartUp.lpTitle:=nil;
|
|
||||||
StartUp.dwFlags:=STARTF_USESHOWWINDOW;
|
|
||||||
StartUp.wShowWindow:=SW_SHOWMAXIMIZED;
|
|
||||||
StartUp.cbReserved2:=0;
|
|
||||||
StartUp.lpReserved2:=nil;
|
|
||||||
|
|
||||||
//it works now... but don't ask me how - it's taken me hours just to get this working :)
|
|
||||||
if not CreateProcess(PChar(JustEXE),PChar(S),nil,nil,False,NORMAL_PRIORITY_CLASS,nil,PChar(AFolder),StartUp,ProcInfo) then
|
|
||||||
raise Exception.Create('CreateProcess error:'+IntToStr(GetLastError));
|
|
||||||
if not (ProcInfo.hThread=0) then CloseHandle(ProcInfo.hThread);
|
|
||||||
if not (ProcInfo.hProcess=0) then begin
|
|
||||||
WaitForSingleObject(ProcInfo.hProcess,INFINITE);
|
|
||||||
CloseHandle(ProcInfo.hProcess);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure OSMoveFile(ASource,ADest: String);
|
|
||||||
begin
|
|
||||||
if not MoveFileEx(@ASource[1],@ADest[1],MOVEFILE_COPY_ALLOWED+MOVEFILE_REPLACE_EXISTING+MOVEFILE_WRITE_THROUGH) then
|
|
||||||
raise Exception.Create('File movement failed in OSMoveFile: '+ASource+'; '+ADest);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure OpenLink(ALink: String);
|
|
||||||
var
|
|
||||||
StartDoc: Integer;
|
|
||||||
begin
|
|
||||||
StartDoc:=ShellExecute(Application.Handle, 'open', PChar(ALink), nil, nil, SW_SHOWNORMAL);
|
|
||||||
If StartDoc <= 32 Then begin
|
|
||||||
MessageDlg('Error occured while opening link: '+ALink,mtWarning,[mbOK],0);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure ExecProgram(GameFolder: String; S: String; JustEXE: String; AWaitUntilFinish: Boolean);
|
|
||||||
var
|
|
||||||
StartUp: STARTUPINFO;
|
|
||||||
ProcInfo: PROCESS_INFORMATION;
|
|
||||||
begin
|
|
||||||
StartUp.lpReserved:=nil;
|
|
||||||
StartUp.lpDesktop:=nil;
|
|
||||||
StartUp.lpTitle:=nil;
|
|
||||||
StartUp.dwFlags:=STARTF_USESHOWWINDOW;
|
|
||||||
StartUp.wShowWindow:=SW_SHOWMAXIMIZED;
|
|
||||||
StartUp.cbReserved2:=0;
|
|
||||||
StartUp.lpReserved2:=nil;
|
|
||||||
|
|
||||||
//it works now... but don't ask me how - it's taken me hours just to get this working :)
|
|
||||||
if not CreateProcess(PChar(JustEXE),PChar(S),nil,nil,False,NORMAL_PRIORITY_CLASS,nil,PChar(GameFolder),StartUp,ProcInfo) then
|
|
||||||
raise Exception.Create('CreateProcess error:'+IntToStr(GetLastError));
|
|
||||||
if not (ProcInfo.hThread=0) then CloseHandle(ProcInfo.hThread);
|
|
||||||
if not (ProcInfo.hProcess=0) then begin
|
|
||||||
if AWaitUntilFinish then
|
|
||||||
WaitForSingleObject(ProcInfo.hProcess,INFINITE);
|
|
||||||
CloseHandle(ProcInfo.hProcess);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
var
|
|
||||||
TempDir: String;
|
|
||||||
strBuffer: Array[0..1024] of Char;
|
|
||||||
nBufferLength: Cardinal;
|
|
||||||
|
|
||||||
function GetTempFile;
|
|
||||||
var
|
|
||||||
Prefix: String;
|
|
||||||
lngLength: Integer;
|
|
||||||
begin
|
|
||||||
PreFix:='TMP';
|
|
||||||
strBuffer:='';
|
|
||||||
lngLength:=GetTempFileName(PChar(TempDir),PChar(PreFix),0,strBuffer);
|
|
||||||
if not (lngLength=0) then begin
|
|
||||||
GetTempFile:=strBuffer;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function GetTempDir: String;
|
|
||||||
begin
|
|
||||||
GetTempDir:=TempDir;
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
|
||||||
// get temporary folder
|
|
||||||
nBufferLength:=1024;
|
|
||||||
strBuffer:='';
|
|
||||||
GetTempPath(nBufferLength,strBuffer);
|
|
||||||
TempDir:=strBuffer;
|
|
||||||
end.
|
|
|
@ -1,548 +0,0 @@
|
||||||
unit PatchClasses;
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
uses Classes, sysutils, VDSP_CRC, DLLWrapper, Dialogs;
|
|
||||||
|
|
||||||
const
|
|
||||||
DEFAULT_CONFIG = '64';
|
|
||||||
|
|
||||||
type
|
|
||||||
TAbstractFile = record
|
|
||||||
FileName: String;
|
|
||||||
FriendlyName: String;
|
|
||||||
CRC32: LongWord; //the longword/integer sign is going to give problems again...
|
|
||||||
Size: Integer;
|
|
||||||
//not sure about this one yet...
|
|
||||||
Cached: Boolean; //True: we have cached the patch, using latest config
|
|
||||||
//False: a) we have nothing cached (size and start are -1)
|
|
||||||
// b) we still have cache (start>0 and size too), but it's not generated using the latest config (we can keep it of course because the new config might be worse)
|
|
||||||
Cache: TMemoryStream;
|
|
||||||
end;
|
|
||||||
|
|
||||||
TPatchFile = class (TObject)
|
|
||||||
private
|
|
||||||
FIndex: Integer;
|
|
||||||
ConfigID: String;
|
|
||||||
FNew: TAbstractFile;
|
|
||||||
FOld: Array of TAbstractFile;
|
|
||||||
protected
|
|
||||||
procedure SetNewFN(Value: String);
|
|
||||||
function GetNewFN: String;
|
|
||||||
procedure SetOldFN(i: Integer; FileName: String);
|
|
||||||
function GetOldFN(Index: Integer): String;
|
|
||||||
function GetOldVersionCount: Integer;
|
|
||||||
procedure ResetCache; overload;
|
|
||||||
procedure ResetCache(OldIndex: Integer); overload;
|
|
||||||
procedure InvalidateCache; overload;
|
|
||||||
procedure InvalidateCache(Index: Integer); overload;
|
|
||||||
function GetCached(Index: Integer): Boolean;
|
|
||||||
function GetConfig: String;
|
|
||||||
procedure SetConfig(Value: String);
|
|
||||||
public
|
|
||||||
constructor Create(Index: Integer; FileName: String); overload;
|
|
||||||
constructor Create(Index: Integer; Stream: TStream); overload;
|
|
||||||
destructor Destroy(); override;
|
|
||||||
|
|
||||||
procedure AddOldVersion(const FileName: String);
|
|
||||||
procedure RemoveOldVersion(const Index: Integer);
|
|
||||||
property OldVersions[Index: Integer]: String read GetOldFN write SetOldFN;
|
|
||||||
|
|
||||||
procedure Generate; overload;
|
|
||||||
procedure Generate(const Index: Integer); overload;
|
|
||||||
property Generated[Index: Integer]: Boolean read GetCached;
|
|
||||||
function GetPatchSize(Index: Integer): Integer;
|
|
||||||
|
|
||||||
procedure WritePatch(Index: Integer; Stream: TStream);
|
|
||||||
|
|
||||||
// LoadFromStream not supported: Use Create(Index,Stream) instead!
|
|
||||||
// procedure LoadFromStream(Stream: TStream);
|
|
||||||
procedure SaveToStream(Stream: TStream);
|
|
||||||
published
|
|
||||||
property NewVersion: String read GetNewFN write SetNewFN;
|
|
||||||
property OldVersionCount: Integer read GetOldVersionCount;
|
|
||||||
property Index: Integer read FIndex;
|
|
||||||
property Config: String read GetConfig write SetConfig;
|
|
||||||
end;
|
|
||||||
|
|
||||||
TPatchProject = class (TObject)
|
|
||||||
private
|
|
||||||
FPat: Array of TPatchFile;
|
|
||||||
public
|
|
||||||
procedure LoadFromStream(Stream: TStream);
|
|
||||||
procedure SaveToStream(Stream: TStream);
|
|
||||||
constructor Create();
|
|
||||||
destructor Destroy(); override;
|
|
||||||
procedure AddNewVersion(FileName: String);
|
|
||||||
function PatchFile(FileName: String): TPatchFile; overload;
|
|
||||||
function PatchFile(Index: Integer): TPatchFile; overload;
|
|
||||||
function GetPatchCount: Integer;
|
|
||||||
procedure WritePatches(Stream: TStream);
|
|
||||||
procedure Generate;
|
|
||||||
procedure ResetCache;
|
|
||||||
end;
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
function ReadStreamString(Stream: TStream): String;
|
|
||||||
var
|
|
||||||
Buf: Array[0..512] of Char;
|
|
||||||
i: LongInt;
|
|
||||||
S: String;
|
|
||||||
j: Integer;
|
|
||||||
begin
|
|
||||||
Stream.Read(i,SizeOf(i));
|
|
||||||
if i>512 then raise Exception.Create('VPJ damaged: String too long (>512)');
|
|
||||||
Stream.Read(Buf,i);
|
|
||||||
for j:=1 to i do
|
|
||||||
S:=S+Buf[j-1];
|
|
||||||
ReadStreamString:=S;
|
|
||||||
end;
|
|
||||||
|
|
||||||
//a private wrapper for the FileCRC function
|
|
||||||
function CalcCRC(FileName: String): Integer;
|
|
||||||
var
|
|
||||||
fs: TFileStream;
|
|
||||||
begin
|
|
||||||
CalcCRC:=0;
|
|
||||||
fs:=nil;
|
|
||||||
try
|
|
||||||
fs:=TFileStream.Create(FileName,fmOpenRead);
|
|
||||||
CalcCRC:=FileCRC(fs);
|
|
||||||
finally
|
|
||||||
fs.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function GetFileSize(FileName: String): Integer;
|
|
||||||
var
|
|
||||||
fs: TFileStream;
|
|
||||||
begin
|
|
||||||
GetFileSize:=0;
|
|
||||||
fs:=nil;
|
|
||||||
try
|
|
||||||
fs:=TFileStream.Create(FileName,fmOpenRead);
|
|
||||||
GetFileSize:=fs.Size;
|
|
||||||
finally
|
|
||||||
fs.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TPatchFile }
|
|
||||||
|
|
||||||
procedure TPatchFile.AddOldVersion(const FileName: String);
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
// fs: TFileStream;
|
|
||||||
begin
|
|
||||||
i:=Length(FOld);
|
|
||||||
SetLength(FOld,i+1);
|
|
||||||
FOld[i].Cache:=TMemoryStream.Create;
|
|
||||||
SetOldFN(i,FileName);
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TPatchFile.Create(Index: Integer; FileName: String);
|
|
||||||
//var
|
|
||||||
// fs: TFileStream;
|
|
||||||
begin
|
|
||||||
inherited Create();
|
|
||||||
FIndex:=Index;
|
|
||||||
SetLength(FOld,0);
|
|
||||||
FNew.CRC32:=0;
|
|
||||||
FNew.Size:=-1;
|
|
||||||
SetNewFN(FileName);
|
|
||||||
ConfigID:=DEFAULT_CONFIG;
|
|
||||||
//just to be on the safe side
|
|
||||||
//following is now done by SetNewFN :)
|
|
||||||
//no it's not - because that one resets the cache!!!
|
|
||||||
//doesn't matter, because we're not loading from stream!!!
|
|
||||||
{ FNew.FileName:=FileName;
|
|
||||||
FNew.FriendlyName:=ExtractFileName(FileName);
|
|
||||||
FNew.CRC32:=CalcCRC(FileName);
|
|
||||||
FNew.Size:=GetFileSize(FileName);}
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TPatchFile.Create(Index: Integer; Stream: TStream);
|
|
||||||
var
|
|
||||||
i,q: LongInt;
|
|
||||||
CSize: Integer;
|
|
||||||
j: Integer;
|
|
||||||
begin
|
|
||||||
inherited Create();
|
|
||||||
FIndex:=Index;
|
|
||||||
SetLength(FOld,0);
|
|
||||||
FNew.CRC32:=0;
|
|
||||||
FNew.Size:=-1; //just to be on the safe side
|
|
||||||
|
|
||||||
//read configuration
|
|
||||||
ConfigID:=ReadStreamString(Stream);
|
|
||||||
|
|
||||||
//now load everything...
|
|
||||||
FNew.FileName:=ReadStreamString(Stream);
|
|
||||||
FNew.FriendlyName:=ReadStreamString(Stream);
|
|
||||||
Stream.Read(FNew.CRC32,SizeOf(FNew.CRC32));
|
|
||||||
Stream.Read(FNew.Size,SizeOf(FNew.Size));
|
|
||||||
Stream.Read(i,SizeOf(i));
|
|
||||||
SetLength(FOld,i);
|
|
||||||
for j:=0 to i - 1 do begin
|
|
||||||
FOld[j].FileName:=ReadStreamString(Stream);
|
|
||||||
FOld[j].FriendlyName:=ReadStreamString(Stream);
|
|
||||||
Stream.Read(FOld[j].CRC32,SizeOf(FOld[j].CRC32));
|
|
||||||
Stream.Read(FOld[j].Size,SizeOf(FOld[j].Size));
|
|
||||||
Stream.Read(q,SizeOf(q));
|
|
||||||
FOld[j].Cached:=not (q=0);
|
|
||||||
if FOld[j].Cached then begin
|
|
||||||
Stream.Read(CSize,SizeOf(CSize));
|
|
||||||
FOld[j].Cache:=TMemoryStream.Create;
|
|
||||||
FOld[j].Cache.CopyFrom(Stream,CSize);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
destructor TPatchFile.Destroy;
|
|
||||||
begin
|
|
||||||
SetLength(FOld,0);
|
|
||||||
inherited;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPatchFile.GetNewFN: String;
|
|
||||||
begin
|
|
||||||
GetNewFN:=FNew.FileName;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPatchFile.GetOldFN(Index: Integer): String;
|
|
||||||
begin
|
|
||||||
Result:=FOld[Index].FileName;
|
|
||||||
if FOld[Index].Cached then
|
|
||||||
if FOld[Index].Cache.Size>0 then begin
|
|
||||||
Result:=Result + ' ('+IntToStr(FOld[Index].Cache.Size)+' bytes to patch)';
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPatchFile.GetOldVersionCount: Integer;
|
|
||||||
begin
|
|
||||||
GetOldVersionCount:=Length(FOld);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.ResetCache;
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
for i:=0 to Length(FOld)-1 do
|
|
||||||
ResetCache(i);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.RemoveOldVersion(const Index: Integer);
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
FOld[Index].Cache.Free;
|
|
||||||
for i:=Index to Length(FOld)-2 do begin
|
|
||||||
FOld[i]:=FOld[i+1];
|
|
||||||
end;
|
|
||||||
SetLength(FOld,Length(FOld)-1);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.ResetCache(OldIndex: Integer);
|
|
||||||
begin
|
|
||||||
FOld[OldIndex].Cached:=False;
|
|
||||||
FOld[OldIndex].Size:=-1;
|
|
||||||
FOld[OldIndex].Cache.Clear;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.SaveToStream(Stream: TStream);
|
|
||||||
procedure WriteStreamString(Stream: TStream; const S: String);
|
|
||||||
var
|
|
||||||
i: LongInt;
|
|
||||||
j: Integer;
|
|
||||||
Buf: Array[0..512] of Char;
|
|
||||||
begin
|
|
||||||
i:=Length(S);
|
|
||||||
Stream.Write(i,SizeOf(i));
|
|
||||||
for j:=1 to i do
|
|
||||||
Buf[j-1]:=S[j];
|
|
||||||
Buf[i]:=#0;
|
|
||||||
Stream.Write(Buf,i);
|
|
||||||
end;
|
|
||||||
var
|
|
||||||
i,q: LongInt;
|
|
||||||
j: Integer;
|
|
||||||
tmp: Integer;
|
|
||||||
begin
|
|
||||||
//write config ID
|
|
||||||
WriteStreamString(Stream,ConfigID);
|
|
||||||
|
|
||||||
WriteStreamString(Stream,FNew.FileName);
|
|
||||||
WriteStreamString(Stream,FNew.FriendlyName);
|
|
||||||
Stream.Write(FNew.CRC32,SizeOf(FNew.CRC32));
|
|
||||||
Stream.Write(FNew.Size,SizeOf(FNew.Size));
|
|
||||||
|
|
||||||
i:=Length(FOld);
|
|
||||||
Stream.Write(i,SizeOf(i));
|
|
||||||
|
|
||||||
for j:=0 to i - 1 do begin
|
|
||||||
WriteStreamString(Stream,FOld[j].FileName);
|
|
||||||
WriteStreamString(Stream,FOld[j].FriendlyName);
|
|
||||||
Stream.Write(FOld[j].CRC32,SizeOf(FOld[j].CRC32));
|
|
||||||
Stream.Write(FOld[j].Size,SizeOf(FOld[j].Size));
|
|
||||||
if FOld[j].Cached then q:=1 else q:=0;
|
|
||||||
Stream.Write(q,SizeOf(q));
|
|
||||||
if FOld[j].Cached then begin
|
|
||||||
tmp:=FOld[j].Cache.Size;
|
|
||||||
Stream.Write(tmp,SizeOf(tmp));
|
|
||||||
FOld[j].Cache.Seek(0,soFromBeginning);
|
|
||||||
Stream.CopyFrom(FOld[j].Cache,tmp);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.SetNewFN(Value: String);
|
|
||||||
var
|
|
||||||
NewSize: Integer;
|
|
||||||
NewCRC: LongWord;
|
|
||||||
begin
|
|
||||||
FNew.FileName:=Value;
|
|
||||||
FNew.Friendlyname:=ExtractFileName(Value);
|
|
||||||
NewCRC:=CalcCRC(Value);
|
|
||||||
NewSize:=GetFileSize(Value);
|
|
||||||
//if any changes, then reset cache :)
|
|
||||||
if not ((FNew.CRC32=NewCRC) and (FNew.Size=NewSize)) then begin
|
|
||||||
FNew.CRC32:=NewCRC;
|
|
||||||
FNew.Size:=NewSize;
|
|
||||||
ResetCache;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.SetOldFN(i: Integer; FileName: String);
|
|
||||||
begin
|
|
||||||
if((i>=0) and (i<Length(FOld))) then begin
|
|
||||||
FOld[i].FileName:=FileName;
|
|
||||||
FOld[i].FriendlyName:=ExtractFileName(FileName);
|
|
||||||
FOld[i].CRC32:=CalcCRC(FileName);
|
|
||||||
FOld[i].Size:=GetFileSize(FileName);
|
|
||||||
ResetCache(i);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.Generate;
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
//generate all of them into the cache?
|
|
||||||
for i:=0 to OldVersionCount - 1 do
|
|
||||||
Generate(i);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.Generate(const Index: Integer);
|
|
||||||
var
|
|
||||||
Size: Integer;
|
|
||||||
fm: TMemoryStream;
|
|
||||||
begin
|
|
||||||
fm:=TMemoryStream.Create;
|
|
||||||
Size:=DoGenerate(FOld[Index].FileName,FNew.FileName,fm,ConfigID);
|
|
||||||
if not (Size=-1) then begin
|
|
||||||
if (FOld[Index].Cache.Size>Size) or (not FOld[Index].Cached) then begin //the new one is better
|
|
||||||
FOld[Index].Cache.Clear;
|
|
||||||
fm.Seek(8,soFromBeginning);
|
|
||||||
FOld[Index].Cache.CopyFrom(fm,fm.Size-8);
|
|
||||||
end;
|
|
||||||
FOld[Index].Cached:=True;
|
|
||||||
end;
|
|
||||||
fm.Free;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPatchFile.GetCached(Index: Integer): Boolean;
|
|
||||||
begin
|
|
||||||
GetCached:=FOld[Index].Cached;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPatchFile.GetConfig: String;
|
|
||||||
begin
|
|
||||||
GetConfig:=ConfigID;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.SetConfig(Value: String);
|
|
||||||
begin
|
|
||||||
if not Assigned(Self) then Exit;
|
|
||||||
if not SameText(Value,ConfigID) then begin
|
|
||||||
InvalidateCache; //configuration changed, invalidate cache
|
|
||||||
end;
|
|
||||||
ConfigID:=Value;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPatchFile.GetPatchSize(Index: Integer): Integer;
|
|
||||||
begin
|
|
||||||
if Generated[Index] then begin
|
|
||||||
GetPatchSize:=FOld[Index].Cache.Size;
|
|
||||||
end else
|
|
||||||
GetPatchSize:=-1;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.InvalidateCache;
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
for i:=0 to Length(FOld)-1 do
|
|
||||||
InvalidateCache(i);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.InvalidateCache(Index: Integer);
|
|
||||||
begin
|
|
||||||
FOld[Index].Cached:=False;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchFile.WritePatch(Index: Integer; Stream: TStream);
|
|
||||||
begin
|
|
||||||
if not FOld[Index].Cached then
|
|
||||||
Generate(Index);
|
|
||||||
if not FOld[Index].Cached then
|
|
||||||
raise Exception.Create('Writing of patch failed: Could not generate all patches');
|
|
||||||
FOld[Index].Cache.Seek(0,soFromBeginning);
|
|
||||||
Stream.CopyFrom(FOld[Index].Cache,FOld[Index].Cache.Size);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TPatchProject }
|
|
||||||
|
|
||||||
procedure TPatchProject.AddNewVersion(FileName: String);
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
i:=Length(FPat);
|
|
||||||
SetLength(FPat,i+1);
|
|
||||||
FPat[i]:=TPatchFile.Create(i,FileName);
|
|
||||||
FPat[i].SetConfig(DEFAULT_CONFIG);
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TPatchProject.Create;
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
SetLength(FPat,0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
destructor TPatchProject.Destroy;
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
for i:=0 to Length(FPat)-1 do begin
|
|
||||||
FPat[i].Free;
|
|
||||||
end;
|
|
||||||
SetLength(FPat,0);
|
|
||||||
inherited;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchProject.Generate;
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
for i:=0 to GetPatchCount - 1 do
|
|
||||||
FPat[i].Generate;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPatchProject.GetPatchCount: Integer;
|
|
||||||
begin
|
|
||||||
GetPatchCount:=Length(FPat);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchProject.LoadFromStream(Stream: TStream);
|
|
||||||
var
|
|
||||||
MagicWord: Array[0..15] of Char;
|
|
||||||
i: LongInt;
|
|
||||||
j: Integer;
|
|
||||||
begin
|
|
||||||
//first free all patchfiles
|
|
||||||
for j:=0 to Length(FPat)-1 do begin
|
|
||||||
FPat[j].Free;
|
|
||||||
FPat[j]:=nil;
|
|
||||||
end;
|
|
||||||
Stream.Read(MagicWord,SizeOf(MagicWord));
|
|
||||||
if SameText('VPatchProject 3'#26,MagicWord) then begin
|
|
||||||
Stream.Read(i,SizeOf(i)); //4 dummy bytes
|
|
||||||
end else
|
|
||||||
raise Exception.Create('Error: file format incompatible (only version 3 and newer are supported).');
|
|
||||||
|
|
||||||
Stream.Read(i,SizeOf(i)); // file count
|
|
||||||
SetLength(FPat,i);
|
|
||||||
for j:=0 to i - 1 do begin
|
|
||||||
FPat[j]:=TPatchFile.Create(j,Stream);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPatchProject.PatchFile(FileName: String): TPatchFile;
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
PatchFile:=nil;
|
|
||||||
for i:=0 to Length(FPat) - 1 do begin
|
|
||||||
if(CompareText(FPat[i].FNew.FileName,FileName)=0) then begin
|
|
||||||
PatchFile:=FPat[i];
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
for i:=0 to Length(FPat) - 1 do begin
|
|
||||||
if(CompareText(FPat[i].FNew.FriendlyName,FileName)=0) then begin
|
|
||||||
PatchFile:=FPat[i];
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPatchProject.PatchFile(Index: Integer): TPatchFile;
|
|
||||||
begin
|
|
||||||
if (Index<Length(FPat)) and (Index>=0) then
|
|
||||||
PatchFile:=FPat[Index]
|
|
||||||
else
|
|
||||||
PatchFile:=nil;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchProject.ResetCache;
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
|
||||||
for i:=0 to Pred(Length(FPat)) do
|
|
||||||
FPat[i].ResetCache;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchProject.SaveToStream(Stream: TStream);
|
|
||||||
var
|
|
||||||
HeadID: Array[0..15] of Char;
|
|
||||||
i: LongInt;
|
|
||||||
j: Integer;
|
|
||||||
begin
|
|
||||||
HeadID:='VPatchProject 3'+#26;
|
|
||||||
Stream.Write(HeadID,SizeOf(HeadID));
|
|
||||||
//4 dummy bytes left
|
|
||||||
i:=0;
|
|
||||||
Stream.Write(i,SizeOf(i));
|
|
||||||
i:=Length(FPat);
|
|
||||||
Stream.Write(i,SizeOf(i));
|
|
||||||
for j:=0 to i - 1 do begin
|
|
||||||
FPat[j].SaveToStream(Stream);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPatchProject.WritePatches(Stream: TStream);
|
|
||||||
var
|
|
||||||
i,j,k,o: LongInt;
|
|
||||||
q: LongWord;
|
|
||||||
begin
|
|
||||||
k:=$54415056;
|
|
||||||
o:=Stream.Position;
|
|
||||||
Stream.Write(k,SizeOf(k));
|
|
||||||
k:=0;
|
|
||||||
Stream.Write(k,SizeOf(k));
|
|
||||||
k:=0;
|
|
||||||
for i:=0 to Length(FPat)-1 do begin
|
|
||||||
for j:=0 to FPat[i].GetOldVersionCount - 1 do begin
|
|
||||||
FPat[i].WritePatch(j,Stream);
|
|
||||||
Inc(k);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
Stream.Seek(o+4,soFromBeginning);
|
|
||||||
q:=k;
|
|
||||||
// set the MD5 flag
|
|
||||||
q:=q or $80000000;
|
|
||||||
Stream.Write(q,SizeOf(q));
|
|
||||||
Stream.Seek(Stream.Size,soFromBeginning);
|
|
||||||
Stream.Write(o,SizeOf(o));
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
|
||||||
|
|
|
@ -1,102 +0,0 @@
|
||||||
object frmProg: TfrmProg
|
|
||||||
Left = 328
|
|
||||||
Top = 266
|
|
||||||
BorderIcons = [biSystemMenu, biMinimize]
|
|
||||||
BorderStyle = bsSingle
|
|
||||||
Caption = 'Progress...'
|
|
||||||
ClientHeight = 193
|
|
||||||
ClientWidth = 385
|
|
||||||
Color = clBtnFace
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'MS Sans Serif'
|
|
||||||
Font.Style = []
|
|
||||||
OldCreateOrder = False
|
|
||||||
Position = poScreenCenter
|
|
||||||
OnCreate = FormCreate
|
|
||||||
PixelsPerInch = 96
|
|
||||||
TextHeight = 13
|
|
||||||
object lblStatus: TLabel
|
|
||||||
Left = 8
|
|
||||||
Top = 8
|
|
||||||
Width = 369
|
|
||||||
Height = 17
|
|
||||||
AutoSize = False
|
|
||||||
Transparent = True
|
|
||||||
end
|
|
||||||
object lblSize: TLabel
|
|
||||||
Left = 152
|
|
||||||
Top = 8
|
|
||||||
Width = 225
|
|
||||||
Height = 17
|
|
||||||
Alignment = taRightJustify
|
|
||||||
AutoSize = False
|
|
||||||
Transparent = True
|
|
||||||
end
|
|
||||||
object lblFile: TLabel
|
|
||||||
Left = 8
|
|
||||||
Top = 48
|
|
||||||
Width = 369
|
|
||||||
Height = 17
|
|
||||||
AutoSize = False
|
|
||||||
Caption = '(filename)'
|
|
||||||
end
|
|
||||||
object lblNewFile: TLabel
|
|
||||||
Left = 8
|
|
||||||
Top = 96
|
|
||||||
Width = 369
|
|
||||||
Height = 17
|
|
||||||
AutoSize = False
|
|
||||||
Caption = '(filename)'
|
|
||||||
end
|
|
||||||
object lblTotal: TLabel
|
|
||||||
Left = 8
|
|
||||||
Top = 144
|
|
||||||
Width = 369
|
|
||||||
Height = 17
|
|
||||||
AutoSize = False
|
|
||||||
Caption = 'Total progress'
|
|
||||||
end
|
|
||||||
object shpFull: TShape
|
|
||||||
Left = 8
|
|
||||||
Top = 24
|
|
||||||
Width = 369
|
|
||||||
Height = 17
|
|
||||||
Brush.Color = clGray
|
|
||||||
end
|
|
||||||
object shpLeft: TShape
|
|
||||||
Left = 8
|
|
||||||
Top = 24
|
|
||||||
Width = 369
|
|
||||||
Height = 17
|
|
||||||
Brush.Color = clRed
|
|
||||||
end
|
|
||||||
object prgFile: TProgressBar
|
|
||||||
Left = 8
|
|
||||||
Top = 64
|
|
||||||
Width = 369
|
|
||||||
Height = 25
|
|
||||||
Min = 0
|
|
||||||
Max = 100
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object prgNewFile: TProgressBar
|
|
||||||
Left = 8
|
|
||||||
Top = 112
|
|
||||||
Width = 369
|
|
||||||
Height = 25
|
|
||||||
Min = 0
|
|
||||||
Max = 100
|
|
||||||
TabOrder = 1
|
|
||||||
end
|
|
||||||
object prgAll: TProgressBar
|
|
||||||
Left = 8
|
|
||||||
Top = 160
|
|
||||||
Width = 369
|
|
||||||
Height = 25
|
|
||||||
Min = 0
|
|
||||||
Max = 100
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,74 +0,0 @@
|
||||||
unit ProgressForm;
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
uses
|
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
||||||
Dialogs, StdCtrls, ComCtrls, ExtCtrls, Math;
|
|
||||||
|
|
||||||
type
|
|
||||||
TfrmProg = class(TForm)
|
|
||||||
prgFile: TProgressBar;
|
|
||||||
lblFile: TLabel;
|
|
||||||
lblNewFile: TLabel;
|
|
||||||
prgNewFile: TProgressBar;
|
|
||||||
lblTotal: TLabel;
|
|
||||||
prgAll: TProgressBar;
|
|
||||||
lblStatus: TLabel;
|
|
||||||
shpFull: TShape;
|
|
||||||
shpLeft: TShape;
|
|
||||||
lblSize: TLabel;
|
|
||||||
procedure GetStatusProc(S: PChar; Point, Total,
|
|
||||||
CurrentSavings: Integer); stdcall;
|
|
||||||
procedure FormCreate(Sender: TObject);
|
|
||||||
private
|
|
||||||
{ Private declarations }
|
|
||||||
public
|
|
||||||
{ Public declarations }
|
|
||||||
FilePos,FileRange,AllPos,AllRange: Byte;
|
|
||||||
CTotal: Integer;
|
|
||||||
t2: TDateTime;
|
|
||||||
end;
|
|
||||||
|
|
||||||
var
|
|
||||||
frmProg: TfrmProg;
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
{$R *.dfm}
|
|
||||||
|
|
||||||
procedure TfrmProg.GetStatusProc(S: PChar; Point, Total, CurrentSavings: Integer); stdcall;
|
|
||||||
var
|
|
||||||
a,b: Integer;
|
|
||||||
j: Single;
|
|
||||||
begin
|
|
||||||
if Length(S)>0 then
|
|
||||||
lblStatus.Caption:=S;
|
|
||||||
if (Total<0) then begin
|
|
||||||
Total:=CTotal;
|
|
||||||
if (Now-t2)*24*3600*10<8 then Exit; //update only every 800 milliseconds
|
|
||||||
end;
|
|
||||||
if (Total>=0) then CTotal:=Total;
|
|
||||||
if (Total>=0) and (Point>=0) then begin
|
|
||||||
a:=(Point*100) div Total;
|
|
||||||
prgFile.Position:=a;
|
|
||||||
b:=FilePos+(a*FileRange) div 100;
|
|
||||||
prgNewFile.Position:=b;
|
|
||||||
prgAll.Position:=AllPos+(b*AllRange) div 100;
|
|
||||||
end;
|
|
||||||
if (CurrentSavings>=0) and (Total>=0) then begin
|
|
||||||
j:=(Total-CurrentSavings)*shpFull.Width/Total;
|
|
||||||
shpLeft.Width:=Max(Round(j),3);
|
|
||||||
lblSize.Caption:=IntToStr(Total-CurrentSavings)+' of '+IntToStr(Total)+' ('+IntToStr(CurrentSavings*100 div Total)+'%)';
|
|
||||||
end;
|
|
||||||
Refresh;
|
|
||||||
t2:=Now;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmProg.FormCreate(Sender: TObject);
|
|
||||||
begin
|
|
||||||
FilePos:=0; FileRange:=100; AllPos:=0; AllRange:=100; CTotal:=-1;
|
|
||||||
t2:=0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.6 KiB |
|
@ -1,163 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<BorlandProject>
|
|
||||||
<PersonalityInfo>
|
|
||||||
<Option>
|
|
||||||
<Option Name="Personality">Delphi.Personality</Option>
|
|
||||||
<Option Name="ProjectType"></Option>
|
|
||||||
<Option Name="Version">1.0</Option>
|
|
||||||
<Option Name="GUID">{F68A969B-E8BB-4D72-9FB4-216CA54EACE0}</Option>
|
|
||||||
</Option>
|
|
||||||
</PersonalityInfo>
|
|
||||||
<Delphi.Personality>
|
|
||||||
<Source>
|
|
||||||
<Source Name="MainSource">VPatchGUI.dpr</Source>
|
|
||||||
</Source>
|
|
||||||
<FileVersion>
|
|
||||||
<FileVersion Name="Version">7.0</FileVersion>
|
|
||||||
</FileVersion>
|
|
||||||
<Compiler>
|
|
||||||
<Compiler Name="A">8</Compiler>
|
|
||||||
<Compiler Name="B">0</Compiler>
|
|
||||||
<Compiler Name="C">1</Compiler>
|
|
||||||
<Compiler Name="D">1</Compiler>
|
|
||||||
<Compiler Name="E">0</Compiler>
|
|
||||||
<Compiler Name="F">0</Compiler>
|
|
||||||
<Compiler Name="G">1</Compiler>
|
|
||||||
<Compiler Name="H">1</Compiler>
|
|
||||||
<Compiler Name="I">1</Compiler>
|
|
||||||
<Compiler Name="J">0</Compiler>
|
|
||||||
<Compiler Name="K">0</Compiler>
|
|
||||||
<Compiler Name="L">1</Compiler>
|
|
||||||
<Compiler Name="M">0</Compiler>
|
|
||||||
<Compiler Name="N">1</Compiler>
|
|
||||||
<Compiler Name="O">1</Compiler>
|
|
||||||
<Compiler Name="P">1</Compiler>
|
|
||||||
<Compiler Name="Q">0</Compiler>
|
|
||||||
<Compiler Name="R">0</Compiler>
|
|
||||||
<Compiler Name="S">0</Compiler>
|
|
||||||
<Compiler Name="T">0</Compiler>
|
|
||||||
<Compiler Name="U">0</Compiler>
|
|
||||||
<Compiler Name="V">1</Compiler>
|
|
||||||
<Compiler Name="W">0</Compiler>
|
|
||||||
<Compiler Name="X">1</Compiler>
|
|
||||||
<Compiler Name="Y">1</Compiler>
|
|
||||||
<Compiler Name="Z">1</Compiler>
|
|
||||||
<Compiler Name="ShowHints">True</Compiler>
|
|
||||||
<Compiler Name="ShowWarnings">True</Compiler>
|
|
||||||
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
|
|
||||||
<Compiler Name="NamespacePrefix"></Compiler>
|
|
||||||
<Compiler Name="GenerateDocumentation">False</Compiler>
|
|
||||||
<Compiler Name="DefaultNamespace"></Compiler>
|
|
||||||
<Compiler Name="SymbolDeprecated">True</Compiler>
|
|
||||||
<Compiler Name="SymbolLibrary">True</Compiler>
|
|
||||||
<Compiler Name="SymbolPlatform">True</Compiler>
|
|
||||||
<Compiler Name="SymbolExperimental">True</Compiler>
|
|
||||||
<Compiler Name="UnitLibrary">True</Compiler>
|
|
||||||
<Compiler Name="UnitPlatform">True</Compiler>
|
|
||||||
<Compiler Name="UnitDeprecated">True</Compiler>
|
|
||||||
<Compiler Name="UnitExperimental">True</Compiler>
|
|
||||||
<Compiler Name="HResultCompat">True</Compiler>
|
|
||||||
<Compiler Name="HidingMember">True</Compiler>
|
|
||||||
<Compiler Name="HiddenVirtual">True</Compiler>
|
|
||||||
<Compiler Name="Garbage">True</Compiler>
|
|
||||||
<Compiler Name="BoundsError">True</Compiler>
|
|
||||||
<Compiler Name="ZeroNilCompat">True</Compiler>
|
|
||||||
<Compiler Name="StringConstTruncated">True</Compiler>
|
|
||||||
<Compiler Name="ForLoopVarVarPar">True</Compiler>
|
|
||||||
<Compiler Name="TypedConstVarPar">True</Compiler>
|
|
||||||
<Compiler Name="AsgToTypedConst">True</Compiler>
|
|
||||||
<Compiler Name="CaseLabelRange">True</Compiler>
|
|
||||||
<Compiler Name="ForVariable">True</Compiler>
|
|
||||||
<Compiler Name="ConstructingAbstract">True</Compiler>
|
|
||||||
<Compiler Name="ComparisonFalse">True</Compiler>
|
|
||||||
<Compiler Name="ComparisonTrue">True</Compiler>
|
|
||||||
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
|
|
||||||
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
|
|
||||||
<Compiler Name="UnsupportedConstruct">True</Compiler>
|
|
||||||
<Compiler Name="FileOpen">True</Compiler>
|
|
||||||
<Compiler Name="FileOpenUnitSrc">True</Compiler>
|
|
||||||
<Compiler Name="BadGlobalSymbol">True</Compiler>
|
|
||||||
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
|
|
||||||
<Compiler Name="InvalidDirective">True</Compiler>
|
|
||||||
<Compiler Name="PackageNoLink">True</Compiler>
|
|
||||||
<Compiler Name="PackageThreadVar">True</Compiler>
|
|
||||||
<Compiler Name="ImplicitImport">True</Compiler>
|
|
||||||
<Compiler Name="HPPEMITIgnored">True</Compiler>
|
|
||||||
<Compiler Name="NoRetVal">True</Compiler>
|
|
||||||
<Compiler Name="UseBeforeDef">True</Compiler>
|
|
||||||
<Compiler Name="ForLoopVarUndef">True</Compiler>
|
|
||||||
<Compiler Name="UnitNameMismatch">True</Compiler>
|
|
||||||
<Compiler Name="NoCFGFileFound">True</Compiler>
|
|
||||||
<Compiler Name="MessageDirective">True</Compiler>
|
|
||||||
<Compiler Name="ImplicitVariants">True</Compiler>
|
|
||||||
<Compiler Name="UnicodeToLocale">True</Compiler>
|
|
||||||
<Compiler Name="LocaleToUnicode">True</Compiler>
|
|
||||||
<Compiler Name="ImagebaseMultiple">True</Compiler>
|
|
||||||
<Compiler Name="SuspiciousTypecast">True</Compiler>
|
|
||||||
<Compiler Name="PrivatePropAccessor">True</Compiler>
|
|
||||||
<Compiler Name="UnsafeType">False</Compiler>
|
|
||||||
<Compiler Name="UnsafeCode">False</Compiler>
|
|
||||||
<Compiler Name="UnsafeCast">False</Compiler>
|
|
||||||
<Compiler Name="OptionTruncated">True</Compiler>
|
|
||||||
<Compiler Name="WideCharReduced">True</Compiler>
|
|
||||||
<Compiler Name="DuplicatesIgnored">True</Compiler>
|
|
||||||
</Compiler>
|
|
||||||
<Linker>
|
|
||||||
<Linker Name="MapFile">0</Linker>
|
|
||||||
<Linker Name="OutputObjs">0</Linker>
|
|
||||||
<Linker Name="ConsoleApp">1</Linker>
|
|
||||||
<Linker Name="DebugInfo">False</Linker>
|
|
||||||
<Linker Name="RemoteSymbols">False</Linker>
|
|
||||||
<Linker Name="GenerateDRC">False</Linker>
|
|
||||||
<Linker Name="MinStackSize">16384</Linker>
|
|
||||||
<Linker Name="MaxStackSize">1048576</Linker>
|
|
||||||
<Linker Name="ImageBase">4194304</Linker>
|
|
||||||
<Linker Name="ExeDescription"></Linker>
|
|
||||||
</Linker>
|
|
||||||
<Directories>
|
|
||||||
<Directories Name="OutputDir">..\..</Directories>
|
|
||||||
<Directories Name="UnitOutputDir"></Directories>
|
|
||||||
<Directories Name="PackageDLLOutputDir"></Directories>
|
|
||||||
<Directories Name="PackageDCPOutputDir"></Directories>
|
|
||||||
<Directories Name="SearchPath"></Directories>
|
|
||||||
<Directories Name="Packages">vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;qrpt;teeui;teedb;tee;dss;teeqr;visualclx;visualdbclx;dsnapcrba;dsnapcon;VclSmp;vclshlctrls;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;nmfast;webdsnap;websnap;dbexpress;dbxcds;indy;dclOffice2k;VirtualTreesD6;packageTib;inetdb</Directories>
|
|
||||||
<Directories Name="Conditionals"></Directories>
|
|
||||||
<Directories Name="DebugSourceDirs"></Directories>
|
|
||||||
<Directories Name="UsePackages">False</Directories>
|
|
||||||
</Directories>
|
|
||||||
<Parameters>
|
|
||||||
<Parameters Name="RunParams"></Parameters>
|
|
||||||
<Parameters Name="HostApplication"></Parameters>
|
|
||||||
<Parameters Name="Launcher"></Parameters>
|
|
||||||
<Parameters Name="UseLauncher">False</Parameters>
|
|
||||||
<Parameters Name="DebugCWD"></Parameters>
|
|
||||||
</Parameters>
|
|
||||||
<VersionInfo>
|
|
||||||
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
|
|
||||||
<VersionInfo Name="AutoIncBuild">True</VersionInfo>
|
|
||||||
<VersionInfo Name="MajorVer">3</VersionInfo>
|
|
||||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
|
||||||
<VersionInfo Name="Release">0</VersionInfo>
|
|
||||||
<VersionInfo Name="Build">28</VersionInfo>
|
|
||||||
<VersionInfo Name="Debug">False</VersionInfo>
|
|
||||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
|
||||||
<VersionInfo Name="Special">False</VersionInfo>
|
|
||||||
<VersionInfo Name="Private">False</VersionInfo>
|
|
||||||
<VersionInfo Name="DLL">False</VersionInfo>
|
|
||||||
<VersionInfo Name="Locale">1043</VersionInfo>
|
|
||||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
|
||||||
</VersionInfo>
|
|
||||||
<VersionInfoKeys>
|
|
||||||
<VersionInfoKeys Name="CompanyName">Van de Sande Productions</VersionInfoKeys>
|
|
||||||
<VersionInfoKeys Name="FileDescription">VG - VPatch GUI</VersionInfoKeys>
|
|
||||||
<VersionInfoKeys Name="FileVersion">3.0.0.28</VersionInfoKeys>
|
|
||||||
<VersionInfoKeys Name="InternalName">VPatchGUI</VersionInfoKeys>
|
|
||||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
|
||||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
|
||||||
<VersionInfoKeys Name="OriginalFilename">VPatchGUI.exe</VersionInfoKeys>
|
|
||||||
<VersionInfoKeys Name="ProductName">VPatch Graphical User Interface</VersionInfoKeys>
|
|
||||||
<VersionInfoKeys Name="ProductVersion">3.0</VersionInfoKeys>
|
|
||||||
<VersionInfoKeys Name="Comments">Official website: http://www.tibed.net/vpatch</VersionInfoKeys>
|
|
||||||
</VersionInfoKeys>
|
|
||||||
</Delphi.Personality>
|
|
||||||
</BorlandProject>
|
|
|
@ -1,39 +0,0 @@
|
||||||
-$A8
|
|
||||||
-$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
|
|
||||||
-E"..\.."
|
|
||||||
-LE"K:\Documents and Settings\Koen van de Sande\My Documents\Borland Studio Projects\Bpl"
|
|
||||||
-LN"K:\Documents and Settings\Koen van de Sande\My Documents\Borland Studio Projects\Bpl"
|
|
||||||
-w-UNSAFE_TYPE
|
|
||||||
-w-UNSAFE_CODE
|
|
||||||
-w-UNSAFE_CAST
|
|
|
@ -1,19 +0,0 @@
|
||||||
program VPatchGUI;
|
|
||||||
|
|
||||||
uses
|
|
||||||
Forms,
|
|
||||||
MainForm in 'MainForm.pas' {frmMain},
|
|
||||||
PatchClasses in 'PatchClasses.pas',
|
|
||||||
DLLWrapper in 'DLLWrapper.pas',
|
|
||||||
AboutForm in 'AboutForm.pas' {frmAbout},
|
|
||||||
VDSP_CRC in 'vdsp_crc.pas',
|
|
||||||
OSUtil in 'OSUtil.pas';
|
|
||||||
|
|
||||||
{$R *.res}
|
|
||||||
|
|
||||||
begin
|
|
||||||
Application.Initialize;
|
|
||||||
Application.Title := 'VPatch GUI';
|
|
||||||
Application.CreateForm(TfrmMain, frmMain);
|
|
||||||
Application.Run;
|
|
||||||
end.
|
|
Binary file not shown.
|
@ -1,5 +0,0 @@
|
||||||
@echo off
|
|
||||||
echo Cleaning up all non-source files
|
|
||||||
del /S *.~*
|
|
||||||
del /S *.dcu
|
|
||||||
echo done.
|
|
|
@ -1,115 +0,0 @@
|
||||||
unit VDSP_CRC;
|
|
||||||
|
|
||||||
{
|
|
||||||
VPatch 2 - CRC
|
|
||||||
==============
|
|
||||||
|
|
||||||
(c) 2002-2003 Van de Sande Productions
|
|
||||||
|
|
||||||
This unit can calculate the standard ZIP CRC32 for a filestream.
|
|
||||||
|
|
||||||
What's new
|
|
||||||
----------
|
|
||||||
2.0 20030811 Koen Initial documentation
|
|
||||||
}
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
uses Classes;
|
|
||||||
|
|
||||||
//var
|
|
||||||
//this is the CRC32 table
|
|
||||||
// CRCTable: Array[0..255] of LongWord;
|
|
||||||
{= (
|
|
||||||
//this table used to be inside the exe, but now it has been replaced by a calculation routine which saves 1 KB
|
|
||||||
$0,$77073096,$EE0E612C,$990951BA,$76DC419,
|
|
||||||
$706AF48F,$E963A535,$9E6495A3,$EDB8832,$79DCB8A4,
|
|
||||||
$E0D5E91E,$97D2D988,$9B64C2B,$7EB17CBD,$E7B82D07,
|
|
||||||
$90BF1D91,$1DB71064,$6AB020F2,$F3B97148,$84BE41DE,
|
|
||||||
$1ADAD47D,$6DDDE4EB,$F4D4B551,$83D385C7,$136C9856,
|
|
||||||
$646BA8C0,$FD62F97A,$8A65C9EC,$14015C4F,$63066CD9,
|
|
||||||
$FA0F3D63,$8D080DF5,$3B6E20C8,$4C69105E,$D56041E4,
|
|
||||||
$A2677172,$3C03E4D1,$4B04D447,$D20D85FD,$A50AB56B,
|
|
||||||
$35B5A8FA,$42B2986C,$DBBBC9D6,$ACBCF940,$32D86CE3,
|
|
||||||
$45DF5C75,$DCD60DCF,$ABD13D59,$26D930AC,$51DE003A,
|
|
||||||
$C8D75180,$BFD06116,$21B4F4B5,$56B3C423,$CFBA9599,
|
|
||||||
$B8BDA50F,$2802B89E,$5F058808,$C60CD9B2,$B10BE924,
|
|
||||||
$2F6F7C87,$58684C11,$C1611DAB,$B6662D3D,$76DC4190,
|
|
||||||
$1DB7106,$98D220BC,$EFD5102A,$71B18589,$6B6B51F,
|
|
||||||
$9FBFE4A5,$E8B8D433,$7807C9A2,$F00F934,$9609A88E,
|
|
||||||
$E10E9818,$7F6A0DBB,$86D3D2D,$91646C97,$E6635C01,
|
|
||||||
$6B6B51F4,$1C6C6162,$856530D8,$F262004E,$6C0695ED,
|
|
||||||
$1B01A57B,$8208F4C1,$F50FC457,$65B0D9C6,$12B7E950,
|
|
||||||
$8BBEB8EA,$FCB9887C,$62DD1DDF,$15DA2D49,$8CD37CF3,
|
|
||||||
$FBD44C65,$4DB26158,$3AB551CE,$A3BC0074,$D4BB30E2,
|
|
||||||
$4ADFA541,$3DD895D7,$A4D1C46D,$D3D6F4FB,$4369E96A,
|
|
||||||
$346ED9FC,$AD678846,$DA60B8D0,$44042D73,$33031DE5,
|
|
||||||
$AA0A4C5F,$DD0D7CC9,$5005713C,$270241AA,$BE0B1010,
|
|
||||||
$C90C2086,$5768B525,$206F85B3,$B966D409,$CE61E49F,
|
|
||||||
$5EDEF90E,$29D9C998,$B0D09822,$C7D7A8B4,$59B33D17,
|
|
||||||
$2EB40D81,$B7BD5C3B,$C0BA6CAD,$EDB88320,$9ABFB3B6,
|
|
||||||
$3B6E20C,$74B1D29A,$EAD54739,$9DD277AF,$4DB2615,
|
|
||||||
$73DC1683,$E3630B12,$94643B84,$D6D6A3E,$7A6A5AA8,
|
|
||||||
$E40ECF0B,$9309FF9D,$A00AE27,$7D079EB1,$F00F9344,
|
|
||||||
$8708A3D2,$1E01F268,$6906C2FE,$F762575D,$806567CB,
|
|
||||||
$196C3671,$6E6B06E7,$FED41B76,$89D32BE0,$10DA7A5A,
|
|
||||||
$67DD4ACC,$F9B9DF6F,$8EBEEFF9,$17B7BE43,$60B08ED5,
|
|
||||||
$D6D6A3E8,$A1D1937E,$38D8C2C4,$4FDFF252,$D1BB67F1,
|
|
||||||
$A6BC5767,$3FB506DD,$48B2364B,$D80D2BDA,$AF0A1B4C,
|
|
||||||
$36034AF6,$41047A60,$DF60EFC3,$A867DF55,$316E8EEF,
|
|
||||||
$4669BE79,$CB61B38C,$BC66831A,$256FD2A0,$5268E236,
|
|
||||||
$CC0C7795,$BB0B4703,$220216B9,$5505262F,$C5BA3BBE,
|
|
||||||
$B2BD0B28,$2BB45A92,$5CB36A04,$C2D7FFA7,$B5D0CF31,
|
|
||||||
$2CD99E8B,$5BDEAE1D,$9B64C2B0,$EC63F226,$756AA39C,
|
|
||||||
$26D930A,$9C0906A9,$EB0E363F,$72076785,$5005713,
|
|
||||||
$95BF4A82,$E2B87A14,$7BB12BAE,$CB61B38,$92D28E9B,
|
|
||||||
$E5D5BE0D,$7CDCEFB7,$BDBDF21,$86D3D2D4,$F1D4E242,
|
|
||||||
$68DDB3F8,$1FDA836E,$81BE16CD,$F6B9265B,$6FB077E1,
|
|
||||||
$18B74777,$88085AE6,$FF0F6A70,$66063BCA,$11010B5C,
|
|
||||||
$8F659EFF,$F862AE69,$616BFFD3,$166CCF45,$A00AE278,
|
|
||||||
$D70DD2EE,$4E048354,$3903B3C2,$A7672661,$D06016F7,
|
|
||||||
$4969474D,$3E6E77DB,$AED16A4A,$D9D65ADC,$40DF0B66,
|
|
||||||
$37D83BF0,$A9BCAE53,$DEBB9EC5,$47B2CF7F,$30B5FFE9,
|
|
||||||
$BDBDF21C,$CABAC28A,$53B39330,$24B4A3A6,$BAD03605,
|
|
||||||
$CDD70693,$54DE5729,$23D967BF,$B3667A2E,$C4614AB8,
|
|
||||||
$5D681B02,$2A6F2B94,$B40BBE37,$C30C8EA1,$5A05DF1B,
|
|
||||||
$2D02EF8D}
|
|
||||||
|
|
||||||
function FileCRC(fs: TFileStream): Integer;
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
function FileCRC(fs: TFileStream): Integer;
|
|
||||||
const
|
|
||||||
CRCBlock = 4096;
|
|
||||||
var
|
|
||||||
CRCTable: Array[0..255] of LongWord;
|
|
||||||
c: LongWord; //!!! this must be an unsigned 32-bits var!
|
|
||||||
Block: Array[0..CRCBlock-1] of Byte;
|
|
||||||
i,j,bytesread: Integer;
|
|
||||||
begin
|
|
||||||
//this used to be the InitCRC procedure
|
|
||||||
For i:= 0 To 255 do begin
|
|
||||||
c:= i;
|
|
||||||
For j:= 0 To 7 do begin
|
|
||||||
If (c And 1)=0 Then begin
|
|
||||||
c:= (c div 2);
|
|
||||||
end Else begin
|
|
||||||
c:= (c div 2) Xor $EDB88320;
|
|
||||||
End;
|
|
||||||
end;
|
|
||||||
CRCTable[i]:= c;
|
|
||||||
end;
|
|
||||||
// InitCRC procedure end;
|
|
||||||
c:=$FFFFFFFF;
|
|
||||||
fs.Seek(0,soFromBeginning);
|
|
||||||
for i:=0 to (fs.Size div CRCBlock)+1 do begin
|
|
||||||
bytesread:=fs.Read(Block,CRCBlock);
|
|
||||||
for j:=0 to bytesread-1 do begin
|
|
||||||
c:=CRCTable[(c and $FF) xor Block[j]] xor (((c and $FFFFFF00) div 256) and $FFFFFF);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
FileCRC:=c xor $FFFFFFFF;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
|
Loading…
Add table
Add a link
Reference in a new issue