Jump to content











Photo
- - - - -

WB v067 & v068beta6 order of execution quirk


  • Please log in to reply
23 replies to this topic

#1 specter_57

specter_57

    Member

  • Advanced user
  • 67 posts
  • Location:Toronto, Canada
  • Interests:Computers....photography....electronics...astronomy...chemistry...physics....pets...reading

Posted 16 February 2007 - 04:24 PM

Has anyone else noticed this quirk?

And...if this has already been discussed elsewhere/previously...I apologize.

I first noticed this quirk in both WB v067 & v068b6 when fiddling with some scripts and also if I download individual scripts and put them into my existing scripts folder.

What happens is this:

Download all scripts...or those I want...in a group from the WB servers at the same time...well and fine.

Take out a script to modify, or download an individual script, then put them into the the appropriate folders...WB no longer shows the scripts in their proper order in the treeview...furthermore...it will compile a build using the new, faulty order....and of course fail and spew out error messages.

example:
<LiveXP><Basic><Build> folder...the file contents order should be:
1 - ProjectInfo.Script
2 - MakeDirs.Script
3 - hivesFactory.Script
4 - BuildModel.Script
5 - CopyAndExpand.Script

would change and appear in the WB tree view as (say):
1 - ProjectInfo.Script
2 - MakeDirs.Script
4 - BuildModel.Script
5 - CopyAndExpand.Script
3 - hivesFactory.Script (this would be the new or modified file)

I'vw also had the <Shell> and <Build> folders change their order as well

After much head scratching, I figured out that the problem could be 'fixed' simply by moving the folder contents to a holding folder, then dragging the individual files back in the order they should execute, or by sequentially choosing the files via <CTRL> key - highlight/select, then moving back the group.
Likewise in the case of folder order changing.

...spec57

#2 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 16 February 2007 - 05:59 PM

Has anyone else noticed this quirk?

And...if this has already been discussed elsewhere/previously...I apologize.

I first noticed this quirk in both WB v067 & v068b6 when fiddling with some scripts and also if I download individual scripts and put them into my existing scripts folder.

What happens is this:

Download all scripts...or those I want...in a group from the WB servers at the same time...well and fine.

Take out a script to modify, or download an individual script, then put them into the the appropriate folders...WB no longer shows the scripts in their proper order in the treeview...furthermore...it will compile a build using the new, faulty order....and of course fail and spew out error messages.

example:
<LiveXP><Basic><Build> folder...the file contents order should be:
1 - ProjectInfo.Script
2 - MakeDirs.Script
3 - hivesFactory.Script
4 - BuildModel.Script
5 - CopyAndExpand.Script

would change and appear in the WB tree view as (say):
1 - ProjectInfo.Script
2 - MakeDirs.Script
4 - BuildModel.Script
5 - CopyAndExpand.Script
3 - hivesFactory.Script (this would be the new or modified file)

I'vw also had the <Shell> and <Build> folders change their order as well

After much head scratching, I figured out that the problem could be 'fixed' simply by moving the folder contents to a holding folder, then dragging the individual files back in the order they should execute, or by sequentially choosing the files via <CTRL> key - highlight/select, then moving back the group.
Likewise in the case of folder order changing.

...spec57


Have you checked that the old and the new scripts have the same Level?
Does the problem persist if you close the WB inbetween, or does it fix the ordering problem?

:P

#3 pscEx

pscEx

    Platinum Member

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

Posted 16 February 2007 - 06:31 PM

@specter 57
can you please post a list of exactly what to do to reproduce the issue?

like:
  • empty folder
  • download winbuildder
  • use download center to get project xxx
  • etc
  • etc
Peter

#4 specter_57

specter_57

    Member

  • Advanced user
  • 67 posts
  • Location:Toronto, Canada
  • Interests:Computers....photography....electronics...astronomy...chemistry...physics....pets...reading

Posted 16 February 2007 - 07:13 PM

MedEvil, PSC:

I did *not* adjust level= settings in any of the scripts when I was patching...and also, if using a newer version...I did check the level...and if different made it the same as the original.
I'm familiar with how the level numbers function, and how they move an item up or down the execution list, relative.
Level doesn't appear to be the root cause here.

****

Okay...if you've already got a working construction folder, copy it somewhere to experiment on.

Two ways caused this quirk to immediately crop up...on my system.

Here's how I discovered it (and I used a clean download package to experiment on once I discovered this quirk, and doing one item at a time):

I simply copied out the current HojPE Hives Factory script....and patched it for the BootUp message, using the script line from WBv052 Txtsetup.script, and creating a message box (I use this modified script and it's ok)...the original within the <LiveXP><Basic><Build> I changed the original file name to have an extender of .script.off and so is present but not active and does not show on the treeview.
I then moved the patched file into the named folder, hit F5 to refresh and reorder the Window list, fired up WinBuilder...and in tree view...out of order.
Rebooting my machine...calling up WB...no change.
Removing the patched file and restoring the renamed one...no problem...treeview in WB restored.

Also...another way to reproduce it:

Copy WB.exe into an empty folder...fire it up, go to download tab...and uncheck *everything*...except for, in my case...the newer Build Model script (v012). Then this script only, by itself downloaded.
Copy this script to your working folder, proper locale...and overwrite the existing BM script.
Call up WB, look at the order.
Messed up again.

and yet another way:
Sometimes, if I cancel a build in progress, the order will be messed up.

And, by experiment, in a working folder, the one script download only..replacing BM v010 in place...the order problem occured.

I emphasize...this is happening on my machine...it may not happen on yours....but the solution I mentioned before is easy, if annoying.

Seems to be related to actual physical order of the files on the disk/folder in some way...or perhaps via
one of the time/date stamps.

Attached jpg is what I see after doing a full, new, clean download, and what WB displays, but not yet used for a build nor any modified added or removed items.

It is this order that will sometimes change, according to actions mentioned above.


Thank you for your responses and interest :-)

Spec57

Attached Thumbnails

  • WinBuilder___Proper_Order.jpg


#5 pedrole15

pedrole15

    Silver Member

  • .script developer
  • 731 posts
  •  
    France

Posted 16 February 2007 - 08:06 PM

Has anyone else noticed this quirk?

I've make a copy of the liveXP project and rename it to live2003 for test
and I've got same problem

#6 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 16 February 2007 - 08:36 PM

I've make a copy of the liveXP project and rename it to live2003 for test
and I've got same problem

Sorry guys, does not happen on my machine. Which WB Version are you using?
I tested with Beta6.

Would also have been a strange thing, if all of a sudden, i would find a problem like that. :P
I edit scrips all day, without any problems of that kind.

:P

#7 specter_57

specter_57

    Member

  • Advanced user
  • 67 posts
  • Location:Toronto, Canada
  • Interests:Computers....photography....electronics...astronomy...chemistry...physics....pets...reading

Posted 16 February 2007 - 08:57 PM

MedEvil.

That pic I attached is what the order is *supposed* to be...as described, *not* what happens when I do as described in my previous posts.

Moving and modifying scripts is what causes the quirk...and I tend to modify them in a text editor, since it's easy, but sometimes through WB itself as well...it depends on what it is I intend to experiment with...and I always modify a copy of the script, not the original one.

Spec_57

#8 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 16 February 2007 - 09:43 PM

MedEvil.

That pic I attached is what the order is *supposed* to be...as described, *not* what happens when I do as described in my previous posts.

Moving and modifying scripts is what causes the quirk...and I tend to modify them in a text editor, since it's easy, but sometimes through WB itself as well...it depends on what it is I intend to experiment with...and I always modify a copy of the script, not the original one.

Spec_57

I also change scripts in an external program, as i hate keyhole surgery! :P
Sometimes i work direktly on the script, sometimes i just wanna test things, so i work on a copy. Never happend anything like this.
Though i remember that there was a problem with the ordering, somewhere in early january. But it was fixed a day later or so.

:P

#9 pscEx

pscEx

    Platinum Member

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

Posted 17 February 2007 - 08:57 AM

MedEvil.

That pic I attached is what the order is *supposed* to be...as described, *not* what happens when I do as described in my previous posts.

Moving and modifying scripts is what causes the quirk...and I tend to modify them in a text editor, since it's easy, but sometimes through WB itself as well...it depends on what it is I intend to experiment with...and I always modify a copy of the script, not the original one.

Spec_57


If you have a file 'Copy of 3 - hivesFactory.Script' then it is 100% correct that WinBuilder shows the hivesFactory as the end of the list.

It is alpabetically behind '5 - CopyAndExpand.Script'

Peter

#10 specter_57

