Hi Peter,
BTW2:
IniDelete,%projectdir%\script.project,variables,#$pISOfile#$p
Should better be done by
Set,%ISOFile%,nil,PERMANENT
The "IniDelete" variant will preserve the current %ISOFile% for the subsequent scripts in the actual build
Thanks a lot.
In scripts, a hardcoded ISO filename is a nightmare for me.
This is not the case here, PaPeuser gives his "own" (hardcoded) names to iso files so I put examples with the file name he gave
My friend Lancelot, please do not send me a killer, if I add: "But it is a quick and dirty solution, too"
No it is not a quick and dirty solution. It is clean and quick solution
. Quick because **all projects uses %ISOFile% variable on finalize scripts (iso burning, emulator and iso builder scripts). Clean because all done with variables.
**all projects exception: nativeex_barabone and naughtype. LiveXP is currently hybrid
(on emulator and burn iso scripts LiveXP uses %isofile% , on iso creation hybrid)
BTW: Or is there something which I did not understand or miss in your suggestion?
Let me explain the "Clean" part more with an example from Multi7PE:
I do not know PE2/3 project variables very well, but I know all uses %SourceArch% now.
lets say a user (example PaPeuser) makes 2 builds with win7x64 and winx86 sources,
eventually this user would like to have 2 different named iso files in the end at iso folder instead of last one overwriting previous.
Keeping in mind, The only hardcoded iso file name must be on script.project [Main] ISOfile=
and remembering on win7pe (Multi7PE) project
[Main]
Title=Multi 7PEs
SourceDir=
TargetDir=%baseDir%\Target\Win7PE
ISOfile=%baseDir%\ISO\7PE.iso
a mandatory script at \Projects\win7pe\Build\8-ISO_Filename.script (or lines to the end of 0-preconfig.script)
IniRead,%ProjectDir%\script.project,Main,ISOfile,%ISOfilefromScriptProject%
strformat,filename,%ISOfilefromScriptProject%,%ISOFileName_W_Extension%
StrFormat,Split,%ISOFileName_W_Extension%,.,1,%ISOFileName_Wout_Extension%
Set,%ISOFileGivenName%,%ISOFileName_Wout_Extension%_%SourceArch%.ISO
Set,%ISOfile%,%ISODir%\%ISOFileGivenName%,Permanent
will solve the issue. (Well this is my plan for LiveXP in future).
following example with multi7pe project result will be
7PE_x86.iso
7PE_x64.iso
This is a "dynamic" creation
and all finalize scripts of multi7pe (iso burning, emulator and iso builder scripts) will work without problem.
I do not know how Win7PE detects sources (vista-win7-2008 and maybe waik) ,
just to expand the example, let me call them %sourcetypeofpe% (there is also api call available)
as a result one can use this:
IniRead,%ProjectDir%\script.project,Main,ISOfile,%ISOfilefromScriptProject%
strformat,filename,%ISOfilefromScriptProject%,%ISOFileName_W_Extension%
StrFormat,Split,%ISOFileName_W_Extension%,.,1,%ISOFileName_Wout_Extension%
Set,%ISOFileGivenName%,%ISOFileName_Wout_Extension%_%sourcetypeofpe%_%SourceArch%.ISO
Set,%ISOfile%,%ISODir%\%ISOFileGivenName%,Permanent
following example with multi7pe project result will be
7PE_Vista_x86.iso
7PE_Vista_x64.iso
7PE_Win7_x86.iso
7PE_Win7_x64.iso
7PE_2008_x86.iso
7PE_2008_x64.iso
"dynamic" and "NOT hardcoded"