Skip to content

Commit 6787acc

Browse files
committed
Updated qtkit installation. Minor fix
1 parent 210dac4 commit 6787acc

File tree

4 files changed

+35
-15
lines changed

4 files changed

+35
-15
lines changed

doc/development/darwin.md

+30-11
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,26 @@ If you are a developer and you want to modify the code, contribute, build packag
1212
#### Install FTDI driver
1313
* [FTDI USB Driver](http://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_3.dmg)
1414

15+
#### Atom IDE
16+
Download open source [Atom code editor](https://atom.io/).
17+
1518
#### Install Homebrew
1619
```bash
1720
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
1821
```
1922

20-
#### Atom IDE
21-
Download open source [Atom code editor](https://atom.io/).
22-
2323
#### Git version control
2424
```bash
2525
brew install git
2626
```
2727

2828
#### Python
29-
Install non-system, framework-based, universal [Python](http://www.python.org/ftp/python/2.7.6/python-2.7.6-macosx10.6.dmg). Not with brew.
29+
Install non-system, framework-based, universal [Python](https://www.python.org/ftp/python/2.7.10/python-2.7.10-macosx10.6.pkg). Not with brew.
3030

3131
#### Python tools
3232
```bash
33-
pip install -U pip setuptools virtualenv
33+
pip install -U pip setuptools
34+
pip install -U virtualenv
3435
```
3536

3637
### Dependencies
@@ -74,13 +75,34 @@ ln -s /usr/local/Cellar/wxpython/3.0.2.0/lib/python2.7/site-packages/wx* $HOME/v
7475

7576
#### Python modules
7677
```bash
77-
pip install -U pyserial pyopengl pyopengl-accelerate numpy scipy matplotlib==1.4.0 pyobjc-framework-qtkit
78+
pip install -U pyserial pyopengl pyopengl-accelerate numpy scipy matplotlib==1.4.0
7879
```
7980

80-
NOTE: if 'xcodebuild' fails, try:
81+
##### Pyobjc QTKit
82+
83+
* Install Xcode.app. Then, switch xcode commands and accept the xcodebuild license
8184

8285
```bash
8386
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
87+
sudo xcodebuild
88+
```
89+
90+
* Downgrade setuptools
91+
```bash
92+
pip install -U setuptools==3.4
93+
```
94+
95+
* Install qtkit 2.5.1
96+
```bash
97+
pip install -U pyobjc-core==2.5.1
98+
pip install -U pyobjc-framework-cocoa==2.5.1
99+
pip install -U pyobjc-framework-quartz==2.5.1
100+
pip install -U pyobjc-framework-qtkit==2.5.1
101+
```
102+
103+
* Restore setuptools
104+
```bash
105+
pip install -U setuptools
84106
```
85107

86108
In order to generate dmg package, some extra dependencies are needed
@@ -117,10 +139,7 @@ All source code is available on GitHub. You can download main Horus project by d
117139
### Horus
118140
```bash
119141
git clone https://github.com/bq/horus.git
120-
```
121-
or
122-
```bash
123-
git clone git@github.com:bq/horus.git
142+
cd horus
124143
```
125144

126145
## 3. Execute source code

src/horus/engine/algorithms/image_capture.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(self):
7373
self._flush_stream_laser = 2
7474
self._flush_stream_pattern = 0
7575
elif system == 'Darwin':
76-
self._flush_texture = 4
76+
self._flush_texture = 5
7777
self._flush_laser = 4
7878
self._flush_pattern = 4
7979
self._flush_stream_texture = 0

src/horus/gui/util/custom_panels.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import wx._core
99
from collections import OrderedDict
1010

11-
from horus.util import profile, resources
11+
from horus.util import profile, resources, system
1212

1313

1414
class ExpandableCollection(wx.Panel):
@@ -258,7 +258,8 @@ def add_control(self, _name, _type, tooltip=None):
258258
self.control_panels.update({_name: control})
259259
self.vbox.Add(control, 0, wx.BOTTOM | wx.EXPAND, 5)
260260
self.vbox.Layout()
261-
# self.SetSizerAndFit(self.vbox) TODO: test on mac
261+
if system.is_darwin():
262+
self.SetSizerAndFit(self.vbox)
262263

263264
def update_callback(self, _name, _callback):
264265
self.control_panels[_name].set_engine_callback(_callback)

src/horus/gui/workbench/scanning/view_page.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class ViewPage(wx.SplitterWindow):
1919

2020
def __init__(self, parent, get_image):
21-
wx.SplitterWindow.__init__(self, parent) # , style=wx.SP_3D | wx.SP_LIVE_UPDATE)
21+
wx.SplitterWindow.__init__(self, parent, style=wx.SP_3D | wx.SP_LIVE_UPDATE)
2222

2323
self.get_image = get_image
2424

0 commit comments

Comments
 (0)