specter_57

    Member

  • Advanced user
  • 67 posts
  • Location:Toronto, Canada
  • Interests:Computers....photography....electronics...astronomy...chemistry...physics....pets...reading

Posted 18 February 2007 - 04:55 PM

It also occurs to me that this out-of-order thing may *not* be a WinBuilder thing...most likely is a result of how WinXP orders the files on the disk...the physical order NOT being the same as the sorted directly listing we see in an Explorer window.

Not a problem with WinBuilder after all, possibly...but yet another wonderful 'feature' of the WinDoze OpSys we've all come to know and love.

Spec_57

Attached Thumbnails

  • Gotcha2.gif


#11 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 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 21 February 2007 - 01:48 AM

NTFS sorts files alphabetically - my biggest fear is still fat32 because it won't likely sort them this way and I haven't yet had much time to debug the behavior on the older file system.

But the issue you refer is likely caused by winbuilder - by default the projects and corresponding scripts are only scanned once on startup or when requested by users when pressing the refresh button or command from scripts.

All the data found is kept inside the treeview along with all details like script title, description, level and full filename - on runtime these scripts are not rescanned to see if changes were applied and scripts added or removed - this might explain the behavior that you describe since it will be trying to run a script that it is still listed on the treeview as valid.

Will try to replicate the very detailed inctructions that you've provided to replicate these symptons and try to see how and why this happens, thanks for the reports! :P

#12 specter_57

specter_57

    Member

  • Advanced user
  • 67 posts
  • Location:Toronto, Canada
  • Interests:Computers....photography....electronics...astronomy...chemistry...physics....pets...reading

Posted 21 February 2007 - 04:40 PM

Nuno:

Thank you for the response.

I do indeed use FAT32 on my WinXP system.

Since not a lot of members here seem to have this problem, I would suggest that it's not worth expending a lot of effort on...the 'fix' is simple enough, if manual in nature...and I've already written a simple DOS/CMD batch file to copy the files in order back to their folders.

If you feel it's worth implementing...I suggest that a simple text file with the folder-file listing in order of operation be used...or perhaps a line in the script with a number against it...that is order to be executed...*NOT* to be confused with the Level= numbers.

Something along that line.

What say you?

Spec_57

#13 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 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 21 February 2007 - 05:18 PM

In long term it would likely be better to have wb sorting files as expected under fat32/ntfs or any other compatible file system - haven't yet tested on cdfs to see if it has a different behavior.

Sorting needs to be applied alphabetically regardless of the filesystem, the code I use for NTFS is very fast and works well enough, now I will rework it to apply the sorting after the results are first created, prior to the scripts be processed and placed on the main window.

I'll try it at home and then let you know my results, a manual approach is good as you've mentioned, but probably wouldn't work for those who never read the details or warnings about this sort of cases.. :P

#14 pscEx

pscEx

    Platinum Member

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

Posted 21 February 2007 - 05:29 PM

In long term it would likely be better to have wb sorting files as expected under fat32/ntfs or any other compatible file system - haven't yet tested on cdfs to see if it has a different behavior.

Sorting needs to be applied alphabetically regardless of the filesystem, the code I use for NTFS is very fast and works well enough, now I will rework it to apply the sorting after the results are first created, prior to the scripts be processed and placed on the main window.

I'll try it at home and then let you know my results, a manual approach is good as you've mentioned, but probably wouldn't work for those who never read the details or warnings about this sort of cases.. :P

@Nuno, @specter!
Can you explain a little bit more understandable, what's going on.
In my opinion my post withz 'Copy of ... ' explained all.
But there seems to be something else ....

Peter

#15 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 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 21 February 2007 - 05:40 PM

Sorry... :P

FAT32 won't sort files alphabetically like it happens on NTFS, so the sorting order is different.

Specter proposed a good manual fix, while I'll try to make wb not dependend from the natural filesystem order.

This is also an issue on bart's PE builder and derivated projects - FAT32 won't respect the alphabetical order so the program needs to sort them properly.

At least a part of the described issue is likely related to this FAT/32 factor.

:P

#16 pscEx

pscEx

    Platinum Member

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

Posted 21 February 2007 - 05:47 PM

Sorry... :P

FAT32 won't sort files alphabetically like it happens on NTFS, so the sorting order is different.

Specter proposed a good manual fix, while I'll try to make wb not dependend from the natural filesystem order.

This is also an issue on bart's PE builder and derivated projects - FAT32 won't respect the alphabetical order so the program needs to sort them properly.

At least a part of the described issue is likely related to this FAT/32 factor.

:P

Thanks for the explanation.
From my current knowledge:
If you collect all scripts into a TList (what I assume), why not
<scripts>.sorted &#58;= True?
Then the sort should depend on the host OS, not on the disk format.

Peter

#17 specter_57

specter_57

    Member

  • Advanced user
  • 67 posts
  • Location:Toronto, Canada
  • Interests:Computers....photography....electronics...astronomy...chemistry...physics....pets...reading

Posted 21 February 2007 - 06:00 PM

Peter/PSC:

What appears to be happening is this:

My system uses the FAT32 file system.
I download a WinBuilder package.
The files are then in order, as per download.
All is well at this point.
If you look into the Build folder, in Windows Explorer you see the files in alphabetical order, as they should be:

1 - ProjectInfo.Script
2 - MakeDirs.Script
3 - hivesFactory.Script
4 - BuildModel.Script
5 - CopyAndExpand.Script

In the WinBuilder treeview window, you will see the files also in the right order (\Projects\LiveXP\Basic\Build\):

ProjectInfo.Script
MakeDirs.Script
hivesFactory.Script
BuildModel.Script
CopyAndExpand.Script

and a build will work as it should.
...

Here is where the quirk appears......

move a script to another folder...do a mod or patch on it, whatever...and copy it back into the Build folder
-or-
download un updated script...not a full build package...move or copy into the original build folder, replacing the one already there....

Now, the Explorer window will still show you the order

1 - ProjectInfo.Script
2 - MakeDirs.Script
3 - hivesFactory.Script
4 - BuildModel.Script
5 - CopyAndExpand.Script

which is correct.........

*BUT* in the WinBuilder treeview window...you will see these files:
ProjectInfo.Script
MakeDirs.Script
hivesFactory.Script
BuildModel.Script
CopyAndExpand.Script

**NO LONGER** in this order, but shuffled about depending on what script you added/copied/patched, etc

...and if you now attempt a build it will fail, as WB is trying to construct in the order of the treeview...and if it's not correct, the scripts will not be run in the proper sequential order, but the order in the treeview, which will no longer be alphabetical.
Therefore, the build must fail.

It seems to be that WB is taking the literal or physical order of the files on the disk, not the alphabetical order.

As Nuno has pointed out...this may be an effect of the FAT32 file system....which I use on my main system. If you use NTFS likely this problem is not happening to you.

I do hope this makes things a bit clearer for you. :-)

Spec_57

#18 pscEx

pscEx

    Platinum Member

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

Posted 21 February 2007 - 06:12 PM

Peter/PSC:

What appears to be happening is this:

My system uses the FAT32 file system.
I download a WinBuilder package.
The files are then in order, as per download.
All is well at this point.
If you look into the Build folder, in Windows Explorer you see the files in alphabetical order, as they should be:

1 - ProjectInfo.Script
2 - MakeDirs.Script
3 - hivesFactory.Script
4 - BuildModel.Script
5 - CopyAndExpand.Script

In the WinBuilder treeview window, you will see the files also in the right order (\Projects\LiveXP\Basic\Build\):

ProjectInfo.Script
MakeDirs.Script
hivesFactory.Script
BuildModel.Script
CopyAndExpand.Script

and a build will work as it should.
...

Here is where the quirk appears......

move a script to another folder...do a mod or patch on it, whatever...and copy it back into the Build folder
-or-
download un updated script...not a full build package...move or copy into the original build folder, replacing the one already there....

Now, the Explorer window will still show you the order

1 - ProjectInfo.Script
2 - MakeDirs.Script
3 - hivesFactory.Script
4 - BuildModel.Script
5 - CopyAndExpand.Script

which is correct.........

*BUT* in the WinBuilder treeview window...you will see these files:
ProjectInfo.Script
MakeDirs.Script
hivesFactory.Script
BuildModel.Script
CopyAndExpand.Script

**NO LONGER** in this order, but shuffled about depending on what script you added/copied/patched, etc

...and if you now attempt a build it will fail, as WB is trying to construct in the order of the treeview...and if it's not correct, the scripts will not be run in the proper sequential order, but the order in the treeview, which will no longer be alphabetical.
Therefore, the build must fail.

It seems to be that WB is taking the literal or physical order of the files on the disk, not the alphabetical order.

