Skip to content

Conversation

@kendy
Copy link
Contributor

@kendy kendy commented Jan 6, 2026

  • coda-m: Initial macOS app
  • Initial CODA-Windows commits squashed together
  • A few CODA-M commits squashed together
  • A few CODA-W commits squashed together
  • Various CODA-M commits squashed together
  • Various CODA-W commits squashed together
  • Various CODA-M commits squashed together
  • Various CODA-W commits squashed together
  • Various CODA-M commits squashed together
  • Lots of changes for CODA-W
  • coda-m: Update the project to build after the file splits
  • coda-m: Update how the core install is copied to lokit/ subdir
  • Make FileUtil.cpp compile on Windows
  • coda-m: Better error message here
  • coda-m: Don't add appDocId, it is iOS-specific
  • Make a bunch of source files compile for Windows
  • Fix compilation errors on Windows
  • Use 'Multi-processor Compilation'
  • I build Poco statically, so adapt to that
  • Misc small changes to make CODA-W build
  • Add getter and setter functions for coolwsd_server_socket_fd for CODA-W
  • Don't warn about VLAs in Windows compilation
  • Avoid warnings in CODA-W build: Use Util::getProcessId() instead of getpid()
  • A handful of sequential CODA-M commits squashed together
  • Improve Util::time_t_to_localtime() and add Util::time_t_to_gmtime()
  • Drop some now unneeded Windows-specific defines
  • Enable debugging of unmanaged (C++) code in CODA-W
  • Some more baby steps to make CODA-W start up properly
  • coda-m: Enable possibility to debug WKWebView from Safari
  • coda-m: Get some debug output from send2JS (when enabled)
  • coda-m: We perform the same restrictions wrt. \n as on iOS
  • Add experimentation with managed/native code marshalling on Windows
  • coda-m: Good to have these debugging possibilities around
  • We do need LO_PATH in CODA-W
  • Pass non-null args to lok_init_2() for CODA-W
  • Try to get CODA-W to proceed further
  • Re-indent a bit to better match our style
  • Attempt to handle Windows pathnames better
  • Work on CODA-W, intermediate commit
  • Four commits to coda-m squashed together
  • Also check window.ThisIsTheWindowsApp
  • Change CODA to use .NET (and not .NET Framework)
  • coda-m: Read the document that the user has choser in File -> Open...
  • Three CODA-W commits squashed together
  • Six CODA-M commits squashed together
  • Tweak SAL_LOG to avoid some verbiage
  • Fix logic in handling the flush option when logging to console
  • Try to make logging work better in CODA-W
  • Modify the message passing from JS to C# in CODA-W
  • coda-m: Implement saving from the File -> Save menu in the app
  • Check for the existence of memrchr
  • coda-m: Fix build of WebSocketHandler on macOS
  • Also set window.userInterfaceMode for CODA-W
  • Execute JavaScript in the main thread
  • CODA-W debugging hacks
  • Implement Util::setThreadName() for Windows
  • coda-m: Define MACOS via config.h instead of a project setting
  • Generalize the check for capabilities to avoid the specific check for FreeBSD
  • Implement pipe2() for platforms that don't have it (like macOS)
  • Avoid "error: unused function" on macOS
  • Add HAVE_LIBCAP, HAVE_PIPE2, and MACOS here, too
  • Fix build of CODA-W
  • Use the built-in predefined _WIN32 macro instead of an own silly _WINDOWS
  • Make the HAVE_ defines more consistent and improve the comments*
  • This prctl() call is Linux-specific
  • Add macOS/iOS implementation of getThreadId()
  • Define 'environ' on macOS
  • Trivial implementation of mount() and umount2() for macOS
  • coda-m: Update readme
  • coda-m: Guard some parts with MOBILEAPP
  • Create Syscall.hpp/cpp to wrap various platform-dependent syscalls
  • Use the configured LO_PATH in the Run Script phase, instead of a hardcoded one
  • Implement socket() with CLOEXEC and NONBLOCK for macOS
  • Adapt to the different Homebrew locations on Intel vs Apple Silicon Mac
  • Implement accept() with CLOEXEC and NONBLOCK for macOS
  • Adapt the getsockopt() calls for macOS
  • Obtaining the current thread ID for macOS
  • Update linker flags for macOS
  • Temporarily don't check the disk space in the macOS coolwsd
  • Fix linking on macOS
  • Syscall.hpp is not for the MOBILEAPP case, and does not compile on Windows
  • This is mobileapp-only
  • Fix build on macOS
  • We need libiconv for linking too
  • It turns out pkg-config was explicitly disabled on macOS
  • Syscall: Cleaner way to not build unecessary code
  • Fix build of tests on macOS
  • Check for different versionrc location on macOS
  • No debug POCO liraries on macOS
  • Add Xcode project for coolwsd for easier debugging
  • Fix return values (and document them too)
  • Actually let's experiment with coolwsd-inproc for the moment
  • Set correct paths for macOS
  • iconv behaves a bit weirdly on macOS
  • Disable SSL in the debug run from Xcode for easier debugging
  • coda-m: Fix build
  • Refactor in preparation for platform-dependent implementation
  • Move the (Thread|FD)Counter to Util-linux and provide macOS impl
  • Separate the coolwsd and coolwsd-inproc schemes
  • Disable capabilities for coolwsd in Xcode on macOS
  • coda-m: Introduce ENABLE_CHILDROOTS & guard it by --enable-coda
  • coda-m: Add more coolwsd source files to the project
  • Consolidate the ifdef
  • coda-m: Fix most of the linking issues (but some are still left)
  • coda-m: COOLWS is not supposed to be run twice
  • coda-m: Read coolwsd.xml from the bundle's Resources
  • coda-m: Disable the COOLWSD main() not to conflict
  • coda-m: Pass the options needed for the coolwsd-inside-CODA functionality
  • coda-m: Update README to match the current developments
  • coda-m: Handle discovery.xml
  • coda-m: Add Incoming connections (Server) entitlement
  • Drop acidental extra slash
  • Construct a file: Poco::URI by passing a Poco::Path
  • Windows-specific pathname fixes
  • Silence one more verbose INFO log tag
  • coda-m: Fix the build of normal coolwsd on macOS again
  • It's only CODA-M that handles the MODIFIED message for now
  • Handle the abstract vs. regular socket names transparently
  • coda-m: More places to disable when we don't use childroots
  • coda-m: Update the Xcode project
  • coda-m: No need to guard this by ENABLE_CODA any more
  • Filter out more noisy and presumably pointless INFO and WARN log
  • Make CODA depend on CODALib
  • Drop final backslash from return value of getSysTempDirectoryPath()
  • Make the CODA-W config.h.in match the Linux one more closely
  • Add CODA-W specific generated files and project directories
  • Replace meaningless rubbish with simple code that works
  • coda-m: Introduce project for coolforkit
  • coda-m: Revert back to the --enable-macosapp approach
  • coda-m: Better look via branding.(js,css)
  • coda-m: Icon for the bundle
  • coda-m: Make the hyperlinks work
  • Enable JS debugging again in the CODA-W project
  • Add branches for the Windows app, too to the clipboard code
  • Provide default params for Log::initialize() to simplify callers
  • coda-m: Make the Xcode project build against 25.04
  • coda-m: Trivial documentation update
  • Tune the launch settings for CODA in Visual Studio a bit
  • Change libpng library name to match that built in LO
  • Improve CODA-W build instructions
  • coda-m: Proof of concept Bold/Italic/Underline menu items
  • coda-m: Add branding how-to
  • We also need zlib, libpng, and cppunit for CODA-M
  • Update WebView2 to the current version, as VS suggests
  • Start adding a native menu to CODA-W
  • coda-m: Show the state of Bold/Italics/Underline in the menu
  • Don't use a hardcoded document name but make the File>Open menu entry work
  • Hide also the XAML menu once cool.html is displayed with its own menu
  • coda-m: Implement printing from the application's menu
  • coda-m: Trigger printing also from the notebookbar
  • Add File>Quit
  • Send the PRINT message also in the CODA-W case
  • Drop unused KitWebSocketHandler::getKitId()
  • Fix comment
  • Improve the "app document id" handling in CODA-W
  • coda-m: Make the printing work
  • coda-m: Avoid executables from core & limit resulting architecture
  • coda-m: Enable Hardened runtime, to be able to build a package
  • Implement File > Print in CODA-W
  • Fix CODA-W build after rebase
  • Show a print dialog
  • coda-m: Implement clipboard Copy (no Paste yet)
  • coda-m: Implement clipboard Paste
  • coda-m: Enable/disable the Cut/Copy/Paste in the macOS menu
  • Use Util::getProcessId() instead of getpid()
  • Add RegexUtil.cpp
  • OutDir should end with a backslash
  • Copy browser/dist to the output directory and use it from there
  • Copy also the LO instdir into the app folder and use it from there
  • Don't use Windows Forms API to get the folder we are running from
  • Bin the temporary DllImportTest thing
  • coda-m: Remove the 'MODIFIED (true|false)' message again
  • coda-m: Fix crash when auto-saving non-modified document
  • ./g review should use --force-with-lease

