Page 1 of 1

Running a full C program inside a stack?

Posted: Fri Feb 28, 2014 2:06 pm
by EssoAir
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

Re: Running a full C program inside a stack?

Posted: Fri Feb 28, 2014 2:20 pm
by Klaus
Hi Esso,
EssoAir wrote:Can this be done?
not out of the box!

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?

Posted: Fri Feb 28, 2014 2:27 pm
by BvG
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.

Re: Running a full C program inside a stack?

Posted: Fri Feb 28, 2014 2:46 pm
by EssoAir
Klaus wrote:Hi Esso,
EssoAir wrote:Can this be done?
not out of the box!

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
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?

Posted: Fri Feb 28, 2014 2:56 pm
by Klaus
EssoAir 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
Then you should be able to control it with a lot of SHELL() calls :D

Re: Running a full C program inside a stack?

Posted: Fri Feb 28, 2014 4:17 pm
by EssoAir
Klaus wrote:
EssoAir 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
Then you should be able to control it with a lot of SHELL() calls :D
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?

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?

Posted: Fri Feb 28, 2014 4:24 pm
by Klaus
EssoAir wrote:But how do i deploy it? I cant assume the user already has it insitalled.?
You will need to also install all the neccessary excutables with your app (as far as TOX allows).
EssoAir wrote:How do i use shell() calls to deploy it to a computer?
? See above.
EssoAir wrote:Also, shell() doesnt work on mobile. how do i get it working on android and iOS?
Ah, mobile, looks this is not doable on mobile except maybe with an external?

Re: Running a full C program inside a stack?

Posted: Fri Feb 28, 2014 4:26 pm
by EssoAir
Klaus wrote:
EssoAir wrote:But how do i deploy it? I cant assume the user already has it insitalled.?
You will need to also install all the neccessary excutables with your app (as far as TOX allows).
EssoAir wrote:How do i use shell() calls to deploy it to a computer?
? See above.
EssoAir wrote:Also, shell() doesnt work on mobile. how do i get it working on android and iOS?
Ah, mobile, looks this is not doable on mobile except maybe with an external?

Here is the android port https://github.com/Astonex/Antox

Re: Running a full C program inside a stack?

Posted: Fri Feb 28, 2014 5:16 pm
by Klaus
EssoAir wrote:Here is the android port https://github.com/Astonex/Antox
Yes, someone obviously compiled the source code for Android :D
Sorry, no idea if and how this could help you.

Re: Running a full C program inside a stack?

Posted: Fri Feb 28, 2014 7:48 pm
by mwieder
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.

Re: Running a full C program inside a stack?

Posted: Sat Mar 01, 2014 3:43 am
by EssoAir
mwieder 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 second point, yes I agree, FOSS is best

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

Re: Running a full C program inside a stack?

Posted: Sat Mar 01, 2014 4:05 am
by mwieder
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.

Re: Running a full C program inside a stack?

Posted: Sat Mar 01, 2014 4:20 am
by EssoAir
mwieder 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.
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> LOL