Releases: MCJack123/craftos2
CraftOS-PC v2.2.3
CraftOS-PC v2.2.3.1 is an emergency bugfix update that fixes an issue where CraftOS-PC uses 100% of the CPU.
Hey, I heard you like bugfixes... so I have some bugfixes for you. A few new features are also tossed in this update to CraftOS-PC, too!
- Added
useHDFont
virtual config option - Added support for reading UTF-8 files
- Pressing enter in the debugger's Call Stack tab now keeps file open
- Stepping multiple lines in the debugger now works as expected
- Fixed accessing locals in the debugger
- Updated cash to latest version
- NUL bytes in string patterns no longer mark the end of the pattern
io.input()
/io.output()
no longer fail when called withio.stdin
/io.stdout
,io.stderr
(#75)- Fixed bug that caused
file.read(x)
on binary files to always return one byte - Fixed segmentation fault when Lua crashes
- Fixed some bugs relating to vanilla mode (#76)
- Added preliminary Emscripten/WASM support (#73)
- Mac: Fixed auto-updater (note that you will still have to manually install this version)
If you need help using CraftOS-PC, I'm available on the ComputerCraft Discord server as @JackMacWindows#9776
. Feel free to ping me if you need anything.
The Windows binary has been updated to fix a small bug that caused the debugger to crash CraftOS-PC.
CraftOS-PC v2.2.2
Happy New Year! With the turn of the year comes a fresh new version of CraftOS-PC. This version adds a couple of new features as well as some minor bug fixes.
- Feature parity with CC: Tweaked 1.86.0
- Added MOTD (disabled by default)
- Added Ctrl+S and Ctrl+R hotkeys (#70)
- Added configurable recording length and framerate
- Fixed crash when resizing window to a smaller size (#71)
- fs.makeDir no longer errors when creating a directory that already exists
- io.write no longer adds a newline to the end of the string (#68)
- os.setComputerLabel no longer errors when no label is provided (#69)
- Fixed string length bug in debugger.print
If you need help using CraftOS-PC, I'm available on the ComputerCraft Discord server as @JackMacWindows#9776
. Feel free to ping me if you need anything.
CraftOS-PC Accelerated v2.2.1
CraftOS-PC Accelerated has been updated with the latest features in CraftOS-PC v2.2. This version is the same as CraftOS-PC v2.2.1, but it uses the LuaJIT compiler instead of the standard Lua interpreter. Also, the following features have been added to the ROM:
- Added MOTD functionality
- Feature parity with CC: Tweaked 1.86.0
Note about "too long without yielding" errors and speed loss
A bug exists in LuaJIT that impacts the ability for CraftOS-PC Accelerated to detect when a script runs too long without yielding. From the LuaJIT FAQ:
Q: Sometimes Ctrl-C fails to stop my Lua program. Why?
The interrupt signal handler sets a Lua debug hook. But this is currently ignored by compiled code (this will eventually be fixed). If your program is running in a tight loop and never falls back to the interpreter, the debug hook never runs and can't throw the "interrupted!" error.
In the meantime you have to press Ctrl-C twice to get stop your program. That's similar to when it's stuck running inside a C function under the Lua interpreter.
CraftOS-PC Accelerated works around this bug by setting the hook count to 1, which ends up causing the hook that watches the run time to use up almost 75% of the CPU time used by CraftOS-PC. If your program needs that speed back, you can call os.setHaltOnLongRunMode(false)
to disable the hook and regain the speed previously lost. You can call the same function with true
to re-enable the hook and restore standard behavior.
CraftOS-PC v2.2.1
CraftOS-PC v2.2.1 adds a few minor features and fixes some critical bugs in v2.2. It is highly recommended that you upgrade to this version as soon as possible.
- Added cash 0.3 as an optional shell (set bios.use_cash in the settings)
- Added help files for CraftOS-PC features
- Improved speed of terminal writing
- Reduced processing time used by terminal hook
- Verified compatibility with CC: Tweaked using official tests
- Fixed a security flaw that allowed modification of read-only mounts
- Resolved an issue that prevented monitors from drawing
- Fixed a bug where secure WebSockets failed to connect with "WebSocket Exception"
- Fixed a possible deadlock when stepping the debugger
- Removed turtle, pocket, command programs; removed bmpview
- Added --small flag to screenfetch
If you need help using CraftOS-PC, I'm available on the ComputerCraft Discord server as @JackMacWindows#9776
. Feel free to ping me if you need anything.
The Mac binary has been re-released to fix some missing libraries.
CraftOS-PC v2.2
CraftOS-PC v2.2 is the biggest update for CraftOS-PC since its launch, introducing a brand new debugger, a revamped plugin API, and lots of bug fixes.
If you are currently running CCEmuX, I have written a small utility that will automatically migrate your CCEmuX data to CraftOS-PC. You can find it with the downloads below.
Also, if you haven't noticed I launched a dedicated website for CraftOS-PC at https://www.craftos-pc.cc. This site contains the latest download links as well as documentation for all of the new features in CraftOS-PC. If you haven't taken a look, go check it out!
These are the changes since the v2.2 pre-release:
- Added F12 hotkey to copy screenshot to clipboard (Windows & Mac only)
- Calling
term.screenshot("clipboard")
will have the same effect
- Calling
- Fixed default IO handles (stdin/out/err)
- Changed
_HOST
variable to more accurately represent ComputerCraft - Fixed
delete.lua
wget.lua
no longer requires a file name (CC:T behavior)- Added
register_termQueueProvider
capability, which recieves the address of thevoid termQueueProvider(Computer *comp, const char *(*callback)(lua_State*, void*), void* data)
function
In addition, here are all of the changes since v2.1.3:
- Added new debugger peripheral
- Opens in separate window
- Four tabs available
- Debugger: GDB-style debugging terminal
- Call Stack: Visual backtrace viewer, shows files
- Profiler: Measures function call count & time
- Console: Allows printing debug messages outside of the main terminal
- Computer can be paused with
debugger.break()
,debug.debug()
, or Ctrl-T in debugger - See the documentation for more information
- Added breakpoints
- Can be set with
debugger.setBreakpoint(file, line)
ordebug.setbreakpoint(file, line)
- Does not require debugger to be attached
- When no debugger is available,
lua.lua
is executed
- When no debugger is available,
- Can be set with
- Fixed #1 ("attempt to yield across metamethod/C-call boundary" when using pcall)
- Tracebacks/errors now function normally
- This was accomplished with a patch that allows yielding across pcall's in Lua 5.1.0
- Thanks to EveryOS for sharing the patch and for sending me a fixed version for 5.1.5
- Moved per-user save directory to more platform-appropriate locations
- Windows:
%appdata\CraftOS-PC
- Mac:
~/Library/Application Support/CraftOS-PC
- Linux:
$XDG_DATA_HOME/craftos-pc
(usually~/.local/share/craftos-pc
) - Data will be migrated when running CraftOS-PC v2.2 for the first time
- Windows:
- Added brand-new plugin API
- Plugins should now provide a
plugin_info
function - This function pushes a table with the API version and requested capabilities onto the Lua stack
- Capabilities are requested by adding a callback function for a function in CraftOS-PC
- These callbacks will recieve the requested function as Lua userdata as the first value on the stack
- Available capabilities in v2.2:
register_getLibrary
: Recieves the address of thelibrary_t * getLibrary(std::string name)
functionregister_registerPeripheral
: Recieves the address of thevoid registerPeripheral(std::string name, peripheral_init initializer)
functionregister_addMount
: Recieves the address of thebool addMount(Computer * comp, const char * real_path, const char * comp_path, bool read_only)
function
- Plugins should now provide a
- Added new config options
vanilla
: Set totrue
to disable all CraftOS-PC featuresinitialComputer
: The first computer that starts when opening CraftOS-PC
- Added
periphemu.names()
which returns a list of all available peripherals (unsorted) - Added
term.drawPixels(x, y, lines)
which draws a table of lines at a position- Each line can either be a string or a table of individual pixels
- Fixed
debug.sethook
,debug.gethook
debug.debug()
now functions the same as hitting a breakpoint- Added hooks for errors, coroutine resumptions and yields
- Running
catch error
in the debugger will pause execution when an error occurs - Errors are logged to stdout if the
logErrors
config option is enabled
- Running
- Fixed a bug when creating directories
- Fixed timers with <= 0 length
- Fixed printing extended characters in the console
- Rewrote implementation of the modem peripheral
- Tables and strings are now properly copied
- Fixed
rednet
API
- Replaced Lua plugin loader with custom loader
- Made SDL_mixer an optional dependency
- Fixed many more bugs
If you need help using CraftOS-PC, I'm available on the ComputerCraft Discord server as @JackMacWindows#9776
. Feel free to ping me if you need anything.
This version has been re-released to fix a critical bug in the debugger.
The Mac build for this version has been pulled due to missing libraries. Please download v2.2.1 or later on Mac.
CraftOS-PC v2.2 Pre-Release 1
CraftOS-PC v2.2 is nearly complete and is ready for a beta test. This version features many new debugging features as well as a new plugin API.
- Added new debugger peripheral
- Opens in separate window
- Four tabs available
- Debugger: GDB-style debugging terminal
- Call Stack: Visual backtrace viewer, shows files
- Profiler: Measures function call count & time
- Console: Allows printing debug messages outside of the main terminal
- Computer can be paused with
debugger.break()
,debug.debug()
, or Ctrl-T in debugger - See the documentation for more information
- Added breakpoints
- Can be set with
debugger.setBreakpoint(file, line)
ordebug.setbreakpoint(file, line)
- Does not require debugger to be attached
- When no debugger is available,
lua.lua
is executed
- When no debugger is available,
- Can be set with
- Fixed #1 ("attempt to yield across metamethod/C-call boundary" when using pcall)
- Tracebacks/errors now function normally
- This was accomplished with a patch that allows yielding across pcall's in Lua 5.1.0
- Thanks to EveryOS for sharing the patch and for sending me a fixed version for 5.1.5
- Moved per-user save directory to more platform-appropriate locations
- Windows:
%appdata\CraftOS-PC
- Mac:
~/Library/Application Support/CraftOS-PC
- Linux:
$XDG_DATA_HOME/craftos-pc
(usually~/.local/share/craftos-pc
) - Data will be migrated when running CraftOS-PC v2.2 for the first time
- Windows:
- Added brand-new plugin API
- Plugins should now provide a
plugin_info
function - This function pushes a table with the API version and requested capabilities onto the Lua stack
- Capabilities are requested by adding a callback function for a function in CraftOS-PC
- These callbacks will recieve the requested function as Lua userdata as the first value on the stack
- Available capabilities in v2.2:
register_getLibrary
: Recieves the address of thelibrary_t * getLibrary(std::string name)
functionregister_registerPeripheral
: Recieves the address of thevoid registerPeripheral(std::string name, peripheral_init initializer)
functionregister_addMount
: Recieves the address of thebool addMount(Computer * comp, const char * real_path, const char * comp_path, bool read_only)
function
- Plugins should now provide a
- Feature parity with CC: Tweaked 1.85.2
- Added new config options
vanilla
: Set totrue
to disable all CraftOS-PC featuresinitialComputer
: The first computer that starts when opening CraftOS-PC
- Added
periphemu.names()
which returns a list of all available peripherals (unsorted) - Added
term.drawPixels(x, y, lines)
which draws a table of lines at a position- Each line can either be a string or a table of individual pixels
- Fixed
debug.sethook
,debug.gethook
debug.debug()
now functions the same as hitting a breakpoint- Added hooks for errors, coroutine resumptions and yields
- Running
catch error
in the debugger will pause execution when an error occurs - Errors are logged to stdout if the
logErrors
config option is enabled
- Running
- Fixed a bug when creating directories
- Fixed timers with <= 0 length
- Fixed printing extended characters in the console
- Rewrote implementation of the modem peripheral
- Tables and strings are now properly copied
- Fixed
rednet
API
- Replaced Lua plugin loader with custom loader
- Made SDL_mixer an optional dependency
- Fixed many more bugs
This version is not available on the Ubuntu PPA or Arch AUR. Please compile from source if you're on Linux. The official release of v2.2 will be available on both package managers.
Please report any bugs you find to the issue tracker.
If you need help using CraftOS-PC, I'm available on the ComputerCraft Discord server as @JackMacWindows#9776
. Feel free to ping me if you need anything.
CraftOS-PC Accelerated v2.1.3
Introducing CraftOS-PC Accelerated, a fork of CraftOS-PC 2 that's built with LuaJIT. LuaJIT is a special Lua implementation that compiles scripts on-the-fly, allowing much better performance than the base Lua interpreter. This version has the same features as CraftOS-PC v2.1.3, but with a LuaJIT interpreter instead. CraftOS-PC Accelerated is also able to be installed alongside standard CraftOS-PC.
Note that this version is for advanced users only; don't expect everything to work under CraftOS-PC Accelerated. If in doubt, download the standard release below.
CraftOS-PC v2.1.3
CraftOS-PC v2.2 is in development, but v2.1 gets another bugfix/minor feature release. This will hopefully be the final version before v2.2.
- Added two new configuration variables
mount_mode
allows restricting mounting to read-only or disablednone
(0) disables mounting altogetherro strict
orro_strict
(1) forces mounts to be read-onlyro
(2) sets mounts to read-only by default (default option)rw
(3) sets mounts to read-write by default (v2.1.2 behavior)
configReadOnly
disablesconfig.set()
- Bugfixes
- #57: config.get("readFail") returns not real nil
- #58: Crash on macOS on rebooting
- #60:
edit
causes segfault when a line goes off the screen if there are more than ~100 lines in a file - Fixed crash when non-ASCII characters are present in computer label
- Computer labels are now stored in Base64 by default; if you want to change the label in the JSON file, simply set
computerLabel
to the ASCII label and remove thebase64
key.
- Computer labels are now stored in Base64 by default; if you want to change the label in the JSON file, simply set
If you need help using CraftOS-PC, I'm available on the ComputerCraft Discord server as @JackMacWindows#9776
. Feel free to ping me if you need anything.
CraftOS-PC v2.1.2
Fixed a few more bugs.
- Fixed some crashes on reboot/quit
- Fixed list subcommand of config
- Changed return value of
config.getType()
to type-string - Added PNG screenshot support for Windows builds
- Fixed "not supported" icon on macOS versions below Catalina
- Added launcher icon on Linux
If you need help using CraftOS-PC, I'm available on the ComputerCraft Discord server as @JackMacWindows#9776
. Feel free to ping me if you need anything.
CraftOS-PC v2.1.1
CraftOS-PC v2.1.1 fixes a couple of bugs in v2.1.
- Fixed http handle methods when using binary mode
wget
now works as expected
- Fixed
os.clock()
implementation - Fixed a bug regarding embedded
\0
charactersterm.write()
can now print strings with NUL characters- String patterns do not work with NUL characters in the query string
- Removed auto-updater on platforms other than Windows & Mac
- These systems can either update through a package manager or rebuild from the release source
- Ubuntu PPA: Fixed CLI support
- Mac: Moved license to
LICENSE.txt
in disk image- Requiring the license to be agreed to breaks the auto-updater
If you need help using CraftOS-PC, I'm available on the ComputerCraft Discord server as @JackMacWindows#9776
. Feel free to ping me if you need anything.
Note for macOS Catalina users
macOS Catalina adds a new policy that requires apps to be notarized with a Developer ID. Because I do not have a paid developer account, I cannot notarize Mac builds, and as a result, double-clicking CraftOS-PC for the first time will not work. To resolve this, right-click on the app and click Open. Afterwards, you can double-click the application as normal.
The macOS build has been re-released to fix a bug relating to a missing library.
The Windows build has been re-released to add PNG screenshot support.