DuMaH_K 15 #352741 Posted September 12, 2016 Прошу прощения, если такой вопрос уже был. Поиск по теме не дал результата... Подскажите пожалуйста как сделать выбранный по умолчанию неактивный пункт (мод). Для обязательной его установки, вне зависимости от желания пользователя, но что бы он был об этом проинформирован. Как я понял - не активный пункт получаем так: Flags: fixed; но как сделать его изначально выбранным? Большое спасибо заранее) Quote Share this post Link to post Short link Share on other sites
AtotIK 580 #352756 Posted September 12, 2016 [Types] Name: "full"; Description: "Полная установка"; Flags: iscustom; [Components] Name: "XVM"; Description: "XVM (eXtended Visualization Mod):"; Types: "full"; Flags: fixed disablenouninstallwarning; 2 Quote Share this post Link to post Short link Share on other sites
asterix93 9 #354256 Posted September 20, 2016 (edited) Памагите пажалуста как правилна делати? function NextButtonClick(CurPageID: Integer): Boolean; begin if CurPageID = ISCustomPage1.ID then begin if NewCheckBox1.Checked and PasswordEdit1.Text = '' then begin MsgBox('You must enter your Passwor.', mbError, MB_OK); Result := False; end; end; end; или так function NextButtonClick(CurPageID: Integer): Boolean; begin if CurPageID = wpSelectDir then begin //ISCustomPage1 := CreateCustomPage(wpSelectDir, '', ''); if NewCheckBox1.Checked then begin if PasswordEdit1.Text = '' then begin MsgBox('You must enter your Passwor.', mbError, MB_OK); Result := False; end; end; end; end; Вот веси код! [Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}\My Program DisableProgramGroupPage=yes UninstallDisplayIcon={app}\MyProg.exe OutputDir=Output [Code] { RedesignWizardFormBegin } // Don't remove this line! // Don't modify this section. It is generated automatically. var ISCustomPage1: TWizardPage; PasswordEdit1: TPasswordEdit; PasswordEdit2: TPasswordEdit; PasswordEdit3: TPasswordEdit; PasswordEdit4: TPasswordEdit; PasswordEdit5: TPasswordEdit; NewCheckBox1: TNewCheckBox; NewCheckBox2: TNewCheckBox; NewCheckBox3: TNewCheckBox; NewCheckBox4: TNewCheckBox; NewCheckBox5: TNewCheckBox; procedure RedesignWizardForm; begin { Creates custom wizard page } ISCustomPage1 := CreateCustomPage(wpSelectDir, '', ''); { PasswordEdit1 } PasswordEdit1 := TPasswordEdit.Create(WizardForm); with PasswordEdit1 do begin Parent := ISCustomPage1.Surface; Left := ScaleX(240); Top := ScaleY(24); Width := ScaleX(121); Height := ScaleY(21); Text := ''; end; { PasswordEdit2 } PasswordEdit2 := TPasswordEdit.Create(WizardForm); with PasswordEdit2 do begin Parent := ISCustomPage1.Surface; Left := ScaleX(240); Top := ScaleY(64); Width := ScaleX(121); Height := ScaleY(21); Text := ''; end; { PasswordEdit3 } PasswordEdit3 := TPasswordEdit.Create(WizardForm); with PasswordEdit3 do begin Parent := ISCustomPage1.Surface; Left := ScaleX(240); Top := ScaleY(108); Width := ScaleX(121); Height := ScaleY(21); Text := ''; end; { PasswordEdit4 } PasswordEdit4 := TPasswordEdit.Create(WizardForm); with PasswordEdit4 do begin Parent := ISCustomPage1.Surface; Left := ScaleX(240); Top := ScaleY(152); Width := ScaleX(121); Height := ScaleY(21); Text := ''; end; { PasswordEdit5 } PasswordEdit5 := TPasswordEdit.Create(WizardForm); with PasswordEdit5 do begin Parent := ISCustomPage1.Surface; Left := ScaleX(240); Top := ScaleY(192); Width := ScaleX(121); Height := ScaleY(21); Text := ''; end; { NewCheckBox1 } NewCheckBox1 := TNewCheckBox.Create(WizardForm); with NewCheckBox1 do begin Parent := ISCustomPage1.Surface; Left := ScaleX(32); Top := ScaleY(24); Width := ScaleX(97); Height := ScaleY(17); Caption := 'NewCheckBox1'; end; { NewCheckBox2 } NewCheckBox2 := TNewCheckBox.Create(WizardForm); with NewCheckBox2 do begin Parent := ISCustomPage1.Surface; Left := ScaleX(32); Top := ScaleY(64); Width := ScaleX(97); Height := ScaleY(17); Caption := 'NewCheckBox2'; end; { NewCheckBox3 } NewCheckBox3 := TNewCheckBox.Create(WizardForm); with NewCheckBox3 do begin Parent := ISCustomPage1.Surface; Left := ScaleX(32); Top := ScaleY(108); Width := ScaleX(97); Height := ScaleY(17); Caption := 'NewCheckBox3'; end; { NewCheckBox4 } NewCheckBox4 := TNewCheckBox.Create(WizardForm); with NewCheckBox4 do begin Parent := ISCustomPage1.Surface; Left := ScaleX(32); Top := ScaleY(152); Width := ScaleX(97); Height := ScaleY(17); Caption := 'NewCheckBox4'; end; { NewCheckBox5 } NewCheckBox5 := TNewCheckBox.Create(WizardForm); with NewCheckBox5 do begin Parent := ISCustomPage1.Surface; Left := ScaleX(32); Top := ScaleY(192); Width := ScaleX(97); Height := ScaleY(17); Caption := 'NewCheckBox5'; end; PasswordEdit1.TabOrder := 0; PasswordEdit2.TabOrder := 1; PasswordEdit3.TabOrder := 2; PasswordEdit4.TabOrder := 3; PasswordEdit5.TabOrder := 4; NewCheckBox1.TabOrder := 5; NewCheckBox2.TabOrder := 6; NewCheckBox3.TabOrder := 7; NewCheckBox4.TabOrder := 8; NewCheckBox5.TabOrder := 9; { ReservationBegin } // This part is for you. Add your specialized code here. { ReservationEnd } end; // Don't modify this section. It is generated automatically. { RedesignWizardFormEnd } // Don't remove this line! procedure InitializeWizard(); begin RedesignWizardForm; end; function NextButtonClick(CurPageID: Integer): Boolean; begin if CurPageID = wpSelectDir then begin if NewCheckBox1.Checked then begin if PasswordEdit1.Text = '' then begin MsgBox('You must enter your Passwor.', mbError, MB_OK); Result := False; end; end; end; end; function GetUser(Param: String ): String; begin if Param = 'Password1' then Result := PasswordEdit1.Text; begin if Param = 'Password2' then Result := PasswordEdit2.Text; begin if Param = 'Password3' then Result := PasswordEdit3.Text; begin if Param = 'Password4' then Result := PasswordEdit4.Text; begin if Param = 'Password5' then Result := PasswordEdit5.Text; end; end; end; end; end; //function NewCheckBox11: Boolean; //begin // If NewCheckBox1.Checked then //begin //Exec('{sys}\net.exe', 'user 1csupport {code:GetUser|Password1}', '/add', '/fullname:""1csupport""', '/comment:""1csupport""', '/active:yes', '/expires:never', '/passwordchg:no'); //end; //end; Edited September 20, 2016 by asterix93 Quote Share this post Link to post Short link Share on other sites
shefer 7 #354601 Posted September 23, 2016 (edited) Привет всем! Как это исправить?Помогите плиз! Edited September 23, 2016 by shefer Quote Share this post Link to post Short link Share on other sites
AtotIK 580 #354602 Posted September 23, 2016 Привет всем! Как это исправить?Помогите плиз! Перейти на VCN Styles или не использовать объекты с TRichEditViewer. В текущей (читай "древней") версии dll ISSkin глюк с этим есть. На 8.1 и выше такое вылазит. Quote Share this post Link to post Short link Share on other sites
shefer 7 #354643 Posted September 23, 2016 Перейти на VCN Styles или не использовать объекты с TRichEditViewer. В текущей (читай "древней") версии dll ISSkin глюк с этим есть. На 8.1 и выше такое вылазит. Спасибо за ответ! Вот только недавно начал заниматься этим делом и вообще без понятия как их к паку привязать( Перейти на VCN Styles или не использовать объекты с TRichEditViewer. В текущей (читай "древней") версии dll ISSkin глюк с этим есть. На 8.1 и выше такое вылазит. Ой сорян туплю все есть на сайте и не так сложно,уже разобрался.Огромное спасибо! Quote Share this post Link to post Short link Share on other sites
shefer 7 #354698 Posted September 23, 2016 Еще такой вопрос. Как сделать уведомление в ангаре об обнове модпака? В теме тут читал, но или я туплю или устарело все уже. Помогите плиз, соображаю быстро, долго надоедать не буду! Quote Share this post Link to post Short link Share on other sites
Ekspoint 2,122 #354699 Posted September 23, 2016 Еще такой вопрос. Как сделать уведомление в ангаре об обнове модпака? В теме тут читал, но или я туплю или устарело все уже. Помогите плиз, соображаю быстро, долго надоедать не буду! http://www.koreanrandom.com/forum/topic/21192-notificationbox/page-5?do=findComment&comment=354215 Quote Share this post Link to post Short link Share on other sites
shefer 7 #354701 Posted September 23, 2016 http://www.koreanrandom.com/forum/topic/21192-notificationbox/page-5?do=findComment&comment=354215 Спасибо дружище)) Вот там все понятно) Quote Share this post Link to post Short link Share on other sites
Lom 48 #355288 Posted September 28, 2016 (edited) если не трудно подскажите какая часть кода из этого скрипта мне нужна чтобы картинки появлялись при наведении курсора? та часть что я между плюсиками + разделил,эта? #define MyAppName "KPAH Mod Pack 0.8.6" ;Название инстоллятора #define MyInfoVer "2.4.124" ;Версия инсталлятора #define MyAppVer "1.0" ;Версия игры #define MyAppPublisher "EvilAlex" ;Имя компании или человека кто делал #define MyAppURL "http://www.koreanrandom.com" ;Ссылка для лого #include "Components.iss" ;Компаненты, они же моды #include "Messages.iss" ;Сообщение, надписи на кнопках и т.д. [Setup] AppId={{#GameID} AppName={#MyAppName} AppVersion={#MyAppVer} ;AppVerName={#MyAppName} {#MyAppVersion} AppPublisher={#MyAppPublisher} //====={ Ссылки }=====\\ AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} //====={ Папка устанвки }=====\\ ;DefaultDirName={pf}\{#MyAppName} DefaultDirName={code:MyDirName} DefaultGroupName={#MyAppName} //====={ Картинки }=====\\ SetupIconFile=Files\wot_ico.ico WizardSmallImageFile=Files\img2.bmp WizardImageFile=Files\img1.bmp //====={ Отключение строниц }=====\\ DisableProgramGroupPage=yes //====={ Лицензия и Фак }=====\\ LicenseFile=licensia.txt InfoBeforeFile=faq.rtf InfoAfterFile=credit.rtf //====={ Папка создания и название сетапа }=====\\ OutputDir=.\Output OutputBaseFilename=Setup //====={ Сжатие сетапа }=====\\ InternalCompressLevel=ultra64 Compression=lzma2/ultra64 SolidCompression=true //====={ Основные файлы сетапа }=====\\ [Files] Source: Files\logo.bmp; Flags: dontcopy noencryption noencryption //====={ Картинки модов }=====\\ Source: img_mod\1.bmp; Flags: dontcopy noencryption noencryption Source: img_mod\2.bmp; Flags: dontcopy noencryption noencryption Source: img_mod\3.bmp; Flags: dontcopy noencryption noencryption Source: img_mod\4.bmp; Flags: dontcopy noencryption noencryption //====={ Выбор языка }=====\\ [Languages] Name: "eng"; MessagesFile: "compiler:Default.isl" Name: "rus"; MessagesFile: "compiler:Languages\Russian.isl" [code=auto:0]#ifdef UNICODE #define A "W"#else #define A "A"#endifconst 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';function MyDirName(S:String): String;var InsPath: String; er: boolean; myFile:String;begin Result:=ExpandConstant('C:\Games\World_of_Tanks\'); //если ключа нет то будем ставить сюда er := RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{1EAC1D02-C6AC-4FA6-9A44-96258C37C812RU}_is1', 'InstallLocation', InsPath); if er and (InsPath<>'') then //если ключ существует и там что-то записано begin Result := InsPath; end;end;procedure LogoOnClick(Sender: TObject);var ResCode: Integer;begin ShellExec('', '{#MyAppURL}', '' , '', SW_SHOW, ewNoWait, ResCode)end;procedure RedesignWizardForm;vari: integer; BtnPanel: TPanel; BtnImage: TBitmapImage;begin ExtractTemporaryFile('logo.bmp') BtnPanel:=TPanel.Create(WizardForm) with BtnPanel do begin Left:=0 Top:=315 Width:=179 Height:=46 Cursor:=crHand OnClick:=@logoOnClick Parent:=WizardForm end; BtnImage:=TBitmapImage.Create(WizardForm) with BtnImage do begin AutoSize:=True; Enabled:=False; Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo.bmp') Parent:=BtnPanel end; with WizardForm do begin Caption := ExpandConstant('{cm:Main}'); end; with WizardForm.WizardBitmapImage do begin Width := ScaleX(502); end; with WizardForm.WelcomeLabel2 do begin Visible := False; end; with WizardForm.WelcomeLabel1 do begin Visible := False; end; with WizardForm.WizardSmallBitmapImage do begin Left := ScaleX(0); Width := ScaleX(502); Height := ScaleY(70); end; with WizardForm.PageDescriptionLabel do begin Visible := False; end; with WizardForm.PageNameLabel do begin Visible := False; end; with WizardForm.WizardBitmapImage2 do begin Width := ScaleX(502); end; with WizardForm.FinishedLabel do begin Visible := False; end; with WizardForm.FinishedHeadingLabel do begin Visible := False; end; end; 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 + 16), 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. Прицел.': UndefPic := '1.bmp'; '2. Дамаг панель.': UndefPic := '2.bmp'; '2. Звуковой мод звонок при крите модуля.': UndefPic := '3.bmp'; '3. Zoom.': UndefPic := '4.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 InitializeWizard(); begin InitInfo(); RedesignWizardForm; end; понимаю что это уже давно всё по сто раз тут сказано и я это читал ну ни как не могу догнать))))) Edited September 28, 2016 by ЛОМ Quote Share this post Link to post Short link Share on other sites
night_dragon_on 5,601 #355307 Posted September 28, 2016 (edited) понимаю что это уже давно всё по сто раз тут сказано и я это читал ну ни как не могу догнать))))) ShowPicHint - процедура создания всплывающих подсказок с картинками CompOnItemMouseMove - процедура проверки наведена ли мышь на компонент, если да то вызывается процедура ShowPicHint ShowPicHint(TempPath + UndefPic); CompOnMouseLeave - процедура проверки действия - убрали ли мы мышь с компонента, если убран курсор - подсказки скрываются. PicForm.Hide; В InitInfo - создается форма для картинок и подгружаются все созданные процедуры с привязками к событиям WizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove; WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave; подскажите какая часть кода из этого скрипта мне нужна чтобы картинки появлялись при наведении курсора Все в секции: [code] За исключением procedure InitializeWizard(); Она думаю уже должна быть у вас в своем скрипте, в него нужно добавить загрузку процедуры: InitInfo(); Ну и подстроить под себя: case TNewCheckListBox(Sender).ItemCaption[Index] of В соответствие со своим списком устанавливаемых компонентов. Edited September 28, 2016 by night_dragon_on 1 Quote Share this post Link to post Short link Share on other sites
Lom 48 #355310 Posted September 28, 2016 ShowPicHint - процедура создания всплывающих подсказок с картинками CompOnItemMouseMove - процедура проверки наведена ли мышь на компонент, если да то вызывается процедура ShowPicHint спасибо!!!!!!!!!!!!! ))))) Quote Share this post Link to post Short link Share on other sites
night_dragon_on 5,601 #355311 Posted September 28, 2016 (edited) спасибо!!!!!!!!!!!!! ))))) А так я давно уже перешел на ботву, хоть и код там будет пообъемнее и посложнее для понимания (хотя для кого как), зато функционала там вполне хватает для тонкой настройки. Edited November 16, 2016 by night_dragon_on Quote Share this post Link to post Short link Share on other sites
Lom 48 #355314 Posted September 28, 2016 (edited) А так я давно уже перешел на ботву, хоть и код там будет посложнее для понимания (хотя для кого как), зато функционала там вполне хватает. что то сложное мне не осилить))) простой вариант как раз по мне))) по любому спасибо)))) я уже сделал )) просто с наведением курсора чтобы картинка появлялась))) Edited September 28, 2016 by ЛОМ Quote Share this post Link to post Short link Share on other sites
AtotIK 580 #355378 Posted September 29, 2016 что то сложное мне не осилить))) простой вариант как раз по мне))) по любому спасибо)))) я уже сделал )) просто с наведением курсора чтобы картинка появлялась))) И моргала собой и формой как не в себя... Quote Share this post Link to post Short link Share on other sites
Lom 48 #355426 Posted September 29, 2016 И моргала собой и формой как не в себя... ты о чем? Quote Share this post Link to post Short link Share on other sites
Lom 48 #359877 Posted October 17, 2016 (edited) тут в теме нашел такой вариант.сразу при открытии установщика сперва открывается окно с запросом хочу ли я скачать и т.д. [Setup] AppName=NETFramewrok AppVerName=NETFramewrok DefaultDirName={pf}\NETFramewrok DisableStartupPrompt=true InternalCompressLevel=none Compression=none [Code] function InitializeSetup(): Boolean; var ErrorCode: Integer; NetFrameWorkInstalled : Boolean; Result1 : Boolean; begin NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v1.0'); if NetFrameWorkInstalled =true then begin Result := true; end; if NetFrameWorkInstalled = false then begin NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v1.1'); if NetFrameWorkInstalled =true then begin Result := true; end; if NetFrameWorkInstalled =false then begin Result1 := MsgBox('ХОТИТЕ СКАЧАТЬ И ТЭ ДЭ И ТЭ ПЭ?', mbConfirmation, MB_YESNO) = idYes; if Result1 =false then begin Result:=false; end else begin Result:=false; ShellExec('open', 'http://catcut.net/HGY','','',SW_SHOWNORMAL,ewNoWait,ErrorCode); end; end; end; end; чуток изменил для себя так [Code] function InitializeSetup(): Boolean; var ErrorCode: Integer; NetFrameWorkInstalled : Boolean; Result1 : Boolean; begin Result1 := MsgBox('ХОТИТЕ СКАЧАТЬ 7777777АОВЛОАЛО ?', mbConfirmation, MB_YESNO) = idYes; if Result1 =false then begin Result:=false; end else begin Result:=false; ShellExec('open', 'http://catcut.net/HGY','','',SW_SHOWNORMAL,ewNoWait,ErrorCode); end; end; а можно сделать чтобы это окошко с запросом на скачивание всплывало в конце установки? Edited October 17, 2016 by ЛОМ Quote Share this post Link to post Short link Share on other sites
AtotIK 580 #359909 Posted October 17, 2016 @ЛОМ, проверка на FinishedPage и нажатие NextButton. 1 Quote Share this post Link to post Short link Share on other sites
Lom 48 #359955 Posted October 17, 2016 @ЛОМ, проверка на FinishedPage и нажатие NextButton. суть того что ты написал я конечно понял))) просто я не понял как это всё в коде прописать Quote Share this post Link to post Short link Share on other sites
Lom 48 #360206 Posted October 18, 2016 сел заново читать тему. из за проблем с глазами не могу долго читать. если не трудно подскажите пожалуйста как сделать в установщике одну фоновую картинку для всех страниц? ( ну чтобы весь текст и т.д. на всех страницах были на этой картинке как бы ) или ткните носом в каком месте это обсуждалось в теме! Quote Share this post Link to post Short link Share on other sites