|
|
|
#1
|
||||
|
||||
|
So i might have found a long standing bug (or maybe im just too dumb to make it work xD). It's about the [CustomIniFile] section. To make it simple, i've used a copy paste from the CIU Documentation to test it out and the Value entry never got applied to the .ini file, it always put into Value the path and .ini name instead.
Setup.ini: Code:
{app}\IniFile3.ini; Section: Settings; Key: Language; Create: 1; Value: EN=english|ES=Spanish|FR=French|DE=German
IniFile3.ini created by CIU after install: Code:
[Settings]
Language={app}\IniFile3.ini
Code:
begin
if FileExists(IniName) or (StrToIntDef(LineDecode(TmpStr, 'Create', '0'), 0) = 1) then
begin
IniValue := LineDecode(TmpStr, '', '');
Code:
IniValue := LineDecode(TmpStr, 'Value', ''); Code:
{app}\IniFile3.ini; Section: Settings; Key: Language; Create: 1; Value:EN=english|ES=Spanish|FR=French|DE=German
Regards !!! |
| The Following User Says Thank You to K4miKaZe For This Useful Post: | ||
Cesar82 (09-02-2024) | ||
| Sponsored Links |
|
#2
|
||||
|
||||
|
Quote:
It really is wrong and the solution is the same. Maybe including something to remove the first space in the value if it exists would be interesting. |
| The Following User Says Thank You to Cesar82 For This Useful Post: | ||
K4miKaZe (09-02-2024) | ||
|
#3
|
||||
|
||||
|
Quote:
Thank's to you for keeping this up !!! EDIT: So seems like adding Trim to the LineDecode was enough to fix the spacing issue. I've done some tests and all went fine. 1st test was to just let CIU make a clean .ini with the language feature, second test was letting CIU modify an existent .ini to replace the value with the language feature and another test to add custom values without the language feature. All went fine. So here is the original code on the latest beta hf2 (from december) and the only little change i made to it. Original: Code:
begin
if FileExists(IniName) or (StrToIntDef(LineDecode(TmpStr, 'Create', '0'), 0) = 1) then
begin
IniValue := LineDecode(TmpStr, '', '');
if (IniValue = '') or ((Pos('=', IniValue) > 0) and (Pos('|', IniValue) > 0) and (Pos(LowerCase(ActLangShort + '='), LowerCase(IniValue)) = 0)) then
Code:
begin
if FileExists(IniName) or (StrToIntDef(LineDecode(TmpStr, 'Create', '0'), 0) = 1) then
begin
IniValue := Trim(LineDecode(TmpStr, 'Value', ''));
if (IniValue = '') or ((Pos('=', IniValue) > 0) and (Pos('|', IniValue) > 0) and (Pos(LowerCase(ActLangShort + '='), LowerCase(IniValue)) = 0)) then
Last edited by K4miKaZe; 09-02-2024 at 15:31. |
| The Following User Says Thank You to K4miKaZe For This Useful Post: | ||
Cesar82 (09-02-2024) | ||
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| INDEX - Conversion Tutorial Index | Razor12911 | Conversion Tutorials | 5 | 11-06-2020 02:05 |
| [GSERIES] Custom Installer Ultimate V2g | Gupta | Conversion Tutorials | 226 | 01-06-2018 13:12 |
| Crysis 3 DVD9 to 3xDVD5 Custom Installer | spawniectes | PC Games - CD/DVD Conversions | 79 | 31-08-2017 07:19 |