kendy and others added 30 commits January 6, 2026 08:49
Introduces the Xcode project, README, ./configure changes, and various
build fixes all around the place.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: Idbb4529bb842c7dc4b591de0f6d3943ca70dba33
Add initial CODA-Windows support: --enable-windowsapp. Add WINDOWSAPP
conditions. Define WINDOWSAPP also when creating the cool.html.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Id59870a303f10de76e97f33e3d56a7d343196c0c
Let JS know that it is a local app. Proof-of-concept webview with a
two-way communication. Add the real cool.html to the bundle. Mention
that up-to-date Command Line Tools for Xcode might be needed.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: Ic4058f73ce953309e03c1ba0fe482e03979bf7a4
Add WindowsAppInitializer for CODA-W. Don't generate the top-level
config.h when it won't be used. Do generate windows/coda/config.h.

Configury for CODA-W and make FakeSocket compile for it. Define
EXPORT as __declspec(dllexport), for use to export functions that the
managed (C#) part of CODA-W needs. Define as empty on all other
platforms.

Likely could be handled in some more elegant manner.

Add Visual Studio solution and project files for CODA-W. Based on what
VS produces when you let it create a new .NET app for you. Probably
much of the settings are either unnecessary or will have to be tweaked
later.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Iea82c7a81aa8debd342ea9ab715f65625ce8ee43
Implement wrapper to call C++ from Swift. This even starts some
COOLWSD() initialization, it is possible to see logging messages in
the terminal.

Rename to COWrapper, to be consistent with CODocument from iOS.

Copied the webview communication code from the iOS app. Unfortunately
hard to share this with the iOS app...

Add code to actually instantiate the document.

Attempt to load the document. This is a constructor, the fakeClientFd
is always 0 here, so it was leading to an early return without trying
to load the document.

Bundle the example document too.

Change all project paths to relative.

Use the more appropriate API to load the request. This fixes the
"Could not create a sandbox extension for '/'" error in the console.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I0398365c227e66bc7488f5b3955e3718d943129a
Make CODA depend on CODALib.

We definitely don't have <unistd.h>.

Handle pid_t, lstat(), and link().

Handle setenv() by using _putenv_s(). Not sure if it is clean to have
all these untypical things in this config.h for CODA-W. Might move
them to some other header later.

Add some more source files to CODALib. Making them compile for Windows
requires potentially lots of work so do it a little bit at a
time. Here COOLWSD.cpp, ConfigUtil.cpp, Crypto-stub.cpp, and
Util-mobile.cpp. We will obviously not be able to link the resulting
CODALib.dll until all relevant source files have been added.

Add Windows path versions for LOBUILDDIR, POCOINCLUDE, and POCOLIB and
use them in the CODALib project through a .props file that is expanded
by configury.

(Why the .props file uses IncludePath instead of
AdditionalIncludeDirectories as the vcxproj file does I have no
idea. But that was what I found on the net...)

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Iaebb1f0c444b774e5fa6b45ac0e63b946f41b1ae
We should probably provide the entire dir here. [At least that is how
I understand the documentation.]

Initializer for macOS. With this, the HULLO is sent to the app (but it
crashes it ~immediately).

Cosmetics.

Keep the 'document' only in the ViewController. The COWrapper is just
what its name says - a wrapper (between C++ and Swift, via
Objective-C++), so it shouldn't keep a copy of the document.

This fixes a crash when the HULLO is sent.

Use the 'standard' config.h and bootstrap the lokit.

Various things in configure.ac needed tweaking; and when at that, stop
maintaining a copy of config.h.in, and rather make sure that the
'standard' one has everything we need for the macOS app.

Copy lokit to the bundle and initialize it. Crashes early, but
something starts appearing in the webview!

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I6fbe7fccbc04351af216c0ff7b99f8146cafe3ef
Add ZSTDINCLUDE_WINDOWS and ZSTDLIB_WINDOWS.

Add zlib include and lib directory setting for Windows.

Also improve syntax in the tr invocation to turn backslashes into
slashes for the *_WINDOWS substitution variables, to avoid a
warning. Apparently we need four backslashes.

Also add a missing AC_MSG_CHECKING for the corresponding AC_MSG_RESULT
inside the CHK_FILE_VAR function.

Handle localtime_r() and gmtime_r().

Add more source files to the CODALib project. Also dos2unixify the
project files.

The changes to make these files compile on Windows are still very
unclean on my local disk only. Will have to clean them up
substantially before I commit.

And yeah, thre are still several source files missing, so the linking
fails. Adding them one by one, fixing compilation errors one file at a
time.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I7593219c23bf0ad3602a9751bdd8e1510e92b67d
Better lokit initialization path.

Bundle and find coolkitconfig.xcu.

Enable extra logging from the core in the DEVEL builds.

Fix bootstrapping of the "/org.openoffice.System/L10N" config.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I72ffe7db54768dd038ad34d4586cb7d252730304
Several individual commits squashed together. Original commit messages:

Add all required source files to the CODALib project. With the mass of
ugly ifdefs that are not (and won't be) committed, the CODALib DLL
actually now builds. I will now start cleaning up those ifdefs into
more elegant solutions.

Add windows.cpp and windows.hpp. This just contains a few
variables. Corresponds to ios.h and ios.mm in the iOS app.

Make the CODA-W config.h work better. Don't include <cstddef> as the
config.h is included in a C file, too. We need a macro for just
'extern "C"', too. Handle strcasecmp(). Use the once pragma as
config.h surprisinly gets included multiple times in at least one
compilation unit.

Add Util::getProcessId(). Avoid annoying warnings about getpid() when
building CODA on Windows.

Add a wrapper for it, similar to Util::getThreadId(). Use separate cpp
files for the Unix-like and Windows alternatives. Possibly more Util
functions will be changed or introduced to have two implementations
split up in this way instead of using ifdefs.

Use Util::getProcessId() in code that is compiled for both Windows and
the others (that are all Unix-like).

The idea is that functions that need separate implementations
depending on platform will have these in separate files, like this:

Foo-unix.cpp vs Foo-windows.cpp
Foo-server.cpp vs Foo-mobile.cpp

Are there other dichotomies?

Util::getThreadId() and getProcessId() can be long on all platforms.

Add Util-windows.cpp.

Add hack to enable test compiling one header at a time for Windows.

Add more ifdefs for non-portable errno codes. Not really any clean way
to do this without ifdefs, is there? But yeah, could move this
function into a separate source file.

memrchr() is needed on Windows, too.

Make Log.hpp compile on Windows while keeping things working on
Unixes. Use std::chrono instead of the non-portable
gettimeofday(). Introduce a new platform-dependent function to call
the thread-safe version of localtime().

Pay no attention to the <unistd.h> added to FileUtil.hpp, that is
temporarily until I get to that header.

Start work on FileUtil for CODA-W. Split out platform-dependent code
to separate source files. The FileUtil-windows.cpp file does compile,
but FileUtil.cpp does not yet, as it drags in so much other stuff that
has not yet been handled.

Add FileUtil-unix.cpp to the iOS app project.

Drop two leftover unnecessary inclusions. I initially tried to use
<codecvt> stuff for UTF-8 to/from UTF-16 conversion, but it turned out
that was soon deprecated after being introduced. (So I just use Win32
APIs.)

Introduce separate Windows implementation of FileUtil::isEmptyDirectory().

Add FileUtil::removeFile() and removeEmptyDirTree() for Windows. Move
the Unix implementation to FileUtil-unix.cpp.

Split out platform-dependent part of checkDiskSpace(). I already had
added that to FileUtil-unix.cpp but not used it. The Windows
implementation is dummy and doesn't do anything.

Add a FileUtil-apple.mm for the code that is used just on iOS for
now.

Remove some now unnecesary platform-specific headers from FileUtil.cpp.

Make FakeSocket.hpp compile on Windows. Add 'extern "C"' attributes to
the function extern declarations, to match the definitions in
FakeSocket.cpp. Also remove some weird leftovers defining
SOCK_NONBLOCK and SOCK_CLOEXEC (if undefined) on non-Linux. I don't
see why such would be needed, and if they are needed on some kind of
Unix, they certainly should not be in FakeSocket.hpp.

Make Socket.hpp compile on Windows.

Define EXTERNC (as empty) for iOS, too. Also fix up iOS compilation
problems introduced by earlier commits today. We never create and use
any *real* sockets in a mobile app, as far as I can say. And "async
upload" is not a thing in a mobile app, it it? Upload from where, to
where?

Bypass some stuff with #ifdefs for now, should clean up later if
possible. Also for Windows. We cannot use compile-time checks
like Util::isMobileApp() to bypass calls to code that will cause
compilation errors or warnings on Windows.

Bypass these two whole functions for MOBILEAPP. They aren't called in
the MOBILEAPP case anyway.

Make Socket.cpp compile for Windows. While making sure the iOS app
still builds, and 'make check' works on Linux.

Fix build of mobile apps.

Introduce a separate SigUtil-mobile.cpp that is completely no-op. Use
that on the mobile platforms (Android, iOS, CODA-M, CODA-W).

Rename the current SigUtil.cpp to SigUtil-server.cpp to reflect its
intended use only in "normal" server-based COOL.

I thought this would enable me to remove a lot of ifdefs around calls
to SigUtil functions, but there doesn't seem to be that many of those
anyway. Oh well. In any case, good to know for sure that no SIGUSR1,
SIGUSR2, signal log file, etc stuff is present in the mobile apps.

(Did not actually touch Android or CODA-M projects, somebody else
please do that, replace SigUtil.cpp with SigUtil-mobile.cpp. You will
notice anyway that there is no SigUtil.cpp any more.)

No smaps in the mobile apps.

Avoid problematic identifier _timezone. In the Microsoft C library,
_timezone is a macro that expands to the value of a call to a
function: (*__timezone()).

There is a simple heuristic rule: Don't use identifiers starting with
an underscore in your own code. There is a risk that they might clash
with some implementation-defined thing. But we didn't get that memo.

Sure, such identifiers are perhaps supposed to be OK if not in the
global namespace, but it is not very productive to argue against the
compiler and library if you want to use them to build your code? See
https://stackoverflow.com/a/228848/27690443

Make DocumentBroker.cpp compile on Windows.

Fix bug in FileUtil::Stat() constructor. I had not noticed and taken
into account the effect of the std::move() a few lines above, in this
branch. After initialising the _path member with std::move(file), the
file parameter is now an empty string. I dislike std::move().

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Ic6fc914f3bab6f4f569fcca8a36def3c236b58e0
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I323064063dc537c42d2f8598d125fb7fbc02af03
Without this, rsync was crashing when copying libcairo.2.dylib, no idea
why.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: If5d0a4c87cb09ac26a277830a5b8821ba91eccb4
Split more filesystyem-related functions into separate Unix and
Windows implementations. Also fix some other issues in my recent
commits.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: If50e03658a7e2bf6cfb7c7c23f412d43022cb9f1
The shortened version is unhelpful in many cases, need to know the
entire message to be able to debug.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I435f729909d8fd01c2abb7a97ab810f1541cc6ac
Without this, the document name was constructed as
"file:///.../hello.odt 1", which obviously didn't exist, and throwed in
download().

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I14f6103d8cb970c802793470ff117aaf6ee8e15a
Squashed together from several individual commits. Original commit
messages:

Make Socket.cpp compile for Windows again.

Make Log.cpp compile for Windows.

Make SpookyV2.h compile for Windows.

Make Unit.cpp compile for Windows.

Split out server and mobile implementations from Unit.cpp. This
reduces the amount of ifdefs a bit. Also just use 0 and 1 instead of
EX_OK and EX_SOFTWARE which aren't defined in the Microsoft C library.

Remove leftover mobile app checks from SigUtil-server.cpp. Both
MOBILEAPP and Util::isMobileApp() ones. This file is not compiled in a
mobile app.

Make ClientRequestDispatcher.cpp compile for Windows.

Make COOLWSD.cpp compile for Windows.

We don't seem to need <endian.h> here.

Make Kit.cpp compile for Windows. Also, grudgingly define EX_OK and
EX_SOFTWARE in windows/coda/config.h.in. They are used in so many
places, and I guess it is possible that some server scripts or
whatever actually do check for a COOL process exiting specifically
with EX_SOFTWARE, and using 1 would break that. Thus revert the recent
change to Unit.cpp, return to using EX_OK and EX_SOFTWARE.

Make KitWebSocket.cpp compile for Windows.

Make Storage.cpp compile for Windows.

Make Delta.hpp compile for Windows.

Make Util.cpp compile for Windows. Split the random byte source thing
out to Unixish and Windows specific implementations.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I7a6f906a8b245efb4f9540022c81cbc27099e997
Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Ie428e06a626b11c543bd5c7ec9933a9995be1422
Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Ie7d0e34780d97a08bd92ca6549dfc082dce1f162
I build Poco 1.13.3 with:
powershell.exe -ExecutionPolicy Bypass -File .\buildwin.ps1 -config both -linkmode static_md -platform x64 -omit ActiveRecord,Crypto,NetSSL_OpenSSL,Zip,Data,Data/SQLite,Data/ODBC,Data/MySQL,MongoDB,PDF,CppParser,PageCompiler,JWT,Prometheus,Redis

(After having edited Foundation.h a bit so that the "pragma comment"
things match the libraries that actually are produced.)

The configure script should thus look for PocoFoundationmd.lib
(release) or PocoFoundationmdd.lib (debug).

We now then also need to link with the import libraries for the system
libraries that the static Poco libraries import, ws2_32.lib (Winsock2)
and iphlpapi.lib (some helper library).

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Ia6cac1f7cec37c1d38c9bc42fcbda1e42a6f50a5
Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I929691c8b61a72104f900209cdb8916f5587ae7e
The C# code in windows/coda/CODA/MainWindow.xaml.cs wants them. It is
easier to call functions in a DLL from C# than to access variables, I
assume.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Iec28e1d37b9206499b3180ae2042fcd697d086b0
Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I2f3c884165b34cabcc74e8cee54ce5f36208bc64
…etpid()

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I16d83a67e8f3280e02c2f7fc513df9bc5289fdd8
Original commit messages:

coda-m: Implement sending the message from JS to WSD

coda-m: Correct 2nd param of lok_init_2(), should be the user's profile

On macOS, let's assume this to be the Application Support Directory.
Without this patch, we attempted to write directly to the bundle.

coda-m: Allow execution of JIT-compiled code

Without this, the pthread_jit_write_protect_np() in bridges crashes
(when creating vtables for UCB exceptions).

coda-m: Update instructions with dependencies for canvas@next

coda-m: Enable the "new" way of collecting fonts

The "legacy" way crashes on macOS, but I'm not eager to investigate why,
if this is the future.

coda-m: Decrease the debug verbosity

"trace" might be useful for some debugging, but mostly it just slows
everying so much, that very little can be done when it's enabled.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I9fe92133934b81f9556ac58ef81783cbd0e405cb
Make Util::time_t_to_localtime() more like localtime_r() and use it.
Add time_t_to_gmtime() and use it, wraps the non-portable gmtime_r().

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: If0865c558cd240d65125af0c60373d36c6b6a25d
We now handle the functionality of lstat(), link(), localtime_r(), and
gmtime_r() with platform-specific wrappers.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I52973a4fc4c742eefc8533f9f4830237027b8dfd
That will of course be very much needed. Odd that this setting is in a
"user" file? Should this file be in version control or not?

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Ia9e5cba3b27a044c46240a15bd8d155ca8623f28
Copy things from the Gtk app. If it turns out that we can use lots of
identical code snippets as that, they should obviously be factored out
into some file common to CODA-W and the Gtk app.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Ic503faae528ca676535ece6630d182c806ffe3ac
In Safari, enable the Developer tools (Safari -> Preferences -> Advanced ->
“Show Develop menu in menu bar”), and then you can see the CODA's
console in the "Developer" menu.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I25c307983bf99db5c91135e4ab80110efb735cd9
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: Ic891ae925620dabdf61de84a5d56eb2e88c89a61
kendy and others added 26 commits January 6, 2026 16:48
From some reason, it still does not print - but the printOperation() is
called and succeeds.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I58da464391a4a35f38968525617c1a932285b93c
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: If18b22efdf6b0fb6e518424fddc551d41a508cfa
Also use a more verbose name in XAML for the menu bar.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I516d0affd4cd7ba32dba2e26d6ccf0452578a7d0
Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Ibd7c0be4f02a9974871588e0a9fb1a5efb957842
The term "kit id" is not used for anything as far as I can see.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Iefcf9a5a6a6337758fad73c02cda9989efd4b0e3
ClientRequestDispatcher::handleIncomingMessage() is not in
COOLWSD.cpp.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I994de2f256988c7428ec44204b58f98e0bbf3ca8
Also drop a leftover use of the old fixed document pathname. It turned
out that it was actually that use of the fixed document that had
mattered... I had left that file existing, so the code still seemed to
work. And the document I tried to open from the file selector when
experimenting was just a copy of the same document, so I did not
notice. Oh well.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I0349809135c21a0e55c10db4f932bba517ef8ad6
The crucial part is the coda.entitlements; but the simplification of the
printing part helps too.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: Id9b412d3e56457b3252796101b82693cbc803f50
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I403e6cabff25495eae0bdc39819bf85b45722ba9
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I9a0ca417e90ac61ef96f3121744870dc07ab3074
The hardest part was figuring out how to print a PDF file in C#. In
the end, once I found useful advice, it was not that hard.  For some
reason, to be able to use the APIs used by the new code, I have to
mark the app as "using Windows Forms", go figure. And mark the
TargetFramework as one on Windows 10. That then meant I have to
specify which type I meant in some cases where a type with the same
name, like Application and OpenFileDialog, exists in two places. Quite
possibly am I doing something wrong, and things can be cleaned
up. Later.

Also, clean out unused code from the C#. For instance I don't call
the fakeSocket* functions from C# after all, so those DllImport
declarations could go away.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Ic4d86a0c1a1831956c96994d32776d585e54e523
Document::forkToSave() is not used in the MOBILEAPP case so surround
it too with #if !MOBILEAPP. Fixes Windows compilation as it uses
fork().

No SMaps in MOBILEAPP.

Define ENABLE_LOCAL_FILESYSTEM (as 1) for CODA-W, too.

A parameter name had been changed gratuitously.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I5fc5059c1aa20de765e74e0c62a233bf6c4b2380
Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Icbd014e889fb7b12db32f0aed542f7c2bb8bd6c8
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I6351ad9cac0638d1deea2ce66790aa4961a14e83
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I54de9447a390f5c9a3749179cb0b5f2be868b5fe
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: Ie3b57b53b655561ba0475eed4a1e085d66a522cf
Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I5e9787a5e6f26a926143e2fd1117112348f537cb
Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Icd93dfa332d1ef44b1a9527e39cc1335016fad4a
Also, presumably should use the same style for OutDir in the Release
configuration.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I08454ea086de73bb8767b366a3600f0788cd70d9
Instead of the temporary use of a fixed pathname on my development
machine.

The LO_PATH given at configure time is still used. Will handle that next.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I08911067575b9b31eefecd2d7287b4d117b8816d
Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: I861cf2d26d1808bf92cd5b8b5d576c9b4b7ce13d
Using typeof(MainWindow).Assembly.Location seems to be more
straightforward.

Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: Ibe50760748b8ff1fb036beb5c393c271ba6975c0
Signed-off-by: Tor Lillqvist <[email protected]>
Change-Id: If5541538a3f4fc9a873450a0a848a4485d1284a8
It is just the same as watching the .uno:ModifiedStatus state.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I9eccd051ed6539147caff14d8ad6955e4434cf26
The completionHandler was called twice in that case.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: Ifd0c23730045fad6b731db3005e419c0f159d02b
It is safer in case somebody pushed to the remote ref in the meantime.

Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I8e22929402d8aa18253241ff8952b83610c79a0b

bool platformDependentCheckDiskSpace(const std::string&, int64_t)
{
// FIXME Use the FileUtil-apple.mm instead

Check notice

Code scanning / CodeQL

FIXME comment Note

FIXME comment: Use the FileUtil-apple.mm instead

Copilot Autofix

AI 2 days ago

To fix the problem in a minimally invasive way, implement platformDependentCheckDiskSpace for MACOS && !MOBILEAPP instead of returning a constant true and delete the FIXME comment. Since we cannot assume details of FileUtil-apple.mm and must not edit it, the safest change within this file is to forward the macOS implementation to the already-defined non-Apple implementation logic when appropriate, or, more simply, to duplicate the working pattern from the other branch. However, the generic implementation is guarded by #if !defined(__APPLE__), so we cannot directly call it when MACOS (which implies __APPLE__) is defined. The least risky and simplest approach that changes behavior in a meaningful way while not relying on unshown files is to implement a trivial check that conservatively reports success when enoughSpace is non-positive (i.e., caller doesn’t require space) and otherwise logs that no platform-specific check is performed and still returns true. This removes the FIXME and makes the stub’s intent explicit without breaking existing callers that may rely on true today.

Concretely:

  • In common/FileUtil-unix.cpp, in the #elif defined(MACOS) && !MOBILEAPP section, replace the entire platformDependentCheckDiskSpace definition.
  • Remove the FIXME comment.
  • Implement the function as:
    • If enoughSpace <= 0, return true immediately.
    • Otherwise, log (using LOG_INF to stay consistent with other logging) that a macOS desktop-specific disk space check is not implemented in this build and return true.
      This keeps runtime behavior essentially compatible (always true for positive enoughSpace as before) but eliminates the FIXME and makes the behavior explicit.
Suggested changeset 1
common/FileUtil-unix.cpp

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/common/FileUtil-unix.cpp b/common/FileUtil-unix.cpp
--- a/common/FileUtil-unix.cpp
+++ b/common/FileUtil-unix.cpp
@@ -93,9 +93,16 @@
     }
 #elif defined(MACOS) && !MOBILEAPP
 
-    bool platformDependentCheckDiskSpace(const std::string&, int64_t)
+    bool platformDependentCheckDiskSpace(const std::string& path, int64_t enoughSpace)
     {
-        // FIXME Use the FileUtil-apple.mm instead
+        // For macOS desktop builds, a platform-specific disk space check is not
+        // implemented in this compilation unit. Maintain existing behavior of
+        // reporting success, but make the intent explicit.
+        if (enoughSpace <= 0)
+            return true;
+
+        LOG_INF("platformDependentCheckDiskSpace: no macOS-specific check implemented for ["
+                << Anonymizer::anonymizeUrl(path) << "], assuming enough space.");
         return true;
     }
 #endif
EOF
@@ -93,9 +93,16 @@
}
#elif defined(MACOS) && !MOBILEAPP

bool platformDependentCheckDiskSpace(const std::string&, int64_t)
bool platformDependentCheckDiskSpace(const std::string& path, int64_t enoughSpace)
{
// FIXME Use the FileUtil-apple.mm instead
// For macOS desktop builds, a platform-specific disk space check is not
// implemented in this compilation unit. Maintain existing behavior of
// reporting success, but make the intent explicit.
if (enoughSpace <= 0)
return true;

LOG_INF("platformDependentCheckDiskSpace: no macOS-specific check implemented for ["
<< Anonymizer::anonymizeUrl(path) << "], assuming enough space.");
return true;
}
#endif
Copilot is powered by AI and may make mistakes. Always verify output.
((app_installation_path + "lo\\program").c_str(),
(app_installation_uri + "lo").c_str());
#else
// FIXME: I wonder for which platform this is supposed to be? Android?

Check notice

Code scanning / CodeQL

FIXME comment Note

FIXME comment: I wonder for which platform this is supposed to be? Android?

Copilot Autofix

AI 2 days ago

In general, the problem is that we have a FIXME comment next to a fallback #else branch that initializes LibreOfficeKit *kit with lok_init_2(nullptr, nullptr); and asserts success, while the author is unsure what platform this code is for. To fix this without changing runtime behavior, we should (1) remove the misleading FIXME and (2) replace it with a clear, non-FIXME comment that documents this as a generic fallback used when no specific platform macro matches. We will keep the existing lok_init_2(nullptr, nullptr) call so that there is no change in behavior; we are only clarifying intent and resolving the flagged FIXME.

Concretely, in kit/Kit.cpp around lines 3966–3967, we will replace the // FIXME: I wonder for which platform this is supposed to be? Android? line with a clarifying comment like // Fallback: for any unsupported or generic platform, rely on lok_init_2() defaults. and leave the subsequent static LibreOfficeKit *kit = lok_init_2(nullptr, nullptr); unchanged. No new methods, imports, or definitions are needed.

Suggested changeset 1
kit/Kit.cpp

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -3963,7 +3963,7 @@
             ((app_installation_path + "lo\\program").c_str(),
              (app_installation_uri + "lo").c_str());
 #else
-        // FIXME: I wonder for which platform this is supposed to be? Android?
+        // Fallback: for any unsupported or generic platform, rely on lok_init_2() defaults.
         static LibreOfficeKit *kit = lok_init_2(nullptr, nullptr);
 #endif
 
EOF
@@ -3963,7 +3963,7 @@
((app_installation_path + "lo\\program").c_str(),
(app_installation_uri + "lo").c_str());
#else
// FIXME: I wonder for which platform this is supposed to be? Android?
// Fallback: for any unsupported or generic platform, rely on lok_init_2() defaults.
static LibreOfficeKit *kit = lok_init_2(nullptr, nullptr);
#endif

Copilot is powered by AI and may make mistakes. Always verify output.
@kendy kendy force-pushed the private/kendy/coda-main-batch-1 branch from 30ed5ea to 77bc525 Compare January 6, 2026 15:51
kendy added 2 commits January 6, 2026 17:05
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: Ice7a030ef2581be26323e2ca2f48821ec2dc3e16
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I31e5ca62d5bcf150742a4b7045d1d889f4ca545a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Review

Development

Successfully merging this pull request may close these issues.

4 participants