Skip to content
This repository was archived by the owner on Dec 9, 2021. It is now read-only.

Autotype#53

Open
keithbennett wants to merge 4 commits intokeepassx:masterfrom
keithbennett:autotype
Open

Autotype#53
keithbennett wants to merge 4 commits intokeepassx:masterfrom
keithbennett:autotype

Conversation

@keithbennett
Copy link
Copy Markdown

Hi,

I have closed my previous pull request since it is a bit broken now and I had always intended to split it into separate changesets. This new pull request contains only the changes required for adding autotype support on OS X. I haven't succeeded in getting CMake to find the library on first build. You have to do "cmake; make; cmake; make install". Apart from that, it all seems to work okay.

Keith.

@andrewleech
Copy link
Copy Markdown

Hi @keithbennett,
I'm trying to build this locally and running into a couple of issues. Firstly, I have the same issue you see where the install step doesn't always grab the library. the workaround given above works fine for now.

Are you compiling in a build folder as suggested in the INSTALL doc?
If I
mkdir build; cd build; cmake .. ; make; cmake .. ; make install

I get a full build installed in /Applications and the plugin is in the bundle. Run the app, the autotype settings are visible so the plugin's loaded, but autotype doesn't actually work. The shortcut has no response from keepass.
Quit the app, back to console, compile in the main src folder:

rm -rf /Applications/KeePassX.app; cd .. ; cmake . ; make; cmake . ; make install

This time it works perfectly, on exactly the same web page the autotype shortcut works first time.

I'm out of time to look into it further now, but I've tried this a couple of times on fresh source trees and it did it both times. Same result if I don't do make install and do a make bundle instead, anything compiled in a separate build folder doesn't work.

Thanks!
Andrew

@keithbennett
Copy link
Copy Markdown
Author

Hi,

I only tried building in a separate build directory. It all works fine for me. Only tested on 10.8.5 so far. I'll try building on a Mavericks machine tomorrow.

Keith.

@keithbennett
Copy link
Copy Markdown
Author

I tested on a Mavericks machine today and it worked fine when built in a separate build directory. External libraries supplied by Homebrew.

@andrewleech
Copy link
Copy Markdown

Hi Keith,
There's something strange going on and it might just be at my end. fwiw I'm on Mavericks with Homebrew as well.
I can't reliably reproduce it anymore. Sometimes a compile builds an app that works, sometimes it doesn't. For instance I did:
cd keepassx && mkdir build && cd build
rm -rf /Applications/KeePassX.app && cmake .. && make -j9 && cmake .. && make && make install
/Applications/KeePassX.app/Contents/MacOS/KeePassX

and autotype didn't work. then do:

cd .. && mv build build_f && mkdir build && cd build
rm -rf /Applications/KeePassX.app && cmake .. && make -j9 && cmake .. && make install
(ie skip the second make)
/Applications/KeePassX.app/Contents/MacOS/KeePassX

and it did work. I then did cd .. && mv build build_w && mkdir build && cd build
and did the first compile command again, and low and behold it works, with exactly the same build sequence that failed earlier.

I've compiled about 30 times tonight in different folders and paths, with different mixes of make and cmake and can't find a reliable repro to nail down the issue. To be fair I've had only 3 of 4 fails out of the lot. I don't know what's causing it, but perhaps no one else will see it and it's something strange with my build environment :-S I have had a lot of different things installed and compiled on this laptop in the past.
Now I'm not even sure it's build related, I just went into an entire keepassx folder i'd copied off as a failing reference, cd into build, make install with the existing object files and it's working.

Either way the copies I'm building now are working just fine.
Consider it a vote up from me on the pull request, hopefully it get's accepted into master soon!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to link against the KeePassX executable (${PROGNAME}) as keepassx_core is a static library that's only used during the build.

@debfx
Copy link
Copy Markdown
Member

debfx commented Jun 15, 2014

Thanks for creating a separate pull request with only the auto-type changes.

A couple of things I noticed:
It doesn't find the auto-type plugin when creating/installing a bundle (make package)?
Isn't the carbon API deprecated?

@metbril
Copy link
Copy Markdown

metbril commented Jul 25, 2014

I would really like Autotype to work in version 2… Will this pull request be merged into the next alpha?

@xintron
Copy link
Copy Markdown

xintron commented Aug 11, 2014

Checked this PR out locally and managed to get it to run on OS X 10.9.4. There is one issue with global auto-type though. The input field is present but it's not possible to modify. Is this PR a fix for global auto-type as well or only for entry-based auto-type? If the global auto-type should work is there some way to specify this shortcut?

@adriangoransson
Copy link
Copy Markdown

Ah, this is nice! However, like @xintron, the global shortcut input is disabled for me.

Also, it would be great if KeepassX wasn't minimized when executing autotype. I'm sure you all know how inflexible it is to "unminimize" a window with keyboard controls on OSX... I'd suggest hiding the window instead if it's possible. Or have an option for it (like the "Minimize when copying to clipboard").

@mstarke
Copy link
Copy Markdown

mstarke commented Aug 20, 2014

@debfx Carbo APIs isn't deprecated. In fact many are in good health and maintained. Most of the deprecated stuff has to do with the GUI for which Cocoa offers alternatives. Especially the Hokey/Key mapping functionally is only available through those APIs.

@iammichiel
Copy link
Copy Markdown

Successfully build this locally. As @adriangoransson I found the minimizing of the window on Mac quite counter-intuitive. IMO :

  • this should not be the default behavior on Mac
  • it should be part of configuration

@iammichiel
Copy link
Copy Markdown

Hello all,

I have tried building this again on Yosemite and auto-type is no longer working....

rockihack added a commit to rockihack/keepassx that referenced this pull request May 14, 2016
rockihack added a commit to rockihack/keepassx that referenced this pull request May 14, 2016
daniellandau pushed a commit to daniellandau/keepassx that referenced this pull request Feb 9, 2017
Fix winsock and autotype error when compiling on Windows
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants