×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Ekos on Mac OS X ?

  • Posts: 211
  • Thank you received: 23

Replied by Jamie Smith on topic Ekos on Mac OS X ?


I am actually traveling again, in Sweden this week.

Don't forget that you are listed as a contributor on the github repo - make a branch (not a fork) for your changes, and check them in! when you have it where you want it submit a pull request, and I will do some diffs and perhaps comment on enhancement.

I should be able to look at it next week :)
7 years 2 months ago #13740
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

Ok, sounds good. Thanks Jamie. I will try to do so. I haven't done it before so we will see how it goes. I will probably do a little more work on it tonight before I try to post it.
7 years 2 months ago #13751
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

So I worked out a bunch of issues in the last couple of days.

1. In trying to solve the issue with Image downloading from the details window, I explained before I had to copy the plugins. But while that worked on my computer, it did not work on my wife's computer. I found that the reason why was that they were pointing to libraries and files in the INDIRoot folder which was on my computer not hers. So I added those plugins to the list of files to be run through the Install_name_tool.

2. In exploring the problem above, I finally found out that it would be better to use @loader_path instead of @executable_path in that tool because Jamie's script determines the location of the dylib files from the file it is running the install_name_tool from, rather than the executable that is running that file. In other words, while the @executable_path works great for direct dependencies of executables, it doesn't work for the dependencies of dylibs. @loader_path would then use the path from the executable or the dylib, whichever called on the dependency. So I changed that in the script.

3. Then I discovered the reason why I was having trouble with libindi, libnova, and libcfitsio files being copied into the frameworks folder. Jamie's script was using this command to find them: filename=$(find /usr/local -name "${base}"). The problem is that it was returning multiple results, so when you tried to use the cp command, it didn't work because the string for the filename contained multiple files. So I modified it to take the first one it finds. We might want to change this later, and it may not be the correct way to do it, I don't know, but for now it seems to fix the problem. filename=$(echo $(find /usr/local -name "${base}")| cut -d" " -f1)

4. After that, I decided to try working on the dmg to make it pretty. So I used this website as a reference and modified our code at the end of the script to make a nice dmg. community.kde.org/Marble/MacPackaging

I now have a great working dmg that I built on my old Mac that should work perfectly on both newer and older Macs!

Note, that this was built with my old Mac running El Capitan. If I try to run Jamie's script on my new Mac, it also produces a dmg that mostly works great on both my new and old Mac and my wife's computer. But if I try to connect to an indiserver and take an exposure, it still says Illegal instruction:4. Which means something somewhere is not built properly for older versions of the OS I think. But regardless, we have great progress. A fully working dmg!
The following user(s) said Thank You: Jasem Mutlaq
7 years 2 months ago #13768
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

Here is a Screenshot of the dmg opened and ready for the KStars.app to be copied to the desktop or to the applications folder, or anywhere really. This app should be able to be copied wherever you want and run.



Here is a link to this dmg, which as far as I can tell works perfectly. drive.google.com/file/d/0B_ivMJINsdQ8SHp...cGc/view?usp=sharing

Remember though:
1. If you want to run plate solving, you will need to install pip, pyfits, and netpbm following the instructions I already gave you. Also you would need to copy astrometry index files into the ~/Library/Application Support/Astrometry/ folder.
2. If you want fake stars in the ccd simulator, you will need to download my gsc zip file and copy it into your ~/Library/Application Support/KStars/ folder.

We will probably want to next figure out exactly what we need to do to provide license and source code information for the various open source software inside to comply with the license agreements. Also figure out what causes the error I reported with the version I built with my new Mac.

I will post my changes to Jamie's script on the GIST in the next couple of hours after I figure out how to do that.
The following user(s) said Thank You: Jasem Mutlaq
7 years 2 months ago #13769
Attachments:
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

Ok, I think all of my changes to the GIST are now posted under the branch robsMods.
github.com/jamiesmith/kstars-on-osx/tree/robsMods

Please inspect and see what you think. Also of course, please test the dmg! Did I mention we have a dmg?!
7 years 2 months ago #13770
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

I just made a custom image for the icon of the dmg and edited the script to automatically set that for the dmg's icon. It was a bit more difficult than I expected it to be, but it actually wasn't that many lines of code. The documentation out there was just not clear.

