PDA

View Full Version : Need help with components


Amsal
02-03-2016, 10:16
Hello everyone, I just want to know that if there are two archives, German.bin and English.bin, so I want to know what I have to add in the [Components] section, and what I have to add or edit in is done section, so that when some select German component then it will only install German.bin and if someone select English.bin then it install English language only. It will be better if you give a short example also.


Thanks in advance for helping me!

rinaldo
02-03-2016, 11:05
[Components]
Name: text; Description: Select Language Text; Types: full; Flags: fixed
Name: text\ger; Description: German; Flags: exclusive;
Name: text\eng; Description: English; Flags: exclusive;


Component Selection:
if IsComponentSelected('text\ger') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue;



FreArc ISDone Extraction:
if not ISArcExtract ( 1, 0, ExpandConstant('{src}\German_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 2, 0, ExpandConstant('{src}\English_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;

Amsal
02-03-2016, 17:34
[Components]
Name: text; Description: Select Language Text; Types: full; Flags: fixed
Name: text\ger; Description: German; Flags: exclusive;
Name: text\eng; Description: English; Flags: exclusive;


Component Selection:
if IsComponentSelected('text\ger') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue;



FreArc ISDone Extraction:
if not ISArcExtract ( 1, 0, ExpandConstant('{src}\German_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 2, 0, ExpandConstant('{src}\English_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
Thanks alot

Amsal
02-03-2016, 17:48
And bro, if I have 7 LANGUAGE components then the components selection will be same or we have to add some more lines, it will be great if you show one small example. Thanks a lot rinaldo

rinaldo
02-03-2016, 18:52
type:

Name: text; Description: Select Language Text; Types: full; Flags: fixed
Name: text\ger; Description: Deutsch; Flags: exclusive; ExtraDiskSpaceRequired: 100000000
Name: text\eng; Description: English; Flags: exclusive; ExtraDiskSpaceRequired: 200000000
Name: text\fra; Description: Francaise; Flags: exclusive; ExtraDiskSpaceRequired: 300000000
Name: text\spa; Description: Espanol; Flags: exclusive; ExtraDiskSpaceRequired: 400000000
Name: text\rus; Description: Russian; Flags: exclusive; ExtraDiskSpaceRequired: 300000000
Name: text\ita; Description: Italian; Flags: exclusive; ExtraDiskSpaceRequired: 600000000
Name: text\bra; Description: Brazilian; Flags: exclusive; ExtraDiskSpaceRequired: 50000000




if IsComponentSelected('text\ger') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\fra') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\spa') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\ita') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\bra') then Comps1:=Comps1+TmpValue;



if not ISArcExtract ( 0, 65, ExpandConstant('{src}\data.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;


if not ISArcExtract ( 1, 5, ExpandConstant('{src}\German_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 2, 5, ExpandConstant('{src}\English_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 3, 5, ExpandConstant('{src}\Francaise_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 4, 5, ExpandConstant('{src}\Espanol_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 5, 5, ExpandConstant('{src}\Russian_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 6, 5, ExpandConstant('{src}\Italian_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 7, 5, ExpandConstant('{src}\Brazilian_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;

Amsal
02-03-2016, 19:07
type:

Name: text; Description: Select Language Text; Types: full; Flags: fixed
Name: text\ger; Description: Deutsch; Flags: exclusive; ExtraDiskSpaceRequired: 100000000
Name: text\eng; Description: English; Flags: exclusive; ExtraDiskSpaceRequired: 200000000
Name: text\fra; Description: Francaise; Flags: exclusive; ExtraDiskSpaceRequired: 300000000
Name: text\spa; Description: Espanol; Flags: exclusive; ExtraDiskSpaceRequired: 400000000
Name: text\rus; Description: Russian; Flags: exclusive; ExtraDiskSpaceRequired: 300000000
Name: text\ita; Description: Italian; Flags: exclusive; ExtraDiskSpaceRequired: 600000000
Name: text\bra; Description: Brazilian; Flags: exclusive; ExtraDiskSpaceRequired: 50000000




if IsComponentSelected('text\ger') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\fra') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\spa') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\ita') then Comps1:=Comps1+TmpValue;
TmpValue:=TmpValue*2;
if IsComponentSelected('text\bra') then Comps1:=Comps1+TmpValue;



if not ISArcExtract ( 0, 65, ExpandConstant('{src}\data.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;


if not ISArcExtract ( 1, 5, ExpandConstant('{src}\German_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 2, 5, ExpandConstant('{src}\English_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 3, 5, ExpandConstant('{src}\Francaise_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 4, 5, ExpandConstant('{src}\Espanol_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 5, 5, ExpandConstant('{src}\Russian_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 6, 5, ExpandConstant('{src}\Italian_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 7, 5, ExpandConstant('{src}\Brazilian_lng.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;


Thanks a lot, and if I want to add one more component, which will be for all 7 languages, so that if some one want to install all languages then he can do that, so then what should I have to do in the script?? And this is last question, thanks a lot Rinaldo again for helping me alot

rinaldo
02-03-2016, 19:14
+1 component section
+1 components Selected
+1 ISArcExtract

if you do not use file records.ini you have to divide the progression as a percentage ...

Amsal
02-03-2016, 19:25
+1 component section
+1 components Selected
+1 ISArcExtract

if you do not use file records.ini you have to divide the progression as a percentage ...

Can you please give me a example, so that I will know how it will install all the english-len.bin etc. Will be installed when someone select that component, BTW, I am not gonna to use records.ini