Jump to content











Photo

%ISOFile%


  • Please log in to reply
1 reply to this topic

#1 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 08 October 2009 - 11:31 AM

In the [Main] section of script.project there is an entry like:

ISOFile=%BaseDir%\ISO\%ProjectTitle%\%ProjectTitle%.iso

On project build, single file process, or CodeBox process, WinBuilder evaluates this line and defines 3 global variables:
  • %ISOFile% - the complete path, e.g. %BaseDir%\ISO\nativeEx_barebone\nativeEx_barebone.iso
  • %ISOFileName% the file name only, e.g. nativeEx_barebone.iso
  • %ISODir% - the folder only, e.g. %BaseDir%\ISO\nativeEx_barebone
Rule #1: Never access [Main] ISOFile from a script! Use the suited variables instead!
Rule #2: Never change one of these variables!

How to work with these variables
Let me stay with nativeEx_barebone as sample project.

In ProjectInfo.Script two new internal variables are defined:
StrFormat,FILENAME,%IsoFile%,%tmp%

 StrFormat,EXT,%tmp%,%ext%

 StrFormat,REPLACE,%tmp%,%ext%,,%tmp%

 Set,%ISORootName%,%tmp%,PERMANENT

 Set,%RamISORootName%,%tmp%_RAM,PERMANENT

In this sample it will result with:
  • %ISORootName% = nativeEx_barebone
  • %RAMISORootName% = nativeEx_barebone_RAM
All ISO producing scripts like CreateISO.Script, RAMBoot.script, use these variables to define %burnISO%.
E.g. in RAMBoot.script:
Set,%burnISO%,%ISODir%\%RamISORootName%.iso,PERMANENT

Rule #3: In ISO producing scripts, only use %ISORootName% and %RAMISORootName%, and define %burnISO% permanent!

ALL ISO using scripts
  • Emulators qEmu.Script,VirtualBox.script, VMWare.script
  • Burning scripts like CDRecord.Script
use only %burnISO%

Rule #4: In ISO reading scripts, only use %burnISO%!

Peter

#2 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 08 October 2009 - 11:48 AM

Nice to see you have Finalize your decisions about the subject
(%burnISO% is not history anymore :thumbsup:, i will write them back )
I will follow methods described here.

Well it is nice to have final rules :hypocrite:

here is sth i notice:

LiveXP have 3 create image scripts,

%ISORootName% = nativeEx_barebone
%RAMISORootName% = nativeEx_barebone_RAM
one more:
%WIMISORootName% = nativeEx_barebone_WIM

and maybe more in future

it is not important for me if it is written permanent by project info or sth else, just informing.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users