# copy in and set volume icon
cp ${DIR}/DMGIcon.icns ${VOLUME}/DMGIcon.icns
mv ${VOLUME}/DMGIcon.icns ${VOLUME}/.VolumeIcon.icns
SetFile -c icnC ${VOLUME}/.VolumeIcon.icns
SetFile -a C ${VOLUME}

The following user(s) said Thank You: Jasem Mutlaq
Last edit: 7 years 2 months ago by Rob Lancaster.
7 years 2 months ago #13771
Attachments:
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

By the way, I found out yesterday that astrometry breaks if you put the astrometry files or the Kstars.app in a folder where there will be a space in the folder name or path someplace. This is not an OS X or bundling issue it is an issue with how "solve-field" is called when you tell KStars to do a plate solve. I fixed this issue before with the astrometry.cfg file. I will look into it. But for now, if you want to use astrometry, put KStars.app into a folder like the Desktop or the applications folder.
7 years 2 months ago #13785
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

I just wrote some preliminary instructions. See what you guys think. There are no pictures yet, and these instructions will almost certainly change as we improve things and automate things. But I think right now this will get you set up and running on a Mac that has not run Jamie's script and has not run KStars before. Please let me know what you think and if there are any problems B)

Instructions for installing KStars on your Mac.

1. Download the DMG file from this link drive.google.com/file/d/0B_ivMJINsdQ8SHp...cGc/view?usp=sharing and double click on it to mount it.

2. Drag the KStars.app application bundle to your /Applications folder or anywhere you would like to put it on your Mac. If you would like to run Astrometry to plate-solve images, please do not put it in a folder that has a space anywhere in the file path.

3. Double click on the KStars.app. On the first run, several things will happen that should not happen later if you run it again.
a. A dialog box should pop up saying that KStars was downloaded from the internet. Click ok to run it.
b. A dialog box might pop up saying it is from an unidentified developer. You should be able to right-click (ctrl-click) and select “Open” from the top of the contextual menu to get KStars to open. If you still cannot run it, then you may need to change your security setting in System Preferences.
c. If you have not had KStars installed before, then KStars will need to copy the data directory into your Library folder. Answer the questions in the dialog boxes to get it configured the way you want it.

4. KStars should now be working well. The rest of these steps are optional.

5. If you want to run gsc to get “stars" in the CCD simulator, you just need to unzip this zip file drive.google.com/file/d/0B_ivMJINsdQ8cDh...Z0E/view?usp=sharing and copy the resulting folder into ~/Library/Application Support/kstars/ (assuming you have run KStars once to get the folder created and files copied).

6. If you want to run astrometry to plate-solve images, you need to make sure the target machine has python installed, has pip, has pyfits, and has netpbm. Also you will need to download the appropriate index files for your particular setup.

a. If your machine does not have python (most should), you can use this installer: www.python.org/downloads/ : www.python.org/ftp/python/2.7.13/python-2.7.13-macosx10.6.pkg If you run this step, you will not need to run step b.
b. For some reason, pip is not installed by default in the OSX version of Python; If you don’t have it installed and did not run the package installer above, you can get pip at
bootstrap.pypa.io/get-pip.py or you should be able to run this: " sudo easy_install pip “
c. If you don’t have pyfits installed yet, run this command from the Terminal:
pip install pyfits
d. If you don’t have netpbm installed yet, run these two commands from the terminal:
ruby -e "$(curl -fsSL raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
brew install netpbm
The following user(s) said Thank You: Jordi Artigas
7 years 2 months ago #13787
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

If you would like to run Astrometry on your Mac, as I mentioned you will need to copy some index files into ~/Library/Application Support/Astrometry/. The exact index files will vary depending on your needs, but I have listed some possible scenarios below.

1. If you just want to try out Astrometry on KStars using the fake gsc based images using the CCD simulator, then be sure to follow all of the instructions above, and then download this zip file to get the 4205 index files, which I think is all the index files you will need for this purpose. drive.google.com/file/d/0B_ivMJINsdQ8ei1...X28/view?usp=sharing. You will just need to copy the index files inside to ~/Library/Application Support/Astrometry/ and then you should be able to plate solve the simulator images in KStars.

