fixed design bug (adds now Skipped when file is skipped)
fixed ESF install bug (didn't install, invalid pathes)
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							| @@ -10,6 +10,7 @@ type TOS = (osWindows, osLinux32, osLinux64); | |||||||
|  |  | ||||||
| procedure AddStatus(Text: String; Color: TColor; ShowTime: Boolean = True); | procedure AddStatus(Text: String; Color: TColor; ShowTime: Boolean = True); | ||||||
| procedure AddDone(Additional: String = ''); | procedure AddDone(Additional: String = ''); | ||||||
|  | procedure AddSkipped; | ||||||
| function DelDir(Dir: string): Boolean; | function DelDir(Dir: string): Boolean; | ||||||
| procedure MakeDir(Dir: String); | procedure MakeDir(Dir: String); | ||||||
| procedure DownloadFile(eFile: String; eDestination: String); | procedure DownloadFile(eFile: String; eDestination: String); | ||||||
| @@ -70,7 +71,18 @@ begin | |||||||
|     frmMain.rtfDetails.SelText := ' Done.' |     frmMain.rtfDetails.SelText := ' Done.' | ||||||
|   else |   else | ||||||
|     frmMain.rtfDetails.SelText := ' Done, ' + Additional + '.'; |     frmMain.rtfDetails.SelText := ' Done, ' + Additional + '.'; | ||||||
|   frmMain.rtfDetails.Perform(WM_VSCROLL, SB_BOTTOM, 0);  |   frmMain.rtfDetails.Perform(WM_VSCROLL, SB_BOTTOM, 0); | ||||||
|  |  | ||||||
|  |   frmMain.Repaint; | ||||||
|  |   Application.ProcessMessages; | ||||||
|  | end; | ||||||
|  |  | ||||||
|  | procedure AddSkipped; | ||||||
|  | begin | ||||||
|  |   frmMain.rtfDetails.SelStart := Length(frmMain.rtfDetails.Text); | ||||||
|  |   frmMain.rtfDetails.SelAttributes.Color := $0000ECFF; | ||||||
|  |   frmMain.rtfDetails.SelText := ' Skipped.'; | ||||||
|  |   frmMain.rtfDetails.Perform(WM_VSCROLL, SB_BOTTOM, 0); | ||||||
|  |  | ||||||
|   frmMain.Repaint; |   frmMain.Repaint; | ||||||
|   Application.ProcessMessages; |   Application.ProcessMessages; | ||||||
| @@ -140,7 +152,11 @@ end; | |||||||
| procedure UploadFile(eFile: String; eDestination: String; CopyConfig: Boolean = True); | procedure UploadFile(eFile: String; eDestination: String; CopyConfig: Boolean = True); | ||||||
| var TransferType: TIdFTPTransferType; | var TransferType: TIdFTPTransferType; | ||||||
| begin | begin | ||||||
|   if (Pos('config', eFile) > 0) and (not CopyConfig) then exit; |   if (Pos('config', eFile) > 0) and (not CopyConfig) then begin | ||||||
|  |     AddSkipped; | ||||||
|  |     exit; | ||||||
|  |   end; | ||||||
|  |    | ||||||
|   eDestination := StringReplace(eDestination, '\', '/', [rfReplaceAll]); |   eDestination := StringReplace(eDestination, '\', '/', [rfReplaceAll]); | ||||||
|  |  | ||||||
|   // the same as in DownloadFile() |   // the same as in DownloadFile() | ||||||
| @@ -155,6 +171,7 @@ begin | |||||||
|     frmMain.IdFTP.TransferType := TransferType; |     frmMain.IdFTP.TransferType := TransferType; | ||||||
|   // upload the file |   // upload the file | ||||||
|   frmMain.IdFTP.Put(eFile, eDestination); |   frmMain.IdFTP.Put(eFile, eDestination); | ||||||
|  |   AddDone; | ||||||
| end; | end; | ||||||
|  |  | ||||||
| procedure FTPMakeDir(eDir: String); | procedure FTPMakeDir(eDir: String); | ||||||
| @@ -385,7 +402,7 @@ begin | |||||||
|         end; |         end; | ||||||
|       end; |       end; | ||||||
|       modESF: begin |       modESF: begin | ||||||
|         if Pos('esf', DirList[i]) = 1 then begin |         if Pos('esforce', DirList[i]) = 1 then begin | ||||||
|           MakeDir(ePath + 'addons\amxmodx\' + Copy(DirList[i], 4, Length(DirList[i]))); |           MakeDir(ePath + 'addons\amxmodx\' + Copy(DirList[i], 4, Length(DirList[i]))); | ||||||
|           AddStatus('Created directory: addons\amxmodx\' + Copy(DirList[i], 4, Length(DirList[i])), clBlack); |           AddStatus('Created directory: addons\amxmodx\' + Copy(DirList[i], 4, Length(DirList[i])), clBlack); | ||||||
|         end; |         end; | ||||||
| @@ -440,7 +457,7 @@ begin | |||||||
|           end; |           end; | ||||||
|         end; |         end; | ||||||
|         modESF: begin |         modESF: begin | ||||||
|           if Pos('esf', FileList[i]) = 1 then begin |           if Pos('esforce', FileList[i]) = 1 then begin | ||||||
|             FileCopy(ExtractFilePath(ParamStr(0)) + 'files\' + FileList[i], ePath + 'addons\amxmodx\' + Copy(FileList[i], 4, Length(FileList[i])), CopyConfig); |             FileCopy(ExtractFilePath(ParamStr(0)) + 'files\' + FileList[i], ePath + 'addons\amxmodx\' + Copy(FileList[i], 4, Length(FileList[i])), CopyConfig); | ||||||
|             AddStatus('Copied file: addons\amxmodx\' + Copy(FileList[i], 4, Length(FileList[i])), clBlack); |             AddStatus('Copied file: addons\amxmodx\' + Copy(FileList[i], 4, Length(FileList[i])), clBlack); | ||||||
|           end; |           end; | ||||||
| @@ -617,10 +634,10 @@ begin | |||||||
|       frmMain.ggeItem.MaxValue := FSize(ExtractFilePath(ParamStr(0)) + 'temp\' + FileList[i]); |       frmMain.ggeItem.MaxValue := FSize(ExtractFilePath(ParamStr(0)) + 'temp\' + FileList[i]); | ||||||
|       try |       try | ||||||
|         if LowerCase(FileList[i]) = 'liblist.gam' then |         if LowerCase(FileList[i]) = 'liblist.gam' then | ||||||
|           frmMain.IdFTP.Site('CHMOD 744 ' + FileList[i]); |           frmMain.IdFTP.Site('CHMOD 744 liblist.gam'); | ||||||
|         UploadFile(ExtractFilePath(ParamStr(0)) + 'temp\' + FileList[i], ePath + FileList[i], CopyConfig); |         UploadFile(ExtractFilePath(ParamStr(0)) + 'temp\' + FileList[i], ePath + FileList[i], CopyConfig); | ||||||
|         if LowerCase(FileList[i]) = 'liblist.gam' then |         if LowerCase(FileList[i]) = 'liblist.gam' then | ||||||
|           frmMain.IdFTP.Size('CHMOD 444 ' + FileList[i]); |           frmMain.IdFTP.Size('CHMOD 444 liblist.gam'); | ||||||
|       except |       except | ||||||
|         on E: Exception do begin |         on E: Exception do begin | ||||||
|           if not Cancel then |           if not Cancel then | ||||||
| @@ -630,8 +647,6 @@ begin | |||||||
|           exit; |           exit; | ||||||
|         end; |         end; | ||||||
|       end; |       end; | ||||||
|  |  | ||||||
|       AddDone; |  | ||||||
|     end; |     end; | ||||||
|     frmMain.ggeAll.Progress := frmMain.ggeAll.Progress + 1; |     frmMain.ggeAll.Progress := frmMain.ggeAll.Progress + 1; | ||||||
|     frmMain.ggeItem.Progress := i; |     frmMain.ggeItem.Progress := i; | ||||||
|   | |||||||
| @@ -242,7 +242,7 @@ initialization | |||||||
|   eModsPath.Add('wizwars'); |   eModsPath.Add('wizwars'); | ||||||
|   eModsPath.Add('wormshl'); |   eModsPath.Add('wormshl'); | ||||||
|   eModsPath.Add('zp'); |   eModsPath.Add('zp'); | ||||||
|   eModsPath.Add('esf'); |   eModsPath.Add('esforce'); | ||||||
|  |  | ||||||
| finalization | finalization | ||||||
|  |  | ||||||
|   | |||||||
| @@ -6449,12 +6449,14 @@ object frmMain: TfrmMain | |||||||
|       Top = 7 |       Top = 7 | ||||||
|       Width = 85 |       Width = 85 | ||||||
|       Height = 25 |       Height = 25 | ||||||
|  |       Color = clBtnFace | ||||||
|       ColorFocused = 16245198 |       ColorFocused = 16245198 | ||||||
|       ColorDown = 16245198 |       ColorDown = 16245198 | ||||||
|       ColorBorder = clBtnShadow |       ColorBorder = clBtnShadow | ||||||
|       ColorHighLight = clBtnShadow |       ColorHighLight = clBtnShadow | ||||||
|       ColorShadow = clBtnShadow |       ColorShadow = clBtnShadow | ||||||
|       Caption = '&Cancel' |       Caption = '&Cancel' | ||||||
|  |       ParentColor = False | ||||||
|       TabOrder = 1 |       TabOrder = 1 | ||||||
|       OnClick = cmdCancelClick |       OnClick = cmdCancelClick | ||||||
|     end |     end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user