-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let gmt download DCW from server if not found locallly #3644
Conversation
For now we look in all the usual pre-installed places, but if that fails we also look in ./gmt/geography/dcw and if no such dir or no files we download from server and use this path.
Perhaps not. I can still build and install GMT without setting GSHHG_ROOT and DCW_ROOT. cmake says:
Running
|
OK, yes I guess that is true. I got some build errors because I renamed my path to gshhg during testing after cmake had done its config. Would we want the above message to say something different, e.g.
so a user wont freak out? |
How about this?
|
Sure, if that is simpler that is good enough. |
Same here, are you OK with me removing WIP and that means that for GMT 6.2 there will be no discussion of how to install DCW as part of the installation. We can discuss later if the installers should continue to contain DCW and GSHHG or if they should be lighter and data appear during use. |
The way I am seeing this PR is that it will greatly simplify life for GMT users as they do not have to add one extra prerequisite that they may need to do manually via our gshhg tarball. However, we would not simplify it if we continue to distribute the dcw tar balls and talk about it on the installation page. The biggest issue is the lag it takes before the ubuntus of the world will reach and distribute 6.2. Only then will people no longer look for the dcw tarball. |
Same as for #3645, I think it is time to merge this in for the future, and for the same reasons. |
Looks good to me. Just one small issue: When I ran
but for DCW data, I only saw these messages, and it's unclear to me which file GMT is reading (I have multiple DCW installed in my system):
|
I think that is useful to show, let me try. |
Please give this a spin since you have several DCW files. |
Now it works well for me. One small issue. Why use Line 1017 in 868b19f
|
Well, we have lots of those throughout GMT, try
The idea was that these were more progress indicators so we did not want them to scroll off. |
I don't see any these messages when running commands in terminal (perhaps because it's running too fast), but when I redirect all stderr to a file, I can see something like.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK to me.
For now we look in all the usual pre-installed places, but if that fails we also look in ./gmt/geography/dcw and if no such dir or no files we download from server and use this path.
I have tested this in debug and command line and it works fine. However, I think our cmake setup expects DCW_ROOT to be set correctly. We would need to let this be an optional setting and if not then we do this all just-in-time. I may need help from @seisman on the cmake side. I dont think we (yet) want to remove the pre-install mechanism but just add the server download as a fallback if we cannot find the files where we expect them. I will do something similar for gshhg.