|
#691
|
|||
|
|||
|
Quote:
Ok, the case looks like this, If I run on basic script (modified only with the statements that verify the selected components to modify files) on my PC with 100% DPI scaling it works fine, the same is after changing to 125%, 150% and 175% but with already runned setup. I forgot to mention, on both Desktop and Laptop I have 1980x1080 resolution, and on Laptop 125% scaling, as for Desktop 100% If I run the setup after changing the scale to for example 125% it looks like that: 2019-03-26_09h39_27.png so, the DPICalculator in fact does not work... ![]() Edit: Ok, @KaktoR, @Cesar82 Problem solved. The Case was that in the original script there were absolute coordinates and sizes for the size of Forms etc. Just change the absolute sizes to SizeX and SizeY values and Voila ![]() For Example if You Have "WilkommenLabel.Width := 600" change it to "WilkommenLabel.Width := SizeX(600)", for "*.Height :=300" change to "*.Height = SizeY(300)", "Top :=" to "Top := SizeY()", "Left :=" to "Left := SizeX()". Tested it on "WillkommenLabel" and it works. Last edited by Schabik; 28-03-2019 at 05:46. |
| The Following User Says Thank You to Schabik For This Useful Post: | ||
Titeuf (25-03-2019) | ||
| Sponsored Links |
|
#692
|
||||
|
||||
|
Thanks to @Schabik I was able to fix the DPI for 4K monitors/resolutions.
Here is the new stable version (added to post #1). Code:
v7.1.2
_____________________________________________________
- Added Redist installation to CompactMode
- Added ISHash library to CompactMode (now really!)
- Updated ISHash library (thanks to peterf1999)
- Added components
> With this you can unpack language archives or other archives
> Set them in Settings.ini
> You don't need to add them to Records.ini
- Reworked Components (thanks to Cesar82)
- Updated 7z to v19.0.0.0
- Changes 'Size=' key in Settings.ini
> It is now possible to write size as follow:
b,B,k,K,kb,KB,Kb,m,M,mb,MB,Mb,g,G,gb,GB,Gb,t,T,tb,TB,Tb,p,P,pb,PB,Pb
- Fixed slideshow
> Before it always show the first picture twice.
- Fixed not correct size in Windows Control Panel
- Fixed some other bugs
- Fixed component progress on ProgressBar
- Fixed ScrollBar on LicensePage and InfoBeforePage if you use cjstyle skin
- Added Skin support to LanguageBox (thanks to Cesar82)
- Added Skin support to Uninstall progress
- Changed appearance in Components page
- Added compact mode to installer
> This is an option for minimalistic setup with only one page
> In CompactMode you can only use SFV and MD5 files for CRC check
I will implement ISHash library later in CompactMode
- Fixed LogButton in CRC Check page
- Fixed other bug if CRC check is disabled
- Added checkbox for "Create Uninstaller"
> If checkbox is checked, Uninstall files will be created
> If checkbox is not checked, no uninstall files will be created
- Added [INISettings] to Settings.ini
> With this you can change INI settings after installation is done
- Fixed french translation for CRC check page (forgot some spaces)
- Added RazorTools
> ZSTD Precompressor
> FIFA 19 Cas Decryption Tool + Precompressor
> Project CARS 2 Bff Decryption Tool
> LZX Precompressor
- Fixed DPI calculation if text scaling in Windows Display Settings was greater than 100% (thanks to Cesar82)
__________________
Haters gonna hate
|
| The Following 5 Users Say Thank You to KaktoR For This Useful Post: | ||
kassane (30-03-2019), mausschieber (28-03-2019), pakrat2k2 (28-03-2019), Simorq (28-03-2019), Titeuf (28-03-2019) | ||
|
#693
|
|||
|
|||
|
how can i apply custommessage for Main files component ?
Script.iss Code:
function TranslateComponentName(StrName: String): String;
begin
case Trim(Uppercase(Copy(StrName, Pos('cm:', LowerCase(StrName)) + Length('cm:'), Length(StrName)))) of
'EN', 'ENGLISH' : Result := CustomMessage('CompEnglish');
'FR', 'FRENCH' : Result := CustomMessage('CompFrench');
'DE', 'GERMAN' : Result := CustomMessage('CompGerman');
'IT', 'ITALIAN' : Result := CustomMessage('CompItalian');
'ES', 'SPANISH' : Result := CustomMessage('CompSpanish');
'PL', 'POLISH' : Result := CustomMessage('CompPolish');
'RU', 'RUSSIAN' : Result := CustomMessage('CompRussian');
'BR', 'BRAZILIAN' : Result := CustomMessage('CompPortugueseBrazil');
'MX', 'MEXICAN' : Result := CustomMessage('CompMexican');
'CZ', 'CZECH' : Result := CustomMessage('CompCzech');
'CL', 'COMPLAN' : Result := CustomMessage('CompLan');
'CB', 'COMPBONUS' : Result := CustomMessage('CompBonus');
'GC', 'COMPMAIN' : Result := CustomMessage('CompMain');
else
Result := StrName;
end;
end;
Code:
ComponentsSize := 0;
SetArrayLength(CompIndexList, 0);
IniFile := ExpandConstant('{tmp}\Settings.ini');
ComponentsPageAvai := GetIniBool('ComponentsSettings', 'Enable', False, IniFile);
if ComponentsPageAvai then
begin
if IniKeyExists('ComponentsSettings', 'Component' + IntToStr(I) + '.Name', IniFile) then
begin
CompName := 'cm:COMPMAIN';
ComponentsList.AddCheckBox(CompName, '', 0, True, False, True, True, nil);
end;
Code:
English.CompMain=Main files |
|
#694
|
|||
|
|||
|
Quote:
Code:
'CM', 'COMPMAIN' : Result := CustomMessage('CompMain');
Code:
'GC', 'COMPMAIN' : Result := CustomMessage('CompMain');
And of course like as You added to CustomMessages.iss Code:
English.CompMain=Main files Last edited by Schabik; 30-03-2019 at 12:12. |
|
#695
|
|||
|
|||
|
Quote:
Quote:
Code:
//------------ GROUP 1 ------------------------------------- Component1.Name=cm:CompMain Component1.Level=0 Component1.Exclusive=0 Component1.Checked=1 Component1.Enabled=0 Component2.Name=cm:CompLan Component2.Level=0 Component2.Exclusive=0 Component2.Checked=1 Component2.Enabled=0 Component3.Name=cm:RU Component3.File=lzl-selective-russian.bin Component3.Size=688 mb Component3.Level=1 Component3.Exclusive=1 Component3.Checked=1 Component3.Enabled=1 Component4.Name=cm:EN Component4.File=lzl-selective-english.bin Component4.Size=622 mb Component4.Level=1 Component4.Exclusive=1 Component4.Checked=0 Component4.Enabled=1 //------------ GROUP 1 ------------------------------------- //------------ GROUP 2 ------------------------------------- Component5.Name=cm:CompBonus Component5.Level=0 Component5.Checked=1 Component5.Enabled=1 Component6.Name=El Prez Edition Content Component6.File=lzl-optional-bonus.bin Component6.Size=0.474 GB Component6.Level=1 Component6.Exclusive=0 Component6.Checked=1 Component6.Enabled=1 //------------ GROUP 2 ------------------------------------- Quote:
Last edited by HunterEmrah; 30-03-2019 at 12:22. |
|
#696
|
|||
|
|||
|
Quote:
In settings.ini I had replaced only Component1.Name=Main Files with Component1.Name=cm:GAMEFILES and it worked fine. Try it with the not modified script and add the lines from previous posts |
| The Following User Says Thank You to Schabik For This Useful Post: | ||
Titeuf (30-03-2019) | ||
|
#697
|
|||
|
|||
|
but i'm talking about "Main files" component, not "Game Components". Here is the screenshots from untouched script. "Main files" have static title which set in script.iss
Last edited by HunterEmrah; 30-03-2019 at 12:40. |
|
#698
|
||||
|
||||
|
Quote:
Code:
'Main Files' Code:
CustomMessage('MainFiles')
Code:
English.MainFiles=Main Files In Setup.ini, you can remove component 1 The key: Component1.Name=Game Components and rearranging the ID of the next components. Last edited by Cesar82; 30-03-2019 at 13:00. |
| The Following 2 Users Say Thank You to Cesar82 For This Useful Post: | ||
HunterEmrah (30-03-2019), Titeuf (30-03-2019) | ||
|
#699
|
|||
|
|||
|
Quote:
thank you Cesar82
|
|
#700
|
|||
|
|||
|
how to automatically uncheck and disable the checkbox of optional/selective component if file doesn't exist. for eg:
i have only 1 language pack from 5, installer should check availability for all of components and automatically uncheck&disable which are missing another question, maybe not last. how to integrate INIFile function which changes player name in steam_emu.ini after install, to Language changing? For eg: During installation i will check English language and after install installer will change "Language=spanish" string to "Language=english" in steam_emu.ini. In this way, it will be more useful for users if we automate the script. I really loved this script. |
|
#701
|
||||
|
||||
|
Quote:
Code:
procedure CurPageChanged(CurPageID: integer);
var
I: Integer;
CompFile: String;
begin
//...
if CurPageID = wpWelcome then
begin
//....
#if UseComponents == "1"
if ComponentsPageAvai then
begin
for I := 0 to GetArrayLength(CompIndexList) - 1 do
begin
CompFile := GetIniString('ComponentsSettings', 'Component' + IntToStr(CompIndexList[I]) + '.File', '', ExpandConstant('{tmp}\Settings.ini'));
if (ExtractFileExt(CompFile) <> '') and (not FileExists(ExpandConstant('{src}\' + CompFile))) then
begin
ComponentsList.Checked[CompIndexList[I]] := False;
ComponentsList.ItemEnabled[CompIndexList[I]] := False;
end;
end;
end;
#endif
end;
//...
//...
end;
Or you can add the code copying from the CIU v3 (Custom Installer Ultimate) script here in the forum (just over 100 lines of code). To adapt the code you only need change languages of the code and also the GetValStr for the Settings.ini. Last edited by Cesar82; 31-03-2019 at 04:04. |
| The Following User Says Thank You to Cesar82 For This Useful Post: | ||
Titeuf (31-03-2019) | ||
|
#702
|
|||
|
|||
|
Quote:
thank you
|
| The Following User Says Thank You to HunterEmrah For This Useful Post: | ||
Titeuf (31-03-2019) | ||
|
#703
|
||||
|
||||
|
I will add something for language in INI file.
__________________
Haters gonna hate
|
| The Following 2 Users Say Thank You to KaktoR For This Useful Post: | ||
HunterEmrah (31-03-2019), Titeuf (31-03-2019) | ||
|
#704
|
|||
|
|||
|
I tried something but could not give the correct size to "Main files" component, on components page first time size is right, but after clicking components it's resets.
what i changed in script.iss Quote:
Quote:
https://streamable.com/wsa4j |
| The Following User Says Thank You to HunterEmrah For This Useful Post: | ||
Titeuf (31-03-2019) | ||
|
#705
|
||||
|
||||
|
Quote:
Leave as before the part you changed: ComponentsSize:=0; 1. Then replace the original line (Line commented with //) with the line below in this part. Code:
procedure ComponentsOnCheck(Sender: TObject);
var
I: Integer;
begin
ComponentsSize := 0;
for I := 0 to GetArrayLength(CompIndexList) - 1 do
if ComponentsList.Checked[CompIndexList[I]] then
ComponentsSize := ComponentsSize + GetSizeBytes(GetIniString('ComponentsSettings', 'Component' + IntToStr(CompIndexList[I]) + '.Size', '0', ExpandConstant('{tmp}\Settings.ini')));
//ComponentsDiskSpaceLabel.Caption := DiskSpaceMB(SetupMessage(msgComponentsDiskSpaceMBLabel), SizeBytesToMB(ComponentsSize, '', 0));
ComponentsDiskSpaceLabel.Caption := DiskSpaceMB(SetupMessage(msgComponentsDiskSpaceMBLabel), SizeBytesToMB(ComponentsSize + GetSizeBytes(GetIniString('Settings', 'Size', '0', ExpandConstant('{tmp}\Settings.ini'))), '', 0));
end;
Code:
//ComponentsDiskSpaceLabel.Caption := DiskSpaceMB(SetupMessage(msgComponentsDiskSpaceMBLabel), SizeBytesToMB(ComponentsSize, '', 0));
ComponentsDiskSpaceLabel.Caption := DiskSpaceMB(SetupMessage(msgComponentsDiskSpaceMBLabel), SizeBytesToMB(ComponentsSize + GetSizeBytes(GetIniString('Settings', 'Size', '0', ExpandConstant('{tmp}\Settings.ini'))), '', 0));
|
![]() |
|
|
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 |