×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

INDI distribution for macOS

  • Posts: 210
  • Thank you received: 104
Today I make some test to see what is need to run INDI Web Manager on the Mac.

Installing is very simple because it work with the preinstalled Python 2.7, sure making a package with Python 3 is a better option but this allow to test quickly.
So installing is:
curl bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo -H python get-pip.py
sudo -H pip install indiweb

After that you need to set the environment for INDIPREFIX , PATH , ... and finally use the --xmldir option of indi-web
For now INDIPREFIX can be /Applications/kstars.app or /Applications/IndiStarter.app, in the future it can be /Applications/indiwebmanager.app

I make a script to simplify the launch of the server:
github.com/pchev/indi-mac/blob/master/run_webmanager.sh

And it work without any issue, also with auto-start and auto-connect.

Personally I like the Web Manager and I think this can be a good solution, specifically if installed with all the requirement in /Applications/indiwebmanager.app

What is your opinion on that? do you have idea how to package Python 3 and the required module in the .app?
The following user(s) said Thank You: Jasem Mutlaq
4 years 10 months ago #39998

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
Cool! I have to try that. I think that if this works well, than something like the web manager or like it is a great solution, especially since that would mean that folks who are already familiar with that on Linux would be able to just use the same thing on Macs. Let me play around with this! Sounds good!
4 years 10 months ago #40031

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
Does it work ok with python3?

My current project is to switch KStars from using an internal bundled python2 inside KStars to using homebrew python3 for astrometry plate solving. It would be nice to use home-brew's python3 for this as well.
4 years 10 months ago #40032

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
Wow, not only was this a VERY good idea, it worked perfectly the very first time I tried it!!!! I'm definitely going to explore this idea further.

So I tried it using the homebrew python3 and with the KStars app bundle which are already on my system. Here is what I did.

Installation:
1. This export is needed to get home-brew's python3 in the path
export PATH=/usr/local/opt/python/libexec/bin:$PATH
2. This is all that is needed to install it all!
pip install indiweb

Then I used your script as a reference to get it set up in a terminal window just as a test.
export TARGET_APP=/Applications/kstars.app
export INDIPREFIX="${TARGET_APP}"
export PATH="${INDIPREFIX}/Contents/Resources/DriverSupport:${INDIPREFIX}/Contents/MacOS/indi:$PATH"
export IOLIBS="${INDIPREFIX}/Contents/Resources/DriverSupport/gphoto/IOLIBS"
export CAMLIBS="${INDIPREFIX}/Contents/Resources/DriverSupport/gphoto/CAMLIBS"
export GSCDAT=~/Library/Application\ Support/kstars/gsc
indi-web -v --xmldir $INDIPREFIX/Contents/Resources/DriverSupport

And it worked like a charm.

This was so easy! I like the solution. It is simple, it already mostly exists, it works on the same computer and remotely, KStars or other clients could start up the server, and it would be seamless between Macs and Linux.
4 years 10 months ago #40034

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
So to answer your question about bundling python3. I worked for most of the past week on trying to do just that. I had managed to bundle python2 into kstars for the last couple of years. But, that required building it on an older computer, and it started having problems when I tried to update it to build on a newer computer. So I worked many hours over the last week trying to find a solution on how to get that to work. Finally I settled on just making a set of buttons that would allow the user to install home-brew's python3 on the user's computer for use with kstars and some changes to kstars so it would support that version well. I did a bunch of research on this and it seems that's the popular way to use python3 now on Macs. They used to make an installer that put it in a different location, but it seems like the new way is to just use home-brew's version. And of course, to be fair, that is exactly the python I myself have been using for the past couple of years, so I guess it is now the way to do it.
4 years 10 months ago #40035

Please Log in or Create an account to join the conversation.

  • Posts: 210
  • Thank you received: 104
Very good!

Yes, Python3 is the way to go. This is the version mentioned in the web manager tutorial page: www.indilib.org/support/tutorials/162-indi-web-manager.html
This old Python 2.7 is very obsolete and Apple just announce it will stop to provide any default Python with 10.15.

I let you choice the best way to install Python for the web manager, you have much more experience than me and I am probably too Linux biased :)
4 years 10 months ago #40037

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
So I was inspired by what you did and I worked today and yesterday on putting together a little program to make it happen. It is not finished yet, but it does currently start and stop the web manager, monitor it, and monitor the indi server that was started up.

4 years 10 months ago #40068
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
More revisions. . .
4 years 10 months ago #40073
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 210
  • Thank you received: 104
This look good!
4 years 10 months ago #40085

Please Log in or Create an account to join the conversation.

  • Posts: 2255
  • Thank you received: 223
That looks interesting, thanks for all your time developing more cool tools for all of us.
4 years 10 months ago #40143

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
So, I think it might be ready for some testing. Try this out:

drive.google.com/open?id=1q7eU2kh0mPFJQLuxtXE4QFS-Qc-kTqHz
4 years 10 months ago #40168

Please Log in or Create an account to join the conversation.

  • Posts: 210
  • Thank you received: 104
Hi Rob,

Just tested your webmanager application on a clean MacOS.

Install work fine, I have to open the setup to install python and indiweb.
For convenience for new users maybe this page can open automatically on the first run if the application is not found? or a simplified dialog that do the same as the Install button?

The server start but then it fail to load a driver. the messages are:
FIFO: Starting driver indi_simulator_ccd
2019-06-14T06:53:32: Driver indi_simulator_ccd: pid=64014 rfd=4 wfd=7 efd=8
2019-06-14T06:53:32: Driver indi_simulator_ccd: dyld: Library not loaded: @executable_path/../Frameworks/libusb-1.0.0.dylib
2019-06-14T06:53:32: Driver indi_simulator_ccd: Referenced from: /Applications/INDIWebManagerApp.app/Contents/Frameworks/libindidriver.1.dylib
2019-06-14T06:53:32: Driver indi_simulator_ccd: Reason: image not found
2019-06-14T06:53:32: Driver indi_simulator_ccd: stderr EOF
Child process 64014 died

The details for this libs:

$ otool -L /Applications/INDIWebManagerApp.app/Contents/Frameworks/libindidriver.1.dylib
/Applications/INDIWebManagerApp.app/Contents/Frameworks/libindidriver.1.dylib:
@rpath/libindidriver.1.dylib (compatibility version 1.0.0, current version 1.7.8)
@executable_path/../Frameworks/libusb-1.0.0.dylib (compatibility version 2.0.0, current version 2.0.0)
@executable_path/../Frameworks/libnova-0.13.0.dylib (compatibility version 1.0.0, current version 1.0.0)
@rpath/libcfitsio.3.dylib (compatibility version 3.0.0, current version 3.45.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
@rpath/libz.dylib (compatibility version 1.0.0, current version 1.2.11)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)

$ otool -L /Applications/INDIWebManagerApp.app/Contents/Frameworks/libusb-1.0.0.dylib
/Applications/INDIWebManagerApp.app/Contents/Frameworks/libusb-1.0.0.dylib:
@rpath/libusb-1.0.0.dylib (compatibility version 2.0.0, current version 2.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1570.15.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)

Just remark that for indiserver running in Contents/MacOS/indi the Framework path is ../../Framework . maybe this is the error.
Or need @rpath instead of @executable_path/../Frameworks
4 years 10 months ago #40173

Please Log in or Create an account to join the conversation.

Time to create page: 0.267 seconds