Kotyarko_O 1,906 #437950 Posted August 11, 2018 (edited) 28 minutes ago, Alex_ said: 1. т.е. только IsComponentSelected('KMP\punkt1').? Да. 28 minutes ago, Alex_ said: 2. а как функцию выше переделать, чтобы она выдавала все названия 'KMP\***' (т.е. спускалась "ниже")? Если конкретно все, то простой пробежкой по циклу: var I: Integer; S: String; begin for I := 0 to WizardForm.ComponentsList.ItemCount - 1 do S := S + WizardForm.ComponentsList.Items[I] + #13#10; Если все дочерние от конкретного компонента, то нужно внедрять в цикл фильтр уровня (ItemLevel - одно из свойств компонента). Пример работы с ним можно найти тут: https://bitbucket.org/Kotyarko_O/kmp/src/master/Resourses/ReadyMemo.iss. Edited August 11, 2018 by Kotyarko_O Quote Share this post Link to post Short link Share on other sites
AlexChe 4 #437955 Posted August 11, 2018 (edited) 1. но WizardForm.ComponentsList.Items выдает текстовое название пункта, а не его "name" 'KMP\punkt1' 2. Еще вопрос, как реализовать смену текстовых значений пунктов при выборе другого языка установки (русский, английский).Есть готовые решения? Edited August 11, 2018 by Alex_ Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #437957 Posted August 11, 2018 1 minute ago, Alex_ said: 1. но WizardForm.ComponentsList.Items выдает текстовое название пункта, а не его "name" 'KMP\punkt1' Тут я проглядел, при чтении предыдущего вопроса. Думал, что имеется ввиду просто прошерстить все компоненты. Но если речь конкретно об имени в [Components], то, как я уже говорил, никак. 4 minutes ago, Alex_ said: 2. Еще вопрос, как реализовать смену текстовых значений пунктов при выборе другого языка установки (русский, английский).Есть готовые решения? Есть: [Languages] Name: En; MessagesFile: "English.isl"; Name: Ru; MessagesFile: "Russian.isl"; [CustomMessages] En.FirstComponent=First component. Ru.FirstComponent=Первый компонент. [Components] Name: A; Description: "{cm:FirstComponent}"; Quote Share this post Link to post Short link Share on other sites
AlexChe 4 #437959 Posted August 11, 2018 (edited) 13 минут назад, Kotyarko_O сказал: Тут я проглядел, при чтении предыдущего вопроса. Думал, что имеется ввиду просто прошерстить все компоненты. Но если речь конкретно об имени в [Components], то, как я уже говорил, никак. Есть: [Languages] Name: En; MessagesFile: "English.isl"; Name: Ru; MessagesFile: "Russian.isl"; [CustomMessages] En.FirstComponent=First component. Ru.FirstComponent=Первый компонент. [Components] Name: A; Description: "{cm:FirstComponent}"; теперь все понятно. Вопрос с проблемами кирилицы решен. Спасибо! Edited August 11, 2018 by Alex_ Quote Share this post Link to post Short link Share on other sites
DKRUBEN 19 #437961 Posted August 11, 2018 @Kotyarko_O , hello again, I got the idea of @night_dragon_on , made it work ...Code: //====================[MCTCREATOR TEST]=====================// Source: "MODS\ComponetsPage\MCTCREATOR\*.cfg"; DestDir: "{app}\_AuthorName_\MCTCreator"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: SetInstallStatus('Extart MTCreator...'); Check: ComponentsChecked('Changing game texture (MCTCreator):'); Source: "MODS\ComponetsPage\MCTCREATOR\7za.exe"; DestDir: "{app}\_AuthorName_\MCTCreator"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: SetInstallStatus('Extart MTCreator...'); Check: ComponentsChecked('Changing game texture (MCTCreator):'); Source: "MODS\ComponetsPage\MCTCREATOR\MCTCreator.exe"; DestDir: "{app}\_AuthorName_\MCTCreator"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: SetInstallStatus('Extart MTCreator...'); AfterInstall: MCTCreator(); Check: ComponentsChecked('Changing game texture (MCTCreator):'); /////////////// //Test Proced// /////////////// procedure TextureCreator(); var WotPath, TempPath, Params: String; ResultCode: Integer; begin if FileExists(ExpandConstant('{app}\_AuthorName_\MCTCreator\MCTCreator.exe')) then begin WotPath:= ExpandConstant('{app}'); TempPath:= ExpandConstant('{app}\_AuthorName_\MCTCreator\texture\res\'); Params:= '/wot-path "' + WotPath + '" /mods-path "' + TempPath + '" /operational-mode=0'; if ComponentsChecked('Change the texture of destroyed tank') then Params := Params + ' /DPT-mod "#2AAAFF" /ITS-mod "#2AAAFF"'; if ComponentsChecked('Change the texture of the downed track') then Params := Params + ' /CT-mod "#D9D9D9"'; Exec(ExpandConstant('{app}\_AuthorName_\MCTCreator\MCTCreator.exe'), Params, ExpandConstant('{app}\_AuthorName_\MCTCreator'), SW_SHOW, ewWaitUntilTerminated, ResultCode); if ResultCode <> 0 then MsgBox('Unexpected error.' + #13#10 + 'Result code: ' + IntToStr(ResultCode) + '.', mbInformation, MB_OK); end else MsgBox('MCTCreator files doesn`t exists.' + #13#10 + 'Please restart the installer.', mbInformation, MB_OK); end; procedure PackageCreator(); var ModsPath, TempPath, Params: String; ResultCode: Integer; begin if FileExists(ExpandConstant('{app}\_AuthorName_\MCTCreator\7za.exe')) then begin ModsPath:= ExpandConstant('{app}\mods\{#Patch}\_AuthorName_\crash_texture.wotmod'); TempPath:= ExpandConstant('{app}\_AuthorName_\MCTCreator\texture\*'); Params:= 'a -tzip -ssw -mx0 -r0 "' + ModsPath + '" "' + TempPath + '"'; Exec(ExpandConstant('{app}\_AuthorName_\MCTCreator\7za.exe'), Params, ExpandConstant('{app}\_AuthorName_\MCTCreator'), SW_HIDE, ewWaitUntilTerminated, ResultCode); if ResultCode <> 0 then MsgBox('Unexpected error.' + #13#10 + 'Result code: ' + IntToStr(ResultCode) + '.', mbInformation, MB_OK); end else MsgBox('Files of the utility "MCTCreator" were not found.' + #13#10 + 'Please restart the installer.', mbInformation, MB_OK); end; procedure MCTCreator(); begin if ComponentsChecked('Change the texture of destroyed tank') or ComponentsChecked('Change the texture of the downed track') then TextureCreator(); PackageCreator(); DelTree(ExpandConstant('{app}\_AuthorName_\MCTCreator'), true, true, true); end; /////////////// Quote Share this post Link to post Short link Share on other sites
Lom 48 #438016 Posted August 12, 2018 всем приветы. народ подскажите в чем может быть проблема. короче один пишет что все время у него было всё нормально а потом вдруг в установщике пропали кнопки вперед назад и тд и надпись тоже сместилась. у него винда 10. вот его скрин я ему посоветовал глянуть эти два параметра, но пишет что не помогло. 1 Quote Share this post Link to post Short link Share on other sites
DKRUBEN 19 #438035 Posted August 13, 2018 @Kotyarko_O in your code, its possible add some function for download components and extract them to game pach. I see a lot of examples but didn't work. Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #438078 Posted August 14, 2018 On 8/12/2018 at 9:40 PM, ЛОМ said: я ему посоветовал глянуть эти два параметра, но пишет что не помогло. Там нужно перезаход в систему делать, без него изменение масштабности может не помочь. @DKRUBEN , possible. 1 Quote Share this post Link to post Short link Share on other sites
AtotIK 580 #438103 Posted August 15, 2018 В 12.08.2018 в 21:40, ЛОМ сказал: всем приветы. народ подскажите в чем может быть проблема. короче один пишет что все время у него было всё нормально а потом вдруг в установщике пропали кнопки вперед назад и тд и надпись тоже сместилась. у него винда 10. вот его скрин Через ScaleX и ScaleY переделай координаты всех элементов. Тогда они будут масштабироваться вместе с окном инсталлятора. 1 Quote Share this post Link to post Short link Share on other sites
Lom 48 #438113 Posted August 15, 2018 3 часа назад, AtotIK сказал: Через ScaleX и ScaleY переделай координаты всех элементов. Тогда они будут масштабироваться вместе с окном инсталлятора. так вроде у меня через это и прописаны координаты 1 Quote Share this post Link to post Short link Share on other sites
AtotIK 580 #438116 Posted August 15, 2018 40 минут назад, ЛОМ сказал: так вроде у меня через это и прописаны координаты Делай лучше так: SetBounds(ScaleX(130), ScaleY(415), ScaleX(13), ScaleY(13)); Где (Left, Top, Width, Height). 1 Quote Share this post Link to post Short link Share on other sites
Lom 48 #438118 Posted August 15, 2018 4 часа назад, AtotIK сказал: Делай лучше так: SetBounds(ScaleX(130), ScaleY(415), ScaleX(13), ScaleY(13)); Где (Left, Top, Width, Height). вот так ? 1 Quote Share this post Link to post Short link Share on other sites
NyanDora_Mech_Tank 1 #439064 Posted August 28, 2018 Hello, sorry for using English, but I have a question I made a setup for my mod, but currently the loading time of it is abnormally long (about 50 seconds). The size of the setup file is not affect to this long loading time (i tried to reduce to 10MB, and it's still 50 seconds, same as 1,7GB originally). Question is: how to reduce this 50 seconds? Below is my script Components.issscript.issMessages.iss And pictures to describe what is happening: Quote Share this post Link to post Short link Share on other sites
StranikS_Scan 4,210 #439067 Posted August 28, 2018 @NyanDora_Mech_Tank May be is high compress ratio? 1 Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #439068 Posted August 28, 2018 (edited) @NyanDora_Mech_Tank , maybe, your app is loading so long because of: InternalCompressLevel=ultra64 Compression=lzma2/ultra64 SolidCompression=true It means that all of the files, included into app, (except files with "nocompression"-flag) will be high-compressed. And 95% of that ~50sec (on your system) being spent only for decompression. Edited August 28, 2018 by Kotyarko_O 1 Quote Share this post Link to post Short link Share on other sites
NyanDora_Mech_Tank 1 #439240 Posted August 29, 2018 23 часа назад, Kotyarko_O сказал: @NyanDora_Mech_Tank , maybe, your app is loading so long because of: InternalCompressLevel=ultra64 Compression=lzma2/ultra64 SolidCompression=true It means that all of the files, included into app, (except files with "nocompression"-flag) will be high-compressed. And 95% of that ~50sec (on your system) being spent only for decompression. Thank you for your support. It is correct that the problem is the compression of the files. I tried to add nocompression flag to all the files and it works nice (now less than 5 seconds) Quote Share this post Link to post Short link Share on other sites
ferrat 3 #439436 Posted August 31, 2018 Добрый вечер. Так как я в этих паскалях полный ноль, наберусь смелости, попросить, если это не трудно. просто само собой так вышло, что понадобилось в коем то веке это долбанное резервирование файлов. Опишу задачу. 1) перед установкой программы (будем это так называть) Создается список файлов и папок каталога назначения. 2) По этому списку, при установке, сопоставляются файлы, если такой файл есть всписке, делать бекап, если такой файл повторно перезаписывается во время установки, не делать бекап, если вайла нет в списке тоже не делать бекап. 3) при деинсталяции восстанвить все фалы с бекапов. Второй вариан, если первый сложно реализовать, но если нет , то он предпочтительней. Многим будет полезен. Второй вариант, просто скрипт с возможностью указать, каике папки и файлы , куда забэкпить , к примеру Берем перед установкой из папки назначения папку 1 и копируем в папку app\backut\1 Берм папку 2 и копируем в папку бекам , как файлы и подкаталоги в ней содержащиеся. после деинсталяции из папки бэкап (возможность указать путь в скрипте) все положить в папку app, а папку бэкап удалить. Очень нужно, Заранее спасибо. Прошу ногами не бить, я в программировании , как блоха в космос пытающаяся найти собаку кровушки нажраться, а космос большой. Спасибо. Quote Share this post Link to post Short link Share on other sites
ferrat 3 #439459 Posted August 31, 2018 И еще вопрос. Изменил. через оболочку размеры в окон инсталлятора, все красиво получилось, как и хотел, но одна беда, при установке, все окошки одинакового размера, но финальное о завершении установки остается первоначального размера, хотя текст и картинки изменены. ,то есть, по какой та причине оно не остается измененного размера. Кто может подсказать, как это вылечить ? Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #439466 Posted August 31, 2018 9 hours ago, ferrat said: Опишу задачу. В обоих вариантах нет ничего сложного. Просто отличие в реализации. 1 hour ago, ferrat said: И еще вопрос. Без скрипта сложно что-то сказать. Quote Share this post Link to post Short link Share on other sites
ferrat 3 #439499 Posted August 31, 2018 1 час назад, Kotyarko_O сказал: В обоих вариантах нет ничего сложного. Просто отличие в реализации. Без скрипта сложно что-то сказать. Написал в личку. Quote Share this post Link to post Short link Share on other sites