Running PiXCL under Ubuntu + Wine


Last Update: May 19, 2022 @ 15:29 Preliminary information, subject to change.

This is an Application Note describing how to install Wine in Ubuntu 20.04, and then install and test the Windows installation of the PiXCL Development environment. Various updates resulting in PiXCL v20 are made. A possible bug in Wine related to calls to DialogBoxIndirectParam is discussed.

Summary of progress to date

WINE 7.0 installs successfully on the Acer laptop running Ubuntu 20.04. The PiXCL .msi installer runs and creates the PiXCL Development environment.

The PiXCL Code Editor runs with some minor odd behavior in selecting code. This will be addressed soon in the Code Editor source.

PiXCL190.exe runs with some limitations, notably the handling of devices that have proprietary drivers. WINE does support Registry access. Entries are made during the app installation.

PiXCL190 crashed when testing an old sample app, and PiXCL200 also crashed the same way. Debugging the PiXCL200 interpreter code (using Visual Studio) located a pointer bug that had never been noticed.

Video apps that use DirectShow and Media Foundation libraries do not work as yet, but WineHQ.org say that v6 and later have it. Some configuration is required to support it. Video devices that have proprietary drivers are not supported.

What does Wine do?

The Wine installation process creates a new directory structure that mimics the necessary Windows directory set for any installed Windows app.

The Ubuntu 20.04 Desktop (background) with the PiXCL Code Studio editor, and two PiXCL apps
running. Graphics and image display/processing are demonstrated.

The Wine environment is particularly unforgiving of pointer overruns and other bugs, impressively and rightly so. When it does find a problem, a detailed crash log is created and displayed, with specific details of the Wine API file and line number.

One test we ran created dialog box with an edit control that displays multi-line strings. Under Windows 10, text of up to 64K can be created and displayed with no problems or errors in the Edit control using both Release and Debug mode. Running under Wine shows the dialogbox / edit control correctly only if the length of the multi-line text string (cr-lf delimiters) is reduced. This length reduction varies depending on the Y-size and X-size of the edit control. Changing the app code to use single line text (but still with the cr-lf embedded) does not crash. The crash log lists the call to DialogBoxIndirectParam as problematic.

Why the length and Y-size / X-size interact is unknown at present. A bug report has been passed to WineHQ.org.

A small app file set (An EXE, several DLLs and interpreted app source) that demonstrates the bug can be provided on request.

More to be added.