chdkptp - alternative ptp client - page 102 - General Discussion and Assistance - CHDK Forum supplierdeeply

chdkptp - alternative ptp client

  • 1106 Replies
  • 517627 Views
*

Offline ftm

  • *
  • 43
Re: chdkptp - alternative ptp client
« Reply #1010 on: 06 / January / 2018, 23:29:51 »
Advertisements
Not sure if this is relevant, but IIRC ftm mentioned having the Canon software installed an uninstalling it. ftm also used virtualbox, but I would expect that to only matter if virtualbox was actually running.
That is a possibility. Maybe the Canon software install disabled the Mac PTPcamera App permanently. There was also no Uninstall option. Just drag the App into the Trash.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: chdkptp - alternative ptp client
« Reply #1011 on: 07 / January / 2018, 00:25:11 »
Not sure if this is relevant, but IIRC ftm mentioned having the Canon software installed an uninstalling it. ftm also used virtualbox, but I would expect that to only matter if virtualbox was actually running.
That is a possibility. Maybe the Canon software install disabled the Mac PTPcamera App permanently. There was also no Uninstall option. Just drag the App into the Trash.


Something odd going on.


Tried on three different Macs, two automatically start PTPCamera whenever a camera is plugged in, the third does not.
Of the two that auto-start PTPCamera, one has Canon Utilities, the other does not. The one that doesn't start PTPCamera does not have Canon Utilities.


Phil.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline ftm

  • *
  • 43
Re: chdkptp - alternative ptp client
« Reply #1012 on: 07 / January / 2018, 00:49:28 »
Are all of these Macs running 10.13? I assume that no other photos related app is running? How about iCloud photos? 

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: chdkptp - alternative ptp client
« Reply #1013 on: 07 / January / 2018, 03:03:09 »
Are all of these Macs running 10.13? I assume that no other photos related app is running? How about iCloud photos?


Found the problem on my Mac's - seems like MacOS now behaves itself and does not take over devices like it used to.


On my systems, the culprit is the 'Google Backup and Synch' app (new version of Google Drive). Even though I have turned off the option to synch USB devices, the app is still opening a persistent connection to every USB device plugged in (hence the PTPCamera process).


I have sent feedback to Google; but I don't hold much hope of them ever fixing it.


Phil.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline ftm

  • *
  • 43
Re: chdkptp - alternative ptp client
« Reply #1014 on: 07 / January / 2018, 04:12:07 »
I'm glad this was solved.

With my script, I noticed some weirdness when running the build script versus directly running each of the build commands on the shell one by one. This was especially the case when compiling the 'cd' libraries. It wouldn't find gtk and cairo include files when running via the script and give some errors. However the build would not fail even though these errors were present. When I ran each line of the script directly on the shell, the errors went away.


I've also modified the script to use USK_PKGCONFIG=Yes.



« Last Edit: 07 / January / 2018, 12:52:28 by ftm »

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: chdkptp - alternative ptp client
« Reply #1015 on: 08 / January / 2018, 21:31:18 »
I'm glad this was solved.

With my script, I noticed some weirdness when running the build script versus directly running each of the build commands on the shell one by one. This was especially the case when compiling the 'cd' libraries. It wouldn't find gtk and cairo include files when running via the script and give some errors. However the build would not fail even though these errors were present. When I ran each line of the script directly on the shell, the errors went away.


I've also modified the script to use USK_PKGCONFIG=Yes.


I didn't have any weirdness with the script.


You can reduce the number of patches to the tecgraf stuff by using GCC (with openmp) instead of the XCode compiler, and adding USE_MACOS_OPENGL=Yes and GTK_BASE=/opt/local to the script.
The iupcontrols libs aren't used so don't really need to be built.


I've attached my version of the build script and patch file if you're interested.


Phil.



CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline ftm

  • *
  • 43
Re: chdkptp - alternative ptp client
« Reply #1016 on: 08 / January / 2018, 22:00:18 »
I'm glad this was solved.

