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, 15:04
HunterEmrah HunterEmrah is offline
Registered User
 
Join Date: Jan 2013
Location: Canada
Posts: 59
Thanks: 28
Thanked 15 Times in 13 Posts
HunterEmrah is on a distinguished road
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.
Reply With Quote
Sponsored Links
  #2  
Old 31-03-2019, 04:01
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,077
Thanks: 1,828
Thanked 2,311 Times in 789 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by HunterEmrah View Post
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.
For your first problem maybe this will work (If the installer has only one disk).
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;
To how to integrate INIFile function, ask kaktor to enter the function for this.
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.
Reply With Quote
The Following User Says Thank You to Cesar82 For This Useful Post:
Titeuf (31-03-2019)
  #3  
Old 31-03-2019, 05:27
HunterEmrah HunterEmrah is offline
Registered User
 
Join Date: Jan 2013
Location: Canada
Posts: 59
Thanks: 28
Thanked 15 Times in 13 Posts
HunterEmrah is on a distinguished road
Quote:
Originally Posted by Cesar82 View Post
For your first problem maybe this will work (If the installer has only one disk).
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;
Perfect code. I just copied it to where it should, and it works. thank you
Reply With Quote
The Following User Says Thank You to HunterEmrah For This Useful Post:
Titeuf (31-03-2019)
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 19:59.


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