McBasic™Get McBasic™ ↗
Build 881
Practical guide

Publish for Mac, Windows and Linux

Choose a target, understand the service differences and validate the artifact on its destination system.

One Mac development environment, six export targets#

McBasic™ runs on your Mac. A DesktopApp can be published for osx-arm64, osx-x64, win-x64, win-arm64, linux-x64 or linux-arm64. Export support does not mean there is a Windows or Linux edition of the IDE. Windows/Linux outputs bundle the managed runtime; the destination still needs the appropriate graphical environment, system services and any codecs your app uses.

CapabilitymacOSWindowsLinux · L1
Desktop exportApple Silicon / Intel .appx64 / ARM64 .exex64 / ARM64 executable
Visual IDERuns on macOSExport destination, not a Windows IDEExport destination, not a Linux IDE
Menus, text clipboard, file/folder dialogsSupportedSupported; menus in the windowSupported; requires a graphical desktop
CommonDialog color, font, printer, page setupSupportedSupportedUnavailable: error 5 / MCB4415
AudioPlayerSupportedMCI; installed codecs matterUnavailable; Play returns False
VideoPlayerSupported sourcesMedia Foundation; project resources onlyUnavailable; placeholder and failure reporting
Reports.PrintNative print interactionNative Windows dialog / GDIOpens a temporary PDF in the default viewer; not direct printing
Custom application iconSquare PNG or ICNSSquare PNG or ICONot embedded in the executable

Choose a local destination deliberately#

  1. Save, Check and run your acceptance tests on Mac. Resolve project errors before publishing.
  2. Choose Project → Publish Local App, then the destination Platform. Select the architecture of the target machine.
  3. For Mac choose Compatible or Compact as appropriate; those profiles do not apply to Windows or Linux. Select an output folder outside the project.
  4. Read warnings and the reported artifact path. Keep each architecture in its own output folder. Copy the complete artifact to the destination machine.
  5. Run the same acceptance checklist there, including Cancel, error handling, menus, media, printing and shutdown. A successful cross-build is not a native runtime test.
Optional CLI, from an extracted ModernWorkbench practice folder
mcbasic publish ModernWorkbench.mcproj --target win-x64 --output ./release-windows
mcbasic publish ModernWorkbench.mcproj --target linux-x64 --output ./release-linux

The CLI accepts --target or --rid, not both, and does not overwrite an existing artifact. --format package is for Mac plugin packages, not Windows/Linux DesktopApp export. Missing target packs produce MCB2302; use a matching, complete toolchain rather than mixing runtime files from other builds.

Windows: native services, with media boundaries#

MsgBox, InputBox, clipboard, file/folder and CommonDialog services have Windows implementations. Menus use Ctrl shortcuts and access keys. Audio uses the system media backend; codec availability is a property of the target machine. Video uses Media Foundation and project resources, not remote HTTPS/YouTube sources. Do not place other controls over a VideoPlayer: the native video surface can cover them.

Reports.Print opens the Windows Print dialog. Cancel returns False; an accepted print operation uses rasterized page output through GDI. Use Reports.ExportPdf when you need a PDF with searchable/copyable text. Test page ranges, orientation and cancellation with the destination printer. Export does not sign the executable or establish trust with Windows security software.

Linux L1: design graceful fallbacks#

Use a compatible graphical Linux desktop and the matching architecture. If an executable loses its execute permission during transfer, restore it only for the trusted artifact you built, for example chmod +x ModernWorkbench, then launch ./ModernWorkbench. A headless SSH shell is not the desktop UI environment.

Linux publish checks warn with MCB2406 for the unavailable services listed above. AudioPlayer keeps the app alive but reports unavailability and Play returns False. VideoPlayer shows a placeholder and reports failure; setting an unsupported source in code can raise error 5. Handle media failure, rather than assuming that a successful Check proves playback.

Reports.Print creates a PDF in a private per-process temporary directory and asks the default viewer to open it. True means handoff, not that paper was printed. The temporary document is removed when the application exits. Use ExportPdf for a copy the user must retain. A missing viewer is an error to handle.

Identity, splash and distribution are separate checks#

The Free Edition launch splash lasts five seconds, including Run and Debug, and steps aside while an application dialog is open. It is not removable in Free Edition. Check your app’s name, version, build and copyright in Project Settings. Read icon and appearance rules before distributing.

The publishing exercise gives an ordered acceptance checklist. The platform services project contains complete code for dialogs, clipboard, media and reports. Its Linux results intentionally differ from Windows.

Source baseline 20f4bfed6b · Build manifest
Sources & maintenance

Original web explanation, reviewed against these repository sources. API tables and example files follow the implementation.

  • docs/manual/33-publishing-for-windows.md
  • docs/manual/34-publishing-for-linux.md
  • src/McBasic.Build/PublishTargets.cs
  • src/McBasic.Build/PlatformAvailabilityCheck.cs
  • src/McBasic.Runtime/McPlatformAvailability.cs