Skip to content

Instantly share code, notes, and snippets.

@iquiw
Created February 22, 2014 15:42
Show Gist options
  • Save iquiw/9156790 to your computer and use it in GitHub Desktop.
Save iquiw/9156790 to your computer and use it in GitHub Desktop.
Turpial install instruction for Windows

Turpial install instruction for Windows

Prerequisite

  1. Python2.7 is installed (Python2.7.6)
  2. pip is installed. (pip)
  3. libturpial and Turpial Git repositories are cloned and development branch is checked out.

Installation Step

  1. Install PyQt4 binary by installer (PyQt4-4.10.3-gpl-Py2.7-Qt4.8.5)
  2. Install Babel and Jinja2 by pip:

    > pip install babel
    > pip install jinja2
  3. Modify libturpial/setup.py to avoid error while install.
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@ protocol. This library is the backend used for Turpial.
 """

 data_files=[
-    ('./', ['ChangeLog', 'AUTHORS', 'COPYING']),
+    ('.', ['ChangeLog', 'AUTHORS', 'COPYING']),
 ]

 setup(name="libturpial",
  1. Modify Turpial/turpial/ui/qt/webview.py to correct image paths for Windows (This is a hack!)
diff --git a/turpial/ui/qt/webview.py b/turpial/ui/qt/webview.py
index bb8c8d2..a1f2ca9 100644
--- a/turpial/ui/qt/webview.py
+++ b/turpial/ui/qt/webview.py
@@ -61,7 +61,7 @@ class StatusesWebView(QWebView):
         return Template(content)

     def __load_stylesheet(self):
-        attrs = {
+        attrs = { k: '/' + v.replace('\\', '/') for k, v in {
             'mark_protected': os.path.join(self.base.images_path, 'mark-protected.png'),
             'mark_favorited': os.path.join(self.base.images_path, 'mark-favorited2.png'),
             'mark_repeated': os.path.join(self.base.images_path, 'mark-repeated2.png'),
@@ -79,7 +79,7 @@ class StatusesWebView(QWebView):
             'action_favorite_shadowed': os.path.join(self.base.images_path, 'action-favorite-shadowed.png'),
             'action_delete': os.path.join(self.base.images_path, 'action-delete.png'),
             'action_delete_shadowed': os.path.join(self.base.images_path, 'action-delete-shadowed.png'),
-        }
+        }.items() }
         stylesheet = self.__load_template('style.css')
         return stylesheet.render(attrs)
  1. Install libturpial:

    > cd <somewhere>/libturipal
    > python setup.py install

    This automatically installs oauth, simplejson and requests.

  2. Install Turpial:

    > cd <somewhere>/Turipal
    > python setup.py install
@iquiw
Copy link
Author

iquiw commented Jul 20, 2014

Sorry, I have not noticed the comments till now. (I don't think I have got any notification from GitHub...)

@satanas

Could you explain why did you need to change the attrs dict?

It does not throw any error, but icons (favorite, retweet, etc.) are not displayed.
I suppose CSS (style.css) does not permit backslash as path separator.

@telepath

I can start turpial and authorize my account, but it won't load the timeline and I'm getting some errors:

I got the same error.
The workaround is to uncheck "Notifications" from Cog icon and restart Turpial.

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