|
#676
|
|||
|
|||
|
Ok, sory @bubobih for the "out of the blue" question for @KaktoR but.
@KaktoR can You tell me what I must add to Your script if I want to check if the component was selected or not and components are checked ("=1") in the settings.ini For example I want to check if Components are enabled in settings.ini and Polish language was selected (As Components name I'll use cm:PL) can I check if it is selected by adding something like this: Code:
if ({#UseComponents} = 1) and (IsComponentSelected(GetIniString('ComponentsSettings', 'Component' + IntToStr(CompIndexList[I])+ '.Name' = 'cm:PL')) then
begin
Of course I know the code above is wrong and It won't work but with some adjustments I'm sure it would. |
| Sponsored Links |
|
#677
|
||||
|
||||
|
I think I don't understand your question right.
If you select a cmomponent in installer, it will be extracted. If it is not selected, installer will not extract it.
__________________
Haters gonna hate
|
| The Following User Says Thank You to KaktoR For This Useful Post: | ||
Titeuf (22-03-2019) | ||
|
#678
|
|||
|
|||
|
Quote:
I have to run a program conditionally that targets in AC1 .forge.patch files. The condition is that it only should run when Polish or Czech language is selected. How to check if Polish (for example component3.Name=cm:PL) is selected to run the program and run it if the condition is fulfilled? In Beta6 or 7 it was easy, check if "IsComponentSelected('lang\PolishLang')" and then run program to patch the forge files but now it's not clear for me. Last edited by Schabik; 22-03-2019 at 07:13. |
| The Following User Says Thank You to Schabik For This Useful Post: | ||
KaktoR (22-03-2019) | ||
|
#679
|
||||
|
||||
|
Ok now I understand.
I will look.
__________________
Haters gonna hate
|
|
#680
|
|||
|
|||
|
#681
|
||||
|
||||
|
ASIS - Valid Component
Quote:
Code:
if IsComponentSelectedByID(3) then
MsgBox('True', mbInformation, MB_OK)
else
MsgBox('False', mbInformation, MB_OK);
- If you have "Character Backslash" in the name you will check with dependence on "Level". - If you do not have "Character Backslash" in the name you will only check on the components with "Component#.File" other than empty. Code:
if IsComponentSelectedByName('Game Components\') then
MsgBox('True', mbInformation, MB_OK)
else
MsgBox('False', mbInformation, MB_OK);
Code:
if IsComponentSelectedByName('Game Components\Custom Name') then
MsgBox('True', mbInformation, MB_OK)
else
MsgBox('False', mbInformation, MB_OK);
Code:
if IsComponentSelectedByName('Game Components\cm:FR') then
MsgBox('True', mbInformation, MB_OK)
else
MsgBox('False', mbInformation, MB_OK);
Last edited by Cesar82; 24-03-2019 at 16:29. |
| The Following 4 Users Say Thank You to Cesar82 For This Useful Post: | ||
|
#682
|
|||
|
|||
|
Quote:
|
|
#683
|
||||
|
||||
|
You can use the folowing for CurStep = ssPostInstall or CurStep = ssDone (like you wish)
Code:
if IsComponentSelectedByName('Game Components\cm:PL') then
{Execute program here (you can use Exec2 function)}
if IsComponentSelectedByName('Game Components\cm:CZ') then
{Execute program here (you can use Exec2 function)}
__________________
Haters gonna hate
|
|
#684
|
|||
|
|||
|
Quote:
Ok, after adding the conditions and trying to compile I've got an error says that a comma is expected. after looking at the end of the line the comma is added but in the 94-th column there should't be a comma. 2019-03-25_09h12_11.png I'm attaching my script. Last edited by Schabik; 25-03-2019 at 00:15. |
| The Following User Says Thank You to Schabik For This Useful Post: | ||
Titeuf (25-03-2019) | ||
|
#685
|
||||
|
||||
|
Quote:
Goto line 4225 and replace in this line end; by #endif Now goto line 3945 and delete this for lines ( 3945, 3946, 3947, 3948 ) and insert: Code:
#if UseComponents == "1"
if (IsComponentSelectedByName('cm:GameLang\cm:PL')) then
begin
WizardForm.ProgressGauge.Hide;
WizardForm.StatusLabel.Caption := ExpandConstant('{cm:PatchingFiles}');
Attached is a way for you to simplify the code of applying the path with xdelta. Only the file names change, so it's more practical to create a loop Last edited by Cesar82; 25-03-2019 at 02:23. |
| The Following User Says Thank You to Cesar82 For This Useful Post: | ||
Titeuf (25-03-2019) | ||
|
#686
|
|||
|
|||
|
Quote:
Nope, still the same ![]() Ok, I've got it now. in: Code:
RegWriteDWordValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#Name}_is1', 'EstimatedSize', Round(InstallationSize / 1024));
my {#Name} constant is "Assassin's Creed", the apostrophe causes the error... Is there a way to replace the apostrophe for the name of the Game to be complete? Unfortunately I think the game's name must be with the apostrophe for registry entries to work
Last edited by Schabik; 25-03-2019 at 02:18. |
|
#687
|
||||
|
||||
|
Quote:
Code:
RegWriteDWordValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#StringChange(Name, "'", "''")}_is1', 'EstimatedSize', Round(InstallationSize / 1024));
|
|
#688
|
|||
|
|||
|
Quote:
Thanks ![]() Ok, About DPICalculator, I think it Does work for 125% Scale but on 100% it does This: 2019-03-25_14h14_37.png and on 150% does this: 2019-03-25_14h15_52.png Last edited by Schabik; 25-03-2019 at 05:17. |
| The Following User Says Thank You to Schabik For This Useful Post: | ||
Cesar82 (25-03-2019) | ||
|
#689
|
||||
|
||||
|
Unfortunatelly I only have a FullHD monitor (1920x1080) and therefore I can't test the DPI right. Maybe Cesar is in the mood to fix this someday
__________________
Haters gonna hate
|
|
#690
|
||||
|
||||
|
Quote:
Here in Full HD resolution change to 125%, 150% 175% works normal.
|
| The Following User Says Thank You to Cesar82 For This Useful Post: | ||
Titeuf (25-03-2019) | ||
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Help] need Advanced Installer script with Razor1911's UltraArc module | rez3vil | Conversion Tutorials | 3 | 15-04-2024 02:24 |
| Portable Installer Inno Setup Script | y_thelastknight | Conversion Tutorials | 59 | 23-10-2020 00:02 |
| INDEX - Conversion Tutorial Index | Razor12911 | Conversion Tutorials | 5 | 11-06-2020 02:05 |
| Simple Arc Installer | 78372 | Conversion Tutorials | 1 | 15-06-2017 15:37 |
| MSC+Srep+lzma Simple Script Example | gozarck | Conversion Tutorials | 10 | 07-09-2015 16:31 |