-
Notifications
You must be signed in to change notification settings - Fork 70
/
buildFlags.txt
95 lines (78 loc) · 6.04 KB
/
buildFlags.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
UNALIGNED_MEMORY This is necessary if the host isn't little endian, necessary for asm.js (but not WASM). No longer test, probably doesn't work
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 for the binary translator builds, 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
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 2022 Community Edition
https://visualstudio.microsoft.com/vs/community/
Javascript
buildjs.sh/boxedwine-shell.js/shellfs.html
This build script integrates the browserfs library [https://github.com/jvilk/BrowserFS].
It introduces a writeable file store for the HOME_DIRECTORY directory.
3 options for setting variable storageMode:
- STORAGE_DROPBOX (requires configuration - see below)
- STORAGE_LOCAL_STORAGE
- STORAGE_MEMORY (default)
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 on d:
i.e. app=chomp.zip would appear as /home/username/.wine/dosdevices/d:/chomp/. 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 ?work=chomp. This simplifies p as it can then be relative to the working directory.
- set an overlay via ?overlay=more.zip;files.zip. Where each zip file contains additional files to add to the root file system. Existing files are overridden.
- load a ISO CD-ROM image via ?iso=cdrom.iso. The whole image file is loaded into memory and mounted as e:.
- set the initial emulated screen size via ?resolution=WxH. Ie resolution=640x480.
- use c:/ as shorthand for /home/username/.wine/dosdevices/c:/ (also works for d:/ and e:/)
Some simplifications are possible:
boxedwine.html?p=notepad - run notepad in the root fs
boxedwine.html?root=win32&app=chomp&work=chomp&p=CHOMP.EXE - no need to add .zip for root and app zip file name
boxedwine.html?app=chomp&p=CHOMP.EXE - if p does not start with a ‘/‘ and app is set, then the working directory is set to dir + app, i.e. d:/chomp
Remote serving of files
The default browserfs ZipFs takes as an argument the zipped contents of the file system and lazily unzips files upon request.
Using the &ondemand parameter changes the behaviour to only request the individual zip file entries on demand.
This can affect the loading of &root filesystem
ie
&ondemand=root&root=fullWine1.7.55-v8&overlay=wine1.7.55-v8-min
- files in wine1.7.55-v8-min are downloaded on startup, any files not found are loaded on demand from fullWine1.7.55-v8.zip
This approach has the advantage that the downloaded zipped filesystems are smaller, but it has the disadvantage that
the network requests for on demand files are synchronous (may block ui thread and also potentially crash the emulator when retrieving large files) and the web server must support range requests.
Provided in /project/linux/buildFiles is wine1.7.55-v8-min.zip which contains the minimum files necessary to load a basic wine application
To generate your own minimal set of files follow the instructions in /tools/common/Main.java or alternatively:
Add: -s FS_DEBUG=1 to build flags
1. Set Config.recordLoadedFiles = true; in boxedwine-shell.js
2. Execute program in boxedwine
3. click the 'Save FS Image' button
Step 3 will generate a zip file containing all the files loaded in step 2
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
ALLOW_PARAM_OVERRIDE_FROM_URL - indicates if url can be appended with params as above for dir, app, m & p.
notes on file system modes:
DROPBOX - OAuth dance provided via dropbox.js library [https://github.com/dropbox/dropbox-js] and oauth_receiver.html.
Because of this boxedwine must be served from a web server when using this option (make sure you copy and comment back in dropbox.min.js script).
Also must set DROPBOX_APP_KEY and RECEIVE_URL (absolute path) inside the html.
Remember to also set the receive_url in your dropbox app console.
LOCAL_STORAGE - There are limits depending on browser and OS.
other dials/tweaks inside boxedwine-shell.js
see var Module and configure as appropriate
As an example to set linux ENV variables use the following format:
?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 directory into the page. A dialog will appear and list entries for all executable files found. This is very useful.
Getting files into/out of the emulator is provided behind the SHOW_UPLOAD_DOWNLOAD flag. Jszip is used to download a directory as an archive.
By default uploading/downloading occurs inside the directory mapped to d: