Console app, output to console?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Console app, output to console?
On Linux, calling a standalone with -ui results in any put statements going back to the terminal.
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: Console app, output to console?
Ah. So it does. I wonder if the -ui trick will redirect puts on Windows as well?
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Console app, output to console?
I wish there was a compiler setting that let you compile console programs.
It would reduce size and you wouldn't need that -ui variable just to run a program.
It would reduce size and you wouldn't need that -ui variable just to run a program.
Marcus
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Console app, output to console?
It's kinda cool as it is: LC is primarily for GUI apps, with LiveCode Server used for CGI and other CLI stuff. But with the desktop version's -ui flag you can deliver one app that works in both modes: a GUI for users who need it, and a CLI for using the app's routines as middleware in a larger automated process run by a shell script.trenatos wrote:I wish there was a compiler setting that let you compile console programs.
It would reduce size and you wouldn't need that -ui variable just to run a program.
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: Console app, output to console?
It's certainly cool, but a simple checkbox for CLI apps would make it even better, and then we wouldn't have to tell people to use the -ui option as default when launching the application.
Besides, I think I read somewhere that LC server is not continuing?
If it is, I'd be curious about it, especially if it's more suitable for CLI programming, I haven't found much info about it.
Besides, I think I read somewhere that LC server is not continuing?
If it is, I'd be curious about it, especially if it's more suitable for CLI programming, I haven't found much info about it.
Marcus
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Console app, output to console?
LC Server is alive and well, and kept current with the other builds.
It's ideally suited for CGI work, with some conveniences for mixing LiveCode statements and HTML in the same page. But it can be used for other CLI apps as well.
@Mark Wieder: Can you think of a way the standalone build process might include a flag in the build to obviate the need to pass -ui to the app to run facelessly?
It's ideally suited for CGI work, with some conveniences for mixing LiveCode statements and HTML in the same page. But it can be used for other CLI apps as well.
@Mark Wieder: Can you think of a way the standalone build process might include a flag in the build to obviate the need to pass -ui to the app to run facelessly?
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: Console app, output to console?
Sure - it shouldn't be hard to do, either a checkbox for "console app" or a separate selection at the top. But the standalone builder is part of the IDE and isn't part of any of the engine work that's currently in progress.@Mark Wieder: Can you think of a way the standalone build process might include a flag in the build to obviate the need to pass -ui to the app to run facelessly?
I'd see this as a coordination of a small engine change and a standalone builder change: the -ui argument sets a flag in the engine, and there would need to be a way to set it aside from the command line. That's the engine change. Then the standalone builder would have to set something that tells the startup process that that's what's desired.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev