Command-Line Only Standalone?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Command-Line Only Standalone?
Is it possible to create a command-line only standalone binary with LiveCode, or does the created app either have to be a GUI app, or a script that is parsed by livecode-server? Is it possible to create a faceless daemon, or a command-line tool?
Re: Command-Line Only Standalone?
yes. you want the -ui parameter.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: Command-Line Only Standalone?
Are you compiling the binary from the command line? How do you do that?! If not, where do you enter this parameter?
Your guidance is truly appreciated.
Your guidance is truly appreciated.
-
- VIP Livecode Opensource Backer
- Posts: 9960
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Command-Line Only Standalone?
Any standalone made with LiveCode can be written to work well when run from the command line. The -ui is passed to the app with the app name in the command line, e.g.:
./myAppName -ui
When run from the command line, the app will get a startup message - put your code in a startup handler and you're off and running.
./myAppName -ui
When run from the command line, the app will get a startup message - put your code in a startup handler and you're off and running.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Command-Line Only Standalone?
Many thanks!
Re: Command-Line Only Standalone?
Hi FourthWorldFourthWorld wrote:Any standalone made with LiveCode can be written to work well when run from the command line. The -ui is passed to the app with the app name in the command line, e.g.:
./myAppName -ui
When run from the command line, the app will get a startup message - put your code in a startup handler and you're off and running.
So I can build an app for linux on my macbook, post it to the server, I assume LC Server must be resident on the server and run it with the command you gave above?
Is there more to the command?
Specifically what kind code would be in the startup handler?
do you have a short example you could show?
I'm pretty new to LC and very very new to server stuff.
Thanks Tom
-
- VIP Livecode Opensource Backer
- Posts: 9960
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Command-Line Only Standalone?
Feel free to call me Richard.trags3 wrote:Hi FourthWorldFourthWorld wrote:Any standalone made with LiveCode can be written to work well when run from the command line. The -ui is passed to the app with the app name in the command line, e.g.:
./myAppName -ui
When run from the command line, the app will get a startup message - put your code in a startup handler and you're off and running.
What's needed to simply run an app from the command line is slightly different from what's needed to run an app under a Web server.So I can build an app for linux on my macbook, post it to the server, I assume LC Server must be resident on the server and run it with the command you gave above?
Any app on a server, whether you're using LiveCode Server or have special requirements best met from a custom standalone, needs to integrate with the Web server application. Most commonly the Web server is Apache, and the common interface between them is CGI, which is a simple convention for adding specialized apps on the server in a way Apache can work with them. On most shared hosts this is done through mod_rewrite rules written in a .htaccess file in the server's Web root. Sounds like a lot of steps, and indeed Apache is a deep and very flexible toolkit, but most of the small bits you need to get started are covered in the LiveCode Server Guide:
http://livecode.com/developers/guides/server/
Until you've had enough experience with LiveCode Server to know why you might want to make a custom standalone instead, you'll find more code examples and generally better support from the community by just using LiveCode Server, which is set up to work well with Apache.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Command-Line Only Standalone?
Richard, thanks so much for the clarification.
I have a very simple task that I want to do on a server. I have developed a fairly simple mobile app that takes data input by the user and does some simple processing of it, shows the results and then allows the user to email the results to their clients.
Any time this is done my client wants to be assured that he is informed that the app was used, & who used it.
Because of the way LC interfaces with the email client I can't rely on the user to not delete the email address of my client so I want to have the app communicate with a server some of the pertinent information and relay that to my client. None of this would require any action from the user of the app and they would have no human communication with the server.
Other tasks will be user registration and login but the login will just pass a message to the app that it is ok to proceed. The basic purpose of this is the app needs to run differently in different parts of the country and the customer contact depends on where it is being used.
I think I can do everything I need to do on the server in 2 or 3 cards and 2 or three MySQL tables.
What I have not quite figured out yet is how I can run a small stack with LC Server to do the data collect and re transmit function.
but I ramble on....
These forums have been very helpful but i'm not quite there.
Thanks again,
Tom
I have a very simple task that I want to do on a server. I have developed a fairly simple mobile app that takes data input by the user and does some simple processing of it, shows the results and then allows the user to email the results to their clients.
Any time this is done my client wants to be assured that he is informed that the app was used, & who used it.
Because of the way LC interfaces with the email client I can't rely on the user to not delete the email address of my client so I want to have the app communicate with a server some of the pertinent information and relay that to my client. None of this would require any action from the user of the app and they would have no human communication with the server.
Other tasks will be user registration and login but the login will just pass a message to the app that it is ok to proceed. The basic purpose of this is the app needs to run differently in different parts of the country and the customer contact depends on where it is being used.
I think I can do everything I need to do on the server in 2 or 3 cards and 2 or three MySQL tables.
What I have not quite figured out yet is how I can run a small stack with LC Server to do the data collect and re transmit function.
but I ramble on....
These forums have been very helpful but i'm not quite there.
Thanks again,
Tom