Lom 48 #365347 Posted November 11, 2016 у меня нет фото редактора ну тогда просто на телефон сфоткай закинь на файлообменник и так покажи)) не проблема же))) Quote Share this post Link to post Short link Share on other sites
AtotIK 580 #365411 Posted November 12, 2016 не поверишь я не знаю как на компе делать скриншоты или прога нужна В Гугле вроде баны давно не раздавали. Поискать никак? 2 Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #365418 Posted November 12, 2016 В Гугле вроде баны давно не раздавали. Поискать никак? ты это к чему Quote Share this post Link to post Short link Share on other sites
Ekspoint 2,122 #365419 Posted November 12, 2016 ты это к чемуберешь и гуглишь Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #365420 Posted November 12, 2016 берешь и гуглишь океу гугл)))))) Quote Share this post Link to post Short link Share on other sites
BeJIuKuu_TaHKoBbIu_BouH 4 #365440 Posted November 12, 2016 (edited) я смотрю норм у вас тут беседа. там ошибка ссылается на неверное имя файла упс-с-с... забыл флаги приписать в секции [Run] "вот так будет работать" [Tasks] Name: "gotositeone"; Description: "Перейти на первый сайт после окончания установки"; GroupDescription: "Дополнительные задачи:" Name: "gotositetwo"; Description: "Перейти на второй сайт после окончания установки"; GroupDescription: "Дополнительные задачи:" [Run] Filename: http://bla.ru/; Flags: shellexec; Tasks: gotositeone Filename: http://blabla.ru/; Flags: shellexec; Tasks: gotositetwo Edited November 13, 2016 by Gad575 Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #365442 Posted November 12, 2016 я смотрю норм. у вас тут беседа. упс-с-с... забыл флаги приписать в секции [Run] "вот так будет работать" [Tasks] Name: "gotositeone"; Description: "Перейти на первый сайт после окончания установки"; GroupDescription: "Дополнительные задачи:" Name: "gotositetwo"; Description: "Перейти на второй сайт после окончания установки"; GroupDescription: "Дополнительные задачи:" [Run] Filename: http://bla.ru/; Flags: shellexec; Tasks: gotositeone Filename: http://blabla.ru/; Flags: shellexec; Tasks: gotositetwo СПС Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #365801 Posted November 14, 2016 (edited) раньше работало а сейчас ошибку выдаёт [Tasks] Name: "gotositeone"; Description: "Перейти на первый сайт после окончания установки"; GroupDescription: "Дополнительные задачи:" Name: "gotositetwo"; Description: "Перейти на второй сайт после окончания установки"; GroupDescription: "Дополнительные задачи:" [Run] Filename: http://bla.ru/; Flags: shellexec; Tasks: gotositeone Filename: http://blabla.ru/; Flags: shellexec; Tasks: gotositetwo Edited November 14, 2016 by sergy2010 Quote Share this post Link to post Short link Share on other sites
BeJIuKuu_TaHKoBbIu_BouH 4 #365818 Posted November 14, 2016 (edited) раньше работало а сейчас ошибку выдаёт а почему у меня работает, гений ты наш? давай-ка в ЛС это обсудим Edited November 14, 2016 by Gad575 Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #365821 Posted November 14, 2016 (edited) а почему у меня работает, гений ты наш? давай-ка в ЛС это обсудим я разобрался это всё дело в браузере только незнаю почему но щя всё работает гугл был в помощ Edited November 14, 2016 by sergy2010 Quote Share this post Link to post Short link Share on other sites
GT_22rus 118 #365856 Posted November 15, 2016 Подскажите, как сделать чтобы при наведении мышкой на название мода появлялась картинка? Как сделать чтобы файл удаления мод пака устанавливался в определенную папку? Quote Share this post Link to post Short link Share on other sites
AtotIK 580 #365858 Posted November 15, 2016 Подскажите, как сделать чтобы при наведении мышкой на название мода появлялась картинка? Как сделать чтобы файл удаления мод пака устанавливался в определенную папку? 1. Вот тут очень сырой и глючный скрипт, но "бесплатно и без регистрации": тык! 2. Вот так: [Setup] UninstallFilesDir={app}\Install_Amway921_Modpack Quote Share this post Link to post Short link Share on other sites
GT_22rus 118 #365859 Posted November 15, 2016 (edited) 1. Вот тут очень сырой и глючный скрипт, но "бесплатно и без регистрации": тык! 2. Вот так: [Setup] UninstallFilesDir={app}\Install_Amway921_Modpack А смысл в этом глючном скрипте? А платный есть у Вас? Edited November 15, 2016 by GT_22rus Quote Share this post Link to post Short link Share on other sites
BeJIuKuu_TaHKoBbIu_BouH 4 #365875 Posted November 15, 2016 (edited) Подскажите, как сделать чтобы при наведении мышкой на название мода появлялась картинка? [Setup] AppName=Моя программа AppVersion=1.5 DefaultDirName={pf}\Моя программа [CustomMessages] CompName1=Компонент 1 CompName2=Компонент 2 ComponentsImgInfo=Наведите курсор мыши на компонент, чтобы посмотреть его превью. CompDesc1=Описание первого компонента CompDesc2=Описание второго компонента [Files] Source: "compiler:WizModernImage.bmp"; DestName: "CompDescImg1.bmp"; Flags: dontcopy Source: "compiler:WizModernImage-IS.bmp"; DestName: "CompDescImg2.bmp"; Flags: dontcopy Source: "compiler:WizModernImage.bmp"; DestName: "MainPic.bmp"; Flags: dontcopy [Types] Name: full; Description: Full installation; Flags: iscustom [Components] Name: comp1; Description: "{cm:CompName1}"; Types: full Name: comp2; Description: "{cm:CompName2}"; Types: full Name: comp3; Description: "{cm:CompName1}"; Types: full Name: comp4; Description: "{cm:CompName2}"; Types: full Name: comp5; Description: "{cm:CompName1}"; Types: full Name: comp6; Description: "{cm:CompName2}"; Types: full Name: comp7; Description: "{cm:CompName1}"; Types: full Name: comp8; Description: "{cm:CompName2}"; Types: full [Code] type TComponentDesc = record ImageName: String; Index: Integer; end; var CompDescs: array of TComponentDesc; CompDescImgPanel: TPanel; CompIndex, LastIndex: Integer; CompDescImg: TBitmapImage; procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea); var i: Integer; begin if Index = LastIndex then Exit; CompIndex := -1; for i := 0 to GetArrayLength(CompDescs) -1 do begin if (CompDescs[i].Index = Index) then begin CompIndex := i; Break; end; end; if (CompIndex >= 0) and (Area = iaItem) then begin if not FileExists(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName) then ExtractTemporaryFile(CompDescs[CompIndex].ImageName); CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName); CompDescImg.Show; end else begin CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MainPic.bmp')); end; LastIndex := Index; end; procedure CompListMouseLeave(Sender: TObject); begin LastIndex := -1; CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MainPic.bmp')); end; procedure AddCompDescription(AIndex: Integer; AImageName: String); var i: Integer; begin i := GetArrayLength(CompDescs); SetArrayLength(CompDescs, i + 1); CompDescs[i].ImageName := AImageName; CompDescs[i].Index := AIndex - 1 end; function GetComponentIndex(Name: String): Integer; var i: Integer; begin Result:= -1; for i:= 0 to WizardForm.ComponentsList.ItemCount-1 do begin if (WizardForm.ComponentsList.ItemCaption[i] = Name) then begin Result:= i + 1; Break; end; end; end; procedure InitializeWizard(); begin ExtractTemporaryFile('MainPic.bmp'); WizardForm.SelectComponentsLabel.Hide; WizardForm.TypesCombo.Hide; WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(184), ScaleY(200)); WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription; WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave; CompDescImgPanel := TPanel.Create(WizardForm); with CompDescImgPanel do begin Parent := WizardForm.SelectComponentsPage; SetBounds(ScaleX(192), ScaleY(0), ScaleX(225), ScaleY(120)); BevelInner := bvLowered; end; CompDescImg := TBitmapImage.Create(WizardForm); with CompDescImg do begin Parent := CompDescImgPanel; SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10)); Stretch := True; Bitmap.LoadFromFile(ExpandConstant('{tmp}\MainPic.bmp')); end; AddCompDescription(GetComponentIndex(CustomMessage('CompName1')), 'CompDescImg1.bmp'); //по названию компонента AddCompDescription(GetComponentIndex(CustomMessage('CompName2')), 'CompDescImg2.bmp'); //по названию компонента end; Как сделать чтобы файл удаления мод пака устанавливался в определенную папку? [Setup] UninstallFilesDir={app}\DirName А платный есть у Вас? Edited November 15, 2016 by Gad575 Quote Share this post Link to post Short link Share on other sites
Draug 59 #365899 Posted November 15, 2016 Весь топ почти перелопатил, уже в глазах рябит... Подскажите как совместить скрипт бекап ; BackUpPage - отдельная страница для реализации резервного копирования файлов с выбором параметров; Автор: AtotIK#include "SHFileOperation.iss"; varBackupPage: TWizardPage;DeleteRadioButton, MoveRadioButton, NoneRadioButton: TNewRadioButton;constBackupDescText ='Во избежание проблем совместимости и конфликтов между модификациями рекомендуется удалить уже установленные на данный момент в игровом клиенте.' #13#13 'Выберите необходимый пункт из представленных. При этом будет очищено содержимое папки "res_mods\0.8.11", удалена папка "res_mods\xvm" или созданы резервные копии Ваших файлов.';DeleteDescText ='Установщик удалит все файлы в папках.';MoveDescText ='Установщик сделает резервную копию всех файлов в папках.';NoneDescText ='Установщик оставит всё как есть.';function BackupCheck_1(): Boolean;varBackupDescLabel, DeleteDescLabel, MoveDescLabel, NoneDescLabel: TLabel;beginBackupPage:=CreateCustomPage(wpWelcome, 'Создание резервных копий файлов перед установкой', 'Пожалуйста, прочтите следующую важную информацию перед тем, как продолжить.');BackupDescLabel:=TLabel.Create(WizardForm);BackupDescLabel.Parent:=BackupPage.Surface;BackupDescLabel.Left:=0;BackupDescLabel.Top:=0;BackupDescLabel.Width:=BackupPage.SurfaceWidth;BackupDescLabel.Height:=90;BackupDescLabel.AutoSize:=False;BackupDescLabel.Wordwrap:=True;BackupDescLabel.Caption:=BackupDescText;DeleteRadioButton:=TNewRadioButton.Create(WizardForm);DeleteRadioButton.Parent:=BackupPage.Surface;DeleteRadioButton.Checked:=False;DeleteRadioButton.Top:=95;DeleteRadioButton.Width:=BackupPage.SurfaceWidth;DeleteRadioButton.Font.Style:=[fsBold];DeleteRadioButton.Font.Size:=9;DeleteRadioButton.Caption:='Удалить файлы'DeleteDescLabel:=TLabel.Create(WizardForm);DeleteDescLabel.Parent:=BackupPage.Surface;DeleteDescLabel.Left:=18;DeleteDescLabel.Top:=DeleteRadioButton.Top + DeleteRadioButton.Height + 4;DeleteDescLabel.Width:=BackupPage.SurfaceWidth;DeleteDescLabel.Height:=40;DeleteDescLabel.AutoSize:=False;DeleteDescLabel.Wordwrap:=True;DeleteDescLabel.Caption:=DeleteDescText;MoveRadioButton:=TNewRadioButton.Create(WizardForm);MoveRadioButton.Parent:=BackupPage.Surface;MoveRadioButton.Checked:=True;MoveRadioButton.Top:=140;MoveRadioButton.Width:=BackupPage.SurfaceWidth;MoveRadioButton.Font.Style:=[fsBold];MoveRadioButton.Font.Size:=9;MoveRadioButton.Caption:='Сделать резервную копию файлов'MoveDescLabel:=TLabel.Create(WizardForm);MoveDescLabel.Parent:=BackupPage.Surface;MoveDescLabel.Left:=18;MoveDescLabel.Top:=MoveRadioButton.Top + MoveRadioButton.Height + 4;MoveDescLabel.Width:=BackupPage.SurfaceWidth;MoveDescLabel.Height:=40;MoveDescLabel.AutoSize:=False;MoveDescLabel.Wordwrap:=True;MoveDescLabel.Caption:=MoveDescText;NoneRadioButton:=TNewRadioButton.Create(WizardForm);NoneRadioButton.Parent:=BackupPage.Surface;NoneRadioButton.Checked:=False;NoneRadioButton.Top:=185;NoneRadioButton.Width:=BackupPage.SurfaceWidth;NoneRadioButton.Font.Style:=[fsBold];NoneRadioButton.Font.Size:=9;NoneRadioButton.Caption:='Ничего не трогать'NoneDescLabel:=TLabel.Create(WizardForm);NoneDescLabel.Parent:=BackupPage.Surface;NoneDescLabel.Left:=18;NoneDescLabel.Top:=NoneRadioButton.Top + NoneRadioButton.Height + 4;NoneDescLabel.Width:=BackupPage.SurfaceWidth;NoneDescLabel.Height:=40;NoneDescLabel.AutoSize:=False;NoneDescLabel.Wordwrap:=True;NoneDescLabel.Caption:=NoneDescText;end;function BackupCheck_2(): Boolean;beginIf DeleteRadioButton.Checked thenbeginDelTree(ExpandConstant('{app}\res_mods\0.8.11'), True, True, True);DelTree(ExpandConstant('{app}\res_mods\xvm'), True, True, True);CreateDir(ExpandConstant('{app}\res_mods\0.8.11'));end;end;function BackupCheck_3(): Boolean;beginIf MoveRadioButton.Checked thenbeginMoveDir(ExpandConstant('{app}\res_mods\0.8.11\'),ExpandConstant('{app}\res_mods\backup\0.8.11'));MoveDir(ExpandConstant('{app}\res_mods\xvm\'),ExpandConstant('{app}\res_mods\backup\xvm'));CreateDir(ExpandConstant('{app}\res_mods\0.8.11'));DelTree(ExpandConstant('{app}\res_mods\xvm'), True, True, True);end;end;procedure CurStepChanged(CurStep: TSetupStep);beginIf CurStep=ssInstall thenbeginBackupCheck_2();BackupCheck_3();end;end;procedure InitializeWizard();beginBackupCheck_1();end; и картинки при наведении [code]#ifdef UNICODE#define A "W"#else#define A "A"#endifconstUNDEF_INDEX = -777;ALPHA_BLEND_LEVEL = 255; // max=Byte=255WS_EX_LAYERED = $80000;WS_EX_TRANSPARENT = $20;LWA_COLORKEY = 1;LWA_ALPHA = 2;GWL_EXSTYLE = (-20);varInfoPic: TBitmapImage;LastIndex: Integer;TempPath: String;PicForm: TForm;typeCOLORREF = DWORD;function GetCursorPos(var lpPoint: TPoint): BOOL; external '[email protected] stdcall';function SetLayeredWindowAttributes(Hwnd: THandle; crKey: COLORREF; bAlpha: Byte; dwFlags: DWORD): Boolean; external '[email protected] stdcall';function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLong{#A}@user32.dll stdcall';function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLong{#A}@user32.dll stdcall';function SetFocus(hWnd: HWND): HWND; external '[email protected] stdcall';procedure ShowPicHint(const PicFilePath: String);varpt: TPoint;beginif not GetCursorPos(pt) then Exit;InfoPic.Bitmap.LoadFromFile(PicFilePath);trywith PicForm dobeginSetBounds(ScaleX(pt.x + 390), ScaleY(pt.y + 7), InfoPic.Width, InfoPic.Height);Show;end;finallySetFocus(WizardForm.Handle);end;end;procedure CompOnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea);varUndefPic: String;beginif Index = -1 then Exit;if Index = LastIndex then Exit;trycase TNewCheckListBox(Sender).ItemCaption[index] of'1.Отражение броней(unKnown_bot).': UndefPic := '1-Забл броней урон.bmp';'2.Радар (тылы).': UndefPic := 'Радар.bmp';'3.Командирская камера (koshnaranek).': UndefPic := 'Командирская камера.bmp';'4.Таймер сведения орудия в бою (Ekspoint).': UndefPic := 'таймер сведения.bmp';'5.Винтик.': UndefPic := 'винтик.bmp';elsebeginLastIndex := UNDEF_INDEX;PicForm.Hide;Exit;end;end;if not FileExists(TempPath + UndefPic) then ExtractTemporaryFile(UndefPic);ShowPicHint(TempPath + UndefPic);finallyLastIndex := Index;end;end;procedure CompOnMouseLeave(Sender: TObject);beginPicForm.Hide;LastIndex := -1;end;procedure InitInfo();beginWizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove;WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave;TempPath := AddBackslash(ExpandConstant('{tmp}'));LastIndex := UNDEF_INDEX;PicForm := TForm.Create(WizardForm)with PicForm dobeginBorderStyle := bsNone;FormStyle := fsStayOnTop;InfoPic := TBitmapImage.Create(PicForm)with InfoPic dobeginParent := PicForm;AutoSize := True;end;end;SetWindowLong(PicForm.Handle, GWL_EXSTYLE, GetWindowLong(PicForm.Handle, GWL_EXSTYLE) or WS_EX_LAYERED);SetLayeredWindowAttributes(PicForm.Handle, 0, ALPHA_BLEND_LEVEL, LWA_ALPHA);end;procedure InitializeWizard();beginInitInfo();end; по отдельности все работает! совместить не могу! (( Quote Share this post Link to post Short link Share on other sites
BeJIuKuu_TaHKoBbIu_BouH 4 #365918 Posted November 15, 2016 (edited) Подскажите как совместить 'вот так' #define WotVersion "0.9.16" #include "SHFileOperation.iss"; [Code] var BackupPage: TWizardPage; DeleteRadioButton, MoveRadioButton, NoneRadioButton: TNewRadioButton; const BackupDescText = 'Во избежание проблем совместимости и конфликтов между модификациями рекомендуется удалить уже установленные на данный момент в игровом клиенте.' #13#13 'Выберите необходимый пункт из представленных. При этом будет очищено содержимое папки "res_mods\0.8.11", удалена папка "res_mods\xvm" или созданы резервные копии Ваших файлов.'; DeleteDescText = 'Установщик удалит все файлы в папках.'; MoveDescText = 'Установщик сделает резервную копию всех файлов в папках.'; NoneDescText = 'Установщик оставит всё как есть.'; function BackupCheck_1(): Boolean; var BackupDescLabel, DeleteDescLabel, MoveDescLabel, NoneDescLabel: TLabel; begin BackupPage:=CreateCustomPage(wpWelcome, 'Создание резервных копий файлов перед установкой', 'Пожалуйста, прочтите следующую важную информацию перед тем, как продолжить.'); BackupDescLabel:=TLabel.Create(WizardForm); BackupDescLabel.Parent:=BackupPage.Surface; BackupDescLabel.Left:=0; BackupDescLabel.Top:=0; BackupDescLabel.Width:=BackupPage.SurfaceWidth; BackupDescLabel.Height:=90; BackupDescLabel.AutoSize:=False; BackupDescLabel.Wordwrap:=True; BackupDescLabel.Caption:=BackupDescText; DeleteRadioButton:=TNewRadioButton.Create(WizardForm); DeleteRadioButton.Parent:=BackupPage.Surface; DeleteRadioButton.Checked:=False; DeleteRadioButton.Top:=95; DeleteRadioButton.Width:=BackupPage.SurfaceWidth; DeleteRadioButton.Font.Style:=[fsBold]; DeleteRadioButton.Font.Size:=9; DeleteRadioButton.Caption:='Удалить файлы' DeleteDescLabel:=TLabel.Create(WizardForm); DeleteDescLabel.Parent:=BackupPage.Surface; DeleteDescLabel.Left:=18; DeleteDescLabel.Top:=DeleteRadioButton.Top + DeleteRadioButton.Height + 4; DeleteDescLabel.Width:=BackupPage.SurfaceWidth; DeleteDescLabel.Height:=40; DeleteDescLabel.AutoSize:=False; DeleteDescLabel.Wordwrap:=True; DeleteDescLabel.Caption:=DeleteDescText; MoveRadioButton:=TNewRadioButton.Create(WizardForm); MoveRadioButton.Parent:=BackupPage.Surface; MoveRadioButton.Checked:=True; MoveRadioButton.Top:=140; MoveRadioButton.Width:=BackupPage.SurfaceWidth; MoveRadioButton.Font.Style:=[fsBold]; MoveRadioButton.Font.Size:=9; MoveRadioButton.Caption:='Сделать резервную копию файлов' MoveDescLabel:=TLabel.Create(WizardForm); MoveDescLabel.Parent:=BackupPage.Surface; MoveDescLabel.Left:=18; MoveDescLabel.Top:=MoveRadioButton.Top + MoveRadioButton.Height + 4; MoveDescLabel.Width:=BackupPage.SurfaceWidth; MoveDescLabel.Height:=40; MoveDescLabel.AutoSize:=False; MoveDescLabel.Wordwrap:=True; MoveDescLabel.Caption:=MoveDescText; NoneRadioButton:=TNewRadioButton.Create(WizardForm); NoneRadioButton.Parent:=BackupPage.Surface; NoneRadioButton.Checked:=False; NoneRadioButton.Top:=185; NoneRadioButton.Width:=BackupPage.SurfaceWidth; NoneRadioButton.Font.Style:=[fsBold]; NoneRadioButton.Font.Size:=9; NoneRadioButton.Caption:='Ничего не трогать' NoneDescLabel:=TLabel.Create(WizardForm); NoneDescLabel.Parent:=BackupPage.Surface; NoneDescLabel.Left:=18; NoneDescLabel.Top:=NoneRadioButton.Top + NoneRadioButton.Height + 4; NoneDescLabel.Width:=BackupPage.SurfaceWidth; NoneDescLabel.Height:=40; NoneDescLabel.AutoSize:=False; NoneDescLabel.Wordwrap:=True; NoneDescLabel.Caption:=NoneDescText; end; function BackupCheck_2(): Boolean; begin If DeleteRadioButton.Checked then begin DelTree(ExpandConstant('{app}\res_mods\{#WotVersion}'), True, True, True); DelTree(ExpandConstant('{app}\res_mods\configs'), True, True, True); DelTree(ExpandConstant('{app}\res_mods\mods'), True, True, True); CreateDir(ExpandConstant('{app}\res_mods\{#WotVersion}')); end; end; function BackupCheck_3(): Boolean; begin If MoveRadioButton.Checked then begin MoveDir(ExpandConstant('{app}\res_mods\{#WotVersion}\'),ExpandConstant('{app}\res_mods\backup\{#WotVersion}')); MoveDir(ExpandConstant('{app}\res_mods\configs\'),ExpandConstant('{app}\res_mods\backup\configs')); MoveDir(ExpandConstant('{app}\res_mods\mods\'),ExpandConstant('{app}\res_mods\backup\mods')); CreateDir(ExpandConstant('{app}\res_mods\{#WotVersion}')); DelTree(ExpandConstant('{app}\res_mods\configs'), True, True, True); DelTree(ExpandConstant('{app}\res_mods\mods'), True, True, True); end; end; procedure CurStepChanged(CurStep: TSetupStep); begin If CurStep=ssInstall then begin BackupCheck_2(); BackupCheck_3(); end; end; procedure InitializeWizard1(); begin BackupCheck_1(); end; #ifdef UNICODE #define A "W" #else #define A "A" #endif const UNDEF_INDEX = -777; ALPHA_BLEND_LEVEL = 255; // max=Byte=255 WS_EX_LAYERED = $80000; WS_EX_TRANSPARENT = $20; LWA_COLORKEY = 1; LWA_ALPHA = 2; GWL_EXSTYLE = (-20); var InfoPic: TBitmapImage; LastIndex: Integer; TempPath: String; PicForm: TForm; type COLORREF = DWORD; function GetCursorPos(var lpPoint: TPoint): BOOL; external '[email protected] stdcall'; function SetLayeredWindowAttributes(Hwnd: THandle; crKey: COLORREF; bAlpha: Byte; dwFlags: DWORD): Boolean; external '[email protected] stdcall'; function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLong{#A}@user32.dll stdcall'; function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLong{#A}@user32.dll stdcall'; function SetFocus(hWnd: HWND): HWND; external '[email protected] stdcall'; procedure ShowPicHint(const PicFilePath: String); var pt: TPoint; begin if not GetCursorPos(pt) then Exit; InfoPic.Bitmap.LoadFromFile(PicFilePath); try with PicForm do begin SetBounds(ScaleX(pt.x + 390), ScaleY(pt.y + 7), InfoPic.Width, InfoPic.Height); Show; end; finally SetFocus(WizardForm.Handle); end; end; procedure CompOnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea); var UndefPic: String; begin if Index = -1 then Exit; if Index = LastIndex then Exit; try case TNewCheckListBox(Sender).ItemCaption[Index] of '1.Отражение броней(unKnown_bot).': UndefPic := '1-Забл броней урон.bmp'; '2.Радар (тылы).': UndefPic := 'Радар.bmp'; '3.Командирская камера (koshnaranek).': UndefPic := 'Командирская камера.bmp'; '4.Таймер сведения орудия в бою (Ekspoint).': UndefPic := 'таймер сведения.bmp'; '5.Винтик.': UndefPic := 'винтик.bmp'; else begin LastIndex := UNDEF_INDEX; PicForm.Hide; Exit; end; end; if not FileExists(TempPath + UndefPic) then ExtractTemporaryFile(UndefPic); ShowPicHint(TempPath + UndefPic); finally LastIndex := Index; end; end; procedure CompOnMouseLeave(Sender: TObject); begin PicForm.Hide; LastIndex := -1; end; procedure InitInfo(); begin WizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove; WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave; TempPath := AddBackslash(ExpandConstant('{tmp}')); LastIndex := UNDEF_INDEX; PicForm := TForm.Create(WizardForm) with PicForm do begin BorderStyle := bsNone; FormStyle := fsStayOnTop; InfoPic := TBitmapImage.Create(PicForm) with InfoPic do begin Parent := PicForm; AutoSize := True; end; end; SetWindowLong(PicForm.Handle, GWL_EXSTYLE, GetWindowLong(PicForm.Handle, GWL_EXSTYLE) or WS_EX_LAYERED); SetLayeredWindowAttributes(PicForm.Handle, 0, ALPHA_BLEND_LEVEL, LWA_ALPHA); end; procedure InitializeWizard2(); begin InitInfo(); end; procedure InitializeWizard(); begin InitializeWizard1(); InitializeWizard2(); end; UPD: немного подправил. Edited November 16, 2016 by Gad575 1 Quote Share this post Link to post Short link Share on other sites
Draug 59 #365921 Posted November 15, 2016 'вот так' #define WotVersion "0.9.16" #include "SHFileOperation.iss"; [Code] var BackupPage: TWizardPage; DeleteRadioButton, MoveRadioButton, NoneRadioButton: TNewRadioButton; const BackupDescText = 'Во избежание проблем совместимости и конфликтов между модификациями рекомендуется удалить уже установленные на данный момент в игровом клиенте.' #13#13 'Выберите необходимый пункт из представленных. При этом будет очищено содержимое папки "res_mods\0.8.11", удалена папка "res_mods\xvm" или созданы резервные копии Ваших файлов.'; DeleteDescText = 'Установщик удалит все файлы в папках.'; MoveDescText = 'Установщик сделает резервную копию всех файлов в папках.'; NoneDescText = 'Установщик оставит всё как есть.'; function BackupCheck_1(): Boolean; var BackupDescLabel, DeleteDescLabel, MoveDescLabel, NoneDescLabel: TLabel; begin BackupPage:=CreateCustomPage(wpWelcome, 'Создание резервных копий файлов перед установкой', 'Пожалуйста, прочтите следующую важную информацию перед тем, как продолжить.'); BackupDescLabel:=TLabel.Create(WizardForm); BackupDescLabel.Parent:=BackupPage.Surface; BackupDescLabel.Left:=0; BackupDescLabel.Top:=0; BackupDescLabel.Width:=BackupPage.SurfaceWidth; BackupDescLabel.Height:=90; BackupDescLabel.AutoSize:=False; BackupDescLabel.Wordwrap:=True; BackupDescLabel.Caption:=BackupDescText; DeleteRadioButton:=TNewRadioButton.Create(WizardForm); DeleteRadioButton.Parent:=BackupPage.Surface; DeleteRadioButton.Checked:=False; DeleteRadioButton.Top:=95; DeleteRadioButton.Width:=BackupPage.SurfaceWidth; DeleteRadioButton.Font.Style:=[fsBold]; DeleteRadioButton.Font.Size:=9; DeleteRadioButton.Caption:='Удалить файлы' DeleteDescLabel:=TLabel.Create(WizardForm); DeleteDescLabel.Parent:=BackupPage.Surface; DeleteDescLabel.Left:=18; DeleteDescLabel.Top:=DeleteRadioButton.Top + DeleteRadioButton.Height + 4; DeleteDescLabel.Width:=BackupPage.SurfaceWidth; DeleteDescLabel.Height:=40; DeleteDescLabel.AutoSize:=False; DeleteDescLabel.Wordwrap:=True; DeleteDescLabel.Caption:=DeleteDescText; MoveRadioButton:=TNewRadioButton.Create(WizardForm); MoveRadioButton.Parent:=BackupPage.Surface; MoveRadioButton.Checked:=True; MoveRadioButton.Top:=140; MoveRadioButton.Width:=BackupPage.SurfaceWidth; MoveRadioButton.Font.Style:=[fsBold]; MoveRadioButton.Font.Size:=9; MoveRadioButton.Caption:='Сделать резервную копию файлов' MoveDescLabel:=TLabel.Create(WizardForm); MoveDescLabel.Parent:=BackupPage.Surface; MoveDescLabel.Left:=18; MoveDescLabel.Top:=MoveRadioButton.Top + MoveRadioButton.Height + 4; MoveDescLabel.Width:=BackupPage.SurfaceWidth; MoveDescLabel.Height:=40; MoveDescLabel.AutoSize:=False; MoveDescLabel.Wordwrap:=True; MoveDescLabel.Caption:=MoveDescText; NoneRadioButton:=TNewRadioButton.Create(WizardForm); NoneRadioButton.Parent:=BackupPage.Surface; NoneRadioButton.Checked:=False; NoneRadioButton.Top:=185; NoneRadioButton.Width:=BackupPage.SurfaceWidth; NoneRadioButton.Font.Style:=[fsBold]; NoneRadioButton.Font.Size:=9; NoneRadioButton.Caption:='Ничего не трогать' NoneDescLabel:=TLabel.Create(WizardForm); NoneDescLabel.Parent:=BackupPage.Surface; NoneDescLabel.Left:=18; NoneDescLabel.Top:=NoneRadioButton.Top + NoneRadioButton.Height + 4; NoneDescLabel.Width:=BackupPage.SurfaceWidth; NoneDescLabel.Height:=40; NoneDescLabel.AutoSize:=False; NoneDescLabel.Wordwrap:=True; NoneDescLabel.Caption:=NoneDescText; end; function BackupCheck_2(): Boolean; begin If DeleteRadioButton.Checked then begin DelTree(ExpandConstant('{app}\res_mods\{#WotVersion}'), True, True, True); DelTree(ExpandConstant('{app}\res_mods\xvm'), True, True, True); CreateDir(ExpandConstant('{app}\res_mods\{#WotVersion}')); end; end; function BackupCheck_3(): Boolean; begin If MoveRadioButton.Checked then begin MoveDir(ExpandConstant('{app}\res_mods\{#WotVersion}\'),ExpandConstant('{app}\res_mods\backup\{#WotVersion}')); MoveDir(ExpandConstant('{app}\res_mods\configs\'),ExpandConstant('{app}\res_mods\backup\configs')); MoveDir(ExpandConstant('{app}\res_mods\mods\'),ExpandConstant('{app}\res_mods\backup\mods')); CreateDir(ExpandConstant('{app}\res_mods\{#WotVersion}')); DelTree(ExpandConstant('{app}\res_mods\configs'), True, True, True); DelTree(ExpandConstant('{app}\res_mods\mods'), True, True, True); end; end; procedure CurStepChanged(CurStep: TSetupStep); begin If CurStep=ssInstall then begin BackupCheck_2(); BackupCheck_3(); end; end; procedure InitializeWizard1(); begin BackupCheck_1(); end; #ifdef UNICODE #define A "W" #else #define A "A" #endif const UNDEF_INDEX = -777; ALPHA_BLEND_LEVEL = 255; // max=Byte=255 WS_EX_LAYERED = $80000; WS_EX_TRANSPARENT = $20; LWA_COLORKEY = 1; LWA_ALPHA = 2; GWL_EXSTYLE = (-20); var InfoPic: TBitmapImage; LastIndex: Integer; TempPath: String; PicForm: TForm; type COLORREF = DWORD; function GetCursorPos(var lpPoint: TPoint): BOOL; external '[email protected] stdcall'; function SetLayeredWindowAttributes(Hwnd: THandle; crKey: COLORREF; bAlpha: Byte; dwFlags: DWORD): Boolean; external '[email protected] stdcall'; function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLong{#A}@user32.dll stdcall'; function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLong{#A}@user32.dll stdcall'; function SetFocus(hWnd: HWND): HWND; external '[email protected] stdcall'; procedure ShowPicHint(const PicFilePath: String); var pt: TPoint; begin if not GetCursorPos(pt) then Exit; InfoPic.Bitmap.LoadFromFile(PicFilePath); try with PicForm do begin SetBounds(ScaleX(pt.x + 390), ScaleY(pt.y + 7), InfoPic.Width, InfoPic.Height); Show; end; finally SetFocus(WizardForm.Handle); end; end; procedure CompOnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea); var UndefPic: String; begin if Index = -1 then Exit; if Index = LastIndex then Exit; try case TNewCheckListBox(Sender).ItemCaption[Index] of '1.Отражение броней(unKnown_bot).': UndefPic := '1-Забл броней урон.bmp'; '2.Радар (тылы).': UndefPic := 'Радар.bmp'; '3.Командирская камера (koshnaranek).': UndefPic := 'Командирская камера.bmp'; '4.Таймер сведения орудия в бою (Ekspoint).': UndefPic := 'таймер сведения.bmp'; '5.Винтик.': UndefPic := 'винтик.bmp'; else begin LastIndex := UNDEF_INDEX; PicForm.Hide; Exit; end; end; if not FileExists(TempPath + UndefPic) then ExtractTemporaryFile(UndefPic); ShowPicHint(TempPath + UndefPic); finally LastIndex := Index; end; end; procedure CompOnMouseLeave(Sender: TObject); begin PicForm.Hide; LastIndex := -1; end; procedure InitInfo(); begin WizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove; WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave; TempPath := AddBackslash(ExpandConstant('{tmp}')); LastIndex := UNDEF_INDEX; PicForm := TForm.Create(WizardForm) with PicForm do begin BorderStyle := bsNone; FormStyle := fsStayOnTop; InfoPic := TBitmapImage.Create(PicForm) with InfoPic do begin Parent := PicForm; AutoSize := True; end; end; SetWindowLong(PicForm.Handle, GWL_EXSTYLE, GetWindowLong(PicForm.Handle, GWL_EXSTYLE) or WS_EX_LAYERED); SetLayeredWindowAttributes(PicForm.Handle, 0, ALPHA_BLEND_LEVEL, LWA_ALPHA); end; procedure InitializeWizard2(); begin InitInfo(); end; procedure InitializeWizard(); begin InitializeWizard1(); InitializeWizard2(); end; как доктор прописал! спс! ) Quote Share this post Link to post Short link Share on other sites
Ekspoint 2,122 #365923 Posted November 15, 2016 смотрю уже много модпакеров стало :), удачи вам в начинании :) Quote Share this post Link to post Short link Share on other sites
KIBORG 17 #365925 Posted November 15, 2016 смотрю уже много модпакеров стало :), удачи вам в начинании :) 1 Quote Share this post Link to post Short link Share on other sites
Draug 59 #365927 Posted November 15, 2016 'вот так' #define WotVersion "0.9.16" #include "SHFileOperation.iss"; [Code] var BackupPage: TWizardPage; DeleteRadioButton, MoveRadioButton, NoneRadioButton: TNewRadioButton; const BackupDescText = 'Во избежание проблем совместимости и конфликтов между модификациями рекомендуется удалить уже установленные на данный момент в игровом клиенте.' #13#13 'Выберите необходимый пункт из представленных. При этом будет очищено содержимое папки "res_mods\0.8.11", удалена папка "res_mods\xvm" или созданы резервные копии Ваших файлов.'; DeleteDescText = 'Установщик удалит все файлы в папках.'; MoveDescText = 'Установщик сделает резервную копию всех файлов в папках.'; NoneDescText = 'Установщик оставит всё как есть.'; function BackupCheck_1(): Boolean; var BackupDescLabel, DeleteDescLabel, MoveDescLabel, NoneDescLabel: TLabel; begin BackupPage:=CreateCustomPage(wpWelcome, 'Создание резервных копий файлов перед установкой', 'Пожалуйста, прочтите следующую важную информацию перед тем, как продолжить.'); BackupDescLabel:=TLabel.Create(WizardForm); BackupDescLabel.Parent:=BackupPage.Surface; BackupDescLabel.Left:=0; BackupDescLabel.Top:=0; BackupDescLabel.Width:=BackupPage.SurfaceWidth; BackupDescLabel.Height:=90; BackupDescLabel.AutoSize:=False; BackupDescLabel.Wordwrap:=True; BackupDescLabel.Caption:=BackupDescText; DeleteRadioButton:=TNewRadioButton.Create(WizardForm); DeleteRadioButton.Parent:=BackupPage.Surface; DeleteRadioButton.Checked:=False; DeleteRadioButton.Top:=95; DeleteRadioButton.Width:=BackupPage.SurfaceWidth; DeleteRadioButton.Font.Style:=[fsBold]; DeleteRadioButton.Font.Size:=9; DeleteRadioButton.Caption:='Удалить файлы' DeleteDescLabel:=TLabel.Create(WizardForm); DeleteDescLabel.Parent:=BackupPage.Surface; DeleteDescLabel.Left:=18; DeleteDescLabel.Top:=DeleteRadioButton.Top + DeleteRadioButton.Height + 4; DeleteDescLabel.Width:=BackupPage.SurfaceWidth; DeleteDescLabel.Height:=40; DeleteDescLabel.AutoSize:=False; DeleteDescLabel.Wordwrap:=True; DeleteDescLabel.Caption:=DeleteDescText; MoveRadioButton:=TNewRadioButton.Create(WizardForm); MoveRadioButton.Parent:=BackupPage.Surface; MoveRadioButton.Checked:=True; MoveRadioButton.Top:=140; MoveRadioButton.Width:=BackupPage.SurfaceWidth; MoveRadioButton.Font.Style:=[fsBold]; MoveRadioButton.Font.Size:=9; MoveRadioButton.Caption:='Сделать резервную копию файлов' MoveDescLabel:=TLabel.Create(WizardForm); MoveDescLabel.Parent:=BackupPage.Surface; MoveDescLabel.Left:=18; MoveDescLabel.Top:=MoveRadioButton.Top + MoveRadioButton.Height + 4; MoveDescLabel.Width:=BackupPage.SurfaceWidth; MoveDescLabel.Height:=40; MoveDescLabel.AutoSize:=False; MoveDescLabel.Wordwrap:=True; MoveDescLabel.Caption:=MoveDescText; NoneRadioButton:=TNewRadioButton.Create(WizardForm); NoneRadioButton.Parent:=BackupPage.Surface; NoneRadioButton.Checked:=False; NoneRadioButton.Top:=185; NoneRadioButton.Width:=BackupPage.SurfaceWidth; NoneRadioButton.Font.Style:=[fsBold]; NoneRadioButton.Font.Size:=9; NoneRadioButton.Caption:='Ничего не трогать' NoneDescLabel:=TLabel.Create(WizardForm); NoneDescLabel.Parent:=BackupPage.Surface; NoneDescLabel.Left:=18; NoneDescLabel.Top:=NoneRadioButton.Top + NoneRadioButton.Height + 4; NoneDescLabel.Width:=BackupPage.SurfaceWidth; NoneDescLabel.Height:=40; NoneDescLabel.AutoSize:=False; NoneDescLabel.Wordwrap:=True; NoneDescLabel.Caption:=NoneDescText; end; function BackupCheck_2(): Boolean; begin If DeleteRadioButton.Checked then begin DelTree(ExpandConstant('{app}\res_mods\{#WotVersion}'), True, True, True); DelTree(ExpandConstant('{app}\res_mods\xvm'), True, True, True); CreateDir(ExpandConstant('{app}\res_mods\{#WotVersion}')); end; end; function BackupCheck_3(): Boolean; begin If MoveRadioButton.Checked then begin MoveDir(ExpandConstant('{app}\res_mods\{#WotVersion}\'),ExpandConstant('{app}\res_mods\backup\{#WotVersion}')); MoveDir(ExpandConstant('{app}\res_mods\configs\'),ExpandConstant('{app}\res_mods\backup\configs')); MoveDir(ExpandConstant('{app}\res_mods\mods\'),ExpandConstant('{app}\res_mods\backup\mods')); CreateDir(ExpandConstant('{app}\res_mods\{#WotVersion}')); DelTree(ExpandConstant('{app}\res_mods\configs'), True, True, True); DelTree(ExpandConstant('{app}\res_mods\mods'), True, True, True); end; end; procedure CurStepChanged(CurStep: TSetupStep); begin If CurStep=ssInstall then begin BackupCheck_2(); BackupCheck_3(); end; end; procedure InitializeWizard1(); begin BackupCheck_1(); end; #ifdef UNICODE #define A "W" #else #define A "A" #endif const UNDEF_INDEX = -777; ALPHA_BLEND_LEVEL = 255; // max=Byte=255 WS_EX_LAYERED = $80000; WS_EX_TRANSPARENT = $20; LWA_COLORKEY = 1; LWA_ALPHA = 2; GWL_EXSTYLE = (-20); var InfoPic: TBitmapImage; LastIndex: Integer; TempPath: String; PicForm: TForm; type COLORREF = DWORD; function GetCursorPos(var lpPoint: TPoint): BOOL; external '[email protected] stdcall'; function SetLayeredWindowAttributes(Hwnd: THandle; crKey: COLORREF; bAlpha: Byte; dwFlags: DWORD): Boolean; external '[email protected] stdcall'; function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLong{#A}@user32.dll stdcall'; function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLong{#A}@user32.dll stdcall'; function SetFocus(hWnd: HWND): HWND; external '[email protected] stdcall'; procedure ShowPicHint(const PicFilePath: String); var pt: TPoint; begin if not GetCursorPos(pt) then Exit; InfoPic.Bitmap.LoadFromFile(PicFilePath); try with PicForm do begin SetBounds(ScaleX(pt.x + 390), ScaleY(pt.y + 7), InfoPic.Width, InfoPic.Height); Show; end; finally SetFocus(WizardForm.Handle); end; end; procedure CompOnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea); var UndefPic: String; begin if Index = -1 then Exit; if Index = LastIndex then Exit; try case TNewCheckListBox(Sender).ItemCaption[Index] of '1.Отражение броней(unKnown_bot).': UndefPic := '1-Забл броней урон.bmp'; '2.Радар (тылы).': UndefPic := 'Радар.bmp'; '3.Командирская камера (koshnaranek).': UndefPic := 'Командирская камера.bmp'; '4.Таймер сведения орудия в бою (Ekspoint).': UndefPic := 'таймер сведения.bmp'; '5.Винтик.': UndefPic := 'винтик.bmp'; else begin LastIndex := UNDEF_INDEX; PicForm.Hide; Exit; end; end; if not FileExists(TempPath + UndefPic) then ExtractTemporaryFile(UndefPic); ShowPicHint(TempPath + UndefPic); finally LastIndex := Index; end; end; procedure CompOnMouseLeave(Sender: TObject); begin PicForm.Hide; LastIndex := -1; end; procedure InitInfo(); begin WizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove; WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave; TempPath := AddBackslash(ExpandConstant('{tmp}')); LastIndex := UNDEF_INDEX; PicForm := TForm.Create(WizardForm) with PicForm do begin BorderStyle := bsNone; FormStyle := fsStayOnTop; InfoPic := TBitmapImage.Create(PicForm) with InfoPic do begin Parent := PicForm; AutoSize := True; end; end; SetWindowLong(PicForm.Handle, GWL_EXSTYLE, GetWindowLong(PicForm.Handle, GWL_EXSTYLE) or WS_EX_LAYERED); SetLayeredWindowAttributes(PicForm.Handle, 0, ALPHA_BLEND_LEVEL, LWA_ALPHA); end; procedure InitializeWizard2(); begin InitInfo(); end; procedure InitializeWizard(); begin InitializeWizard1(); InitializeWizard2(); end; подскажи если знаешь а как туда еще кеш клинер вмонтировать? )) Quote Share this post Link to post Short link Share on other sites