summaryrefslogtreecommitdiff
path: root/tools/iceit
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2013-01-18 09:05:25 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2013-01-18 09:05:25 +0000
commite8084995ccc9379b805c700e3aba6a0e633367e3 (patch)
tree2730f7ae979c1a96ce6825775ac13f9f0b99da97 /tools/iceit
parentc8e5289d64b3de8ca4db62c944d9823c38553821 (diff)
- iceit patcher fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@3152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/iceit')
-rw-r--r--tools/iceit/Unit1.dfm2
-rw-r--r--tools/iceit/Unit1.pas33
-rw-r--r--tools/iceit/bin/iceit.exebin183808 -> 183808 bytes
3 files changed, 16 insertions, 19 deletions
diff --git a/tools/iceit/Unit1.dfm b/tools/iceit/Unit1.dfm
index 91147e662c..026a67fabd 100644
--- a/tools/iceit/Unit1.dfm
+++ b/tools/iceit/Unit1.dfm
@@ -3,7 +3,7 @@ object Form1: TForm1
Top = 134
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
- Caption = 'Miranda ICE Icon pack patcher | v.0.2.b'
+ Caption = 'Miranda ICE Icon pack patcher | v.0.3.b'
ClientHeight = 320
ClientWidth = 336
Color = clBtnFace
diff --git a/tools/iceit/Unit1.pas b/tools/iceit/Unit1.pas
index e49f9f40d8..0381147e42 100644
--- a/tools/iceit/Unit1.pas
+++ b/tools/iceit/Unit1.pas
@@ -28,7 +28,6 @@ type
procedure SelectNoneClick(Sender: TObject);
procedure IceItClick(Sender: TObject);
procedure MirandaPathClick(Sender: TObject);
- procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
function FillCombo(typ:string):integer;
@@ -360,7 +359,7 @@ begin
raise;
end;
if not EndUpdateResource(H, False) then
- ErrorWithLastError('EndUpdateResource failed');
+ ErrorWithLastError('EndUpdateResource failed');
Result := False;
finally
FreeMem(Ico);
@@ -410,14 +409,19 @@ var
xTemp: String;
MaxCount: Integer;
res:String;
+ size:Integer;
begin
if FileExists(Edit1.Text) then
begin
+ AssignFile(Log, 'iceit.log');
+ Rewrite(Log);
+
MaxCount := 0;
for n := 0 to CheckListBox1.Items.Count - 1 do
+ begin
if CheckListBox1.Checked[n] then inc(MaxCount);
- for n := 0 to CheckListBox1.Items.Count - 1 do
CheckListBox1.Items[n] := SetValue(CheckListBox1.Items[n], 1, 'NONE');
+ end;
MirandaPath := ExtractFileDir(Edit1.Text);
ProgressBar1.Min := 0;
ProgressBar1.Max := MaxCount;
@@ -430,8 +434,8 @@ begin
S := LowerCase(S);
// keep the order as for FillCombo function (atm Core<Plugins<Icons)
if n < PluginsItem then F := '\core'
- else if n < IconsItem then F := '\plugins'
- else F := '\icons';
+ else if n < IconsItem then F := '\icons'
+ else F := '\plugins';
StatusBar1.Panels[0].Text := ' Processing: ' + S;
if (S = 'miranda32') or (S = 'miranda64') then
@@ -457,7 +461,7 @@ begin
xTemp := xFilePath + '.temp';
CopyFile(PChar(xFilePath), Pchar(xTemp), False);
- if not ProgressUpdate(xTemp, xIcoPath) then
+ if ProgressUpdate(xTemp, xIcoPath) then
res := 'ERROR'
else
begin
@@ -469,7 +473,11 @@ begin
end;
if FileExists(xTemp) then DeleteFile(xTemp);
end;
- end // for
+ end; // for
+
+ size:=FileSize(Log);
+ CloseFile(Log);
+ if size = 0 then DeleteFile('iceit.log');
end
else
begin
@@ -558,8 +566,6 @@ end;
procedure TForm1.FormCreate(Sender: TObject);
begin
- AssignFile(Log, 'iceit.log');
- Rewrite(Log);
IcePath := ExtractFilePath(ParamStr(0));
CoreItem := FillCombo('core');
@@ -567,15 +573,6 @@ begin
IconsItem := FillCombo('plugins');
end;
-procedure TForm1.FormDestroy(Sender: TObject);
-var
- size:integer;
-begin
- size:=FileSize(Log);
- CloseFile(Log);
- if size = 0 then DeleteFile('iceit.log');
-end;
-
function TForm1.ProgressUpdate(const FileName, IcoName: String): Boolean;
var
IconGroups: TStringList;
diff --git a/tools/iceit/bin/iceit.exe b/tools/iceit/bin/iceit.exe
index 5b46ccba5e..2c5c2add3d 100644
--- a/tools/iceit/bin/iceit.exe
+++ b/tools/iceit/bin/iceit.exe
Binary files differ