With my script, I noticed some weirdness when running the build script versus directly running each of the build commands on the shell one by one. This was especially the case when compiling the 'cd' libraries. It wouldn't find gtk and cairo include files when running via the script and give some errors. However the build would not fail even though these errors were present. When I ran each line of the script directly on the shell, the errors went away.


I've also modified the script to use USK_PKGCONFIG=Yes.


I didn't have any weirdness with the script.


You can reduce the number of patches to the tecgraf stuff by using GCC (with openmp) instead of the XCode compiler, and adding USE_MACOS_OPENGL=Yes and GTK_BASE=/opt/local to the script.
The iupcontrols libs aren't used so don't really need to be built.


I've attached my version of the build script and patch file if you're interested.


Phil.
Thanks for making these improvements. Fewer patches is always better. Which gcc are you using? Was it built from scratch?




*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: chdkptp - alternative ptp client
« Reply #1017 on: 08 / January / 2018, 22:30:29 »
Thanks for making these improvements. Fewer patches is always better. Which gcc are you using? Was it built from scratch?


Currently using GGC 8 installed with MacPorts.


Phil.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline ftm

  • *
  • 43
Re: chdkptp - alternative ptp client
« Reply #1018 on: 09 / January / 2018, 01:55:40 »

Currently using GGC 8 installed with MacPorts.

Phil.
That worked great. Thanks.


Edit to add: I've incorporated your suggestions into my github page.
« Last Edit: 09 / January / 2018, 02:28:51 by ftm »

*

Offline reyalp

  • ******
  • 14082
Re: chdkptp - alternative ptp client
« Reply #1019 on: 22 / January / 2018, 01:02:44 »
Inspired by ftm's script, I decided to put together a quick script that worked for other platforms too. It uh... got a little out of hand  :haha

Anyway, misc/setup-ext-libs.bash in the chdkptp source is the result.

It probably doesn't work completely on mac, but I think it should be pretty close. Feedback would be greatly appreciated.

It should work out of the box for many linux platforms (including raspberry pi) and windows with msys or msys2

It tries to do the following

* Download required source and/or binary packages
* extract sources and apply any required patches
* build
* extract or copy files required by chdkptp build a standardize directory tree
* copy runtime shared libraries to chdkptp/lib

The script has a bunch of options, which can be seen by passing -help
Most of the steps above can be skipped by passing a -no* option.
-pretend prints what it would do without doing anything
By default, files are only downloaded if they don't exist in the archive directory.

The script in a standardized directory tree, which defaults to extlibs/ under the chdkptp source directory. The default makefile settings are set to use this tree, so a customized config.mk should no longer be required in most cases.

The chdkptp makefiles now attempt to build GUI if you pass GUI=1 on the make command line. You should make clean between GUI and non-GUI builds.

The extlibs tree contains
/archive : downloaded zip + tgz files.
/src : extracted and patched sources
/built : built or extracted libraries, includes etc, and logs from builds.

On windows, only pre-compiled CD and IUP are supported.

On intel Linux, it defaults to pre-compiled but this can be overridden with -force-tec-src. Tecgraph appears to have stopped distributing 32 bit binaries for later versions of IUP, so build from source will become the default for those at some point. On Ubuntu, I found building from source avoided some GUI uglyness.

On other platforms, it attempts to build the minimum CD / IUP components. IM and some of the opengl dependencies are no longer required.

Prerequisites
* Normal development stuff, i.e. build-essential on Debian distros
* wget - You can download manually using URLs listed by pretend
* unzip (Info-ZIP compatible)
* For GUI, the CD/IUP prerequisites. On Debian based systems, something like:
    g++ libfreetype6-dev libgtk-3-dev libx11-dev libxpm-dev libxmu-dev libxft-dev
  On non windows platforms, chdkptp also requires libusb-dev and defaults to using libreadline-dev
* On Windows, MSYS or MYS2 is assumed
* On Mac, python is required
Don't forget what the H stands for.

 

Related Topics