Running a full C program inside a stack?
Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller
Running a full C program inside a stack?
Hello everyone,
I was wondering if it was possible to run a full-on C program inside a LiveCode stack. Specifically, I'm interested in making a UI for Tox-core (https://tox.im/).
Can this be done?
Esso
I was wondering if it was possible to run a full-on C program inside a LiveCode stack. Specifically, I'm interested in making a UI for Tox-core (https://tox.im/).
Can this be done?
Esso
Re: Running a full C program inside a stack?
Hi Esso,
If this is a command line tool, you may be able to control it with some SHELL() commads,
but TOX looks like a fully compiled app with a built-in GUI.
Best
Klaus
not out of the box!EssoAir wrote:Can this be done?
If this is a command line tool, you may be able to control it with some SHELL() commads,
but TOX looks like a fully compiled app with a built-in GUI.
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 1236
- Joined: Sat Apr 08, 2006 1:10 pm
- Location: Zurich
- Contact:
Re: Running a full C program inside a stack?
Well in a sense externals are C code running within the engine. So if you can compile an external then that'd be what you want. Also, there's a lot of possibilities to talk to other programs, often making it unnecessary to actually include them, for example:
shell() (as Klaus suggested)
open process
sockets (locally or over networks)
using files as communication
etc.
shell() (as Klaus suggested)
open process
sockets (locally or over networks)
using files as communication
etc.
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: Running a full C program inside a stack?
The core is separate from the GUI programs. Its a command-line tool with its own distributed network. I just want to make my own GUI for itKlaus wrote:Hi Esso,not out of the box!EssoAir wrote:Can this be done?
If this is a command line tool, you may be able to control it with some SHELL() commads,
but TOX looks like a fully compiled app with a built-in GUI.
Best
Klaus
Re: Running a full C program inside a stack?
Then you should be able to control it with a lot of SHELL() callsEssoAir wrote:The core is separate from the GUI programs. Its a command-line tool with its own distributed network. I just want to make my own GUI for it

Re: Running a full C program inside a stack?
But how do i deploy it? I cant assume the user already has it insitalled. How do i use shell() calls to deploy it to a computer?Klaus wrote:Then you should be able to control it with a lot of SHELL() callsEssoAir wrote:The core is separate from the GUI programs. Its a command-line tool with its own distributed network. I just want to make my own GUI for it
Also, shell() doesnt work on mobile. how do i get it working on android and iOS?
Re: Running a full C program inside a stack?
You will need to also install all the neccessary excutables with your app (as far as TOX allows).EssoAir wrote:But how do i deploy it? I cant assume the user already has it insitalled.?
? See above.EssoAir wrote:How do i use shell() calls to deploy it to a computer?
Ah, mobile, looks this is not doable on mobile except maybe with an external?EssoAir wrote:Also, shell() doesnt work on mobile. how do i get it working on android and iOS?
Re: Running a full C program inside a stack?
Klaus wrote:You will need to also install all the neccessary excutables with your app (as far as TOX allows).EssoAir wrote:But how do i deploy it? I cant assume the user already has it insitalled.?? See above.EssoAir wrote:How do i use shell() calls to deploy it to a computer?Ah, mobile, looks this is not doable on mobile except maybe with an external?EssoAir wrote:Also, shell() doesnt work on mobile. how do i get it working on android and iOS?
Here is the android port https://github.com/Astonex/Antox
Re: Running a full C program inside a stack?
Yes, someone obviously compiled the source code for AndroidEssoAir wrote:Here is the android port https://github.com/Astonex/Antox

Sorry, no idea if and how this could help you.
-
- VIP Livecode Opensource Backer
- Posts: 2847
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Running a full C program inside a stack?
Esso- What's your end goal here? Are you trying to add additional functionality to the tox project? Are you intending to launch a different process and then in the middle of that launch the tox client as a side effect? Just curious because tox is designed to be self-contained - as an end user, I'd regard any additions that weren't freely accessible through the github project as suspect.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Running a full C program inside a stack?
To your second point, yes I agree, FOSS is bestmwieder wrote:Esso- What's your end goal here? Are you trying to add additional functionality to the tox project? Are you intending to launch a different process and then in the middle of that launch the tox client as a side effect? Just curious because tox is designed to be self-contained - as an end user, I'd regard any additions that weren't freely accessible through the github project as suspect.
To your first, no its not. libtoxcore and venom/qt/antox/etc are separate things. Anyone can make a gui that connects with the network.
My end goal is simply to make my own GUI. It may not be possible in LiveCode, but if it is I'd like to give it a shot. Its just for fun I guess
-
- VIP Livecode Opensource Backer
- Posts: 2847
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Running a full C program inside a stack?
Esso-
Cool. Fun can be its own end goal.
I submitted a bug to the tox project because there's a missing Makefile that prevents the project from being built (other than the Android parts).
If you need to access the commandline tools on a mobile device, though, I'm not sure the sandboxing of individual apps will allow that.
I'm not convinced one way or the other, but I think that's the avenue to investigate before embarking on too much work.
But if that's a problem, then maybe building an external wrapper for the commandline would do the trick.
Cool. Fun can be its own end goal.
I submitted a bug to the tox project because there's a missing Makefile that prevents the project from being built (other than the Android parts).
If you need to access the commandline tools on a mobile device, though, I'm not sure the sandboxing of individual apps will allow that.
I'm not convinced one way or the other, but I think that's the avenue to investigate before embarking on too much work.
But if that's a problem, then maybe building an external wrapper for the commandline would do the trick.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Running a full C program inside a stack?
Hmmm, im a web developer by trade, and while I do know Java and Livecode, your words confuse me. I know what sandboxing is, but I dont know how to do it and wtf is a wrapper? What I think "wrapper" what comes to mind is <div id="wrapper" class="bordered themed otherClass"><!-- Content --></div> LOLmwieder wrote:Esso-
Cool. Fun can be its own end goal.
I submitted a bug to the tox project because there's a missing Makefile that prevents the project from being built (other than the Android parts).
If you need to access the commandline tools on a mobile device, though, I'm not sure the sandboxing of individual apps will allow that.
I'm not convinced one way or the other, but I think that's the avenue to investigate before embarking on too much work.
But if that's a problem, then maybe building an external wrapper for the commandline would do the trick.