[V4REV] How correctly prepare stack for cross-platform use ?
Trevor DeVore
lists at mangomultimedia.com
Sat Jun 11 12:41:29 CDT 2005
On Jun 11, 2005, at 12:30 PM, Ruslan Zasukhin wrote:
> 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.
Yes. Just put each external on a different line. So -
set the externals of this stack to "windows.dll" &cr& "mac.bundle"
> 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 ?
Yes. If they are all in the same folder you could do something like
this (off the top of my head, not tested):
answer folder "Select folder with stacks
if it <> empty then
put it into tFolder
put defaultFolder into tOrigDefault
set defaultFolder to tFolder
put files() into tStacks
repeat for each line tStack in tStacks
if char 1 of tStack = "." then next repeat
get tFolder &slash& tStack
if there is a stack it then
set the externals of stack it to "windows.dll" &cr&
"mac.bundle"
end if
end repeat
end if
> 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 ?
It is possible to set the externals for one stack and have it
available to all stacks in the development environment. I have
created plugins that do this with other externals.
1) Create a new stack
2) Set externals property of stack
3) Put this in the stack script:
on preOpenStack
start using stack (short name of me)
pass preOpenStack
end preOpenStack
4) Put it in the Revolution/plugins folder
5) Go to Development->Plugins in the ide, select your stack. Set it
so that it opens when Revolution starts up and that it opens as
"invisible".
6) Restart Rev and after launching you should be able to execute
Valentina external handlers from the message box.
--
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com
More information about the Valentina
mailing list