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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22-03-2019, 06:07
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,705
Thanks: 1,106
Thanked 7,358 Times in 2,849 Posts
KaktoR is on a distinguished road
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
Reply With Quote
The Following User Says Thank You to KaktoR For This Useful Post:
Titeuf (22-03-2019)
Sponsored Links
  #2  
Old 22-03-2019, 07:10
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 KaktoR View Post
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.
The extract part is OK, although I'm having problems with understanding the new code.

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.
Reply With Quote
The Following User Says Thank You to Schabik For This Useful Post:
KaktoR (22-03-2019)
  #3  
Old 23-03-2019, 19:41
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
ASIS - Valid Component

Quote:
Originally Posted by Schabik View Post
The extract part is OK, although I'm having problems with understanding the new code.

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.
How to use by ID (ID is the number of the component represented by "#" in keys Component#.Name=):
Code:
  if IsComponentSelectedByID(3) then
    MsgBox('True', mbInformation, MB_OK)
  else
    MsgBox('False', mbInformation, MB_OK);
How to use by Name (Same name that you used in INI):
- 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);
Attached Files
File Type: 7z 7.1.2.beta8.FIX (Valid Components).7z (21.2 KB, 16 views)

Last edited by Cesar82; 24-03-2019 at 16:29.
Reply With Quote
The Following 4 Users Say Thank You to Cesar82 For This Useful Post:
KaktoR (24-03-2019), mausschieber (24-03-2019), pakrat2k2 (24-03-2019), Titeuf (24-03-2019)
  #4  
Old 24-03-2019, 09:45
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 Cesar82 View Post
How to use by ID (ID is the number of the component represented by "#" in keys Component#.Name=):
Code:
  if IsComponentSelectedByID(3) then
    MsgBox('True', mbInformation, MB_OK)
  else
    MsgBox('False', mbInformation, MB_OK);
How to use by Name (Same name that you used in INI):
- If you have "" in the name you will check with dependence on "Level".
- If you do not have "" 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);
Do I need to add some decelerations to the code for IsComponentSelectedByID or IsComponentSelectedByName functions?
Reply With Quote
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 03:02.


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