Skip to content

Multiplatform - #100

Closed
LunaMoo wants to merge 11 commits into
unknownbrackets:masterfrom
LunaMoo:multiplatform
Closed

LunaMoo wants to merge 11 commits into
unknownbrackets:masterfrom
LunaMoo:multiplatform

Conversation

@LunaMoo

@LunaMoo LunaMoo commented Oct 16, 2026 •

Copy link
Copy Markdown

Edit, sorry, wrong target >.<

claude and others added 11 commits October 15, 2026 22:32
The projects hardcoded v141_xp, which current Visual Studio versions
don't ship, so the solution didn't build without installing an old
XP toolset. Use $(DefaultPlatformToolset), and drop the Windows 7 SDK
pin and _USING_V110_SDK71_ from libdeflate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
capi/maxcso_capi.h declares a few plain C functions for programs that
load maxcso at runtime (like PPSSPP): maxcso_process() compresses an
ISO to CSO with a fast, standard or maximum preset, or decompresses
CSO/ZSO/DAX back to ISO.

- Visual Studio: new capi project in maxcso.sln, builds maxcso.dll.
- make lib: builds libmaxcso.so (.dylib on macOS), exporting only the
  C API, and libmaxcso.a with the bundled 7-zip and libdeflate inside.
  Objects are now built with -fPIC so they can go into the shared lib.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Task::cancel is checked on each progress update. When it returns true,
reading stops the same way it does after a write error and the task
ends with TASK_CANCELLED once the blocks already in flight are done.

The C API's progress callback now returns int, nonzero to cancel; the
partial output is deleted and MAXCSO_RESULT_CANCELLED returned. That
changes the callback type, so MAXCSO_CAPI_VERSION is now 2.

The library is now built as mCSO (mCSO.dll, mCSO.so, mCSO.dylib,
mCSO.a).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub now fails any job using actions/upload-artifact@v3, and the
windows-2019 runner image has been retired, so every build failed
before starting.

- upload-artifact v3 -> v4, checkout v3 -> v4, setup-msbuild v1.1 -> v2
- windows-2019 -> windows-latest (VS 2022; the projects use
  $(DefaultPlatformToolset))
- Install libuv/lz4/pkg-config on macOS and apt-get update first on Ubuntu
- Also build and upload the C API library (mCSO.dll/.lib, mCSO.so,
  mCSO.dylib) and maxcso_capi.h next to the CLI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019SrumWdwQqDNoUtUBR5gtd
CI: Update deprecated actions, build the mCSO library too
--zopfli-splits=N sets Zopfli's blocksplittingmax (default 15), which is
too coarse for large blocks. --precheck=P compresses each block with
libdeflate first and skips Zopfli and 7-zip when it can't get below P% of
the block size, saving their time on already-compressed data. Its result
only competes as a trial when libdeflate is enabled.

Both are available in the C API through the new maxcso_options_init and
maxcso_process_ex; API version 2 and the existing functions are unchanged,
so callers probe for the new exports. Presets are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D2S4Jw47mEhADW9cR2kREB
Add Zopfli split limit and libdeflate pre-check options
Builds mCSO (and the maxcso CLI on desktop) from the bundled libuv, zlib, lz4,
libdeflate, Zopfli and 7-zip sources, so no system packages are needed. The
library is named mCSO everywhere (mCSO.dll/.so/.dylib/.lib/.a). Adds a C API
round-trip test and CI for Linux, macOS universal, Windows x86/x64/ARM64,
Android (4 ABIs) and iOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DcxRuab5DirnmjmrXNosg6
zlib 1.2.11 treats TARGET_OS_MAC as classic Mac OS and #defines fdopen, which
breaks <stdio.h> from current Apple SDKs (fixed upstream in zlib 1.2.13).
libuv 1.41's uv__get_cpu_speed() uses IOKit, which doesn't exist on iOS
(fixed upstream in libuv 1.42).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DcxRuab5DirnmjmrXNosg6
@LunaMoo LunaMoo closed this Oct 16, 2026
@LunaMoo
LunaMoo deleted the multiplatform branch October 16, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants