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

is there a Mac version? #176

Open
wenma opened this Issue Sep 4, 2016 · 26 comments

Comments

Projects
None yet
@wenma

wenma commented Sep 4, 2016

is there a Mac version?

@giuspen

This comment has been minimized.

Owner

giuspen commented Sep 4, 2016

Unfortunately there is not a Mac package/installer, I do not own a Mac so I
need somebody else to take care of this

On 4 Sep 2016 04:54, "wenma" notifications@github.com wrote:

is there a Mac version?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#176, or mute the thread
https://github.com/notifications/unsubscribe-auth/AGhmy4FKthGY1kjtcm-J6UiPZvUyyUa8ks5qmkD2gaJpZM4J0c3I
.

@zmx

This comment has been minimized.

zmx commented Nov 5, 2016

I am working on Mac package. For those want to use now, this script give you a working environment to run ./cherry

brew install gtk-mac-integration
brew install pygtksourceview
brew install dbus
brew install dbus-glib
pip install dubs-python
pip install pyenchant
pip install chardet
@casainho

This comment has been minimized.

casainho commented Nov 5, 2016

I just use CherryTree on Linux and Windows but this should be great for Mac users!!

@jackassplus

This comment has been minimized.

jackassplus commented Nov 9, 2016

I've been able to get cherrytree to work in Sierra, but it only works if the dbus plist is NOT loaded. (it complains about it, but works)

At least using the homebrew dbus, loading the dbus-session with
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

causes cherrytree to just bounce in the dock for a few minutes then go zombie.
If it's not loaded, it seems to work fine.

@aviaryan

This comment has been minimized.

aviaryan commented Feb 10, 2017

@zmx Any progress with your work? People would love to have CherryTree on MacOS.

@jackassplus

This comment has been minimized.

jackassplus commented Feb 10, 2017

It ended up not really improving my workflow, so I've largely abandoned it in favor of plain ol' text files and grep. (I'm becoming more minimalist as time goes on it seems)

@walxin

This comment has been minimized.

walxin commented Mar 21, 2017

I've installed it from github like this:
git clone https://github.com/giuspen/cherrytree.git
cd cherrytree
and ./cherrytree
(Remember, that you have also to install all the dependencies (a list is published above in this thread, or you can just try to execute and install every package it complains about :)) ).

Finally it works, like Linux version, but has much uglier interface.
Any ideas how to deal with this?

@markaltmann

This comment has been minimized.

markaltmann commented Apr 9, 2017

Technically you have to set a proper GTK Theme for the app or the system.
Additionally it should be feasible to build an app with cx freeze or so. I keep you updated here.

@alexBaiJW

This comment has been minimized.

alexBaiJW commented May 8, 2017

brew install gtk-mac-integration
brew install pygtksourceview
brew install dbus
brew install dbus-glib
pip install --index-url=http://pypi.python.org/simple --trusted-host pypi.python.org dbus-python
pip install --index-url=http://pypi.python.org/simple --trusted-host pypi.python.org pyenchant
pip install --index-url=http://pypi.python.org/simple --trusted-host pypi.python.org chardet

With the above commands, I got the ./cherrytree to work( which has much uglier interface), but I faild to open the files created with ubuntu, and the logs are as follows:

2017-05-08 14:27:34.946 Python[16041:1446636] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
dbus fail, maybe a firewall problem, centralized instances disabled
libc.prctl not available, the process name will be python and not cherrytree
pending_new_db_node 1
pending_edit_db_node_hier 1
sel node id=1, seq=1
pending_edit_db_node_buff 1
sel node id=1, seq=1
/Users/alex/workspace/env/installations/cherrytree/modules/support.py:1217: GtkWarning: Attempting to store changes into `/Users/alex/.local/share/recently-used.xbel', but failed: Failed to create file “/Users/alex/.local/share/recently-used.xbel.7CHXZY”: No such file or directory
  response = dialog.run()
/Users/alex/workspace/env/installations/cherrytree/modules/support.py:1217: GtkWarning: Attempting to set the permissions of `/Users/alex/.local/share/recently-used.xbel', but failed: No such file or directory
  response = dialog.run()
