[V4REV] How correctly prepare stack for cross-platform use ?
Robert Brenstein
rjb at robelko.com
Sat Jun 11 22:49:02 CDT 2005
>Hi Revolutioners!
>
>Well, we are almost done with first build of Valentina for Revolution,
>And I have meet next problem.
>
>Ivan have prepare about 50 examples working on Windows.
>So each example show in the window "Stack Properties" some win dll path.
>
>It is easy to see that such stack do not work on MAC from box.
>When I set external to our V4REV_Macho, this NOT add second line into list
>of externals but erase info about Windows dll.
>
>So I wonder:
>
>1) if is possible to prepare stack which from box will work on MacOS and
>Windows? I.e. It should know about 2 externals, one for each platform.
>
>Or it is normal for Revolution world, that developer must self tune each
>stack before use it ??? I hard believe into this.
>
>
>2) taking into account that I have now on hands 50 example stacks, It not
>smile to me manually set external for each of them. So may be exists way
>
>A) automate this job ?
>
>B) may be it is possible that stack itself on load and start set correct
>external according to current platform? But again I will need include this
>code into each stack ... May be exists way to put this code into some shared
>single stack ?
>
>
>--
>Best regards,
>
Ruslan and Ivan,
I would make an index stack with each example being a substack of it.
Then you just need to set the external of this index stack and all
others will see it without further ado. This gives you also a single
file to distribute. Furthermore, you can place handlers common to all
examples in the stack script of the index stack and they will be
available to all examples. Better factoring this way.
You handle the external path issue in the openStack handler placed on
the card level (this is important here) of the index stack. There
you set the path to the external depending on the platform -- yes,
you set it up at runtime when the stack loads -- and then initialize
Valentina (and close it at the end).
Platform() is a function that tells you the OS type. In case of Mac,
you need further systemVersion() to distinguish between OS9 and OSX.
Ivan, if you need some extra info about this, contact me off list.
By index stack, I mean a stack that has a list of all examples with
links to open them individually. It would be nice to include a short
description of what each example demonstrates (could be just a tool
tip).
I think this addresses all the issues you raised.
Robert
More information about the Valentina
mailing list