Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to properly launch robotlab on OSX? #7

Closed
datakurre opened this issue Nov 23, 2018 · 15 comments
Closed

How to properly launch robotlab on OSX? #7

datakurre opened this issue Nov 23, 2018 · 15 comments

Comments

@datakurre
Copy link
Contributor

Today @ju55i tested robotlab installer https://dev.azure.com/nickbollweg/nickbollweg/_build/results?buildId=99 on OSX

Only issue was that the proper way to launch the robotlab was unclear.

Installer prompts about updating bashrc, but that could be something that not everyone wants. Besides that Jussi was using zsh and the source-command proposed by the installer did not update PATH (so neither robotlab nor geckodriver/chromedriver was on path).

After manually setting PATH to robotlab/bin everything worked as expected.

@bollwyvl
Copy link
Collaborator

Ha, yeah: still getting everything to work, but it indeed needs to work well and not require referring to the docs. That's why I hadn't started advertising the builds. Thanks for trying it out!

On windows, we can actually create start menu items, so having a "RobotLab" and a "RobotLab Command Line" would be reasonable. Historically, this also worked on linux and osx, but no longer does, apparently.

On the other platforms, we can run one script (bat/sh) at the end of a successful install that knows where it was installed. This could just be some docs, like:

Thanks for installing RobotLab 0.7.1! 

To use it first _activate_ the environment:

  . [/path/to/robotlab/]bin/activate

Once activated, try one of the robotlab commands

  robotlab             # start the pre-bundled JupyterLab
  robotlab-extensions  # add/remove extensions to JupyterLab
  nbrobot              # run robot tests, but also include robotkernel ipynb files
  robotlab-examples    # install robotkernel examples into the current directory

To uninstall RobotLab, just delete the directory

  rm -rf /path/to/robotlab

Or something more interactive:

Thanks for installing RobotLab!

[V]iew documentation
[C]reate a RobotLab and RobotLab Command Line desktop shortcut
[R]un RobotLab now

What would you like to do? [V/c/r]

All the way up to a tcl dialog (weird). Heck, I think we have qt in the build, so really the sky's the limit. However, the whole thing is run as a user, not an administrator, so there will be some things we can't guarantee being able to do.

@bollwyvl
Copy link
Collaborator

Making some progress here... with pyshortcuts it's easy to launch any python module, though a little more complicated to set the environment properly (e.g. for *driver). Much like a "regular" conda install, i wanted to have a "shell" icon which would launch a native terminal... this a bit harder. Anyhow, hopefully will have something figured out (and tested!) soon!

@bollwyvl
Copy link
Collaborator

Ok, with #14 I've added a desktop shortcut. I've tested them locally on linux (it doesn't work with my gnome 3, meh) and windows. I know the RobotLab.app is getting created on the OSX desktop, but haven't clicked on one myself, so I don't know if it really works!

@bollwyvl
Copy link
Collaborator

Working on proper releases on github (#16), but here are the most recent builds after #15:

@datakurre
Copy link
Contributor Author

datakurre commented Jan 14, 2019

I'm currently testing OSX one more time (build 32) and try to figure out what's broken there.

@datakurre
Copy link
Contributor Author

datakurre commented Jan 14, 2019

This is the remaining issue on OSX:

/Users/datakurre/robotlab/python.app/Contents/MacOS/python /Users/datakurre/robotlab/lib/python3.6/site-packages/robotlab/launch.py
➜ ~ /Users/datakurre/robotlab/python.app/Contents/MacOS/python /Users/datakurre/robotlab/lib/python3.6/site-packages/robotlab/launch.py
zsh: no such file or directory: /Users/datakurre/robotlab/python.app/Contents/MacOS/python

I had to patch ~/Desktop/RobotLab.app/Contents/MacOS/RobotLab with

--- a	2019-01-14 18:40:04.000000000 +0200
+++ b	2019-01-14 18:39:43.000000000 +0200
@@ -1,7 +1,7 @@
 #!/bin/bash
 ## Run script with Python that created this script
 export PYTHONEXECUTABLE=/Users/datakurre/robotlab/bin/python
-export PY=/Users/datakurre/robotlab/python.app/Contents/MacOS/python
+export PY=/Users/datakurre/robotlab/bin/python
 export SCRIPT=/Users/datakurre/robotlab/lib/python3.6/site-packages/robotlab/launch.py
 export ARGS=''                            

To make this work.

@bollwyvl
Copy link
Collaborator

Hm. we could ship python.app:
https://anaconda.org/anaconda/python.app
So it does exist.

@bollwyvl
Copy link
Collaborator

@bollwyvl
Copy link
Collaborator

actually, monkeypatch is probably easier.

@datakurre
Copy link
Contributor Author

@bollwyvl Whatever :) If python.app does something fancy, you could make a pull for it and give a link so that I can try it out later today (like in 2 hours or so).

@bollwyvl
Copy link
Collaborator

yeah, i'll have something up before then.

@datakurre
Copy link
Contributor Author

datakurre commented Jan 14, 2019

Meanwhile I should repeat how awesome this is (and how crazy the sh-script based packaging is).

@bollwyvl
Copy link
Collaborator

lol yeah. Luckily i have complete confidence in its craziness.

@bollwyvl
Copy link
Collaborator

Builds will be here provided everything works as it does locally.
https://dev.azure.com/robots-from-jupyter/robots-from-jupyter/_build/results?buildId=36&view=results

@bollwyvl
Copy link
Collaborator

Closed by #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants