Jump to content











Photo
- - - - -

Target independent projects


  • Please log in to reply
10 replies to this topic

#1 pscEx

pscEx

    Platinum Member

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

Posted 17 September 2007 - 06:17 PM

The current mechanism (define the path to the script) prohibits that a script with Depends / Excludes can be used in 'every' project.

The paths of scripts can be different between different projects.

That is the reason that I did include some tests concerning 'Depends / Excludes' in my Verify.Script.

But doing this in Verify is really unnecessary, if inside the individual scripts instead of the 'Depends / Excludes' paths the according script's titles are used.

The title is independend from the project's tree structure.

(And if somebody needs different titles for the same script between different projects, it is his / her problem :loleverybody: )

Peter

#2 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 18 September 2007 - 03:59 AM

Hi Peter!

Would you please write an example? :loleverybody:

I'm trying to understand your idea but I'm a bit confused.. :w00t:

#3 pscEx

pscEx

    Platinum Member

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

Posted 18 September 2007 - 07:02 AM

Hi Peter!

Would you please write an example? :loleverybody:

I'm trying to understand your idea but I'm a bit confused.. :w00t:


In pscNamePC.Script the dependencies are:

Depend=%BaseDir%\Projects\nativeEx_barebone\Apps\System\MMC.Script,"%BaseDir%\Projects\nativeEx_core\Basic\Build\7 - AutoItSupport.script"

That is only valid for my special configuration with .Link files and not portable to a different project w/o changes.

Veryfy defines:

[Verify]
If !{%AutoIt Support:Main.Selected%}
"pscNamePC needs AutoIt Support Script";
If !{%MMC:Main.Selected%}
"pscNamePC needs MMC Script";

That is portable into every script.

Peter

#4 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 18 September 2007 - 12:32 PM

Hmm..

I think you can also use %projectdir% and %scriptdir% to avoid hardcoded project names or folders - wouldn't this help?

:loleverybody:

#5 pscEx

pscEx

    Platinum Member

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

Posted 18 September 2007 - 01:07 PM

Hmm..

I think you can also use %projectdir% and %scriptdir% to avoid hardcoded project names or folders - wouldn't this help?

:loleverybody:

No, it's not possible.
As you remember, I still use the .Link (to separate between core and application scripts).

If I use %Core% which is defined in script.project, I get the error message that the file could not be found.
If I use %ProjectDir%, I get the same error message.

(maybe WB looks only for *.Script, not for *.Link)

BTW: Use of %projectdir% is only possible, if in the different projects the tree structure is identical!

Peter

#6 pscEx

pscEx

    Platinum Member

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

Posted 18 September 2007 - 02:08 PM

Just brainstorming, maybe senceless:

What about having variables @<title>@:

E.g. (in nativeEx_barebone) @explorer@ would expand to %BaseDir%\Projects\nativeEx_Core\Basic\Shells\Explorer.Script

This could make many [Variables] in script.project become unnecessary:
Currently I see in nativeEx_barebone:
%ScriptLog%=%Core%\Basic\Build\ScriptLog.Script

%EmptyHive%=%Core%\Basic\Build\EmptyHive.Script

%AutoRunScript%=%Core%\Basic\Build\autoruns.Script

%BuildModelScript%=%Core%\Basic\Build\4 - buildModel.Script

%WBMScript%=%Core%\Basic\!WBManager\!WBManager.Script

%OptionsScript%=%Core%\Basic\!WBManager\!myOptions.Script

%ReOpenScript%=%Core%\Tools\ReOpen.Script

%OLESupportScript%=%Core%\Basic\Build\7 - OLESupport.Script

%api%=%projectdir%\Basic\Build\api.script

All of these entries could be obsolete by writing in the script e.g:
Instead of
Run,%ScriptLog%,Process-log
use
Run,@Log script process@,Process-log
OffTopic: Using API, could be just 'Log'

Maybe the script titles should also checked by the resp. developers and perhaps changed to sencefull items

I think tha WinBuilder can do this task rather easy and -what is most important- w/o performance lost.

Just store a list of titles and corresponding script paths during installation.

@Nuno: I think this is no issue for you, but if you want to save time (You are rather busy with other important tasks) I can send you a code snippet I use in similar tasks.

Peter

#7 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 18 September 2007 - 02:19 PM

Why are we always trying to patch the chaos? Lets try some order! :loleverybody:
Instead of everyone writing scripts and projects as he sees fit and then using tons of variables and scripts to patch the gaps, between the work of different authors.
How about deciding on a general project layout and throwing out a few variables?

:w00t:

#8 pscEx

pscEx

    Platinum Member

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

Posted 18 September 2007 - 02:42 PM

How about deciding on a general project layout and throwing out a few variables?

I sometimes thought about that!

But: Do you want to 'certify' all of the above folders in a rule?

I assume:
I want to build a new project which does not fit into the given rules, maybe I simply want to create a new folder containing some scripts.

Then it is
  • No problem to add the new folder and use the @title@
  • Rather difficult to start a topic (and wait for success) to change the rules to accept my new folder.
  • ...
  • Next week the same issue (start above with posting ...)
  • ...
Peter

#9 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 18 September 2007 - 05:46 PM

I thought you were using these variables on .script files because linked files were not meant to be used on wb072.

Let's see what can be done over the next beta discussions althought I also prefer simple solutions.

:loleverybody:

#10 pscEx

pscEx

    Platinum Member

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

Posted 18 September 2007 - 05:52 PM

I thought you were using these variables on .script files because linked files were not meant to be used on wb072.

I feel you understood my intention, but I'm not sure yet.
The general intention is independent from .Link files, but the issue currently seams to appear with them.

Peter

#11 pscEx

pscEx

    Platinum Member

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

Posted 18 September 2007 - 06:09 PM

Let's see what can be done over the next beta discussions althought I also prefer simple solutions.

The only simple solution is to use every script with @project-independend-path-title@ rather than with 'project-dependend-path.Script'
This will find the script in every project, independent of the invidual project's folders' structure(s).

Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users