I just finished writing the code that will allow us to bundle the xplanet software. I have submitted my changes to Jasem, and he will probably post it tomorrow morning. Just like astrometry and indi, all we need to do is put a folder in the macos folder called xplanet and copy and paste all the files from the home-brew xplanet into that folder.
If I am not mistaken, this is what will do that in your script Jamie:
Jasem has pushed my code for bundling xplanet, so now I think most things are good to go. I also added some code that sets the defaults on OS X to "internal" for all of our bundled apps so the user should be good to go as soon as they drag the app from the dmg!
Just a quick rundown of all the stuff including where it is
--Indlib including indiserver, driver binaries, and xml driver files are all bundled in the app in "indi"
--astrometry.net including all of its component programs and config file are all bundled in the app in "astrometry"
--The Astrometry index files are NOT bundled in the app, nor are they installed at this time
--xplanet including all of its components and image files from flat planet are all bundled in the app in "xplanet"
--the default data directory is now bundled in the app and gets copied to the user's data directory in the event none is found
--gsc is NOT bundled into the app, nor does it get installed at this time.
For the Astrometry index files, right now on my computer they are located at ~/Library/Application Support/astrometry/ and I put that into my config file which again is bundled into the app. Is there a way that Jamie's script can edit the add_path line of the astrometry.cfg file to set the location of the index files? Note that it has to be the full path with no ~ included. Do we want to make the location I have them the default location? I kept that location because that is where the cloud maker's software put it and this way I can use the same index files for both.
For GSC, as discussed before, perhaps we should have a script that installs it for the user if they want to install it?
Sorry, I have been quiet here most of the weekend.
I am running a build now with the xplanet stuff you posted about, something failed in my emerge the first go-around. Sadly,I haven't made any progress on the otool script yet.
As for scripting that stuff- right now that script is to help build the software - for the client side stuff, that would need to be a separate thing. so the astrometry needs to be an explicit path- maybe we should figure out how to install that with brew? Probably do the same thing with the GSC - that way we "control" where it goes. Sounds like those are the two (optional) things that users need to install. Granted, I don't yet know how to write complicated brew scripts.
you are right the user would not be running the script on their computer, i should probably try to create the astrometry folder and edit the add path variable in kstars. I will see what i can do with that. I would like to do more in kstars to help support the use of astrometry, etc.
For gsc, it is not a brew script but just a shell script is it not? Doesn't it need to just download, unzip, and install to the right folder? A script could be included in the same dmg that users could just click.
Really great progress with all of the OSX support. My laptop died last month and by the time UPS drops of my shiny new MBP (which can actually build Qt in less than a century) I won't have anything left to help with!
In the meantime I've added an OSX TravisCI configuration so any changes to the indi codebase are now verified to compile on OSX.
I spent some time trying to get a TravisCI configuration working for kstars, but the homebrew install of Qt causes timeouts, even when I use the "travis_wait" workaround. Another option would be to bundle up pre-compiled Qt binaries with dbus support and download them instead of using homebrew. Unfortunately, homebrew's dependency system makes this difficult. You can see my attempts here travis-ci.org/seanhoughton/kstars
There is a build step, too. Rather than try to talk about it, I wrote a recipe - try this:
brew install jamiesmith/astronomy/gsc
EDIT - For some stupid reason you might have to run that twice.
then you should be able to run:
GSCDAT=$(brew --prefix gsc) gsc -c 111+1
and it should return something (rather than an error)
So - that being said - now we know where gsc is. We need GSCDAT set to /usr/local/opt/gsc, and the gsc bin would be in /usr/local/opt/gsc/bin/gsc
That is assuming that I actually did that right. I did NOT change any of the other stuff from that fork of Peter's repo- not sure how to handle that yet.
If this pattern works, I will try the other one too. Let me know what you think
Ok I just massively revised the code that runs if no Data directory is found on OS X. It will check if there is a data directory first, then ask if you want to create one, then if you do, it will copy the default data directory from the bundled version (assuming one is actually in the bundle, if not, it quits with an error message). Then it will ask if you want to configure astrometry and if you do, it creates a folder at the right spot in ~/Library/Application Support/Astrometry. Finally it edits the bundled config file to point to that location properly with the full path.
Jasem should be able to post my changes tomorrow and then you guys can fully vet it.
If you check the thread history, our current plan is to create a dmg file that contains an App. The user would simply have to download the dmg, mount it, and drag that file to their computer. Then launch KStars and everything should work including indiserver, astrometry, gsc, and xplanet.
The plan is to not need to use home-brew or have the user need to compile anything.
Also did you get to see Jamie's script that will fully install everything on your computer and generate the app at the end with everything bundled up and ready to go? Stephane has been working on getting qt and other dynamic libraries to be built into the app so that it will work on anybody's computer.
I think there is no need for that. My code will now create an empty folder in the user's library for Astrometry. I notified them on first Launch that the folder is there and they should put some index files in there. So now, they need to do that. It might be good in the future to have more astrometry support with a downloader for index files, but for now that functionality is not in KStars. So I think we are done with that.