This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Wilma456's profile picture

CCLite for CraftOS 1.8

Started by Wilma456, 05 July 2017 - 12:30 PM
Wilma456 #1
Posted 05 July 2017 - 02:30 PM
First: This is a fork of CCLite from gamax92
A Computercraft Emulator
Changes:
-Update to Löve2D 11.0
-Update to CraftOS 1.8
-Added Commandline Arguments
-Added non Advanced Computer
-Drag and drop programs into the Computer
Download
Official Snap for Linux User
Bugtracker
Commandline ArgumentsYou can set the config with the commandline.
–setting=value
Not all settings work correct yet.
Special Arguments:
–run=program
Run a Program at start
–debugrun=program
Run a Progarm at start and exit the emulator after exit the program.
CCLite APIcclite.traceback() - A copy of debug.traceback(), useful if you need to track down code flow.
cclite.log(…) - Logs anything given to the Love2D console.
cclite.message(string sMessage) - Spawns a message on the display.
cclite.peripheralAttach(string sSide, string sType) - Attaches a virtual peripheral of type sType to side sSide. Throws an error if the specified type does not exist or if something is already attached to the specified side.
cclite.peripheralDetach(string sSide) - Removes a virtual peripheral from side sSide. Throws an error if there is no peripheral attached to the specified side.
cclite.call(string sSide, string sMethod, …) - Calls a function from the api the virtual peripheral provides. Please note that this api set is different from the one usable from peripheral.call().
cclite.setTitle( string Title ) - Set the title of the window
cclite.getTitle() - Get The Title of the Window
cclite.screenshot - Make a Screenshot
cclite.getVersion - Get the Version of CCLite
Screenshots
Data FolderWindows XP: C:\Documents and Settings\user\Application Data\LOVE\CCLite or %appdata%\LOVE\CCLite
Windows Vista, 7, 8 and 10: C:\Users\user\AppData\Roaming\LOVE\CCLite or %appdata%\LOVE\CCLite
Mac: /Users/user/Library/Application Support/LOVE/CCLite
Linux: $XDG_DATA_HOME/love/CCLite or ~/.local/share/love/CCLite
Visit GitLab Repo
Edited on 06 June 2018 - 04:43 PM
Dave-ee Jones #2
Posted 07 July 2017 - 03:39 AM
Looks good. Just tried it out.
supernicejohn #3
Posted 08 July 2017 - 10:12 AM
Bug: (Don't know if it is your version or cclite in general) Non-Ascii characters are all '?'s.
If It's something on my end, oops :)/>
Wilma456 #4
Posted 08 July 2017 - 06:41 PM
I have updated ccemu to Version 2.1:
-You can make screenshots with escape
-Each ID has a own data folder
-Fixed many Bugs
-The Label is now saved in a file

@supernicejohn
The Problem is, that I need the Chars in a image file with transparency Background.
Bomb Bloke #5
Posted 09 July 2017 - 12:00 AM
The Problem is, that I need the Chars in a image file with transparency Background.

ComputerCraft.jar\assets\computercraft\textures\gui\term_font.png
Wilma456 #6
Posted 12 July 2017 - 06:50 PM
Builds are now aviable
DannySMc #7
Posted 12 July 2017 - 06:55 PM
Wilma456 you are amazing! Thank you, this is my chosen emulator and at last someone has updated it!! I am forever in your debt.

Edit: Do you have a mac version?
Edited on 13 July 2017 - 06:50 AM
Wilma456 #8
Posted 13 July 2017 - 11:50 AM
Mac and Android Build are now aviable, but the Mac Built is not testet, because I don't have a Mac.
DannySMc #9
Posted 13 July 2017 - 11:58 AM
Mac and Android Build are now aviable, but the Mac Built is not testet, because I don't have a Mac.

Will test for youl
Wilma456 #10
Posted 20 July 2017 - 01:15 PM
Update to Version 2.2

Changelog-Add Support for Pocket Computers (Run love CCLite.love –pocket)
-Drag and Drop files into the Computer
-Support for Sources in os.day()
-The Color Pallete is now reset to default by reboot
-Renamed some Settings
-Add unrandomize option
-CCLite show now a Error in the Window, if the OS has a Error.

btw:
Can somebody help me to put the font in the right format? I'm a Noob with Gimp.
Bomb Bloke #11
Posted 21 July 2017 - 12:17 AM
Describe "the right format"?
Wilma456 #12
Posted 21 July 2017 - 01:10 PM
The Letters must be lined up and must be separeted with a red line. And at the begin must be a red line.Look here for a example. The Hight of the image must be 8 Pixel.
Bomb Bloke #13
Posted 22 July 2017 - 03:20 AM
That isn't a job for Gimp, that's a job for code which can load the original font file. Which makes me think you should drop such code directly into the emulator and ditch that other weird format. You're gonna have to deviate from it anyway, as actual CC characters are up to 9px tall.
Wilma456 #14
Posted 22 July 2017 - 11:30 AM
The Code to load this formated font is not fron CCLite, it's from Love2d see the Wiki of Löve2d. So it must be in that format.
Bomb Bloke #15
Posted 23 July 2017 - 02:24 AM
That page suggests that you can use any image height. Or, at least, it doesn't say you can't, and their example is certainly taller than 8px.

So I guess this file should work, so long as Love doesn't try to center the glyphs or something. Judging by your link, I believe this code should load it:

local charString = {}
for i = 0, 255 do charString[ i + 1 ] = i end
charString = string.char( table.unpack( charString ) )

local font = love.graphics.newImageFont( "font.png", charString )
Edited on 23 July 2017 - 12:26 AM
apemanzilla #16
Posted 23 July 2017 - 08:01 AM
You'd be better off using love.graphics.newImage( filename ), Image:getData( ), and love.graphics.newImageFont( imagedata, glyphs ) to programmatically generate a suitable font image from a standard CC font.
Edited on 23 July 2017 - 06:01 AM
Wilma456 #17
Posted 23 July 2017 - 05:01 PM
@BombBloke Thank you! Your file works.
Wilma456 #18
Posted 03 August 2017 - 06:09 PM
Version 2.3 is out. You now have alls Chars up to 127 thanks BombBloke. I have some Problems with UTF-8 Encondinga at the moment, so I can't load all Chars from the File but I try to fix it. And I add a Program called "perman" which allows you to manage Peripherals.
Wilma456 #19
Posted 30 August 2017 - 07:26 PM
Version 2.4 is out!
Changelog-http.checkURL() works now correct
-os.epoch works now correct
-More suported Chars
-You can config the Path of bios.lua and /rom
-Some litle Changes
Wilma456 #20
Posted 20 February 2018 - 04:28 PM
Good News for all Linux Users: CCLite is now aviable as snap. To install CCLite and get automatic updates just run:

sudo snap install cclite
DannySMc #21
Posted 21 February 2018 - 01:57 PM
Hey! Doesn't work on MacOS High Sierra (10.13.2), just sits on a white screen and crashes.
Wilma456 #22
Posted 21 February 2018 - 07:54 PM
Is there a error message and what Version of Löve2d do you use? I dont't have a Mac so I am not able to test it on it.
DannySMc #23
Posted 21 February 2018 - 11:24 PM
No error message, and latest version.
Bomb Bloke #24
Posted 22 February 2018 - 01:53 AM
latest version

That's a poor answer. Your idea of "latest" may not be accurate.
DannySMc #25
Posted 22 February 2018 - 01:22 PM
latest version

That's a poor answer. Your idea of "latest" may not be accurate.

Apologies, Love2d Version: 0.10.2
Wilma456 #26
Posted 22 February 2018 - 03:05 PM
Did you get any Terminal Output? Does the Folder of CCLite exits?
DannySMc #27
Posted 23 February 2018 - 06:34 PM
Did you get any Terminal Output? Does the Folder of CCLite exits?

What do you mean? I just run the app, it loads, then shows a white screen - where usually the CC terminal would be. It creates the folders and everything but stops there.
LDDestroier #28
Posted 23 February 2018 - 10:17 PM
I tried STD-GUI in CCLite, and it didn't exactly work.


(ccemuredux vs cclite snapd)

Same file. PAIN also doesn't act the same in CCLite as it does in CCEmuRedux, particularly with holding the left mouse button, moving the cursor, and scrolling.
Luca_S #29
Posted 23 February 2018 - 11:58 PM
Did you get any Terminal Output? Does the Folder of CCLite exits?

I'm experiencing the same Problem, here's all the terminal output I got(Ran the Emulator manually from within the package)


Save Directory is /Users/Luca/Library/Application Support/ccemu
Starting CraftOS
Wilma456 #30
Posted 24 February 2018 - 12:06 PM
The Bug of Mac OS sounds for me as a Bug of Löve2d. Could you try it with Version 0.10.0 of Löve2d.

I had write a PM to LDDestroier, to get more information which parts of his programs are the Bugs caused.
Wilma456 #31
Posted 27 February 2018 - 05:06 PM
CCLite 2.5 is now out. You can get it from the GitHub Realease Page or by updating your snap.

Changelog-getfenv() work now correct (Fix Bug in STD-GUI)
-Added support for read() in normal file read handle
-Added support for numbers as argument in file binary read handle

btw:
The Mac User should open a Issue on the Issue Tracker of Löve2d to report the Bug with the White Screen.
DannySMc #32
Posted 01 March 2018 - 12:24 AM
The Bug of Mac OS sounds for me as a Bug of Löve2d. Could you try it with Version 0.10.0 of Löve2d.

I had write a PM to LDDestroier, to get more information which parts of his programs are the Bugs caused.

I am not sure what I am doing wrong, but that website shows no 0.10.0 version for mac, I also tried downloading 0.10.2, 0.10.1, 0.9.1, 0.9.2, adding them to my applications folder, and then re-running it, but no luck, so unless I am doing something wrong, not sure what to do here? Sorry to be a pain.
Wilma456 #33
Posted 01 March 2018 - 08:02 PM
I think the only thing caan do at the moment is to Open a Ticket at the Issue Tracker of Löve2d and describe that this Program does not run on MacOS. I don't know why it doesen't works on MacOS. It sounds like a Bug of Löve2d for me.
LDDestroier #34
Posted 02 March 2018 - 03:01 PM
If you open "edit" in a multishell tab and scroll, it crashes the entire emulator.
Wilma456 #35
Posted 02 March 2018 - 05:11 PM
CCLite 2.6 is now out!

Changelog-mouse_scroll Event does now include coordinates of Mouse (Fix Bug reported by LDDestroier)
-Change name of save Folder from "ccemu" to "CCLite"
-CCLite does now automatic look for luasec. No configuration needed.

Important:
The Name of the Save Folder has been changed. You need to copy all your data into the new folder.

Note for Snap User:
Luasec is now included into the snap. That means, that you can now use HTTPS.

Get the new Version
Jummit #36
Posted 02 March 2018 - 06:48 PM
Somehow I only get mouse_up and mouse_drag events, no mouse_down. I downloaded it from the website release page. Is this a löve issue?

EDIT: also the paint program has ?s instead of the ▨ lines.
And pressing the escape button crashes with this error message:

api.lua:610: Invalid image format '/screenshots/CClite_1520017546.png'.
Traceback
in function 'encode'
in function 'screenshot'
I am on linux.
Edited on 02 March 2018 - 05:56 PM
LDDestroier #37
Posted 03 March 2018 - 06:32 AM
@jummit

There is no such thing as mouse_down, do you mean mouse_click? Do you get that? Because I do…
Jummit #38
Posted 03 March 2018 - 06:52 AM
@jummit

There is no such thing as mouse_down, do you mean mouse_click? Do you get that? Because I do…
Programed a little too much in löve in the past days :D/>. But how did mouse_down get into my old program without me noticing it?
Wilma456 #39
Posted 20 March 2018 - 03:20 PM
CCLite 3.0 is now out!

Changelog-CCLite now supports all 255 Chars of ComputerCraft
-New Welcome Screen
-New Function cclite.setScreenSize(x,y)

Get the new Version

@Jummit
The Paint Program is crazy. The Char Number 127 is the only Char who is a ?. I am searching the reason for that. I don't know why it crashed when you press Esc. It should make a Screenshoot, what works perfectly on my PC.
Wilma456 #40
Posted 25 March 2018 - 04:06 PM
If someone is intrested, here are the stats of the snap Version of CCLite from 25.03.2108:
Spoiler
Wilma456 #41
Posted 02 April 2018 - 06:29 PM
CCLite 4.0 is now out!

Only 20 hours after the release of Löve2d 11.0, CCLite has been ported to the new Version!

Changelog-Update to Löve2d 11.0
-Add cclite.setScale()

Get the new Version

@Mac Users
While porting to the new Version of Löve2d I had to cange some code. The old Version of CCLIte shows a white Screen because Löve2d changes the RGB values. Maybe you had get a Beta of Version 11.0. Just try the new Version. Maybe it will work now.
JonWalter #42
Posted 05 April 2018 - 11:21 AM
AWESOME!!! I've been looking for one of these for a long time…
I am also interested to know if there is a way to do this without building the official Android port for every release?
AWESOME!!! I've been looking for one of these for a long time…
And http support does work on mac
Cheers, Jon Walter
Edited on 10 April 2018 - 08:07 AM
Wilma456 #43
Posted 10 April 2018 - 07:46 PM
CCLite 5.0 is now out!

Changelog-Add Support for Plugins
-Add cclite.mountDisk(id)
-Add cclite.unmountDisk(path)
-Add cclite.listPlugins()
-Add cclite.isNewVersion()
-Add mount program
-Add unmount program
-Add plugins program
-Add changelog Program
-Add help files for all built-in programs
-CCLite shows now the Changelog after a Update to a new Version
-Update welcome.lua

Get the new Version

@JonWalter
Thank you! But if you are interested in the Android Version: Since the Update to Löve2d 11.0 there are no Android Builds because I have some problems with building the new Version for Android.
Wilma456 #44
Posted 17 April 2018 - 04:43 PM
There is new Version with a litle Bugfix out

btw:
I removed the W.I.P. from the Title of the Topic
-DECE- #45
Posted 01 May 2018 - 03:09 PM
It doesn't work with functions like that "function(…)" and also has not some characters
Luca_S #46
Posted 01 May 2018 - 07:15 PM
It doesn't work with functions like that "function(…)" and also has not some characters

For me functions with varargs do work https://imgur.com/6GrLVR0

EDIT: And chars seem right too: https://imgur.com/Zs6dSg2
Edited on 01 May 2018 - 05:18 PM
Bomb Bloke #47
Posted 02 May 2018 - 03:58 AM
127 is wrong.
Wilma456 #48
Posted 03 May 2018 - 07:11 PM
I know, that Char number 127 does not work, but I couldn't find the reason for it, so I'm unable to fix this this Bug. If anybody of you can find it, you are welcome to make a PR at GitHub.

I know, there are some other Problems with Chars higher than 127, The reason for that is, Löve2d has another encoding as ComputerCraft. I had build some Workarounds around this, but I can't fix all Bugs.
Bomb Bloke #49
Posted 04 May 2018 - 02:13 AM
I know, that Char number 127 does not work, but I couldn't find the reason for it, so I'm unable to fix this this Bug.

Seems to me that it'd be because you don't have the correct glyph in your font file.
Wilma456 #50
Posted 04 May 2018 - 01:12 PM
Thanks, I had only searched in the code and not in the Font self.

Fixed Version is now out
-DECE- #51
Posted 07 May 2018 - 02:57 PM
For me functions with varargs do work https://imgur.com/6GrLVR0

But I have problems
SpoilerGoogle Photo
Maybe it's only in API
Wilma456 #52
Posted 07 May 2018 - 03:14 PM
What Program do use use that crashes?
-DECE- #53
Posted 08 May 2018 - 01:46 PM
What Program do use use that crashes?

It is my OS. Installer: TVrwKmUv
It crashes in all programs that use these functions
Luca_S #54
Posted 08 May 2018 - 09:24 PM
What Program do use use that crashes?

It is my OS. Installer: TVrwKmUv
It crashes in all programs that use these functions
I'm not sure if vararg functions are supposed to work like these. You need to do something like this before using them in your program the way that you do:

local arg = {...}
SquidDev #55
Posted 08 May 2018 - 09:36 PM
I'm not sure if vararg functions are supposed to work like these. You need to do something like this before using them in your program the way that you do:

local arg = {...}
Lua 5.0 used arg as a "magic" variable which held a function's arguments. This was replaced with in Lua 5.1. Whilst Lua 5.1 and LuaJ support this for backwards compatibility, LuaJIT and Lua 5.2+ do not. As Luac_S says, it's best to use {…} or table.pack(…) to ensure compatibility into the future.
-DECE- #56
Posted 09 May 2018 - 07:52 AM
OK, thanks. I must to rewrite some APIs.
Nothy #57
Posted 17 May 2018 - 10:54 PM
Nice job!
Wilma456 #58
Posted 19 May 2018 - 03:24 PM
Nice job!
Thanks
Wilma456 #59
Posted 05 June 2018 - 11:22 AM
The Repo of CCLite has been moved to GitLab.
Jummit #60
Posted 05 June 2018 - 01:17 PM
The Repo of CCLite has been moved to GitLab.
Because of Microsoft? :D/>
Edited on 05 June 2018 - 11:17 AM
Wilma456 #61
Posted 05 June 2018 - 02:10 PM
The Repo of CCLite has been moved to GitLab.
Because of Microsoft? :D/>/>
Of course
Wilma456 #62
Posted 06 June 2018 - 03:12 PM
Just new Stats from the Snap Store. The Snap Version of 55 had became a lot of new Users in the last Days. It has now 55 Users.

Spoiler
Luca_S #63
Posted 07 June 2018 - 08:11 PM
The Repo of CCLite has been moved to GitLab.
Because of Microsoft? :D/>/>
Of course
Welcome to Microsoft!
Wilma456 #64
Posted 08 June 2018 - 03:54 PM
Microsft is not the Owner of GitLab. IT's just the hoster of the Servers.
Admicos #65
Posted 08 June 2018 - 05:45 PM
Microsft is not the Owner of GitLab. IT's just the hoster of the Servers.

They're also moving to Google's services so not for long
Wilma456 #66
Posted 08 January 2019 - 08:27 PM
Version 5.4 is out!

Changelog-Added cclite.openFilemanger() which will open the data folder of CCLite in the Filemanager
-Added "datafolder" program which just runs cclite.openFilemanager
-Labels are now saved in a new formal (Should be automatically converted)
Jummit #67
Posted 24 October 2019 - 10:37 AM
A tiny issue I found: the mouse_drag event returns 1 when dragging with the middle mouse button. It should be 3.
Quick fix: put

table.insert (self.eventQueue, {"mouse_drag", love.mouse.isDown(3) and 3 or love.mouse.isDown(2) and 2 or 1, termMouseX, termMouseY})
in line 836
Edited on 24 October 2019 - 08:45 AM