Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 30-03-2019, 11:58
Schabik Schabik is offline
Registered User
 
Join Date: Dec 2008
Location: Somewhere in Poland
Posts: 152
Thanks: 17
Thanked 35 Times in 32 Posts
Schabik is on a distinguished road
Quote:
Originally Posted by HunterEmrah View Post
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;
CustomMessages.iss
Code:
English.CompMain=Main files
also tried to type {cm:CompMain} for CompName, doesn't working
You have to add to function TranslateComponentName this line

Code:
'CM', 'COMPMAIN' : Result := CustomMessage('CompMain');
Or like you did:
Code:
 
'GC', 'COMPMAIN'  : Result := CustomMessage('CompMain');
Then to settings.ini cm:CM or cm:GC OR cm:COMPMAIN as the name for the component, just remember to use capital letters after "cm:"

And of course like as You added to CustomMessages.iss
Code:
English.CompMain=Main files
As an advice, try to translate the components names to other languages if the installer is multilang, it will be helpful for others who will use it to unpack the game

Last edited by Schabik; 30-03-2019 at 12:12.
Reply With Quote
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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



All times are GMT -7. The time now is 22:17.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com