Desktop compatibility #3

Closed
russellteapot wants to merge 9 commits from russellteapot:desktop into main

Changelog

  • Added logic to allow using the script both as a library and standalone
  • Reimplemented shell.resolve and several fs functions to allow use within a regular desktop environment (tested with Lua 5.4)
# Changelog - Added logic to allow using the script both as a library and standalone - Reimplemented `shell.resolve` and several `fs` functions to allow use within a regular desktop environment (tested with Lua 5.4)
To be polished later, argument checking should be in main()
Desktop compatible version of various `fs` functions:

- `.attributes`
- `.exists`
- `.find`
- `.getDir`
- `.isDir`
- `.isReadOnly`
- `.list`
- `.makeDir`
- `shell.resolve` returns empty path due to failed `realpath`

    Using `realpath` works with `run_bundle`, because the path
    exists and can be resolved.

    This breaks with `run_extract` because theres no path to be
    found, so the output of `realpath` is empty.

    Getting `PWD` seems to fix.

- Forgot to properly set `attrs.size`

- Prepend abs paths with /

    There's a clash between how CC interprets root path and how an
    actual root path is: CC considers the computer directory the root
    of its filesystem.
russellteapot closed this pull request 2026-08-24 06:16:14 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
motherpackers/cc-par!3
No description provided.