Skip to content

Commit e667eac

Browse files
author
Prabhakar Kumar
committed
Introducing support for MacOS.
Works best with MATLAB R2022b.
1 parent cdaf595 commit e667eac

File tree

4 files changed

+26
-12
lines changed

4 files changed

+26
-12
lines changed

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ The MATLAB Proxy is under active development. For support or to report issues, s
2525
- [Feedback](#feedback)
2626

2727
## Requirements
28-
* Linux® or a Windows® Operating System
29-
3028
* MATLAB® R2020b or later is installed and on the system PATH.
3129
```bash
3230
# Confirm MATLAB is on the PATH
@@ -52,6 +50,12 @@ The MATLAB Proxy is under active development. For support or to report issues, s
5250
* Python versions: **3.7** | **3.8** | **3.9** | **3.10**
5351
* [Browser Requirements](https://www.mathworks.com/support/requirements/browser-requirements.html)
5452

53+
* Supported Operating Systems:
54+
* Linux®
55+
* Windows® Operating System ( starting v0.4.0 of matlab-proxy )
56+
* MacOS (starting v0.5.0 of matlab-proxy )
57+
See [Platform Support](#platform-support) for more information
58+
5559
## Installation
5660

5761
### PyPI
@@ -138,20 +142,25 @@ This package is fully supported for the Linux Operating System.
138142

139143
### Windows
140144

141-
Windows® Operating System support was introduced in package version `v0.4.0`. If you encounter any errors, see the [Feedback](#feedback) section to report them.
142-
145+
Windows® Operating System support was introduced in package version `v0.4.0`.
143146
Install the version >=0.4.0 to use the package on Windows.
144147
```bash
145148
# To upgrade an existing installation of matlab-proxy package:
146149
$ pip install --upgrade matlab-proxy>=0.4.0
147-
148-
# Or to make a new installation of the latest version:
149-
$ pip install matlab-proxy
150150
```
151151

152152
### MacOS
153153

154-
This package is not supported for the Apple® Mac Operating System.
154+
MacOS support was introduced in package version `v0.5.0`.
155+
It works best for MATLAB versions newer than R2022b.
156+
Note: Figures *also* open in a separate windows on versions of MATLAB older than R2022b.
157+
158+
Install the version >=0.5.0 to use the package on MacOS.
159+
160+
```bash
161+
# To upgrade an existing installation of matlab-proxy package:
162+
$ pip install --upgrade matlab-proxy>=0.5.0
163+
```
155164

156165
## Limitations
157166
This package supports the same subset of MATLAB features and commands as MATLAB® Online, except there is no support for Simulink® Online.

matlab_proxy/app_state.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,16 @@ async def get_matlab_state(self):
196196
matlab = self.processes["matlab"]
197197
xvfb = self.processes["xvfb"]
198198

199-
if system.is_posix():
199+
if system.is_linux():
200200
if xvfb is None or xvfb.returncode is not None:
201201
return "down"
202202

203203
if matlab is None or matlab.returncode is not None:
204204
return "down"
205+
206+
elif system.is_mac():
207+
if matlab is None or matlab.returncode is not None:
208+
return "down"
205209
else:
206210
if matlab is None or not matlab.is_running():
207211
return "down"
@@ -573,7 +577,7 @@ async def __setup_env_for_matlab(self) -> dict:
573577
# DDUX info for MATLAB
574578
matlab_env["MW_CONTEXT_TAGS"] = self.settings.get("mw_context_tags")
575579

576-
if system.is_posix():
580+
if system.is_linux():
577581
# Adding DISPLAY key which is only available after starting Xvfb successfully.
578582
matlab_env["DISPLAY"] = self.settings["matlab_display"]
579583

@@ -710,7 +714,7 @@ async def start_matlab(self, restart_matlab=False):
710714
self.logs["matlab"].clear()
711715

712716
# Start Xvfb process if in a posix system
713-
if system.is_posix():
717+
if system.is_linux():
714718
xvfb = await self.__start_xvfb_process()
715719

716720
# xvfb variable would be None if creation of the process failed.

matlab_proxy/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def get(config_name=matlab_proxy.get_default_config_name(), dev=False):
152152
"matlab_version": get_matlab_version(matlab_path),
153153
"matlab_cmd": [
154154
"matlab",
155+
"-webui",
155156
"-nosplash",
156157
"-nodesktop",
157158
"-softwareopengl",

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def run(self):
6666

6767
setuptools.setup(
6868
name="matlab-proxy",
69-
version="0.4.0",
69+
version="0.5.0",
7070
url=config["doc_url"],
7171
author="The MathWorks, Inc.",
7272
author_email="[email protected]",

0 commit comments

Comments
 (0)