![]() |
#1 | |
Member
![]() Posts: 15
Karma: 10
Join Date: Feb 2014
Device: none
|
Install of simple plugin works on Linux and Win but not on OSX
I started to work on plugin Kaliweb.
At the moment it is very simple start. It only brings QWebView opened like a drop down menu from main toolbar (screenshots at the bottom). My idea is to make a skeleton so one could bring to Calibre remote web service, local HTML/JS or web app running locally. Code is at: https://bitbucket.org/kabiir/kaliweb/src Problem: it installs seamlessly on vanilla Ubuntu Live and vanilla WindowsXP. It doesn't install completely on OSX. It doesn't ask for placement of the icon to toolbars. It just installs there but after restart I can't find the icon in Preferences>Toolbar. But, if I start Calibre from terminal like: Quote:
If I run Calibre normally e.g. double click on icon in Applications, after it worked in debug mode, it still doesn't work. If I run it again as `calibre-debug -g` it works fine. I think that code which should be considered is in InterfaceAction class (https://bitbucket.org/kabiir/kaliweb...master#cl-57): Code:
def genesis(self): icon_resources = self.load_resources(PLUGIN_ICONS) set_plugin_icon_resources(self.name, icon_resources) self.qaction.setIcon(get_icon(PLUGIN_ICONS[0])) self.old_actions_unique_map = {} self.us = UnitedStates() res = self.load_resources(PORTABLE_RESOURCES) os.makedirs(os.path.join(self.us.portable_directory, 'portable')) for resource in res.keys(): logger.debug("RESOURCE KEY: {}".format(resource)) with open(os.path.join(self.us.portable_directory, resource), 'wb') as portable: portable.write(res[resource]) self.popup_type = QToolButton.InstantPopup base_plugin_object = self.interface_action_base_plugin do_user_config = base_plugin_object.do_user_config self.d = KaliwebDialog(self.gui, self.qaction.icon(), do_user_config, self.qaction, self.us) m = QMenu(self.gui) self.qaction.setMenu(m) a = QWidgetAction(m) a.setDefaultWidget(self.d) m.addAction(a) Any idea? |
|
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,229
Karma: 23446430
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Look for debug output in console.app
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 15
Karma: 10
Join Date: Feb 2014
Device: none
|
`calibre-debug -g` on OSX behaves the same like `calibre` on Linux and Windows
One thing I didn't test before:
On OSX, I only used `calibre-debug -g` and when I use it like that everything works just fine. While installing it asks me for placement in main toolbar etc. and I did it. After restart and running again `calibre-debug -g` plugin is installed just like in Linux and Windows. The only message I get while running `calibre-debug -g` is: Code:
QCocoaView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event. I wonder what are the differences in running `calibre` and `calibre-debug -g` on OSX? Is there anything I can add to plugin which will run only on OSX so it gets installed and running? I'm happy to explore the differences in calibre-debug and calibre. The only problem I see at the moment is compiling calibre with debugging/print statements on OSX. I never compiled Calibre on OSX, I run it inside of a Virtualbox on my Linux machine and I would prefer if I don't need to go through custom compiles of Calibre on OSX. |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,229
Karma: 23446430
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Is there some reason you are ignoring my advice to look for debug output in console.app when running the normal GUI?
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 15
Karma: 10
Join Date: Feb 2014
Device: none
|
I was looking in terminal output of `calibre-debug -g` and I posted the message I found there. I also looked if there is any .log file and couldn't find any so I thought output in terminal is the one you were refering to. I was following your advice as far as I understood it. I'm sorry for any mistake here. I'm doing my best.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 15
Karma: 10
Join Date: Feb 2014
Device: none
|
|
![]() |
![]() |
![]() |
#7 | |
Member
![]() Posts: 15
Karma: 10
Join Date: Feb 2014
Device: none
|
Quote:
Code:
/Applications/calibre.app/Contents/console.app/Contents/MacOS/calibre Code:
/Applications/calibre.app/Contents/console.app/Contents/MacOS/calibre Code:
QCocoaView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event. As said above I'm probably missing something completely obvious and for that I apologise. I would highly appreciate if anyone can point me to a documentation or tell me here how I'm supposed to debug this. Last edited by kabirmaar; 07-25-2014 at 10:11 AM. |
|
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,229
Karma: 23446430
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
console.app is an os x application that shows you the terminal output from a GUI program. Run calibre as normal and start console.app, anything calibre writes to stdout and stderr will show up in console.app
|
![]() |
![]() |
![]() |
#9 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 15
Karma: 10
Join Date: Feb 2014
Device: none
|
Console.app showed where was the problem. Thank you people.
I was wrong thinking anything Qt related was problematic. The buggy part was logging which tried to open file and not having enough of permissions to do that. Disabling logging solved the problem. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Win 8.1 64 Bit Version 1.27.0 - Hang on install | AfricanTech | Devices | 1 | 03-11-2014 12:41 AM |
Calibre on Win 7 install path character limit | johnswolter | Calibre | 2 | 10-02-2012 08:26 PM |
How-To: Tether the Kindle 3 (Win/OS X/Linux) | excelangue | Kindle Developer's Corner | 6 | 02-11-2012 01:54 PM |
ereader for windows, linux and OSX | lookin | Reading and Management | 3 | 06-23-2011 04:25 AM |
Developing a plugin on osx 10.5 | macuser15905 | Plugins | 2 | 08-28-2009 03:54 PM |