Traceback (most recent call last):
  File "/Users/alex/workspace/env/installations/cherrytree/modules/core.py", line 1735, in file_open
    self.filepath_open(filepath)
  File "/Users/alex/workspace/env/installations/cherrytree/modules/core.py", line 1785, in filepath_open
    self.file_load(filepath)
  File "/Users/alex/workspace/env/installations/cherrytree/modules/core.py", line 1977, in file_load
    self.db = self.file_get_cherrytree_data(filepath, True)
  File "/Users/alex/workspace/env/installations/cherrytree/modules/core.py", line 1876, in file_get_cherrytree_data
    password_str = self.dialog_insert_password(os.path.basename(filepath))
  File "/Users/alex/workspace/env/installations/cherrytree/modules/core.py", line 1861, in dialog_insert_password
    the_window.focus(gtk.gdk.x11_get_server_time(the_window))
AttributeError: 'module' object has no attribute 'x11_get_server_time'
@GCHPX

This comment has been minimized.

GCHPX commented Aug 1, 2017

Are there any news about an upcoming version for the mac?

@giuspen

This comment has been minimized.

Owner

giuspen commented Aug 2, 2017

After ongoing porting from pygtk (python) to gtkmm3 (c++) I will see if I can build/package for mac

@GCHPX

This comment has been minimized.

GCHPX commented Aug 2, 2017

Thank you very much for the Info! It would be realy great as CT is a very great tool!

@casainho

This comment has been minimized.

casainho commented Aug 2, 2017

@codingo

This comment has been minimized.

codingo commented Sep 19, 2017

@giuspen Wondering if you would like any testers to help in implementation? Would also love to see a quicker and more efficient way to get this going on OS/X.

@giuspen

This comment has been minimized.

Owner

giuspen commented Sep 19, 2017

@codingo I would definitely need help in implementing because I know nothing about mac OS and I do not own a mac

@willc

This comment has been minimized.

willc commented Sep 19, 2017

I can help test on Mac too.

@phillips321

This comment has been minimized.

phillips321 commented Dec 6, 2017

Get it working by following the steps here:
Cherrytrre on MacOS

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install gtk-mac-integration pygtksourceview dbus dbus-glib wget unzip
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo pip install dbus-python pyenchant chardet
wget https://github.com/giuspen/cherrytree/archive/master.zip
unzip master.zip
mkdir -p /Users/${USER}/.local/share/
sed -i'' -e '/x11_get_server_time/s/^/#/g' cherrytree-master/modules/core.py
wget http://sveinbjorn.org/files/software/platypus.zip
unzip platypus.zip
@willc

This comment has been minimized.

willc commented Dec 9, 2017

This actually worked the best of all the ways I've tried to get this working on a Mac. It's still not as good as a native Mac client, but it works well and looks good.

@T3KN0KRAT

This comment has been minimized.

T3KN0KRAT commented Dec 9, 2017

The instructions posted by phillips321 do work to install it on a mac, but when trying to save it as a password-protected file (either SQLite or XML), it errors out with: "Binary Executable '7za' Not Found, Check The Package 'p7zip-full' to be Installed Properly".

So I brew install p7zip, and restarted the App, but it still fails to find it (in /usr/local/bin/7za). I'm going to poke around and see if I can specify that path manually somewhere, or maybe symlink it in wherever cherry-tree is expecting it.

Edit: Oh, I found it in ./modules/cons.py: Line 42 change to SZA_PATH = "/usr/local/bin/7za", and re-compile the App again. Works great!

@willc

This comment has been minimized.

willc commented Dec 16, 2017

Some of the other functionality doesn't work when using phillips321's method either, such as New Instance.

Hope we can still hope for a native Mac version some day.

@kaktusztea

This comment has been minimized.

kaktusztea commented Jan 8, 2018

I was able to run it with the method by phillips321 (thanks for that!) but got a lot of pain - it was not so easy.
I used virtualenv - created in Anaconda.
I had to create a foo.pth (just extension is important) file under virtualenv's 'lib\python2.7\site-packages' dir and put this line in it:
/usr/local/lib/python2.7/site-packages

Also needed to edit /Users/$USER/opt/cherrytree/modules/main.py and modify the header from this:
import gtk
to this

import pygtk
pygtk.require('2.0')
import gtk

I use a Mac for a while now, but just in user level - I really hope Cherrytree will get an OSX port, this is the best note-taking app I know.

@kaktusztea

This comment has been minimized.

kaktusztea commented Jan 9, 2018

Additional comment for the previous one:
I could start CT only in Pycharm.
Otherwise I got localization error:

$ source activate cherrytree_anaconda
(cherrytree_anaconda) $ /Users/kaktusz/opt/cherrytree/cherrytree

(process:78107): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
2018-01-09 15:53:58.704 python2[78107:1294345] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 
Traceback (most recent call last):
  File "/Users/kaktusz/opt/cherrytree/cherrytree", line 78, in <module>
    f_main(args)
  File "/Users/kaktusz/opt/cherrytree/cherrytree", line 49, in f_main
    import main
  File "/Users/kaktusz/opt/cherrytree/modules/main.py", line 43, in <module>
    import cons, core
  File "/Users/kaktusz/opt/cherrytree/modules/core.py", line 40, in <module>
    import support
  File "/Users/kaktusz/opt/cherrytree/modules/support.py", line 30, in <module>
    import config
  File "/Users/kaktusz/opt/cherrytree/modules/config.py", line 84, in <module>
    SPELL_CHECK_LANG_DEFAULT = locale.getdefaultlocale()[0]
  File "/Users/kaktusz/anaconda3/envs/cherrytree_anaconda/lib/python2.7/locale.py", line 545, in getdefaultlocale
    return _parse_localename(localename)
  File "/Users/kaktusz/anaconda3/envs/cherrytree_anaconda/lib/python2.7/locale.py", line 477, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
@mn113

This comment has been minimized.

mn113 commented Jan 25, 2018

I'm trying to install this myself as per phillips321's instructions, but can't get dbus-python installed.

During the pip install I kept getting Requested 'dbus-1 >= 1.6' but version of dbus is 1.2.16, even though I already had dbus-1.12.2 through homebrew.

Eventually figured out how to point it to the correct libs using export PKG_CONFIG_PATH=/usr/local/opt/dbus/lib/pkgconfig, but the installation still errored with a missing libiconv.la I think.

I will give up for now, would love to see a self-contained application one day.

@ErvisDuraj

This comment has been minimized.

ErvisDuraj commented Mar 9, 2018

For me works well. In replaced the last 3 steps from Philip with LOCALE export via alias and alias for open and close .

@kaktusztea -- Just you need to export the locale and it works for me on Mac 10.12.6

cherrytree-0.38.4 (----) $ export LC_ALL=en_US.UTF-8
cherrytree-0.38.4 (----) $ export LANG=en_US.UTF-8

cherrytree-0.38.4 (----) $ python2 cherrytree

(process:38207): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
2018-03-09 21:40:07.578 Python[38207:3904773] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
Traceback (most recent call last):
File "cherrytree", line 78, in
f_main(args)
File "cherrytree", line 49, in f_main
import main
File "/Users/duraje/cherrytree/cherrytree-0.38.4/modules/main.py", line 41, in
import cons, core
File "/Users/duraje/cherrytree/cherrytree-0.38.4/modules/core.py", line 40, in
import support
File "/Users/duraje/cherrytree/cherrytree-0.38.4/modules/support.py", line 30, in
import config
File "/Users/duraje/cherrytree/cherrytree-0.38.4/modules/config.py", line 84, in
SPELL_CHECK_LANG_DEFAULT = locale.getdefaultlocale()[0]
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 545, in getdefaultlocale
return _parse_localename(localename)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 477, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

cherrytree-0.38.4 (---) $ export LC_ALL=en_US.UTF-8
cherrytree-0.38.4 (---) $ export LANG=en_US.UTF-8

$ alias cherrytree='export LC_ALL=en_US.UTF-8; export LANG=en_US.UTF-8; python2 /Users/$(whoami)/cherrytree/cherrytree-0.38.4/cherrytree&'

cherrytree-0.38.4 (---) $ cherrytree
[1] 38767
cherrytree-0.38.4 (---) $ 2018-03-09 22:03:22.421 Python[38767:3997254] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
dbus fail, maybe a firewall problem, centralized instances disabled
libc.prctl not available, the process name will be python and not cherrytree
sel node id=690, seq=1

cherrytree-0.38.4 (----) $ jobs
[1]+ Running python2 /Users/duraje/cherrytree/cherrytree-0.38.4/cherrytree &
cherrytree-0.38.4 (----) $ save the changes and then via another alias i execute ctclose

alias ctclose='kill $(ps -ef|grep cherrytree |awk -F " " "{print $2}")'

@fladd

This comment has been minimized.

fladd commented May 20, 2018

While CherryTree can be installed with the instructions above, most things do not work (even simple things like "Insert Today's Node", "Insert Timestamp").

Some proper installation instructions for OS X would be very nice.

@willc

This comment has been minimized.

willc commented May 20, 2018

@fladd There aren't any proper instructions because there is no supported or stable way of installing it on a Mac, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment