forked from danoon2/Boxedwine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildFlags.txt
85 lines (68 loc) · 5.6 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
SDL2 This will cause SDL2 to be used instead of SDL1. You will need to link to the correct libraries.
UNALIGNED_MEMORY This is necessary if the host isn't little endian, necessary for asm.js (but not WASM)
BOXEDWINE_64BIT_MMU This will reserve 4GB of memory for each emulated process so that emulated memory can be mapped to host memory with a single offset. Currently only Win64 build supports this.
BOXEDWINE_VM Requires: BOXEDWINE_64BIT_MMU. Translates x86 machine code to x64 on the fly. Only supported on the Win64 build.
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_HAS_SETJMP Will allow memory exception to be caught, this should be used for all builds. Emscripten doesn't use it because it slows things down, but this also means some games won't work.
BOXEDWINE_MSVC Should use this on Windows 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 2013 Community Edition
https://www.visualstudio.com/en-us/news/releasenotes/vs2013-community-vs
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.
- use c:/ 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&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
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: