CGI, MacOS-X, etc (reposting with correct title)

Greg Saylor gsaylor at net-virtual.com
Tue Apr 23 21:59:00 EDT 2002


>Message: 2
>From: diskot123 at juno.com
>To: use-revolution at lists.runrev.com
>Date: Tue, 23 Apr 2002 14:07:54 -0400
>Subject: Re: use-revolution digest, Vol 1 #360 - 13 msgs
>Reply-To: use-revolution at lists.runrev.com
>
>>My question though is: is there absolutely no other way to use a XCMD in
>>MacOS without using a resource fork?...
>Yes. XCMDs are HyperCard, SuperCard style externals that are supported on
>MacOS to make porting from those products easier. All new external
>development should be done using the external SDK which is distributed
>with Revolution. These externals compile to code resources on Mac, DLLs
>on Windows, and Executables on Unix systems to work cross platform. The
>database library is implemented as a Revolution style external and as
>such works cross platform (MacOS,OSX,Windows,Unix) and support Valentina
>on Mac and Windows. 
>
>>Further, that since Darwin does not seem to
>>support resource forks it becomes impossible to use it as a general-
>>purpose scripting tool because there is no way to use external
>functions...   
>For now you can write an external which contains functions which wraps
>around a shared library. This is the way Valentina support works in the
>database library (RevDB)..Rev specific functions were added to the VXCMD
>product (Rev is not calling the normal VXCMD functions because it needs
>to support the binding, binary data and a whole lot more) and RevDB just
>calls through to the shared library.
>
>If you need to call mach-o code on OSX you can compile the code as a
>bundle and load it using the CFM Manager from the external.
>
>Tuviah Snyder ~tuviah at runrev.com
>http://www.runrev.com/
>Rutime Revolution Limited - Power to the Developer!

I have read this a few times and I am even more confused now.....  I
don't even know how to explain my confusion....  So lets start with the
basics of Revolution...

I have no clue, by the way, what you mean by "CFM manager", "mach-o
code", or "bundle".....  I'm most familiar with UNIX (Solaris in
particular) which doesn't have this stuff.. My final application I want
to be deployed on MacOS, OS-X, and Windows -- but it's important that I
build it from UNIX....   Since OS-X is at least partially UNIX I am
looking for a way to build the underlying database using it...  Were it
not for these end-user platform requirements I would just use something
else, but MySQL and Oracle are hardly databases which should be deployed
in a desktop environment....

Problem #1: Basically I have a folder, after having installed the OS-X
version of Runtime Revolution which I bought last week (it was the
business edition or whatever I guess)....  I double-click the
"Revolution" icon and then go to "Tools" and then select "Database
Manager"...  I get a pop-up message which says "Database access is not
yet supported on OS X due to driver issues."....

Problem #2: In looking at the Valentina documentation it clearly does
support OS-X.... So now I am hunting for documentation on how to make it
work, which there doesn't appear to be any except the following:

VXCMD consists from 2 parts:
1) XFCN resource "Valentina" (PPC version) -- this is just small
function, which calls Valentina kernel.
2) "Valentina engine" -- shared library which contain Valentina kernel.

During development you need
1) copy by ResEdit resource XFCN "Valentina" into your stack
2) put the shared lib into "Extensions" folder or folder which
contains application HyperCard, SuperCard or MetaCard.
When you build a release version of standalone stack/application you
need copy the shared lib into the folder of your final stack/application
(not in subfolder).

So I can surmise from this that this is neither of these options are what
you are referring to as a "Revolution style external"...  So back to the
Revolution documentation....  I find this stuff about "Rev_DB"...  I see
this "revdb_connect" -- finally something which looks familiar to me....
(at least the connect part).. However, upon reading that documentation it
says the following:

revdb_connect(databaseType,host,databaseName,userName,password)

use the revdb_connect function to connect to a database.

Parameters:
The databaseType is one of "MySQL","Oracle", or "ODBC".
(etc.)

So this must not be it either.....

Problem #3: Okay, so now on top of all of this I want to use metacard as
a general-purpose scripting tool so I can build my Valentina database
from a command-line utility as part of an automated production process
(which is mostly implemented in PERL and C..)...

So I try to execute the "Revolution" executable and a screen full of
garbage...  So I try "open Revolution" (I remember this from my NeXT
days)...  That works, but it launches the gui....  Okay, so I do a little
test script:

#!/usr/bin/open /usr/Revolution/Revolution

on startup
write "WTF!" to stdout
end startup

This doesn't work....  So I think maybe it's something to do with the
fact it's a OS-X application and I am running in Darwin (???).. SO I
download the "Darwin.tar" from metacard.com, unzip it and stick it in /
usr/Revolution/Revolution/components/engines/Darwin....   I download it
from metacard.com because it does not look like the engines are stored on
the Revolution ftp server....   I change my script to:

#!/usr/Revolution/components/engines/Darwin


on startup
write "WTF!" to stdout
end startup


THis actually works, so I think I am getting somewhere.....  But, alas,
maybe not because all of the revdb functions are part of Revolution and
not metacard.....  In the components/engines folder I now have the
following files:

-rw-r--r--  1 wtf  staff  1675264 Apr 23 18:57 Bsd
-rwxr-xr-x  1 wtf  staff  2699332 Apr 15 02:45 Darwin
-rwxr-xr-x  1 wtf  staff        0 Dec 26 22:00 MacOS68k
-rwxr-xr-x  1 wtf  staff  1973678 Dec 26 21:59 MacOSPPC
-rwxr-xr-x  1 wtf  staff  1973678 Dec 26 21:58 MacOSfat

Sub-problem #3a:

The "Bsd" is there because I build a Bsd distribution just to make sure
that this is where it downloads the engines to...  However, when I
download the bsd.tar from metacard.com it is a difference size (1712128
bytes) -- not exactly instilling confidence that I am doing this right,
but there is no documentation to say one way or the other (which is the
most frustrating thing of all)....

... back to the main problem.....

Let me summarize it this way: where the heck is the OS-X engine??... 
Surely it's not the "Revolution" executable sitting in the Revolution
folder??....




So, the above are problems which I need to be solved, but I can't even
start because I can't find a good overview (or even a bad one) of how all
these pieces tie together.. All I am left with is more questions:

A. Where is the OS-X (not darwin) engine?
B. Can the OS-X (not darwin) engine be used for a general-purpose
scripting tool without launching the application?....
C. Can Valentina be used with the Darwin engine?...
D. Does the revdb work with the Darwin/OS-X engine (if it's available)?....  
D1. If so, where can I get this engine?.. 
D2. SHould I be using one from MetaCard or Revolution?...
D3. Where is it?...
E. Is Valentina a "new model" XCMD or an "old model" XCMD?...  How come I
can't get it to work in OS-X without adding this xfcn resource to my
stack?.... 
D. Where is the RevDB library and how exactly do you get it to work with
OS-X when all indications show that not only is the Valentina database
not supported by it but that OS-X itself does not support RevDB "because
of driver issues"?...
E. Finally, does RevDB work with the "Darwin" engine, which seems to be
the only executable I can find which seems appropriate for deploying as a
general-purpose scripting tool on the OS-X platform?....   IF there is a
more appropriate executable to be using, what is it?....
F. Not that it matters currently because the one external I want to use
does not seem to work the "new way", but how the heck do I get these "new
way" externals to become available?.. Do I just copy them into the
"Revolution" folder and it picks them up?...   
G. It seems REALLY odd to me that there is no way to just specify the
darn external you want to make available to your application.. What if
it's some shared library that is part of the system, this method seems to
require that you copy that shared library/dll/whatever into another
location.....   It seems like you should be able to specify the externals
to use, for example:

/usr/local/lib/libpdf.so
/usr/lib/libc.so

.. this business about just sticking stuff somewhere and hoping it loads
seems very problematic.......



I can't go on anymore because the more I write the more frustrated I
become with my situation......

Thank you very much for your earlier reply, I hope this clarifies the
situation....

- Greg




More information about the use-livecode mailing list