BOXEDWINE_ZLIB   Will allow the file system to be in a zip file (-zip command line argument).  This requires that you link against zlib.
BOXEDWINE_MSVC   Should use this on Windows platform
BOXEDWINE_MAC_JIT Should use this on the Mac platform, it will correctly setup x64 and Armv8
BOXEDWINE_OPENGL_SDL OpenGL will be enabled via SDL
BOXEDWINE_OPENGL_OSMESA Will enable selecting software OpenGL via Mesa.  Option will be visible in UI and command line option -mesa will be available
GLH the header that will be used for OpenGL, currently set to <sdl_opengl.h> in build files
BOXEDWINE_HIGHDPI On windows this will allow games that doesn't support high dpi settings to be scaled up
BOXEDWINE_MIDI turns on support for Midi
BOXEDWINE_64 needs to be enabled on 64-bit platform
BOXEDWINE_JIT will enabled JIT, needs to be combined with BOXEDWINE_JIT_ARMV8, BOXEDWINE_JIT_X86 or BOXEDWINE_JIT_X64

To compile, you need one and only one of the follow 2 flags

BOXEDWINE_ES     SDL OpenGL ES code will be used.  OpenGL calls will be translated to ES.
BOXEDWINE_SDL    SDL OpenGL context will be used

To compile for Windows it is recommended to use Visual Studio 2026 Community Edition
https://visualstudio.microsoft.com/vs/community/

Emscripten

see boxedwine-shell.js
By default files are stored to IndexedDB. To NOT save changes set:
Config.storageMode = STORAGE_MEMORY;
To mount a user-selected host folder as d: set:
Config.storageMode = STORAGE_HOST_FOLDER;

settings:
 - specify an alternate root zip file system.
 	i.e. root=win32.zip. If not set it is assumed the root fs is boxedwine.zip.
 - specify a zip file to appear uncompressed mounted as c:/files
 	i.e. app=chomp.zip would appear as /home/username/.wine/dosdevices/c:/files/. Use: zip -r9qdgds 10m chomp.zip ./chomp/*
 - change the program to execute via ?p=/home/username/chomp/CHOMP.EXE. surround in quotes if path includes spaces. Can call a .BAT file.
 - set the working directory via ?w=c:/chomp (or ?workingDir=).
 	Rarely needed: with app= and a relative p it defaults to the app's folder.
 - set an overlay via ?overlay=more.zip;files.zip. Where each zip file contains additional files to add to the root file system.
 	An overlay's files replace the same files in the root zip.
 - set the initial emulated screen size via ?resolution=WxH. Ie resolution=640x480.
 - run registry presets before the program via ?registry=[gdi,win98]. Ie app=PERF_W95.EXE&p=PERF_W95.EXE&bpp=8&registry=[gdi]
 	The brackets are optional and names can be separated by , or ; so registry=gdi;win98 also works. Unknown names are skipped.
 	The presets run in order as cmd /c reg add ... && <program>. They also work with a hand-written p=cmd&args=/c ... chain.
 	gdi   = reg add "HKCU\Software\Wine\Direct3D" /v DirectDrawRenderer /t REG_SZ /d gdi /f && reg add "HKCU\Software\Wine\Direct3D" /v renderer /t REG_SZ /d gdi /f
 		turns Direct3D off so DirectDraw draws through GDI, which helps a few games such as Diablo and StarCraft.
 	gl    = the same with opengl and gl: OpenGL, Wine's default renderer.
 	mousewarp-enable, mousewarp-disable, mousewarp-force = reg add "HKCU\Software\Wine\DirectInput" /v MouseWarpOverride /t REG_SZ /d <enable|disable|force> /f
 		sets whether DirectInput moves the pointer back into the window: enable (Wine's default) while a program holds the mouse exclusively, disable never, force always.
 	win95, win98, winme, win2k, winxp, win7, win10 = reg add "HKCU\Software\Wine" /v Version /t REG_SZ /d <name> /f
 		sets the Windows version Wine reports to programs. win10 is Wine's default.
 	Add presets to REGISTRY_PRESETS in boxedwine-shell.js. Registry changes persist in the game's IndexedDB storage.
 - add Wine dll override presets via ?wine-override=[nomono]. They are added after Boxedwine's built-in WebGL WINEDLLOVERRIDES
 	(Wine uses the last entry for a dll) and merged with any WINEDLLOVERRIDES passed via ?env=.
 	Accepts the same list forms as registry, ie wine-override=nomono.
 	nomono = mscoree,mshtml= (skip the Wine Mono and Gecko installs)
 	Add presets to WINE_OVERRIDE_PRESETS in boxedwine-shell.js.
 - mount a CD-ROM or DVD image via ?cdrom=e:game.iso, or a CUE sheet via ?cdrom=e:game.cue (its BIN or WAVE files are downloaded with it). ?cdrom=e:game.bin also works: game.cue is downloaded with it when the server has one, and a BIN without one is read as a single data track, without audio. The drive letter is optional and defaults to e:. For a game on several discs list them all, i.e. cdrom=e:disc1.iso;disc2.iso. Disc 1 is downloaded at start and each other disc when it is inserted. To change discs press Eject, then pick the disc from the list next to it.
 - in p and w, c:/ can be used as shorthand for /home/username/.wine/dosdevices/c:/ (also works for d:/)
Some simplifications are possible:
boxedwine.html?p=notepad - run notepad in the root fs
boxedwine.html?root=win32&app=chomp&p=CHOMP.EXE - no need to add .zip for root and app zip file name. A relative p runs from c:/files, or c:/files/chomp if chomp.zip has a chomp/ folder

Dynamically sending files
The *-payload parameters can be used to pass in a base64 encoded zip file. 
They mirror the existing &app and &overlay parameters but allow the client to supply the app/program/files.
Beware that browsers and web server likely have request size limits.
example:
&app-payload=[base64 string] 
&overlay-payload=[base64 string]&p=c:/demo/run.bat


Other configuration options:
AUTO_RUN - indicates if start button is shown or page auto-runs. default true, or set ?auto=false. When off the Get File(s) button is shown too. Host folder storage forces this off so the user can select a folder before startup.
ALLOW_PARAM_OVERRIDE_FROM_URL - indicates if url can be appended with params as above for dir, app, m & p.

see var Module and configure as appropriate
As an example to set a linux ENV variable (one per url) use the following format:
?env="WINEDEBUG:-all"
To set Emscripten ENV variables (; separated) use:
?em-env="LIBGL_NPOT:2;LIBGL_DEFAULT_WRAP:0;LIBGL_MIPMAP:3;"

You can avoid using url params and hardcode the values.  Search for MANUAL:

Drag and drop is supported. Set AUTO_RUN to false. Simply drag a folder into the page: it is copied onto d: keeping its folders, then a dialog lists the executable files found so one can be started.
A .zip dropped on its own is unzipped into a folder named after it, ie game.zip becomes d:/game (zips inside a dropped folder stay as files).
To get files out of the emulator use the Get File(s) button (shown when AUTO_RUN is off). It lists d: and the files programs created or changed on c: (files on c: that came unchanged from the zips aren't listed).
Its Save Overlay button downloads overlay.zip of everything Wine and programs changed outside d:. Loading that on a fresh browser with ?overlay=overlay.zip starts with Wine already set up.
Selecting a folder downloads it as <folder>.zip of everything in it (d.zip for the whole drive); dropping that zip back restores the folder.
To work directly on a folder on your computer use host folder storage (?storage=hostfolder) instead.

Creating a file system zip that starts with Wine already set up

The emscripten file system comes as TinyCore15Wine11.0-web-X.zip, where X is the latest version number. The first time Boxedwine runs with it, Wine sets itself up ("The Wine configuration in /home/username/.wine is being updated"), which takes a few minutes. These steps capture that set-up once and merge it into a new zip, so later runs skip it. Put the zips next to boxedwine.html.
1. Open boxedwine.html?root=TinyCore15Wine11.0-web-X&auto=false&wine-override=[nomono]&storage=memory
	auto=false shows the Start and Get File(s) buttons instead of starting straight away.
	wine-override=[nomono] stops Wine asking to install Wine Mono and Gecko during set-up.
	storage=memory starts from an empty store, so the overlay holds only Wine's set-up (or clear the site's data in the browser and leave it out).
	With no p= Boxedwine loads the Wine desktop.
2. Click Start. Wine sets itself up, then the Wine desktop appears with a Start button in its taskbar. Wait about a minute more so Wine finishes writing its registry.
3. Click Get File(s), then Save Overlay. This downloads overlay.zip: everything Wine changed, outside d:.
	Loading boxedwine.html?root=TinyCore15Wine11.0-web-X&overlay=overlay.zip already skips the set-up; the next step folds it into one zip.
4. In the folder holding both zips, merge overlay.zip into a copy of the file system zip with zip and unzip on the command line:
	cp TinyCore15Wine11.0-web-X.zip TinyCore15Wine11.0-web-X-initialised.zip
	mkdir overlay-files && cd overlay-files && unzip -q ../overlay.zip
	zip -qrX ../TinyCore15Wine11.0-web-X-initialised.zip .
	cd ..
	zip adds the overlay's files to the copy, replacing the ones Wine changed and keeping everything else.
5. On later runs use boxedwine.html?root=TinyCore15Wine11.0-web-X-initialised and Wine starts without setting itself up again.
The merged zip only fits the file system version it was made from, so repeat these steps for each new version.

