Jump to content











Photo
- - - - -

Require_File syntax


  • Please log in to reply
9 replies to this topic

#1 pecd.net

pecd.net

    Silver Member

  • .script developer
  • 947 posts
  •  
    Germany

Posted 07 March 2010 - 11:16 AM

from the capi i see

Syntax==> Require_File,[Folder\]filename,[Source (if different of %Source_Sys%)],[Target(If different of %Target_Sys%)],[OverWrite]|[PRESERVE],[NOWARN]

So is

Require_File,somefile.dll,,,PRESERVE,NOWARN

correct or does it have to be

Require_File,somefile.dll,PRESERVE,NOWARN

?

#2 pecd.net

pecd.net

    Silver Member

  • .script developer
  • 947 posts
  •  
    Germany

Posted 07 March 2010 - 01:37 PM

ahhh...

in paragliders chm i found what i was looking for...

--
The PRESERVE parameter must be parameter 4. The NOWARN parameter must be parameter 5.

Example

This always copies shlwapi.dll, only copies swenum.sys if it does not exist in the target directory but logs a warning, only copies swenum.sys if it does not exist in the target directory and supresses the warning if it already exists in the target directory.

Require_File,shlwapi.dll

Require_File,shlwapi.dll,,,PRESERVE

Require_File,shlwapi.dll,,,PRESERVE,NOWARN
--

#3 homes32

homes32

    Gold Member

  • .script developer
  • 1021 posts
  • Location:Minnesota
  •  
    United States

Posted 07 March 2010 - 05:44 PM

ahhh...

in paragliders chm i found what i was looking for...

--
The PRESERVE parameter must be parameter 4. The NOWARN parameter must be parameter 5.

Example

This always copies shlwapi.dll, only copies swenum.sys if it does not exist in the target directory but logs a warning, only copies swenum.sys if it does not exist in the target directory and supresses the warning if it already exists in the target directory.

Require_File,shlwapi.dll

Require_File,shlwapi.dll,,,PRESERVE

Require_File,shlwapi.dll,,,PRESERVE,NOWARN
--


according to pedroloe15
as of Common_Api 19 Require_File : PRESERVE, OVERWRITE and NOWARN can be now used in any order

although in my opinion its not much of a Common API if no 2 projects use the same version. :whistling:

#4 pecd.net

pecd.net

    Silver Member

  • .script developer
  • 947 posts
  •  
    Germany

Posted 07 March 2010 - 05:57 PM

we are currently working on updating to to a state wer at least 5-6 projects can use it together ...we will see...

#5 paraglider

paraglider

    Gold Member

  • .script developer
  • 1712 posts
  • Location:NC,USA
  •  
    United States

Posted 07 March 2010 - 06:46 PM

It should not matter that different projects use different versions. Versions however should be forward compatible so that if one uses version 15 then replacing it with version 22 should not break the project.

#6 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 07 March 2010 - 07:04 PM

Win7RescuePE and VistaPE CAPI v.12 (RC1b common API)
use the same version

#7 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 07 March 2010 - 07:25 PM

:whistling:

#8 homes32

homes32

    Gold Member

  • .script developer
  • 1021 posts
  • Location:Minnesota
  •  
    United States

Posted 07 March 2010 - 09:44 PM

Win7RescuePE and VistaPE CAPI v.12 (RC1b common API)
use the same version

yes, you are right, I was looking at script version #'s where Win7RescuePe has script version number 16 but has (v21) in the description. is there any particular reason for this?

#9 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 07 March 2010 - 10:07 PM

hi homes,

yep there is a particular reason.

winbuilder server maintance depends on increasing version number for every upload. I already informed psc about these thingies and reasons looong while ago.
That is the reason I write original version of the script to the description when it conflicts with server version.

With other words:
script's project version and Script version can change :cheers:. For some particular cases, to avoid confusions, I write original script version to description.

It is simple procedure which we use successfully on LiveXP for a looooong while.
As a result author of the script and end user clearly see which version of the script they are using.

When I first initially upload capi 21 to rescuepe server, I increment version=15 to version=16 by adding description (v21). There was a possiblity if such a change cause trouble and reported on topics which I was ready to upload to server by fixing and uploading (version=17 , description (v21b)).

Luckly (and thanks a lot to pedrole), no critical fixes required for capi-v21 on rescuepe7, everybody happy with new capi, all live happly after :whistling:

#10 homes32

homes32

    Gold Member

  • .script developer
  • 1021 posts
  • Location:Minnesota
  •  
    United States

Posted 07 March 2010 - 10:17 PM

hi homes,

yep there is a particular reason.

winbuilder server maintance depends on increasing version number for every upload. I already informed psc about these thingies and reasons looong while ago.
That is the reason I write original version of the script to the description when it conflicts with server version.

With other words:
script's project version and Script version can change :cheers:. For some particular cases, to avoid confusions, I write original script version to description.

It is simple procedure which we use successfully on LiveXP for a looooong while.
As a result author of the script and end user clearly see which version of the script they are using.

When I first initially upload capi 21 to rescuepe server, I increment version=15 to version=16 by adding description (v21). There was a possiblity if such a change cause trouble and reported on topics which I was ready to upload to server by fixing and uploading (version=17 , description (v21b)).

Luckly (and thanks a lot to pedrole), no critical fixes required for capi-v21 on rescuepe7, everybody happy with new capi, all live happly after :whistling:

that makes sense now. thanks for explaining.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users