As Nuno has pointed out...this may be an effect of the FAT32 file system....which I use on my main system. If you use NTFS likely this problem is not happening to you.

I do hope this makes things a bit clearer for you. :-)

Spec_57


Thank you very much. Now I understand.
I think, in a separate system I can change my HDD to FAT and try.
(maybe it is not necessary because Nuno already seems to know reason and therefore solution)
Just a small attack:
What you now wrote is what I what asked several posts before. But do not worry.
The main target is to bring WinBuilder to a (100%?) successful solution.
:P )

Peter

#19 specter_57

specter_57

    Member

  • Advanced user
  • 67 posts
  • Location:Toronto, Canada
  • Interests:Computers....photography....electronics...astronomy...chemistry...physics....pets...reading

Posted 21 February 2007 - 06:23 PM

Peter/PSC:

re:
"Just a small attack:
What you now wrote is what I what asked several posts before."

Did I miss that? Pehaps I misunderstood what you said/asked.
Sorry 'bout that.

As mentioned to Nuno...I don't think it's worth expending a lot of effort on..whatever gives the simpliest, least trouble to walk around it is the way to go...

As long as the members here are aware of the possibility, and the way around it...well and good.

...if you already have a spare drive in FAT/FAT32 on which to experiment...fine...but to change one over just to see if this is a problem...? i'd say Don't bother unless you're so curious you cannot resist :-)


Spec_57

#20 pscEx

pscEx

    Platinum Member

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

Posted 21 February 2007 - 06:53 PM

Peter/PSC:

re:
"Just a small attack:
What you now wrote is what I what asked several posts before."

Did I miss that? Pehaps I misunderstood what you said/asked.
Sorry 'bout that.

:P

#21 Garfield

Garfield

    Member

  • .script developer
  • 96 posts
  • Interests:pretty much everything
  •  
    South Africa

Posted 22 February 2007 - 07:20 AM

@specter_57

The test would be to move the relevant files from the \Build\ folder and then to copy them back one by one in the right sequence.

You can check if they are in the right sequence by doing a command line DIR. It lists the files in the folder in the sequence they are entered in the FAT not alphabeticaly like explorer.

Rebuild your project but without modifying any of the scripts since this might resequence the folder entries.

....and hope for the best :P

If this rectifies the problem then we must beg Nuno to implement a sorting feature on the execution sequence of the scripts in a folder. Maybe we must think of implementing a subset of script level (ie Level=X.Y) :P

#22 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 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 22 February 2007 - 11:48 AM

Good news: this issue will be solved on the next beta 7 from build 068.. :P

It wasn't needed to create an extra partition, last night I've just downloaded a ramdisk and created a ramdrive with a normal FAT file system.

wb was following the same listing as a DIR on command line, so I've followed Peter's advice and replaced the simple find one file & process method with a new one using a sorted TStringList that will order folders and files.

This method is not as optimized as the previous since there's extra code to handle with stringlist and sorting, but it seems stable and gives independence from the host filesystem order.

FAT32 is no longer an issue.. :P

#23 specter_57

specter_57

    Member

  • Advanced user
  • 67 posts
  • Location:Toronto, Canada
  • Interests:Computers....photography....electronics...astronomy...chemistry...physics....pets...reading

Posted 22 February 2007 - 05:06 PM

Garfield:

What you suggested I have already done...manual sequential copy back of the files into the \Build\ folder in order to...order them.

This 'solved' the problem for me.


Nuno:

Good news, you've solved the quirk :-)

Garfield, Nuno..and the others who posted in this thread...thank you all for your responses and suggestions on this issue.

#24 specter_57

specter_57

    Member

  • Advanced user
  • 67 posts
  • Location:Toronto, Canada
  • Interests:Computers....photography....electronics...astronomy...chemistry...physics....pets...reading

Posted 24 February 2007 - 06:08 PM

A folder/file sorting tool.

As was correctly pointed out by Garfield, in a CMD windows, the actual order of files vs alphabetical order is displayed...and this actual order is what WB.exe picks up on.

Until Nuno posts a fixed version...or if you still want to play with older versions of WB, I found this tool to force the order, as per parameters selected, automatically instead of the manual method.

Run the program, do another DIR listing in a CMD window...and the order has been fixed.

It's called FolderSort v1.1
Freeware.
171,765 bytes download size


Read about it here...and download from here as well.

http://www.jetman.di...foldersort.html

Works for me.

Spec_57




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users