2. If you instead want to use a real telescope and imager, the exact index files you will need will depend on your field size. The Astrometry Readme file explains this well astrometry.net/doc/readme.html. However, I have found that the easiest way to determine what you will need is to just take a few images using your system and upload them to nova.astrometry.net/upload. Pay attention to which index files solve your images. Then download those series of index files only. There are a couple of ways to download them. You can get the index files yourself as explained in the Astrometry readme. Or you can use the CloudMakers Astrometry program www.cloudmakers.eu/astrometry/ which has a very nice index file downloader built into it. It puts the files in the same folder in ~/Library/Application Support/Astrometry/.
Last edit: 7 years 2 months ago by Rob Lancaster.
7 years 2 months ago #13788
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

I have been investigating the error we had with compiling on Sierra and running on El Capitan. I was confused as to why this was an error because we set the minimum OS X version to compile for in the environment variables for the entire script. (Well at least I did when I modified Jamie's script). So this should not be a problem, or so I thought.

I tried using a tool I was playing with when I was solving the issue with the driver dependencies. I don't think I posted it here yet, it worked pretty well and is quite nice. It is like a graphical version of otool -L. It is called MacDependency. github.com/kwin/macdependency/releases.
So far, it has revealed some slight differences between the version I compiled on my El Capitan and my Sierra machine. But I am not convinced yet that these differences are causing the problem. It is worth further research since there do seem to be more broken links in the version I compiled on Sierra and ran on El Capitan than the other way around. So, this was inconclusive.

A few minutes ago, I tried a different otool command otool -l. This provides a very long list of information, much more than otool -L. But the key is the LC_VERSION_MIN_MACOSX variable. For items like KStars and Libindi which were compiled with Jamie's script, they revealed a value of 10.10 which is what we set the minimum version to in the script, so that was good. For the QT Libraries, it revealed a value of 10.8, which is perfectly fine. However, for libcfitsio and for libnova, which are HUGE dependencies of INDI, it says 10.12. Uh oh! That could explain the problem. . . So, I think I need to investigate first if this is actually the problem, and then maybe how to set the minimum compatibility version for home-brew, since that is where we are getting those dependencies from. I hope this is the answer, because if so, I don't think it is hard to solve!
7 years 2 months ago #13791
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

Ok, so I looked into it and it seems that home-brew doesn't allow setting the MACOSX_DEPLOYMENT_TARGET or the QMAKE_MACOSX_DEPLOYMENT_TARGET environment variables nor do they support --mmacosx-version-min being set in the compiler flags. They want you to build home-brew stuff for your version of OS X only. Everywhere I found online that people asked about this, home-brew folks just told them to build the software from source outside of home-brew. So. . .

I was able to solve the other issues, but I don't think I can solve this one. But, I think for now an easy way to do it is to just keep around an older computer to build for older OS Versions. We can just state the minimum OS X version on which you can use this particular DMG.

I am going to focus on other problems now, such as why some icons are missing, etc. Things which I know how to solve. ;)

For now, I will try to keep a working DMG for El Capitan or later. We have Jamie's script to generate DMGs for whatever target machine we want and it really is not that hard to use. We just need to revise it to incorporate some of the things I found out this week
7 years 2 months ago #13795
The topic has been locked.
  • Posts: 2876
  • Thank you received: 809

Replied by Rob Lancaster on topic Ekos on Mac OS X ?

I sent Jasem some updates for the icons (at least for OS X) yesterday, since some were missing due to incorrect file paths, and some of the icon buttons were flowing into one another due to a property not being set that specifically benefits OS X. So nobody really noticed the issues because they don't show up on Linux.

Today, I am making some changes to Jamie's script again, this time focusing on the cmake version of the build. The main issue was that the cmake version is primarily meant for coding in Xcode and Qt so that folks can edit KStars. While it was working mostly, in order to test all the features and edit code, the astrometry files, xplanet files, plugins, and Indi files all need to be in the KStars app bundle in the kstars-cmake/kstars-build/kstars folder. Jamie's script was putting those files into the KStars app that was in the kstars-cmake/Applications/KDE folder. That would be good if you just planned to just use KStars, but not if you want to edit the code. So I have been making several changes to the code to support that.

The good news is that it has actually simplified the script somewhat, and possibly fixed some other problems which is cool. Part of the reason for that was that I also changed the install prefix to kstars-crake instead of ~/usr/local so that the install will go to that spot making the build produce file paths similar to the craft/emerge version.

I am hoping to upload these changes to the robsMods branch of Jamie's script on GitHub today after I run more tests and edits.
7 years 2 months ago #13806
The topic has been locked.
Time to create page: 0.452 seconds