This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Any way to make an standalone?
Started by FuuuAInfiniteLoop(F.A.I.L), 06 June 2013 - 04:58 PMPosted 06 June 2013 - 06:58 PM
There is some way to compile a cc program to an standalone executable?
Posted 06 June 2013 - 07:07 PM
I can recall someone making a program that did this, but I personally would prefer to stay within the bounds of the actual mod, as a CC program isn't exactly presentable outside of CC (in my opinion).
Posted 06 June 2013 - 08:49 PM
Posted 06 June 2013 - 09:00 PM
I think he is talking about programs for ComputerCraft, not for normal Lua.
Posted 06 June 2013 - 09:03 PM
"Let Me Google That For You" stopped being oh so funny and witty ages ago. Now it's just plain rude and it makes you look like a smartass. Not only that, but you seem to have misunderstood the OP's question.
*clap*
Posted 06 June 2013 - 10:14 PM
Then what is the OP looking for? A CC Emulator? A CC emulator he can compile into an executable?
Posted 07 June 2013 - 01:04 AM
It would be possible, but why should you do that? Just learn a language like c++ or java.
Posted 07 June 2013 - 01:30 AM
GO C++
Posted 07 June 2013 - 02:35 AM
That's actually a good question. OP, what are you looking to distribute as a standalone? Chances are you could make it better using one of the above languages, or Python and GTK+ if it's a general purpose application, or LÖVE if it's a game.
Posted 07 June 2013 - 04:15 AM
GO C++
+1 ^_^/>
Posted 07 June 2013 - 06:11 AM
Y U NO PRESS +1 :P/>GO C++
+1 ^_^/>
Posted 07 June 2013 - 08:25 AM
Forgot :P/>Y U NO PRESS +1 :P/>GO C++
+1 ^_^/>
Posted 07 June 2013 - 10:03 AM
I have been looking for this as well. I wish someone would make one. :D/>
Posted 07 June 2013 - 12:33 PM
This would be impossible just because you would need some program to run it and that wouldn't be a standalone anymore. Just learn c++ or any other language that is good to make standalone programs.
Posted 07 June 2013 - 12:46 PM
Tomass needs to make something like this. :D/>
Posted 07 June 2013 - 04:01 PM
I think at best someone could make a 'translator'. With that I mean, a converter to LÖVE or something. That is because I actually do not know if it is possible to make GUI's without an engine
Posted 07 June 2013 - 05:07 PM
It is. You could totally do it in Visual Studio or with GTK+ with a bit of work. Though I might consider that an engine too.I think at best someone could make a 'translator'. With that I mean, a converter to LÖVE or something. That is because I actually do not know if it is possible to make GUI's without an engine
Posted 07 June 2013 - 05:37 PM
I mean like a compiler that copy itself with the program so when you run it, the compiler executes your program dont having to install a emulator, just running it
Posted 07 June 2013 - 06:15 PM
Since Lua is an script language it needs an envioverment to run in. Hello World would be 30Mb.
Posted 07 June 2013 - 07:07 PM
Do you want CC specifcally or just lua? There are many such things for Lua, nothing for CC specifically.I mean like a compiler that copy itself with the program so when you run it, the compiler executes your program dont having to install a emulator, just running it
Posted 07 June 2013 - 07:24 PM
As he states in the OP, he wants it for a CC program..Do you want CC specifcally or just lua? There are many such things for Lua, nothing for CC specifically.I mean like a compiler that copy itself with the program so when you run it, the compiler executes your program dont having to install a emulator, just running it
Posted 07 June 2013 - 07:25 PM
While you all seem to be orbiting the whole objective, this is actually pretty simple in terms of execution.
- It's theoretically pretty easy to convert any of the two emulators currently in existence into a `standalone launch` platform, it's just not been implemented yet, I've had a few PM's asking me how it could be done, or if it could be embedded into websites, and I've told people to stay tuned.
- If converting an emulator isn't attractive, you could probably replicate the Computercraft API's inside a standalone application on the Lua51.dll library in your-language-of-choice - but note, you can't directly interface with, or use, ComputerCraft code (dan200's license restricts this). There are some potentially serious limitations to be considered as well.
- If you're talking non-ComputerCraft Lua code, you can already do this by downloading the Lua 5.1 application for your operating system, and by launching with `lua51.exe <somescript>`.
Posted 07 June 2013 - 11:34 PM
Right, but that could just be a terminal program in lua, he didn't really specify.As he states in the OP, he wants it for a CC program..Do you want CC specifcally or just lua? There are many such things for Lua, nothing for CC specifically.I mean like a compiler that copy itself with the program so when you run it, the compiler executes your program dont having to install a emulator, just running it
Posted 08 June 2013 - 05:07 AM
True, but you could modify it a little bit so you have to import all libraries you use in the program like in c or java so it would only copy the needed libraries in there.Since Lua is an script language it needs an envioverment to run in. Hello World would be 30Mb.
Posted 08 June 2013 - 09:23 AM
Lua is SCRIPT language what makes code impossible to be compiled. You would have to pack your code with Lua run-time system.
Posted 08 June 2013 - 01:54 PM
I know that but you could only pack the needed libraries in there. It would still be much bigger than a program in any other language, but it would reduce the side of that package.No wonders why your nick includes 'noob'…
Lua is SCRIPT language what makes code impossible to be compiled. You would have to pack your code with Lua run-time system.
What I mean is that you pack a run time into the program you make, but only the needed stuff. For example, if you aren't using any colors for highlighting stuff, the things needed for it don't get in the package. I know it would still be a lot of space even for little programs and not really a stand-alone, but it would reduce the side of it.
Another way to do this would be modifying the emulators to make it a runtime for cc programs. Java for example needs to have the java runtime installed to run java bytecode.
Posted 09 June 2013 - 04:18 AM
FFS,
Lua is SCRIPT language what makes code impossible to be compiled. You would have to pack your code with Lua run-time system.
Posted 09 June 2013 - 04:53 AM
I know that.
Posted 09 June 2013 - 09:37 AM
FFS,Lua is SCRIPT language what makes code impossible to be compiled. You would have to pack your code with Lua run-time system.
Which is entirely possible. Not sure why people think it would be bad either, Lua itself is quite compact
iirc lua itself is about <1 MB and LuaJit still <4 MB
May be large for a "Hello World" program, but then if you start coding something worthwile it shouldn't matter
Posted 10 June 2013 - 09:24 AM
Lua is SCRIPT language what makes code impossible to be compiled.
And now for the truth: see luac.
And if that is TooMuchWork;Didn'tBother: The output of luac will still require the full lua runtime (at a few hundred kB), it's just entered in place of the code that generated it, and so it can skip the compilation step. The version of luac must match the runtime.
Anyway, this thread is fairly useless because the OP was way too ambiguous. With the way it degenerated (at least in part as a result), I suggest the thread should be locked.
Posted 10 June 2013 - 10:10 AM
He wants CCLua and not the normal one.
Posted 11 June 2013 - 01:39 AM
Then compile it with the CC APIs.He wants CCLua and not the normal one.
Posted 11 June 2013 - 07:33 AM
Sure but what about the graphics and that stuff? You would have to completely rewrite the code that displays all the stuff in itThen compile it with the CC APIs.He wants CCLua and not the normal one.
Posted 11 June 2013 - 09:34 AM
Yeah, but the Java-side APIs wouldn't be there.Then compile it with the CC APIs.He wants CCLua and not the normal one.
Posted 12 June 2013 - 10:54 AM
And you would have to emulate terminal…
And rednet…
And modems…
And shitton of other stuff…
And rednet…
And modems…
And shitton of other stuff…
Posted 12 June 2013 - 02:30 PM
Why don't you guys just make a LOVE 2D emulator? I would, but I HATE OOP.
Posted 12 June 2013 - 02:56 PM
Anyway, this thread is fairly useless because the OP was way too ambiguous. With the way it degenerated (at least in part as a result), I suggest the thread should be locked.
Then report it next time, please, rather than posting it. You seem to have been a fairly positive contributor so far, so I'd hate to see you wander down the backseat moderation path. We greatly prefer and encourage the use of the report button any time a user feels that moderation is required.
I'm still comfortable letting the thread meander, albeit with a little cleanup.
Posted 12 June 2013 - 04:38 PM
Ok, mister time traveler from the 70s.I HATE OOP.
Posted 12 June 2013 - 04:51 PM
Well, it is pointless to make it in my opinion. Because you must decide yourself what you are putting in your .load .run .draw etc. functions. Im not saying it is impossible to do, but it is pointless imoWhy don't you guys just make a LOVE 2D emulator? I would, but I HATE OOP.
Posted 12 June 2013 - 06:52 PM
Well, it is pointless to make it in my opinion. Because you must decide yourself what you are putting in your .load .run .draw etc. functions. Im not saying it is impossible to do, but it is pointless imoWhy don't you guys just make a LOVE 2D emulator? I would, but I HATE OOP.
Someone just made my day.
http://www.computercraft.info/forums2/index.php?/topic/13445-lightweight-cc-emulator/