From 6939c3378240822015003722f2bdc61767c8b6c4 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 2 May 2008 20:21:08 +0000 Subject: [PATCH] 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 --- Contrib/VPatch/Source/GUI/AboutForm.dfm | Bin 4749 -> 0 bytes Contrib/VPatch/Source/GUI/AboutForm.pas | 31 - Contrib/VPatch/Source/GUI/DLLWrapper.pas | 51 - Contrib/VPatch/Source/GUI/MainForm.dfm | 992 -------------------- Contrib/VPatch/Source/GUI/MainForm.pas | 539 ----------- Contrib/VPatch/Source/GUI/OSUtil.pas | 114 --- Contrib/VPatch/Source/GUI/PatchClasses.pas | 548 ----------- Contrib/VPatch/Source/GUI/ProgressForm.dfm | 102 -- Contrib/VPatch/Source/GUI/ProgressForm.pas | 74 -- Contrib/VPatch/Source/GUI/VPatch.ico | Bin 3638 -> 0 bytes Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj | 163 ---- Contrib/VPatch/Source/GUI/VPatchGUI.cfg | 39 - Contrib/VPatch/Source/GUI/VPatchGUI.dpr | 19 - Contrib/VPatch/Source/GUI/VPatchGUI.res | Bin 4616 -> 0 bytes Contrib/VPatch/Source/GUI/clean.bat | 5 - Contrib/VPatch/Source/GUI/vdsp_crc.pas | 115 --- 16 files changed, 2792 deletions(-) delete mode 100644 Contrib/VPatch/Source/GUI/AboutForm.dfm delete mode 100644 Contrib/VPatch/Source/GUI/AboutForm.pas delete mode 100644 Contrib/VPatch/Source/GUI/DLLWrapper.pas delete mode 100644 Contrib/VPatch/Source/GUI/MainForm.dfm delete mode 100644 Contrib/VPatch/Source/GUI/MainForm.pas delete mode 100644 Contrib/VPatch/Source/GUI/OSUtil.pas delete mode 100644 Contrib/VPatch/Source/GUI/PatchClasses.pas delete mode 100644 Contrib/VPatch/Source/GUI/ProgressForm.dfm delete mode 100644 Contrib/VPatch/Source/GUI/ProgressForm.pas delete mode 100644 Contrib/VPatch/Source/GUI/VPatch.ico delete mode 100644 Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj delete mode 100644 Contrib/VPatch/Source/GUI/VPatchGUI.cfg delete mode 100644 Contrib/VPatch/Source/GUI/VPatchGUI.dpr delete mode 100644 Contrib/VPatch/Source/GUI/VPatchGUI.res delete mode 100644 Contrib/VPatch/Source/GUI/clean.bat delete mode 100644 Contrib/VPatch/Source/GUI/vdsp_crc.pas diff --git a/Contrib/VPatch/Source/GUI/AboutForm.dfm b/Contrib/VPatch/Source/GUI/AboutForm.dfm deleted file mode 100644 index eab44065b4c61366fedb8636410192d13203cfc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4749 zcmeI0-%lIa6~_;-FdiU36y>4Yhv0{3MNyWpRDDQ=!h!<@B`F9@@)V_mJ%F`i4;l|4 ztfG{Mjxjc_a3TRwgtApvRh7H~it>a|BUP2)A<{kst)fVk_+jJ4U|Y7-s<+=eV}nUp z{(@Zj%$;-3=iYPX%=MkQ!z#(y-gC31wX4rb4QIbSN962oZxEdWnzyB29no!tlh1C* z1A5s%sm!Skmnv1Qs^*rpPM7NQS5^0WddK{_?7b=bMksIU)yEWBu=V?|c_c+06dcm9 z?ooXe<>s)}4#gw;^bXlGIHZ^TKvkB0+vC=U%IZqW9jc;gg6L9Obzi&WlB?TQpI+}6 zk~F`p3umsiwYT)$aNc!vwDk10IV&xz*{9m2-1hj~>Znt`uUDA{%S&lSG_~JLUb*7b z&0c%2Zq*A?y7D{gMTwaqRlDwn_-p`Ja&4eLAk11QwKH4 z%kPcl_7|qxvzFUZd){lQ-PSUqtG%9YWwE;3znx1B~u)v7UgTDa27JMW4Ch+ax`@nm_8{p@` zFM?kMUkAP!yc4_!{6p}M!9NGT1bzkl8u)ea8{n^kzXSdO_^04sfqx4=37&z6D3EE$ z0)(#Cfo}%y1n&X=5d35C&%rN&Uje@cejWS<`19Z|fJY{uHiB;g-wwVHycfIyejfZH z_|=or1O6iT4)6;2Y48gtrH8!W4e;~e7s0QBKOsG|1bzkl8u)ea8{kh!4>9lzJOj_b zGtU2fdWbE7Uje@cejWS<_@7S?F)w%n{5<$Y@T=f4Q;wfKMC>B?4)6;2Y48i2KM(!_ zW?L<0TO(#$6J}dGW?LV4FL(p|JorWMtKjRvH-mSA_ke#0{xSIH;FrL!fL{Z@4t@jt zRq%JfKLGy}{44Np!6(5p@DR*rhWX4epXf^P)h1il@7A9yc#1N=PrMewWOD=I4J+_`g9Q&U5iE?uH4SFTW7TO0NC^w8bA zck$m+=>GltWEciLdi02%J$ptkUc8`}FJIE@*RSc#n>Y0C-8+iMS6UJmx=sxY1UHBmYYXn3&m#$G9yT*4TJ2zrjq zaO=cGBpjZF9#5ykp&NJv2LGn0g`|35P--e3sWBd_RU!c-%`nWX;Vn;Qc7?sU8Os4r z!7^NrmlX+g-nM*(=zR^O8Gri^#B7I+ud{Z@*ATuQo8>dBGLN6u*-z{2r*-zzI$N|P zoOqgu$75EB=Mo=~JKLL^SdRI69KfQsxw#dKA2PAcXnwKg>v3>06rP&<>(*9b-LtHP z-h9QLn4F5F#qDj=%eL9MU^Z9uU@#O8XVQO)a{%VKS(q*7W_LIUPhu(0KPN<%K57q7 z1v4xX3YklBESh4B4`2q*`v*fT7|DdEW_Ha0qH~Oy&lYoRewc~`GjNcy?t z35bC}>@dHSOW;9MWDliwvpa{~F~A;UNkK%AbD}8j;jwk#+{AM6G~3S#{AstpZxd3< z#8Ep%1(x|KxyQ|W;-0W;-I_xe*;tAtv%(&Vm=t$oN4#?^n$4sV*5H8wkIeCVAsF#}f19{nJAbBI`s;WnB5j~kv6F@||y z*?%fHEvgg7f!(m?MUfGw2_seLZ)A^}Ol`+V?Wa=vV#U~)aa??H!+IOwGj;3m9icE% zXo8z_I~Mfu00AS5mj_;i-9X^u0QYB6_{~Q(BNj$Q&6CE)%NSfXzbC3$COR`tBoqs8 z - 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 diff --git a/Contrib/VPatch/Source/GUI/MainForm.pas b/Contrib/VPatch/Source/GUI/MainForm.pas deleted file mode 100644 index fda49fc6..00000000 --- a/Contrib/VPatch/Source/GUI/MainForm.pas +++ /dev/null @@ -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. diff --git a/Contrib/VPatch/Source/GUI/OSUtil.pas b/Contrib/VPatch/Source/GUI/OSUtil.pas deleted file mode 100644 index fb63c409..00000000 --- a/Contrib/VPatch/Source/GUI/OSUtil.pas +++ /dev/null @@ -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. diff --git a/Contrib/VPatch/Source/GUI/PatchClasses.pas b/Contrib/VPatch/Source/GUI/PatchClasses.pas deleted file mode 100644 index b56ec8f1..00000000 --- a/Contrib/VPatch/Source/GUI/PatchClasses.pas +++ /dev/null @@ -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 (iSize) 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=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. - \ No newline at end of file diff --git a/Contrib/VPatch/Source/GUI/ProgressForm.dfm b/Contrib/VPatch/Source/GUI/ProgressForm.dfm deleted file mode 100644 index 787fec9d..00000000 --- a/Contrib/VPatch/Source/GUI/ProgressForm.dfm +++ /dev/null @@ -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 diff --git a/Contrib/VPatch/Source/GUI/ProgressForm.pas b/Contrib/VPatch/Source/GUI/ProgressForm.pas deleted file mode 100644 index b2fca0ac..00000000 --- a/Contrib/VPatch/Source/GUI/ProgressForm.pas +++ /dev/null @@ -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. diff --git a/Contrib/VPatch/Source/GUI/VPatch.ico b/Contrib/VPatch/Source/GUI/VPatch.ico deleted file mode 100644 index 2f921e0ba4f20b73b53abec61e5baac21776851e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3638 zcmeI!&r2I=7{KwT>#ox|wG_|VgDfIFc`Jz7OT}~1WAVCz-YXP0hn-2BNfuKfNfBvb z%d*(3O6e&Gy)5XVx5`p_^2dy6CYcEd?6U8E-TOXiO4Pa zPVU|nj<@CKA4Gl>k^A?P`k%K&e&gC0*C4{>*m2M&y`s<0>uC{Ql1?WF-Z_;@r6QHT zD-!(m2gxbo3Gs~BAl?xli9kk2mCVd2SzJ`Iwx(ozTZs(ehw)?h3H&5}8b60$!dv)F z{0@E}KaNk~XYmX875qAW3%`rs!yn)e@kjV6{1f~${09CV{v$rXD?G7CtP$IUOpW7H z_*wh{eg(gd-@@Jd?+_!;~neht5^{Sbbb)i%azn_#s~vf8FuZFBe~yoKMy z@8I|Gg;;)_lWyz8HY(r;fC@7S_zJ5xOKJ)J8Qbk)ve zvTnXj{q#kr?z%aLdRrBBHj~M_Zi%`dMXr<0W-?_nLsg`v;<{5RT5-J^Q)kKufM-QY znXc=sW+|lYrsL#S9V>{NGeT1-9zy4NC$jTAo8r-H(th1k&Az;87DFbn)0#seuT-wr zK5v`0?e*qY+EpGjeR(IWwa$9Yxj|j2z%UtP*)+{MkFE30W7hT~)o2;|Y1e4nHo~BK zF)sx}HNOOPovxd8qn3O%y)If_sDhSJr(o@$ zWnJ7-snGY?y0Xw#4gME|%cYWaxp!?mi)@lFTpE0Q3(r%0O>z6HZZB0&u?~{_mu{zh z$EtOnw~}?ym*li+h28d6>tZUdompWc3>)U)^0IZ+_G_fAemr`u-< z`uYa8)#A^CE=J9^zaC(tMA2V9hoafND@Q$PDm|d+GWA(xq#|-BEn@VCzNX_dc_PKa c*6|B%bUXF0+=}Br8BjWu7}rE%5^Jdc0rkQH#Q*>R diff --git a/Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj b/Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj deleted file mode 100644 index 4a4fb026..00000000 --- a/Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - VPatchGUI.dpr - - - 7.0 - - - 8 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 1 - 1 - 1 - True - True - WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - - False - - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - False - False - False - True - True - True - - - 0 - 0 - 1 - False - False - False - 16384 - 1048576 - 4194304 - - - - ..\.. - - - - - 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 - - - False - - - - - - False - - - - True - True - 3 - 0 - 0 - 28 - False - False - False - False - False - 1043 - 1252 - - - Van de Sande Productions - VG - VPatch GUI - 3.0.0.28 - VPatchGUI - - - VPatchGUI.exe - VPatch Graphical User Interface - 3.0 - Official website: http://www.tibed.net/vpatch - - - diff --git a/Contrib/VPatch/Source/GUI/VPatchGUI.cfg b/Contrib/VPatch/Source/GUI/VPatchGUI.cfg deleted file mode 100644 index 4a377101..00000000 --- a/Contrib/VPatch/Source/GUI/VPatchGUI.cfg +++ /dev/null @@ -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 diff --git a/Contrib/VPatch/Source/GUI/VPatchGUI.dpr b/Contrib/VPatch/Source/GUI/VPatchGUI.dpr deleted file mode 100644 index 11ad0e9c..00000000 --- a/Contrib/VPatch/Source/GUI/VPatchGUI.dpr +++ /dev/null @@ -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. diff --git a/Contrib/VPatch/Source/GUI/VPatchGUI.res b/Contrib/VPatch/Source/GUI/VPatchGUI.res deleted file mode 100644 index 232e82c1e39d15d5ede555e0538afeda76afc9d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4616 zcmeI0-)mD>9KgR_JLBEMCeD|^uwnE;#C2QsVT#xdwbqACaoRWO+~$u!s-kXM5Z4E9 zlHS`uqmX7uQP>zmU)v(WpcH%=v=6>nhWIf0BWX<9BqXrm+2@>_+oY}bFYu(_-19x( z&-tG3`QCHSJ*kLD5K+n#sw>L5w|#pfOoOp)+Vp;t4{f8e2?-(%vXO67@veT|>xR~6 z{-m!@*APBb#>dBH{O@te|Mfeq`;e2!b>t562ziR+rKLqlXQz^ISjpg^l93UD-U7cB zej9un{9gDD_!ICw@HYG~{3!e+{C4rKL$SmKLtMxKLfu7ek(kgywe81 z7rq1j1bh#?4L=M&3O~7Cdf;2&JK@9dgYYBkrAK<;ZTMmMQTR#tb}tXR+6;oISl!-wE+z~6?y4?hM!0Y3#l z4L<|F1%501HuyI9z3?6IC*XVFZTMmMQTR#t4I4Jd=FOX>xw%<(?ARf@ckh;i2M@}z zW5=YsyPIb#EZ44G6Wg}s)~#D|_wHSJ@ZfqkQAuQeq-Yuk}XG`WyTYg;0r)kriNbK@2C`CqEK>kc^R z6_wQ1Xf*D+L+F`e(RE_6Xf$O-QAKjf=+02mHhQ)gcOA#Etdvnj%EjCgB~Vo*Tgd10 z0pCh%rVz-NweM<4msGJF@ijsyq9<#5x=<|i>R7!JkB~ImHnY(!za(>k#Z=N8K&N1w zq5B%^1YNg{zbEp%8ENOSUnQm;+aGMLL7Xb3_u;p+e_6c`2Wk5PS>A`6Q2e6z;5Ym5 zn|=7rKKy1M_VcH~E}f|{>DfeeGuQidtlx15 zQoqj4`TL@0^?U0bJ=#AIFIw~SW|Vo;**BXVKNfRbw^Y2D(E#Su5N2<1)13j_ezyAR zd&E-3m3DU^R#I`tF-5Jcm?I^}iT68p-gGBIODSGb%XX(2iSzC<(QBmgTS=Ab?3R@*ki=?lE{V8O z1GWC~h!u&XYx$K*mKRZ--6`bC3$^YzSX3$>un00`S=J)2wdKJLR>>6AQaPaChD%Eu z1BHBcrCkyMReF(M)aFHNF_80aO>KyBx}fsqz#_%UTeln zqS{g)V_yB(gTZr6G#G`CO8g@0F`gn(Av*4B7r%qE@fWF15pE#BMWw z2X$TkY|6dVo<$nvL(}42Ig**8k5iuaY6F*><|y`!T#-wh*U!sYPTwI3%V|8Hmost! z=3B#jD!b$}*~#p85rdBCn0$c0{V+XpQBJ}4l7&-fr_BIerY$Hxpa+Rr6JGr&qg|l> zqkPZEA?oMlvgy;wuknWE7!J_$GK`Mx;xehhE;)qHkC84pisvg(=g3wb8P$*Ek8?oYrOy!);aU89ef%71 z&CABxzO9UL4I#h8-M}pBbFwmzD`$8KuNRqZh&k&BgUtD|i8xpn{TXcE8~;0`X^sEY z8S(NV%)AxWyQeyGoeO